From 33dbcf254295ffd77411c733e37019d096365344 Mon Sep 17 00:00:00 2001 From: bhr-sdk-bot Date: Mon, 1 Jun 2026 22:55:49 +0000 Subject: [PATCH] =?UTF-8?q?[auto]=20SDK=20update=20=E2=80=94=20spec=209a39?= =?UTF-8?q?00af040817251293f457c1cfecaf6e6def77?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 10 +- .openapi-generator/FILES | 1045 +- .sdk-update/analysis/breaking-exit | 1 + .sdk-update/analysis/breaking-output.txt | 3524 ++ .sdk-update/analysis/changelog-stderr.log | 0 .sdk-update/analysis/changelog.json | 1 + .sdk-update/analysis/changelog.md | 1961 + .sdk-update/classification.txt | 2 + .sdk-update/metadata.json | 5 + .sdk-update/pr-body.md | 653 + .sdk-update/public.yaml | 24796 +++++++++++++ .sdk-update/since-last-review.txt | 32 + README.md | 822 +- docs/Api/AccountInformationApi.md | 497 +- docs/Api/AlertApi.md | 67 + docs/Api/AlertConfigurationsApi.md | 258 + docs/Api/ApplicantTrackingApi.md | 268 +- docs/Api/BenefitsApi.md | 320 +- docs/Api/CompanyApi.md | 70 + docs/Api/CompanyFilesApi.md | 72 +- docs/Api/CompanyProfileApi.md | 193 + docs/Api/CompensationApi.md | 190 + docs/Api/CompensationBenchmarkingApi.md | 698 + docs/Api/CompensationPlanningApi.md | 1802 + docs/Api/CustomReportsApi.md | 34 +- docs/Api/DatasetsApi.md | 343 +- docs/Api/EmployeeFilesApi.md | 100 +- docs/Api/EmployeeVerificationApi.md | 325 + docs/Api/EmployeesApi.md | 158 +- docs/Api/GoalsApi.md | 482 +- docs/Api/HoursApi.md | 76 +- docs/Api/LastChangeInformationApi.md | 23 +- docs/Api/LocationsApi.md | 335 + docs/Api/LoginApi.md | 38 +- docs/Api/OnboardingApi.md | 769 + docs/Api/PhotosApi.md | 36 +- docs/Api/ReportsApi.md | 54 +- docs/Api/SchedulingApi.md | 869 + docs/Api/TabularDataApi.md | 178 +- docs/Api/TimeOffApi.md | 340 +- docs/Api/TimeTrackingApi.md | 2089 +- docs/Api/TotalRewardsApi.md | 508 + docs/Api/TrainingApi.md | 142 +- docs/Api/WebhookEventsApi.md | 337 + docs/Api/WebhooksApi.md | 175 +- ...A05b6d5f564f805d688ff2c1e37c3990Request.md | 11 + ...Ad7871529b2a9c6612f8dd3c62192c08Request.md | 10 + docs/Model/AddCycleAdminsResponse.md | 10 + .../Model/AddCycleAdminsResponseAddedInner.md | 10 + .../AddCycleAdminsResponseSkippedInner.md | 10 + .../AddNewEmployeeTrainingRecordRequest.md | 15 - docs/Model/AddTotalRewardsEmployeesRequest.md | 9 + docs/Model/AdjustTimeOffBalance.md | 2 +- docs/Model/AdjustTimeTrackingRequestSchema.md | 8 +- docs/Model/AlertTemplateListResponse.md | 9 + .../AlertTemplateListResponseAlertsInner.md | 11 + docs/Model/AlignmentOptionsResponse.md | 9 + ...ntOptionsResponseAlignsWithOptionsInner.md | 10 + docs/Model/ApplicantStatus.md | 15 + docs/Model/ApplicationDetails.md | 31 +- docs/Model/ApplicationDetailsApplicant.md | 11 +- .../ApplicationDetailsAttachmentsInner.md | 11 + docs/Model/ApplicationDetailsJob.md | 8 +- ...tTask.md => ApplicationDetailsJobTitle.md} | 4 +- ...licationDetailsQuestionsAndAnswersInner.md | 5 + docs/Model/ApplicationDetailsStatus.md | 4 +- docs/Model/ApplicationsList.md | 4 +- .../ApplicationsListApplicationsInner.md | 14 + ...icationsListApplicationsInnerApplicant.md} | 4 +- ...> ApplicationsListApplicationsInnerJob.md} | 4 +- ...licationsListApplicationsInnerJobTitle.md} | 5 +- ...pplicationsListApplicationsInnerStatus.md} | 2 +- .../ApplicationsListApplicationsItemsInner.md | 14 - .../AssignEmployeesToBreakPolicyRequest.md | 9 + ...d => AssignTimeOffPoliciesRequestInner.md} | 4 +- docs/Model/AssignedTimeOffPolicy.md | 11 + docs/Model/AssignedTimeOffPolicyV11.md | 11 + docs/Model/AvailableAction.md | 10 + docs/Model/BadRequestV1.md | 9 + docs/Model/BadRequestV1Error.md | 10 + docs/Model/BankHoliday.md | 11 + docs/Model/BenefitCoveragesResponse.md | 9 + ...tCoveragesResponseBenefitCoveragesInner.md | 13 + docs/Model/BenefitDeductionSubType.md | 22 + docs/Model/BenefitDeductionType.md | 22 + ...Forbidden.md => BenefitDeductionTypeId.md} | 3 +- ...st.md => BudgetBreakdownImportResponse.md} | 4 +- docs/Model/BudgetGuidelinesView.md | 13 + docs/Model/BudgetGuidelinesWarnings.md | 10 + ...C79f9c5950f983e59d2626faa30c00a1Request.md | 10 + ...C7c32ed5278ac67e2e518bf7484a75dcRequest.md | 10 + docs/Model/CanCreateGoalsResponse.md | 9 + ...Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md | 10 + docs/Model/ChangedEmployeeIdsResponse.md | 10 + ...hangedEmployeeIdsResponseEmployeesValue.md | 11 + .../Model/ChangedEmployeeTableDataResponse.md | 10 + ...EmployeeTableDataResponseEmployeesValue.md | 10 + ...ataResponseEmployeesValueRowsInnerValue.md | 8 + ...eEmployeesValueRowsInnerValueAnyOfInner.md | 8 + docs/Model/ClockEntrySchema.md | 1 + docs/Model/ClockInRequestSchema.md | 14 +- ...rnalServerError.md => CloseGoalRequest.md} | 4 +- docs/Model/CompanyAlertDataObject.md | 31 + docs/Model/CompanyBenefitSummary.md | 18 + docs/Model/CompanyBenefitsListResponse.md | 9 + docs/Model/CompanyDeletedWebhookPayload.md | 11 + docs/Model/CompanyFileUpdate.md | 6 +- docs/Model/CompanyFilesResponse.md | 9 + .../CompanyFilesResponseCategoriesInner.md | 12 + ...yFilesResponseCategoriesInnerFilesInner.md | 17 + docs/Model/CompanyIndustryDataObject.md | 12 + docs/Model/CompanyInformation.md | 6 +- docs/Model/CompanyInformationAddress.md | 10 +- ...ompanyIntegrationsUpdatedWebhookPayload.md | 11 + ...nyIntegrationsUpdatedWebhookPayloadData.md | 9 + docs/Model/CompanyProfileData.md | 17 + docs/Model/CompanyProfileDataAddress.md | 13 + docs/Model/CompanyProfileIntegrations.md | 9 + docs/Model/CompanyUpdatedWebhookPayload.md | 11 + .../CompensationBenchmarkDetailEmployee.md | 22 + ...ensationBenchmarkDetailEmployeeJobTitle.md | 11 + ...mpensationBenchmarkDetailEmployeeSalary.md | 10 + docs/Model/CompensationBenchmarkDetails.md | 17 + ...ionBenchmarkDetailsBenchmarkValuesInner.md | 20 + ...ompensationBenchmarkJobLocationEmployee.md | 17 + ...ationBenchmarkJobLocationEmployeeSalary.md | 10 + .../CompensationBenchmarkJobLocationPair.md | 14 + ...tionBenchmarkJobLocationPairJobDetails.md} | 4 +- docs/Model/CompensationBenchmarkOverview.md | 14 + .../CompensationBenchmarkOverviewValues.md | 16 + docs/Model/CompensationBenchmarkSource.md | 13 + .../CompensationBenchmarkingColumnMap.md | 10 + docs/Model/CompensationBenchmarksList.md | 12 + .../CompensationEquitySettingsResponse.md | 17 + ...nEquitySettingsResponseCompanyValuation.md | 8 + ...sationEquitySettingsResponseDisclaimers.md | 8 + ...EquitySettingsResponseOutstandingShares.md | 8 + ...tionEquitySettingsResponsePricePerShare.md | 8 + ...ensationEquitySettingsResponseSliderMin.md | 8 + ...EquitySettingsResponseVestingConditions.md | 8 + ...CompensationEquitySettingsUpdateRequest.md | 17 + ...CompensationPlanningCycleAdminsResponse.md | 10 + ...nPlanningCycleAdminsResponseAdminsInner.md | 18 + ...mpensationPlanningCycleCompleteResponse.md | 12 + ...lanningCycleCompleteResponseErrorsInner.md | 10 + docs/Model/CompensationToolsDataObject.md | 12 + docs/Model/CompensationToolsResponse.md | 11 + docs/Model/CompensationUpsellData.md | 11 + ...CompletedQuestionsAndResponseDataObject.md | 16 + docs/Model/ConversionRateDataObject.md | 11 + docs/Model/CountriesOptionsResponse.md | 11 + docs/Model/CountrySchema.md | 6 +- ....md => CreateApplicationCommentRequest.md} | 4 +- docs/Model/CreateCandidateResponse.md | 10 + docs/Model/CreateCommentResponse.md | 10 + .../CreateCompensationBenchmarkRequest.md | 29 + ...reateCompensationBenchmarkSourceRequest.md | 10 + .../CreateEmployeeTrainingRecordRequest.md | 15 + ...CreateEmployeeTrainingRecordRequestCost.md | 10 + docs/Model/CreateGoalCommentRequest.md | 9 + docs/Model/CreateGoalRequest.md | 16 + ...md => CreateGoalRequestMilestonesInner.md} | 2 +- docs/Model/CreateJobOpeningResponse.md | 10 + docs/Model/CreateLocationRequest.md | 11 + docs/Model/CreateLocationRequestAddress.md | 16 + ...st.md => CreateTrainingCategoryRequest.md} | 2 +- ...equest.md => CreateTrainingTypeRequest.md} | 6 +- ...d => CreateTrainingTypeRequestCategory.md} | 4 +- docs/Model/CreateWebhookBadRequestResponse.md | 9 + ...ist.md => CreatedCompensationBenchmark.md} | 5 +- ...atedCompensationBenchmarkSavedBenchmark.md | 30 + ... => CreatedCompensationBenchmarkSource.md} | 4 +- docs/Model/CreatedTimeOffRequest.md | 26 + docs/Model/CreatedTimeOffRequestAmount.md | 10 + docs/Model/CreatedTimeOffRequestNotes.md | 10 + docs/Model/CreatedTimeOffRequestStatus.md | 11 + docs/Model/CreatedTimeOffRequestType.md | 10 + docs/Model/CurrencyConversionsResponse.md | 12 + docs/Model/CursorPagesResponse.md | 6 +- docs/Model/CursorPaginationQueryObject.md | 4 +- ...Dacd313af2106213fc4696175941ce65Request.md | 11 + docs/Model/DataRequest.md | 10 +- docs/Model/DataRequestAggregations.md | 10 + docs/Model/DataRequestFilters.md | 4 +- docs/Model/DataRequestFiltersFiltersInner.md | 4 +- docs/Model/DataRequestSortByInner.md | 5 +- docs/Model/DatasetDataResponseV2.md | 11 + docs/Model/DatasetDataResponseV2DataInner.md | 9 + ...tasetDataResponseV2DataInnerFieldsValue.md | 8 + docs/Model/DatasetDataResponseV2Links.md | 10 + docs/Model/DatasetDataResponseV2Meta.md | 12 + docs/Model/DatasetFieldsResponse.md | 6 +- docs/Model/DatasetResponseV1.md | 9 + docs/Model/DatasetV1.md | 10 + docs/Model/DatasetsResponseV12.md | 9 + .../Model/DatasetsResponseV12DatasetsInner.md | 10 + ...eleteCompensationBenchmarkSourceRequest.md | 9 + ...leteCompensationBenchmarkSourceResponse.md | 9 + .../DetailsAndCurrencyRequestDataObject.md | 21 + ...Ec1ba8e76f33960b018d0d7518fe97b5Request.md | 20 + docs/Model/Employee.md | 19 +- docs/Model/EmployeeBenefitFilters.md | 9 + docs/Model/EmployeeBenefitFiltersFilters.md | 11 + docs/Model/EmployeeBenefitsListResponse.md | 9 + ...nefitsListResponseEmployeeBenefitsInner.md | 11 + ...ployeeBenefitsInnerEmployeeBenefitInner.md | 29 + docs/Model/EmployeeCreatedWebhookPayload.md | 11 + .../EmployeeCreatedWebhookPayloadData.md | 10 + .../EmployeeCursorPaginationQueryObject.md | 11 + docs/Model/EmployeeDeletedWebhookPayload.md | 11 + .../EmployeeDeletedWebhookPayloadData.md | 10 + docs/Model/EmployeeDependent.md | 35 +- docs/Model/EmployeeDependentsResponse.md | 9 + ...pendentsResponseEmployeeDependentsInner.md | 27 + docs/Model/EmployeeFileUpdate.md | 7 +- docs/Model/EmployeeOptionalField.md | 8 + docs/Model/EmployeePhotoJsonResponse.md | 10 + .../EmployeeStringCodeErrorResponseV1.md | 9 + .../EmployeeStringCodeErrorResponseV1Error.md | 10 + docs/Model/EmployeeTableRow.md | 10 + docs/Model/EmployeeTimeOffPolicyAssignment.md | 11 + .../EmployeeTimeOffPolicyAssignmentV11.md | 11 + ...oyeeTimeOffRequestApproverResponseInner.md | 12 + .../EmployeeTimesheetEntryTransformer.md | 14 +- docs/Model/EmployeeUpdatedWebhookPayload.md | 11 + .../EmployeeUpdatedWebhookPayloadData.md | 11 + docs/Model/EmployeeValue.md | 8 + docs/Model/EmployeeValueAnyOfInner.md | 8 + docs/Model/EmployeeVerificationIntegration.md | 10 + ...EmployeeVerificationIntegrationResponse.md | 9 + ...ificationLifecycleEmailAcceptedResponse.md | 10 + .../EmployeeVerificationPublicApiRecord.md | 22 + .../EmployeeVerificationUpdateResponse.md | 9 + .../EmployeeVerificationsListResponse.md | 9 + docs/Model/EmployeesDirectoryJsonResponse.md | 10 + ...ployeesDirectoryJsonResponseFieldsInner.md | 11 + docs/Model/EmployeesDirectoryXmlResponse.md | 10 + .../EmployeesDirectoryXmlResponseEmployees.md | 9 + ...ectoryXmlResponseEmployeesEmployeeInner.md | 10 + ...esponseEmployeesEmployeeInnerFieldInner.md | 10 + ... EmployeesDirectoryXmlResponseFieldset.md} | 4 +- ...sDirectoryXmlResponseFieldsetFieldInner.md | 10 + docs/Model/ErrorResponse.md | 9 + docs/Model/ErrorResponseError.md | 10 + ...F3883a522dadbe9e11b34f8b656e3adbRequest.md | 15 + docs/Model/Field.md | 10 +- docs/Model/Field1.md | 13 + docs/Model/Field1Id.md | 8 + docs/Model/FieldOptionsRequestSchema.md | 3 +- docs/Model/FieldOptionsTransformer.md | 4 +- docs/Model/FieldOptionsTransformerId.md | 8 + docs/Model/ForbiddenV1.md | 9 + docs/Model/ForbiddenV1Error.md | 10 + .../Model/GetBreakPolicySuggestionsRequest.md | 9 + docs/Model/GetCompanyReportResponse.md | 11 + ...GetCompanyReportResponseEmployeesInner.md} | 4 +- docs/Model/GetDataFromDatasetV2Request.md | 13 + docs/Model/GetEmployeeResponse.md | 55 + .../Model/GetEmployeesEmployeeBaseResponse.md | 16 + docs/Model/GetEmployeesEmployeeResponse.md | 135 +- ...loyeesEmployeeResponseAllOfOvertimeRate.md | 10 + ...tEmployeesEmployeeResponseAllOfPayRate.md} | 4 +- ...GetEmployeesEmployeeResponseAllOfTeams.md} | 4 +- docs/Model/GetEmployeesFilterRequestObject.md | 110 +- docs/Model/GetEmployeesResponseObject.md | 2 +- docs/Model/GetEmployeesResponseObjectLinks.md | 6 +- .../GetEmployeesResponseObjectLinksNext.md | 9 + .../GetEmployeesResponseObjectLinksPrev.md | 9 + .../GetEmployeesResponseObjectLinksSelf.md | 9 + docs/Model/Goal.md | 16 - docs/Model/GoalAggregateCommentsInner.md | 4 +- docs/Model/GoalCommentResponse.md | 14 + docs/Model/GoalCommentsResponse.md | 9 + .../GoalCommentsResponseCommentsInner.md | 14 + docs/Model/GoalResponse.md | 9 + docs/Model/GoalsAggregateV12CommentsInner.md | 2 +- docs/Model/HiringLead.md | 4 +- docs/Model/HiringLeadsList.md | 9 - .../ImportCompensationBenchmarksResponse.md | 10 + docs/Model/Industry.md | 10 + docs/Model/InlineObjectInner.md | 13 + docs/Model/InvalidRequest.md | 9 - docs/Model/InvalidRequestError.md | 10 - docs/Model/JobSummary.md | 19 + docs/Model/JobSummaryStatus.md | 10 + docs/Model/JsonDirectoryEmployee.md | 10 - .../Model/JsonDirectoryEmployeeFieldsInner.md | 11 - docs/Model/JsonEmployeeFiles.md | 10 + .../Model/JsonEmployeeFilesCategoriesInner.md | 15 + ...nEmployeeFilesCategoriesInnerFilesInner.md | 18 + docs/Model/JsonEmployeeFilesEmployee.md | 9 + docs/Model/LevelsAndBandsColumnMap.md | 10 + docs/Model/LevelsAndBandsEmployee.md | 10 + ...> LevelsAndBandsErrorWarningIdentifier.md} | 5 +- docs/Model/LevelsAndBandsGroup.md | 11 + docs/Model/LevelsAndBandsGroupStatusCounts.md | 11 + docs/Model/LevelsAndBandsJobTitle.md | 10 + .../Model/LevelsAndBandsJobTitleAssignment.md | 10 + ...evelsAndBandsJobTitleAssignmentsRequest.md | 9 + .../LevelsAndBandsJobTitleWithEmployees.md | 12 + docs/Model/LevelsAndBandsJobTitlesStatus.md | 11 + docs/Model/LevelsAndBandsLevel.md | 14 + docs/Model/LevelsAndBandsLevelsAndBands.md | 9 + .../LevelsAndBandsLevelsAndBandsStatus.md | 12 + docs/Model/LevelsAndBandsPayBand.md | 15 + docs/Model/LevelsAndBandsStepStatus.md | 11 + docs/Model/LevelsAndBandsUploadResponse.md | 10 + docs/Model/ListFieldDetail.md | 15 + docs/Model/ListFieldOption.md | 15 + docs/Model/ListFieldValues.md | 2 +- docs/Model/ListFieldValuesOptionsInner.md | 8 +- docs/Model/ListFieldValuesXml.md | 9 + docs/Model/ListFieldValuesXmlOptionInner.md | 12 + docs/Model/ListUsersResponseValue.md | 15 + docs/Model/ListUsersXmlResponse.md | 9 + docs/Model/ListUsersXmlResponseUserInner.md | 15 + docs/Model/LocationResponseObject.md | 15 + docs/Model/LocationResponseObjectAddress.md | 18 + .../LocationResponseObjectAddressCountry.md | 11 + .../LocationResponseObjectAddressState.md | 11 + docs/Model/LoginFailureResponse.md | 9 + docs/Model/LoginFailureXmlResponse.md | 9 + docs/Model/LoginResponse.md | 13 + docs/Model/LoginXmlResponse.md | 13 + docs/Model/MemberBenefitEvent.md | 3 +- .../Model/MemberBenefitEventCoveragesInner.md | 10 + ...erBenefitEventCoveragesInnerEventsInner.md | 12 + docs/Model/MemberBenefitEventMembersInner.md | 10 - ...rBenefitEventMembersInnerCoveragesInner.md | 10 - ...ntMembersInnerCoveragesInnerEventsInner.md | 12 - docs/Model/MemberBenefitEventsResponse.md | 9 + ...mberBenefitsGetPermissionDeniedResponse.md | 10 + .../Model/MemberBenefitsGetSuccessResponse.md | 11 + ...mberBenefitsGetSuccessResponseDataInner.md | 11 + ...tsGetSuccessResponseDataInnerPlansInner.md | 10 + ...ponseDataInnerPlansInnerDateRangesInner.md | 11 + .../MemberBenefitsGetSuccessResponseLinks.md | 10 + ...mberBenefitsGetSuccessResponseLinksNext.md | 9 + ...mberBenefitsGetSuccessResponseLinksPrev.md | 9 + .../MemberBenefitsGetSuccessResponseMeta.md | 12 + ...emberBenefitsGetValidationErrorResponse.md | 10 + docs/Model/MetaCompanyPropertiesResponse.md | 12 + docs/Model/MetaCurrencyTypeItem.md | 13 + docs/Model/MonitorFieldList.md | 9 + docs/Model/MonitorFieldListFieldsInner.md | 11 + .../NewHirePacketGtkyAnswerVisibilityItem.md | 11 + ...ewHirePacketGtkyAnswerVisibilityRequest.md | 10 + ...wHirePacketGtkyAnswerVisibilityResponse.md | 9 + docs/Model/NewHirePacketPublicApi.md | 32 + .../NewHirePacketPublicApiWritableBody.md | 19 + docs/Model/NewHirePacketsListResponse.md | 12 + docs/Model/NewHireWidgetItem.md | 17 + docs/Model/NewHireWidgetResponse.md | 9 + docs/Model/NewWebHook.md | 9 +- docs/Model/OnboardingExperiencePublicApi.md | 14 + .../OnboardingExperiencesListResponse.md | 9 + docs/Model/PagedLocationResponse.md | 11 + docs/Model/PagedResponse.md | 11 + docs/Model/PaginationMetaData.md | 12 + ...CompanyProfileCompanyInformationRequest.md | 11 + ...ProfileCompanyInformationRequestAddress.md | 13 + .../Model/PayGradesAndBandsPublishResponse.md | 9 + .../PayGradesAndBandsSaveLevelsResponse.md | 9 + ...ayGradesAndBandsUpdateJobTitlesResponse.md | 9 + ...PayGradesAndBandsUpdatePayBandsResponse.md | 9 + docs/Model/PersonInfoApiTransformer.md | 13 + docs/Model/PostApplicantStatusRequest.md | 9 - docs/Model/PostGoalRequest.md | 16 - docs/Model/PostNewEmployee.md | 8 +- docs/Model/ProblemDetailsResponse.md | 15 + docs/Model/ProjectCreateRequestSchema.md | 4 +- .../ProjectCreateTimeTrackingProjectTaskV1.md | 10 + .../ProjectCreateTimeTrackingProjectV1.md | 14 + ...ctCreateTimeTrackingProjectV1TasksInner.md | 10 + docs/Model/ProjectInfoApiTransformer.md | 2 +- docs/Model/ProjectInfoApiTransformerTask.md | 10 - docs/Model/ProjectPaginatedResponseDataV1.md | 10 + .../ProjectPaginatedResponseDataV1Links.md | 10 + ...ProjectPaginatedResponseDataV1LinksNext.md | 9 + ...ProjectPaginatedResponseDataV1LinksPrev.md | 9 + .../ProjectPaginatedResponseDataV1Meta.md | 12 + docs/Model/ProjectPaginatedTasksResponseV1.md | 11 + .../ProjectPaginatedTasksResponseV1Links.md | 10 + .../ProjectPaginatedTasksResponseV1Meta.md | 12 + ...PaginatedTimeTrackingProjectsResponseV1.md | 11 + docs/Model/ProjectTimeTrackingProjectV1.md | 19 + docs/Model/ProjectTimeTrackingTaskV1.md | 15 + .../ProjectUpdateTimeTrackingProjectTaskV1.md | 10 + .../ProjectUpdateTimeTrackingProjectV1.md | 15 + docs/Model/ProvinceItem.md | 13 + docs/Model/PutCompanyIndustryCodesRequest.md | 9 + .../PutCompanyProfileDisplayNameRequest.md | 9 + docs/Model/RemoveCycleAdminSelfResponse.md | 9 + .../RemoveTotalRewardsEmployeesRequest.md | 9 + docs/Model/Report.md | 2 +- docs/Model/Request.md | 4 +- docs/Model/RequestCustomReport.md | 5 +- docs/Model/RequestCustomReportFilters.md | 1 + .../RequestCustomReportFiltersLastChanged.md | 4 +- docs/Model/RequestCustomReportResponse.md | 11 + ...questCustomReportResponseEmployeesInner.md | 9 + .../RequestCustomReportResponseFieldsInner.md | 11 + docs/Model/SaveChangeCommTemplateResponse.md | 9 + .../SchedulingCreateScheduleRequestV1.md | 15 + ...chedulingCreateSchedulingShiftRequestV1.md | 21 + .../Model/SchedulingPublishShiftsFailureV1.md | 10 + docs/Model/SchedulingPublishShiftsRequest.md | 9 + docs/Model/SchedulingPublishShiftsResultV1.md | 10 + .../Model/SchedulingScheduleListResponseV1.md | 11 + ... SchedulingScheduleListResponseV1Links.md} | 6 +- .../SchedulingScheduleListResponseV1Meta.md | 11 + docs/Model/SchedulingScheduleV1.md | 19 + docs/Model/SchedulingSchedulingShiftV1.md | 27 + docs/Model/SchedulingShiftListResponseV1.md | 11 + .../SchedulingShiftListResponseV1Links.md | 10 + .../SchedulingShiftListResponseV1LinksNext.md | 9 + .../SchedulingShiftListResponseV1LinksPrev.md | 9 + .../SchedulingShiftListResponseV1Meta.md | 11 + .../Model/SchedulingTimezoneListResponseV1.md | 11 + .../SchedulingTimezoneListResponseV1Meta.md | 11 + docs/Model/SchedulingTimezoneV1.md | 10 + .../SchedulingUpdateScheduleRequestV1.md | 15 + ...chedulingUpdateSchedulingShiftRequestV1.md | 21 + ...VerificationLifecycleEmailByUserRequest.md | 9 + docs/Model/SendRecommendationsResponse.md | 9 + docs/Model/SetBreakPolicyEmployeesRequest.md | 9 + .../SetTotalRewardsCustomDisclaimerRequest.md | 9 + .../SetTotalRewardsOnboardingStepRequest.md | 9 + docs/Model/ShareOptionsResponse.md | 9 + docs/Model/StateProvinceResponseSchema.md | 2 +- docs/Model/StateProvinceSchema.md | 6 +- docs/Model/TableRowDeleteResponse.md | 3 +- docs/Model/TableRowUpdate.md | 13 +- docs/Model/TabularField.md | 10 + docs/Model/TabularFieldFieldsInner.md | 12 + docs/Model/TimeOffBalanceEntry.md | 15 + docs/Model/TimeOffHistory.md | 9 +- docs/Model/TimeOffPolicy.md | 13 + docs/Model/TimeOffRequest.md | 15 +- docs/Model/TimeOffRequest1.md | 20 + docs/Model/TimeOffRequest1Actions.md | 14 + docs/Model/TimeOffRequest1Amount.md | 10 + docs/Model/TimeOffRequest1Notes.md | 10 + docs/Model/TimeOffRequest1Status.md | 11 + docs/Model/TimeOffRequest1Type.md | 11 + docs/Model/TimeOffRequestDatesInner.md | 4 +- docs/Model/TimeOffRequestNotesInner.md | 4 +- docs/Model/TimeOffTypesAndDefaultHours.md | 10 + ...ffTypesAndDefaultHoursDefaultHoursInner.md | 10 + ...ffTypesAndDefaultHoursTimeOffTypesInner.md | 14 + ...ingBreakPolicyEmployeeCollectionV1Inner.md | 11 + ...rackingBreakPolicySuggestionsResponseV1.md | 9 + ...estionsResponseV1SuggestedPoliciesInner.md | 12 + ...onseV1SuggestedPoliciesInnerBreaksInner.md | 13 + .../TimeTrackingBulkResponseSchemaResponse.md | 2 +- ...rUpdateTimeTrackingBreakWithoutPolicyV1.md | 17 + ...TrackingCreateTimeTrackingBreakPolicyV1.md | 13 + .../TimeTrackingCreateTimeTrackingBreakV1.md | 17 + ...meTrackingOffsetPaginatedResponseDataV1.md | 10 + ...ckingOffsetPaginatedResponseDataV1Links.md | 10 + ...ackingOffsetPaginatedResponseDataV1Meta.md | 11 + ...kingPaginatedBreakAssessmentsResponseV1.md | 11 + ...rackingPaginatedBreakPoliciesResponseV1.md | 11 + ...PaginatedBreakPolicyEmployeesResponseV1.md | 11 + .../TimeTrackingPaginatedBreaksResponseV1.md | 11 + docs/Model/TimeTrackingRecordSchema.md | 24 +- docs/Model/TimeTrackingRecordSchemaProject.md | 11 - ...meTrackingSyncTimeTrackingBreakPolicyV1.md | 13 + ...meTrackingTimeTrackingBreakAssessmentV1.md | 24 + ...gTimeTrackingBreakAssessmentViolationV1.md | 12 + ...TrackingTimeTrackingBreakAvailabilityV1.md | 24 + .../TimeTrackingTimeTrackingBreakPolicyV1.md | 15 + ...gTimeTrackingBreakPolicyWithRelationsV1.md | 17 + docs/Model/TimeTrackingTimeTrackingBreakV1.md | 21 + ...TrackingUpdateTimeTrackingBreakPolicyV1.md | 11 + .../TimeTrackingUpdateTimeTrackingBreakV1.md | 17 + .../Model/TimesheetEntryInfoApiTransformer.md | 11 +- docs/Model/TimezoneListResponse.md | 11 + docs/Model/TimezoneResource.md | 12 + .../Model/TotalRewardsBenefitDetailsValues.md | 14 + .../Model/TotalRewardsBenefitSectionValues.md | 10 + .../TotalRewardsCalendarSectionValues.md | 11 + docs/Model/TotalRewardsCompSummaryValues.md | 12 + ...md => TotalRewardsCustomDisclaimerInfo.md} | 5 +- docs/Model/TotalRewardsEmployeeStatement.md | 25 + docs/Model/TotalRewardsEquityDetailsValues.md | 29 + ...alRewardsEquityEstimatedValuationValues.md | 13 + .../TotalRewardsEquityGrowthChartItem.md | 14 + .../TotalRewardsEquityGrowthEstimation.md | 15 + docs/Model/TotalRewardsEquitySectionValues.md | 13 + .../TotalRewardsExtraPayDetailsValues.md | 15 + .../TotalRewardsExtraPaySectionValues.md | 11 + docs/Model/TotalRewardsHolidayValue.md | 11 + docs/Model/TotalRewardsOnboardingStep.md | 10 + .../TotalRewardsOverviewSectionValues.md | 11 + docs/Model/TotalRewardsTimeOffPolicyValue.md | 12 + docs/Model/TotalRewardsTimelineItem.md | 11 + docs/Model/TotalRewardsTimelineItemLabel.md | 8 + .../TotalRewardsTimelineSectionValues.md | 11 + docs/Model/TrainingCategory.md | 4 +- docs/Model/TrainingCategoryList.md | 9 - docs/Model/TrainingRecord.md | 16 +- docs/Model/TrainingRecordList.md | 9 - docs/Model/TrainingRecordMap.md | 8 + docs/Model/TrainingRecordType.md | 8 + docs/Model/TrainingType.md | 8 +- docs/Model/TrainingTypeCategory.md | 10 + .../TransformedApiEmployeeGoalDetailsGoal.md | 7 +- docs/Model/TransformedApiGoal.md | 13 +- docs/Model/TransformedApiGoalGoal.md | 19 - docs/Model/TransformedApiGoalGoalActions.md | 10 - .../TransformedApiGoalGoalMilestonesInner.md | 17 - .../TransformedApiGoalMilestonesInner.md | 17 + ...UnassignEmployeesFromBreakPolicyRequest.md | 9 + docs/Model/Unauthorized.md | 9 - docs/Model/Unauthorized1.md | 9 - docs/Model/UpdateApplicantStatusRequest.md | 9 + ...st.md => UpdateApplicantStatusResponse.md} | 5 +- .../UpdateCompanyIndustryCodes400Response.md | 9 + .../UpdateCompanyIndustryCodes403Response.md | 9 + .../UpdateCompanyIndustryCodes404Response.md | 9 + .../UpdateCompanyIndustryCodes500Response.md | 9 + .../UpdateCompanyIndustryCodesResponse.md | 9 + .../UpdateCompanyNameBadRequestResponse.md | 9 + ...pdateCompanyNameBadRequestResponseError.md | 9 + ... => UpdateCompanyNameForbiddenResponse.md} | 4 +- ...UpdateCompanyNameForbiddenResponseError.md | 9 + .../UpdateCompanyNameInternalErrorResponse.md | 9 + .../Model/UpdateCompanyNameSuccessResponse.md | 9 + .../UpdateCompensationBenchmarkRequest.md | 28 + .../UpdateCompensationBenchmarkSourceItem.md | 11 + ...dateCompensationBenchmarkSourcesRequest.md | 9 + ...ateCompensationBenchmarkSourcesResponse.md | 9 + .../UpdateEmployeeTrainingRecordRequest.md | 10 +- ...eEmployeeVerificationIntegrationRequest.md | 9 + .../UpdateEmployeeVerificationRequest.md | 13 + docs/Model/UpdateGoalCommentRequest.md | 9 + ... => UpdateGoalMilestoneProgressRequest.md} | 2 +- ...equest.md => UpdateGoalProgressRequest.md} | 4 +- docs/Model/UpdateGoalSharingRequest.md | 9 + docs/Model/UpdateGoalV1.md | 15 + ...lV11Request.md => UpdateGoalV11Request.md} | 10 +- ...=> UpdateGoalV11RequestMilestonesInner.md} | 2 +- docs/Model/UpdateLocationRequest.md | 11 + docs/Model/UpdateLocationRequestAddress.md | 16 + docs/Model/UpdateTrainingTypeRequest.md | 4 +- .../UpdateTrainingTypeRequestCategory.md | 2 - docs/Model/UpdateWebhookBadRequestResponse.md | 9 + docs/Model/UpdatedCompensationBenchmark.md | 10 + ...atedCompensationBenchmarkSavedBenchmark.md | 30 + docs/Model/UploadEmployeePhotoRequest1.md | 9 + docs/Model/UserPermissionData.md | 12 + docs/Model/WebHookLogResponse.md | 15 - docs/Model/WebHookPostFieldDataObject.md | 14 + docs/Model/WebHookPostFieldPageDataObject.md | 10 + docs/Model/WebHookPostFieldResponseObject.md | 11 + docs/Model/WebHookPostFieldTableDataObject.md | 10 + docs/Model/WebHookResponse.md | 18 +- docs/Model/Webhook.md | 19 +- docs/Model/WebhookBadRequest.md | 2 +- ...ner.md => WebhookBadRequestErrorsInner.md} | 3 +- docs/Model/WebhookErrorErrors.md | 4 +- docs/Model/WebhookEventType.md | 8 + docs/Model/WebhookLogEntry.md | 15 + docs/Model/WebhookLogListResponse.md | 9 + docs/Model/WebhookLogRateLimitResponse.md | 9 + .../Model/WebhookLogRateLimitResponseError.md | 10 + docs/Model/WebhookSubErrorProperty.md | 4 +- ...bhookSubErrorPropertyMonitorFieldsInner.md | 10 + ...ookSubErrorPropertyMonitorFieldsInnerId.md | 8 + ...bhookSubErrorPropertyUnknownFieldsInner.md | 2 +- ...ookSubErrorPropertyUnknownFieldsInnerId.md | 8 + docs/Model/WebhooksListWebhooksInner.md | 6 +- docs/Model/WhosOutEntry.md | 14 + docs/Model/XmlDirectoryEmployee.md | 10 - docs/Model/XmlDirectoryEmployeeEmployees.md | 9 - ...DirectoryEmployeeEmployeesEmployeeInner.md | 10 - ...mployeeEmployeesEmployeeInnerFieldInner.md | 10 - .../XmlDirectoryEmployeeFieldsetFieldInner.md | 10 - docs/Model/XmlEmployeeFiles.md | 10 + docs/Model/XmlEmployeeFilesCategoryInner.md | 15 + .../XmlEmployeeFilesCategoryInnerFileInner.md | 18 + ...1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md | 9 + ...06b8e2fb2d2dRequestBudgetBreakdownInner.md | 13 + ...02ee192568adbd5e3179a91e6e2RequestInner.md | 11 + ...179a91e6e2RequestInnerBudgetAllocations.md | 11 + ...288aa996aba16d7a495c62321ea999a9Request.md | 9 + ...6d7a495c62321ea999a9RequestSentDateTime.md | 8 + ...3958585c861325ea7a2cd30a8c74f042Request.md | 9 + ...89a5068111ec499135c7d6e9a53d5a30Request.md | 9 + lib/Api/AccountInformationApi.php | 2202 +- lib/Api/AlertApi.php | 330 + lib/Api/AlertConfigurationsApi.php | 1076 + lib/Api/ApplicantTrackingApi.php | 966 +- lib/Api/BenefitsApi.php | 1349 +- lib/Api/CompanyApi.php | 376 + lib/Api/CompanyFilesApi.php | 212 +- lib/Api/CompanyProfileApi.php | 809 + lib/Api/CompensationApi.php | 752 + lib/Api/CompensationBenchmarkingApi.php | 2703 ++ lib/Api/CompensationPlanningApi.php | 6628 ++++ lib/Api/CustomReportsApi.php | 183 +- lib/Api/DatasetsApi.php | 1412 +- lib/Api/EmployeeFilesApi.php | 321 +- lib/Api/EmployeeVerificationApi.php | 1303 + lib/Api/EmployeesApi.php | 539 +- lib/Api/GoalsApi.php | 2212 +- lib/Api/HoursApi.php | 388 +- lib/Api/LastChangeInformationApi.php | 68 +- lib/Api/LocationsApi.php | 1393 + lib/Api/LoginApi.php | 142 +- lib/Api/OnboardingApi.php | 2876 ++ lib/Api/PhotosApi.php | 141 +- lib/Api/ReportsApi.php | 217 +- lib/Api/SchedulingApi.php | 3303 ++ lib/Api/TabularDataApi.php | 544 +- lib/Api/TimeOffApi.php | 1648 +- lib/Api/TimeTrackingApi.php | 8457 ++++- lib/Api/TotalRewardsApi.php | 1809 + lib/Api/TrainingApi.php | 284 +- lib/Api/WebhookEventsApi.php | 1276 + lib/Api/WebhooksApi.php | 676 +- ...05b6d5f564f805d688ff2c1e37c3990Request.php | 461 + ...d7871529b2a9c6612f8dd3c62192c08Request.php | 460 + lib/Model/AddCycleAdminsResponse.php | 420 + .../AddCycleAdminsResponseAddedInner.php | 432 + .../AddCycleAdminsResponseSkippedInner.php | 462 + lib/Model/AddTotalRewardsEmployeesRequest.php | 391 + lib/Model/AdjustTimeOffBalance.php | 8 +- lib/Model/AdjustTimeTrackingRequestSchema.php | 8 +- lib/Model/AlertTemplateListResponse.php | 388 + .../AlertTemplateListResponseAlertsInner.php | 452 + lib/Model/AlignmentOptionsResponse.php | 388 + ...tOptionsResponseAlignsWithOptionsInner.php | 420 + lib/Model/ApplicantStatus.php | 592 + lib/Model/ApplicationDetails.php | 170 +- lib/Model/ApplicationDetailsApplicant.php | 320 +- .../ApplicationDetailsAttachmentsInner.php | 452 + lib/Model/ApplicationDetailsJob.php | 86 +- lib/Model/ApplicationDetailsJobTitle.php | 427 + ...icationDetailsQuestionsAndAnswersInner.php | 202 +- lib/Model/ApplicationDetailsStatus.php | 18 +- lib/Model/ApplicationsList.php | 8 +- ... => ApplicationsListApplicationsInner.php} | 32 +- ...cationsListApplicationsInnerApplicant.php} | 20 +- ... ApplicationsListApplicationsInnerJob.php} | 14 +- ...licationsListApplicationsInnerJobTitle.php | 427 + ...plicationsListApplicationsInnerStatus.php} | 8 +- .../AssignEmployeesToBreakPolicyRequest.php | 399 + ... => AssignTimeOffPoliciesRequestInner.php} | 20 +- lib/Model/AssignedTimeOffPolicy.php | 452 + lib/Model/AssignedTimeOffPolicyV11.php | 458 + lib/Model/AvailableAction.php | 427 + ...ternalServerError.php => BadRequestV1.php} | 14 +- lib/Model/BadRequestV1Error.php | 420 + ...eldListFieldsInner.php => BankHoliday.php} | 46 +- lib/Model/BenefitCoveragesResponse.php | 388 + ...CoveragesResponseBenefitCoveragesInner.php | 528 + lib/Model/BenefitDeductionSubType.php | 810 + lib/Model/BenefitDeductionType.php | 810 + lib/Model/BenefitDeductionTypeId.php | 364 + lib/Model/BudgetBreakdownImportResponse.php | 394 + lib/Model/BudgetGuidelinesView.php | 535 + lib/Model/BudgetGuidelinesWarnings.php | 433 + ...79f9c5950f983e59d2626faa30c00a1Request.php | 426 + ...7c32ed5278ac67e2e518bf7484a75dcRequest.php | 423 + ...adsList.php => CanCreateGoalsResponse.php} | 42 +- ...f87b8e09a001b6fb81dfce6c20ab9e3Request.php | 426 + lib/Model/ChangedEmployeeIdsResponse.php | 426 + ...angedEmployeeIdsResponseEmployeesValue.php | 488 + .../ChangedEmployeeTableDataResponse.php | 426 + ...mployeeTableDataResponseEmployeesValue.php | 420 + ...taResponseEmployeesValueRowsInnerValue.php | 363 + ...EmployeesValueRowsInnerValueAnyOfInner.php | 363 + lib/Model/ClockEntrySchema.php | 50 +- lib/Model/ClockInRequestSchema.php | 94 +- lib/Model/CloseGoalRequest.php | 394 + lib/Model/CompanyAlertDataObject.php | 1184 + lib/Model/CompanyBenefitSummary.php | 771 + lib/Model/CompanyBenefitsListResponse.php | 388 + lib/Model/CompanyDeletedWebhookPayload.php | 485 + lib/Model/CompanyFileUpdate.php | 40 +- lib/Model/CompanyFilesResponse.php | 388 + .../CompanyFilesResponseCategoriesInner.php | 518 + ...FilesResponseCategoriesInnerFilesInner.php | 744 + lib/Model/CompanyIndustryDataObject.php | 509 + lib/Model/CompanyInformation.php | 6 +- lib/Model/CompanyInformationAddress.php | 11 +- ...mpanyIntegrationsUpdatedWebhookPayload.php | 485 + ...yIntegrationsUpdatedWebhookPayloadData.php | 389 + lib/Model/CompanyProfileData.php | 692 + lib/Model/CompanyProfileDataAddress.php | 546 + lib/Model/CompanyProfileIntegrations.php | 388 + lib/Model/CompanyUpdatedWebhookPayload.php | 485 + .../CompensationBenchmarkDetailEmployee.php | 876 + ...nsationBenchmarkDetailEmployeeJobTitle.php | 470 + ...pensationBenchmarkDetailEmployeeSalary.php | 420 + lib/Model/CompensationBenchmarkDetails.php | 686 + ...onBenchmarkDetailsBenchmarkValuesInner.php | 812 + ...mpensationBenchmarkJobLocationEmployee.php | 692 + ...tionBenchmarkJobLocationEmployeeSalary.php | 432 + .../CompensationBenchmarkJobLocationPair.php | 566 + ...tionBenchmarkJobLocationPairJobDetails.php | 432 + lib/Model/CompensationBenchmarkOverview.php | 578 + .../CompensationBenchmarkOverviewValues.php | 660 + lib/Model/CompensationBenchmarkSource.php | 534 + .../CompensationBenchmarkingColumnMap.php | 427 + lib/Model/CompensationBenchmarksList.php | 502 + .../CompensationEquitySettingsResponse.php | 680 + ...EquitySettingsResponseCompanyValuation.php | 363 + ...ationEquitySettingsResponseDisclaimers.php | 363 + ...quitySettingsResponseOutstandingShares.php | 363 + ...ionEquitySettingsResponsePricePerShare.php | 363 + ...nsationEquitySettingsResponseSliderMin.php | 363 + ...quitySettingsResponseVestingConditions.php | 363 + ...ompensationEquitySettingsUpdateRequest.php | 698 + ...ompensationPlanningCycleAdminsResponse.php | 420 + ...PlanningCycleAdminsResponseAdminsInner.php | 728 + ...pensationPlanningCycleCompleteResponse.php | 502 + ...anningCycleCompleteResponseErrorsInner.php | 432 + lib/Model/CompensationToolsDataObject.php | 485 + lib/Model/CompensationToolsResponse.php | 458 + lib/Model/CompensationUpsellData.php | 453 + ...ompletedQuestionsAndResponseDataObject.php | 613 + lib/Model/ConversionRateDataObject.php | 453 + lib/Model/CountriesOptionsResponse.php | 452 + lib/Model/CountrySchema.php | 18 +- ...hp => CreateApplicationCommentRequest.php} | 15 +- lib/Model/CreateCandidateResponse.php | 420 + lib/Model/CreateCommentResponse.php | 420 + .../CreateCompensationBenchmarkRequest.php | 1103 + ...eateCompensationBenchmarkSourceRequest.php | 423 + ...> CreateEmployeeTrainingRecordRequest.php} | 24 +- ...eateEmployeeTrainingRecordRequestCost.php} | 45 +- lib/Model/CreateGoalCommentRequest.php | 391 + ...tGoalRequest.php => CreateGoalRequest.php} | 43 +- ...p => CreateGoalRequestMilestonesInner.php} | 8 +- lib/Model/CreateJobOpeningResponse.php | 420 + lib/Model/CreateLocationRequest.php | 458 + lib/Model/CreateLocationRequestAddress.php | 664 + ....php => CreateTrainingCategoryRequest.php} | 8 +- ...uest.php => CreateTrainingTypeRequest.php} | 21 +- ... => CreateTrainingTypeRequestCategory.php} | 14 +- ...hp => CreateWebhookBadRequestResponse.php} | 14 +- lib/Model/CreatedCompensationBenchmark.php | 426 + ...tedCompensationBenchmarkSavedBenchmark.php | 1180 + .../CreatedCompensationBenchmarkSource.php | 426 + lib/Model/CreatedTimeOffRequest.php | 944 + ...er.php => CreatedTimeOffRequestAmount.php} | 119 +- lib/Model/CreatedTimeOffRequestNotes.php | 421 + lib/Model/CreatedTimeOffRequestStatus.php | 453 + lib/Model/CreatedTimeOffRequestType.php | 421 + lib/Model/CurrencyConversionsResponse.php | 484 + lib/Model/CursorPagesResponse.php | 6 +- lib/Model/CursorPaginationQueryObject.php | 20 +- ...acd313af2106213fc4696175941ce65Request.php | 464 + lib/Model/DataRequest.php | 14 +- lib/Model/DataRequestAggregations.php | 469 + lib/Model/DataRequestFilters.php | 39 +- lib/Model/DataRequestFiltersFiltersInner.php | 4 +- lib/Model/DataRequestSortByInner.php | 89 +- lib/Model/DatasetDataResponseV2.php | 452 + ...php => DatasetDataResponseV2DataInner.php} | 14 +- ...asetDataResponseV2DataInnerFieldsValue.php | 363 + lib/Model/DatasetDataResponseV2Links.php | 433 + lib/Model/DatasetDataResponseV2Meta.php | 509 + lib/Model/DatasetFieldsResponse.php | 6 +- ...asetResponse.php => DatasetResponseV1.php} | 14 +- lib/Model/{Dataset.php => DatasetV1.php} | 12 +- ...ationsList.php => DatasetsResponseV12.php} | 42 +- .../DatasetsResponseV12DatasetsInner.php | 420 + ...leteCompensationBenchmarkSourceRequest.php | 391 + ...eteCompensationBenchmarkSourceResponse.php | 394 + .../DetailsAndCurrencyRequestDataObject.php | 779 + ...c1ba8e76f33960b018d0d7518fe97b5Request.php | 743 + lib/Model/Employee.php | 497 +- lib/Model/EmployeeBenefitFilters.php | 391 + lib/Model/EmployeeBenefitFiltersFilters.php | 453 + lib/Model/EmployeeBenefitsListResponse.php | 388 + ...efitsListResponseEmployeeBenefitsInner.php | 458 + ...loyeeBenefitsInnerEmployeeBenefitInner.php | 1166 + lib/Model/EmployeeCreatedWebhookPayload.php | 485 + .../EmployeeCreatedWebhookPayloadData.php | 421 + .../EmployeeCursorPaginationQueryObject.php | 468 + lib/Model/EmployeeDeletedWebhookPayload.php | 485 + .../EmployeeDeletedWebhookPayloadData.php | 421 + lib/Model/EmployeeDependent.php | 144 +- lib/Model/EmployeeDependentsResponse.php | 388 + ...endentsResponseEmployeeDependentsInner.php | 1103 + lib/Model/EmployeeFileUpdate.php | 121 +- lib/Model/EmployeeOptionalField.php | 426 + lib/Model/EmployeePhotoJsonResponse.php | 426 + .../EmployeeStringCodeErrorResponseV1.php | 392 + ...mployeeStringCodeErrorResponseV1Error.php} | 13 +- lib/Model/EmployeeTableRow.php | 421 + lib/Model/EmployeeTimeOffPolicyAssignment.php | 452 + .../EmployeeTimeOffPolicyAssignmentV11.php | 458 + ...yeeTimeOffRequestApproverResponseInner.php | 499 + .../EmployeeTimesheetEntryTransformer.php | 94 +- lib/Model/EmployeeUpdatedWebhookPayload.php | 485 + .../EmployeeUpdatedWebhookPayloadData.php | 453 + lib/Model/EmployeeValue.php | 363 + lib/Model/EmployeeValueAnyOfInner.php | 363 + lib/Model/EmployeeVerificationIntegration.php | 427 + ...ployeeVerificationIntegrationResponse.php} | 45 +- ...ficationLifecycleEmailAcceptedResponse.php | 423 + .../EmployeeVerificationPublicApiRecord.php | 835 + .../EmployeeVerificationUpdateResponse.php | 391 + .../EmployeeVerificationsListResponse.php | 391 + ...php => EmployeesDirectoryJsonResponse.php} | 20 +- ...loyeesDirectoryJsonResponseFieldsInner.php | 452 + ....php => EmployeesDirectoryXmlResponse.php} | 20 +- ...mployeesDirectoryXmlResponseEmployees.php} | 16 +- ...toryXmlResponseEmployeesEmployeeInner.php} | 16 +- ...ponseEmployeesEmployeeInnerFieldInner.php} | 12 +- ...EmployeesDirectoryXmlResponseFieldset.php} | 16 +- ...irectoryXmlResponseFieldsetFieldInner.php} | 12 +- .../{InvalidRequest.php => ErrorResponse.php} | 15 +- lib/Model/ErrorResponseError.php | 420 + ...3883a522dadbe9e11b34f8b656e3adbRequest.php | 651 + lib/Model/Field.php | 10 +- lib/Model/Field1.php | 525 + lib/Model/Field1Id.php | 364 + lib/Model/FieldOptionsRequestSchema.php | 60 +- lib/Model/FieldOptionsTransformer.php | 8 +- lib/Model/FieldOptionsTransformerId.php | 364 + lib/Model/{Forbidden.php => ForbiddenV1.php} | 14 +- lib/Model/ForbiddenV1Error.php | 420 + .../GetBreakPolicySuggestionsRequest.php | 400 + lib/Model/GetCompanyReportResponse.php | 452 + ...GetCompanyReportResponseEmployeesInner.php | 388 + lib/Model/GetDataFromDatasetV2Request.php | 556 + lib/Model/GetEmployeeResponse.php | 2174 ++ .../GetEmployeesEmployeeBaseResponse.php | 673 + lib/Model/GetEmployeesEmployeeResponse.php | 4730 ++- ...oyeesEmployeeResponseAllOfOvertimeRate.php | 421 + ...tEmployeesEmployeeResponseAllOfPayRate.php | 421 + ...GetEmployeesEmployeeResponseAllOfTeams.php | 420 + lib/Model/GetEmployeesFilterRequestObject.php | 3573 +- lib/Model/GetEmployeesResponseObject.php | 34 +- lib/Model/GetEmployeesResponseObjectLinks.php | 20 +- .../GetEmployeesResponseObjectLinksNext.php | 389 + .../GetEmployeesResponseObjectLinksPrev.php | 389 + .../GetEmployeesResponseObjectLinksSelf.php | 389 + lib/Model/GoalAggregateCommentsInner.php | 8 +- lib/Model/GoalCommentResponse.php | 548 + lib/Model/GoalCommentsResponse.php | 388 + .../GoalCommentsResponseCommentsInner.php | 548 + lib/Model/GoalFiltersV11FiltersInner.php | 2 +- lib/Model/GoalFiltersV1FiltersInner.php | 2 +- lib/Model/GoalResponse.php | 388 + lib/Model/GoalsAggregateV12CommentsInner.php | 6 +- lib/Model/HiringLead.php | 4 +- .../ImportCompensationBenchmarksResponse.php | 420 + ...cordSchemaProjectTask.php => Industry.php} | 12 +- lib/Model/InlineObjectInner.php | 540 + ...nsformedApiGoalGoal.php => JobSummary.php} | 385 +- lib/Model/JobSummaryStatus.php | 421 + lib/Model/JsonEmployeeFiles.php | 420 + .../JsonEmployeeFilesCategoriesInner.php | 713 + ...EmployeeFilesCategoriesInnerFilesInner.php | 809 + lib/Model/JsonEmployeeFilesEmployee.php | 388 + lib/Model/LevelsAndBandsColumnMap.php | 427 + ...merTask.php => LevelsAndBandsEmployee.php} | 14 +- .../LevelsAndBandsErrorWarningIdentifier.php | 427 + lib/Model/LevelsAndBandsGroup.php | 465 + lib/Model/LevelsAndBandsGroupStatusCounts.php | 453 + lib/Model/LevelsAndBandsJobTitle.php | 421 + .../LevelsAndBandsJobTitleAssignment.php | 421 + ...velsAndBandsJobTitleAssignmentsRequest.php | 392 + .../LevelsAndBandsJobTitleWithEmployees.php | 491 + lib/Model/LevelsAndBandsJobTitlesStatus.php | 462 + lib/Model/LevelsAndBandsLevel.php | 561 + ...s.php => LevelsAndBandsLevelsAndBands.php} | 46 +- .../LevelsAndBandsLevelsAndBandsStatus.php | 497 + lib/Model/LevelsAndBandsPayBand.php | 593 + lib/Model/LevelsAndBandsStepStatus.php | 462 + lib/Model/LevelsAndBandsUploadResponse.php | 421 + lib/Model/ListFieldDetail.php | 654 + lib/Model/ListFieldOption.php | 666 + lib/Model/ListFieldValues.php | 3 +- lib/Model/ListFieldValuesOptionsInner.php | 42 +- lib/Model/ListFieldValuesXml.php | 389 + lib/Model/ListFieldValuesXmlOptionInner.php | 518 + lib/Model/ListUsersResponseValue.php | 614 + lib/Model/ListUsersXmlResponse.php | 388 + lib/Model/ListUsersXmlResponseUserInner.php | 614 + lib/Model/LocationResponseObject.php | 593 + lib/Model/LocationResponseObjectAddress.php | 719 + .../LocationResponseObjectAddressCountry.php | 453 + .../LocationResponseObjectAddressState.php | 453 + lib/Model/LoginFailureResponse.php | 391 + lib/Model/LoginFailureXmlResponse.php | 388 + lib/Model/LoginResponse.php | 534 + lib/Model/LoginXmlResponse.php | 516 + lib/Model/MemberBenefitEvent.php | 67 +- ...p => MemberBenefitEventCoveragesInner.php} | 16 +- ...BenefitEventCoveragesInnerEventsInner.php} | 46 +- lib/Model/MemberBenefitEventsResponse.php | 388 + ...berBenefitsGetPermissionDeniedResponse.php | 420 + .../MemberBenefitsGetSuccessResponse.php | 452 + ...berBenefitsGetSuccessResponseDataInner.php | 452 + ...sGetSuccessResponseDataInnerPlansInner.php | 420 + ...onseDataInnerPlansInnerDateRangesInner.php | 500 + .../MemberBenefitsGetSuccessResponseLinks.php | 420 + ...berBenefitsGetSuccessResponseLinksNext.php | 388 + ...berBenefitsGetSuccessResponseLinksPrev.php | 388 + .../MemberBenefitsGetSuccessResponseMeta.php | 484 + ...mberBenefitsGetValidationErrorResponse.php | 420 + lib/Model/MetaCompanyPropertiesResponse.php | 484 + lib/Model/MetaCurrencyTypeItem.php | 550 + ...iningTypeList.php => MonitorFieldList.php} | 45 +- lib/Model/MonitorFieldListFieldsInner.php | 467 + .../NewHirePacketGtkyAnswerVisibilityItem.php | 467 + ...wHirePacketGtkyAnswerVisibilityRequest.php | 429 + ...HirePacketGtkyAnswerVisibilityResponse.php | 391 + lib/Model/NewHirePacketPublicApi.php | 1259 + .../NewHirePacketPublicApiWritableBody.php | 733 + lib/Model/NewHirePacketsListResponse.php | 484 + lib/Model/NewHireWidgetItem.php | 690 + lib/Model/NewHireWidgetResponse.php | 391 + lib/Model/NewWebHook.php | 62 +- lib/Model/OnboardingExperiencePublicApi.php | 599 + .../OnboardingExperiencesListResponse.php | 388 + lib/Model/PagedLocationResponse.php | 452 + lib/Model/PagedResponse.php | 459 + lib/Model/Pagination.php | 20 +- lib/Model/PaginationMetaData.php | 485 + ...ompanyProfileCompanyInformationRequest.php | 452 + ...rofileCompanyInformationRequestAddress.php | 529 + .../PayGradesAndBandsPublishResponse.php | 388 + .../PayGradesAndBandsSaveLevelsResponse.php | 388 + ...yGradesAndBandsUpdateJobTitlesResponse.php | 388 + ...ayGradesAndBandsUpdatePayBandsResponse.php | 388 + lib/Model/PersonInfoApiTransformer.php | 528 + lib/Model/PostNewEmployee.php | 155 +- lib/Model/ProblemDetailsResponse.php | 581 + lib/Model/ProjectCreateRequestSchema.php | 12 +- ...ProjectCreateTimeTrackingProjectTaskV1.php | 438 + .../ProjectCreateTimeTrackingProjectV1.php | 583 + ...tCreateTimeTrackingProjectV1TasksInner.php | 438 + lib/Model/ProjectInfoApiTransformer.php | 16 +- ...php => ProjectPaginatedResponseDataV1.php} | 77 +- .../ProjectPaginatedResponseDataV1Links.php | 421 + ...rojectPaginatedResponseDataV1LinksNext.php | 389 + ...rojectPaginatedResponseDataV1LinksPrev.php | 389 + .../ProjectPaginatedResponseDataV1Meta.php | 497 + lib/Model/ProjectPaginatedTasksResponseV1.php | 461 + .../ProjectPaginatedTasksResponseV1Links.php | 438 + .../ProjectPaginatedTasksResponseV1Meta.php | 532 + ...aginatedTimeTrackingProjectsResponseV1.php | 452 + lib/Model/ProjectTimeTrackingProjectV1.php | 727 + lib/Model/ProjectTimeTrackingTaskV1.php | 599 + ...ProjectUpdateTimeTrackingProjectTaskV1.php | 429 + .../ProjectUpdateTimeTrackingProjectV1.php | 581 + lib/Model/ProvinceItem.php | 516 + lib/Model/PutCompanyIndustryCodesRequest.php | 391 + .../PutCompanyProfileDisplayNameRequest.php | 391 + lib/Model/RemoveCycleAdminSelfResponse.php | 394 + .../RemoveTotalRewardsEmployeesRequest.php | 391 + lib/Model/Report.php | 6 +- lib/Model/Request.php | 49 +- lib/Model/RequestCustomReport.php | 103 +- lib/Model/RequestCustomReportFilters.php | 45 +- .../RequestCustomReportFiltersLastChanged.php | 99 +- lib/Model/RequestCustomReportResponse.php | 452 + ...uestCustomReportResponseEmployeesInner.php | 388 + ...equestCustomReportResponseFieldsInner.php} | 14 +- lib/Model/SaveChangeCommTemplateResponse.php | 394 + .../SchedulingCreateScheduleRequestV1.php | 596 + ...hedulingCreateSchedulingShiftRequestV1.php | 891 + .../SchedulingPublishShiftsFailureV1.php | 427 + lib/Model/SchedulingPublishShiftsRequest.php | 406 + lib/Model/SchedulingPublishShiftsResultV1.php | 427 + .../SchedulingScheduleListResponseV1.php | 452 + .../SchedulingScheduleListResponseV1Links.php | 432 + .../SchedulingScheduleListResponseV1Meta.php | 452 + lib/Model/SchedulingScheduleV1.php | 721 + lib/Model/SchedulingSchedulingShiftV1.php | 1096 + lib/Model/SchedulingShiftListResponseV1.php | 452 + .../SchedulingShiftListResponseV1Links.php | 420 + ...SchedulingShiftListResponseV1LinksNext.php | 395 + ...SchedulingShiftListResponseV1LinksPrev.php | 395 + .../SchedulingShiftListResponseV1Meta.php | 452 + .../SchedulingTimezoneListResponseV1.php | 452 + .../SchedulingTimezoneListResponseV1Meta.php | 452 + lib/Model/SchedulingTimezoneV1.php | 427 + .../SchedulingUpdateScheduleRequestV1.php | 581 + ...hedulingUpdateSchedulingShiftRequestV1.php | 875 + ...erificationLifecycleEmailByUserRequest.php | 425 + lib/Model/SendRecommendationsResponse.php | 394 + lib/Model/SetBreakPolicyEmployeesRequest.php | 391 + ...SetTotalRewardsCustomDisclaimerRequest.php | 391 + .../SetTotalRewardsOnboardingStepRequest.php | 391 + ...egoryList.php => ShareOptionsResponse.php} | 42 +- lib/Model/StateProvinceResponseSchema.php | 4 +- lib/Model/StateProvinceSchema.php | 8 +- lib/Model/TableRowDeleteResponse.php | 65 +- lib/Model/TableRowUpdate.php | 63 +- lib/Model/TabularField.php | 420 + ...tegory.php => TabularFieldFieldsInner.php} | 79 +- lib/Model/TimeOffBalanceEntry.php | 616 + lib/Model/TimeOffHistory.php | 145 +- lib/Model/TimeOffPolicy.php | 558 + lib/Model/TimeOffRequest.php | 116 +- lib/Model/TimeOffRequest1.php | 740 + lib/Model/TimeOffRequest1Actions.php | 549 + lib/Model/TimeOffRequest1Amount.php | 455 + lib/Model/TimeOffRequest1Notes.php | 421 + lib/Model/TimeOffRequest1Status.php | 453 + ...emaProject.php => TimeOffRequest1Type.php} | 48 +- lib/Model/TimeOffRequestDatesInner.php | 14 +- lib/Model/TimeOffRequestNotesInner.php | 38 +- lib/Model/TimeOffTypesAndDefaultHours.php | 426 + ...fTypesAndDefaultHoursDefaultHoursInner.php | 426 + ...fTypesAndDefaultHoursTimeOffTypesInner.php | 645 + ...ngBreakPolicyEmployeeCollectionV1Inner.php | 473 + ...ackingBreakPolicySuggestionsResponseV1.php | 388 + ...stionsResponseV1SuggestedPoliciesInner.php | 511 + ...nseV1SuggestedPoliciesInnerBreaksInner.php | 588 + ...TimeTrackingBulkResponseSchemaResponse.php | 2 +- ...UpdateTimeTrackingBreakWithoutPolicyV1.php | 711 + ...rackingCreateTimeTrackingBreakPolicyV1.php | 526 + .../TimeTrackingCreateTimeTrackingBreakV1.php | 705 + ...eTrackingOffsetPaginatedResponseDataV1.php | 421 + ...kingOffsetPaginatedResponseDataV1Links.php | 439 + ...ckingOffsetPaginatedResponseDataV1Meta.php | 462 + ...ingPaginatedBreakAssessmentsResponseV1.php | 452 + ...ackingPaginatedBreakPoliciesResponseV1.php | 452 + ...aginatedBreakPolicyEmployeesResponseV1.php | 452 + .../TimeTrackingPaginatedBreaksResponseV1.php | 452 + lib/Model/TimeTrackingRecordSchema.php | 52 +- ...eTrackingSyncTimeTrackingBreakPolicyV1.php | 523 + ...eTrackingTimeTrackingBreakAssessmentV1.php | 941 + ...TimeTrackingBreakAssessmentViolationV1.php | 537 + ...rackingTimeTrackingBreakAvailabilityV1.php | 935 + .../TimeTrackingTimeTrackingBreakPolicyV1.php | 599 + ...TimeTrackingBreakPolicyWithRelationsV1.php | 663 + lib/Model/TimeTrackingTimeTrackingBreakV1.php | 845 + ...rackingUpdateTimeTrackingBreakPolicyV1.php | 459 + .../TimeTrackingUpdateTimeTrackingBreakV1.php | 705 + .../TimesheetEntryInfoApiTransformer.php | 60 +- lib/Model/TimezoneListResponse.php | 452 + lib/Model/TimezoneResource.php | 485 + .../TotalRewardsBenefitDetailsValues.php | 573 + .../TotalRewardsBenefitSectionValues.php | 421 + .../TotalRewardsCalendarSectionValues.php | 459 + lib/Model/TotalRewardsCompSummaryValues.php | 503 + .../TotalRewardsCustomDisclaimerInfo.php | 427 + lib/Model/TotalRewardsEmployeeStatement.php | 943 + lib/Model/TotalRewardsEquityDetailsValues.php | 1095 + ...lRewardsEquityEstimatedValuationValues.php | 529 + .../TotalRewardsEquityGrowthChartItem.php | 573 + .../TotalRewardsEquityGrowthEstimation.php | 599 + lib/Model/TotalRewardsEquitySectionValues.php | 529 + .../TotalRewardsExtraPayDetailsValues.php | 593 + .../TotalRewardsExtraPaySectionValues.php | 453 + lib/Model/TotalRewardsHolidayValue.php | 459 + lib/Model/TotalRewardsOnboardingStep.php | 420 + .../TotalRewardsOverviewSectionValues.php | 471 + lib/Model/TotalRewardsTimeOffPolicyValue.php | 497 + lib/Model/TotalRewardsTimelineItem.php | 465 + lib/Model/TotalRewardsTimelineItemLabel.php | 364 + .../TotalRewardsTimelineSectionValues.php | 459 + lib/Model/TrainingCategory.php | 4 +- lib/Model/TrainingRecord.php | 88 +- lib/Model/TrainingRecordMap.php | 364 + lib/Model/TrainingRecordType.php | 364 + lib/Model/TrainingType.php | 46 +- ...eldsInner.php => TrainingTypeCategory.php} | 17 +- .../TransformedApiEmployeeGoalDetailsGoal.php | 62 +- lib/Model/TransformedApiGoal.php | 452 +- lib/Model/TransformedApiGoalGoalActions.php | 421 - ... => TransformedApiGoalMilestonesInner.php} | 46 +- ...nassignEmployeesFromBreakPolicyRequest.php | 399 + ...t.php => UpdateApplicantStatusRequest.php} | 10 +- lib/Model/UpdateApplicantStatusResponse.php | 420 + .../UpdateCompanyIndustryCodes400Response.php | 394 + .../UpdateCompanyIndustryCodes403Response.php | 394 + .../UpdateCompanyIndustryCodes404Response.php | 394 + .../UpdateCompanyIndustryCodes500Response.php | 394 + .../UpdateCompanyIndustryCodesResponse.php | 388 + .../UpdateCompanyNameBadRequestResponse.php | 388 + ...dateCompanyNameBadRequestResponseError.php | 394 + .../UpdateCompanyNameForbiddenResponse.php | 388 + ...pdateCompanyNameForbiddenResponseError.php | 388 + ...UpdateCompanyNameInternalErrorResponse.php | 388 + ...p => UpdateCompanyNameSuccessResponse.php} | 42 +- .../UpdateCompensationBenchmarkRequest.php | 1071 + .../UpdateCompensationBenchmarkSourceItem.php | 458 + ...ateCompensationBenchmarkSourcesRequest.php | 391 + ...teCompensationBenchmarkSourcesResponse.php | 394 + .../UpdateEmployeeTrainingRecordRequest.php | 18 +- ...EmployeeVerificationIntegrationRequest.php | 391 + .../UpdateEmployeeVerificationRequest.php | 658 + lib/Model/UpdateGoalCommentRequest.php | 391 + ...=> UpdateGoalMilestoneProgressRequest.php} | 8 +- ...uest.php => UpdateGoalProgressRequest.php} | 14 +- ...quest.php => UpdateGoalSharingRequest.php} | 10 +- lib/Model/{Goal.php => UpdateGoalV1.php} | 97 +- ...11Request.php => UpdateGoalV11Request.php} | 24 +- ...> UpdateGoalV11RequestMilestonesInner.php} | 8 +- lib/Model/UpdateLocationRequest.php | 458 + lib/Model/UpdateLocationRequestAddress.php | 658 + lib/Model/UpdateTrainingTypeRequest.php | 14 +- .../UpdateTrainingTypeRequestCategory.php | 76 +- ...hp => UpdateWebhookBadRequestResponse.php} | 14 +- lib/Model/UpdatedCompensationBenchmark.php | 426 + ...tedCompensationBenchmarkSavedBenchmark.php | 1192 + lib/Model/UploadEmployeePhotoRequest1.php | 391 + lib/Model/UserPermissionData.php | 485 + lib/Model/WebHookPostFieldDataObject.php | 584 + lib/Model/WebHookPostFieldPageDataObject.php | 426 + lib/Model/WebHookPostFieldResponseObject.php | 461 + lib/Model/WebHookPostFieldTableDataObject.php | 426 + lib/Model/WebHookResponse.php | 150 +- lib/Model/Webhook.php | 120 +- lib/Model/WebhookBadRequest.php | 6 +- lib/Model/WebhookBadRequestErrorsInner.php | 420 + lib/Model/WebhookErrorErrors.php | 12 +- lib/Model/WebhookEventType.php | 84 + ...ookLogResponse.php => WebhookLogEntry.php} | 94 +- ...rsInner.php => WebhookLogListResponse.php} | 14 +- lib/Model/WebhookLogRateLimitResponse.php | 388 + .../WebhookLogRateLimitResponseError.php | 420 + lib/Model/WebhookSubErrorProperty.php | 12 +- ...hookSubErrorPropertyMonitorFieldsInner.php | 420 + ...okSubErrorPropertyMonitorFieldsInnerId.php | 363 + ...hookSubErrorPropertyUnknownFieldsInner.php | 6 +- ...okSubErrorPropertyUnknownFieldsInnerId.php | 363 + lib/Model/WebhooksListWebhooksInner.php | 16 +- lib/Model/WhosOutEntry.php | 582 + lib/Model/XmlEmployeeFiles.php | 420 + lib/Model/XmlEmployeeFilesCategoryInner.php | 719 + ...XmlEmployeeFilesCategoryInnerFileInner.php | 827 + ...d1fc0f164cb51973a0206b8e2fb2d2dRequest.php | 391 + ...6b8e2fb2d2dRequestBudgetBreakdownInner.php | 546 + ...2ee192568adbd5e3179a91e6e2RequestInner.php | 464 + ...79a91e6e2RequestInnerBudgetAllocations.php | 470 + ...88aa996aba16d7a495c62321ea999a9Request.php | 388 + ...d7a495c62321ea999a9RequestSentDateTime.php | 364 + ...958585c861325ea7a2cd30a8c74f042Request.php | 391 + ...9a5068111ec499135c7d6e9a53d5a30Request.php | 391 + specs/public.yaml | 30388 ++++++++++------ specs/spec-source.json | 6 +- test/Api/AlertApiTest.php | 80 + test/Api/AlertConfigurationsApiTest.php | 113 + test/Api/CompanyApiTest.php | 80 + test/Api/CompanyProfileApiTest.php | 102 + test/Api/CompensationApiTest.php | 102 + test/Api/CompensationBenchmarkingApiTest.php | 190 + test/Api/CompensationPlanningApiTest.php | 377 + test/Api/EmployeeVerificationApiTest.php | 124 + test/Api/LocationsApiTest.php | 124 + test/Api/OnboardingApiTest.php | 201 + test/Api/SchedulingApiTest.php | 212 + test/Api/TotalRewardsApiTest.php | 157 + 1157 files changed, 319333 insertions(+), 20010 deletions(-) create mode 100644 .sdk-update/analysis/breaking-exit create mode 100644 .sdk-update/analysis/breaking-output.txt create mode 100644 .sdk-update/analysis/changelog-stderr.log create mode 100644 .sdk-update/analysis/changelog.json create mode 100644 .sdk-update/analysis/changelog.md create mode 100644 .sdk-update/classification.txt create mode 100644 .sdk-update/metadata.json create mode 100644 .sdk-update/pr-body.md create mode 100644 .sdk-update/public.yaml create mode 100644 .sdk-update/since-last-review.txt create mode 100644 docs/Api/AlertApi.md create mode 100644 docs/Api/AlertConfigurationsApi.md create mode 100644 docs/Api/CompanyApi.md create mode 100644 docs/Api/CompanyProfileApi.md create mode 100644 docs/Api/CompensationApi.md create mode 100644 docs/Api/CompensationBenchmarkingApi.md create mode 100644 docs/Api/CompensationPlanningApi.md create mode 100644 docs/Api/EmployeeVerificationApi.md create mode 100644 docs/Api/LocationsApi.md create mode 100644 docs/Api/OnboardingApi.md create mode 100644 docs/Api/SchedulingApi.md create mode 100644 docs/Api/TotalRewardsApi.md create mode 100644 docs/Api/WebhookEventsApi.md create mode 100644 docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md create mode 100644 docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md create mode 100644 docs/Model/AddCycleAdminsResponse.md create mode 100644 docs/Model/AddCycleAdminsResponseAddedInner.md create mode 100644 docs/Model/AddCycleAdminsResponseSkippedInner.md delete mode 100644 docs/Model/AddNewEmployeeTrainingRecordRequest.md create mode 100644 docs/Model/AddTotalRewardsEmployeesRequest.md create mode 100644 docs/Model/AlertTemplateListResponse.md create mode 100644 docs/Model/AlertTemplateListResponseAlertsInner.md create mode 100644 docs/Model/AlignmentOptionsResponse.md create mode 100644 docs/Model/AlignmentOptionsResponseAlignsWithOptionsInner.md create mode 100644 docs/Model/ApplicantStatus.md create mode 100644 docs/Model/ApplicationDetailsAttachmentsInner.md rename docs/Model/{TimeTrackingRecordSchemaProjectTask.md => ApplicationDetailsJobTitle.md} (77%) create mode 100644 docs/Model/ApplicationsListApplicationsInner.md rename docs/Model/{ApplicationsListApplicationsItemsInnerApplicant.md => ApplicationsListApplicationsInnerApplicant.md} (81%) rename docs/Model/{ApplicationsListApplicationsItemsInnerJob.md => ApplicationsListApplicationsInnerJob.md} (62%) rename docs/Model/{FieldListFieldsInner.md => ApplicationsListApplicationsInnerJobTitle.md} (73%) rename docs/Model/{ApplicationsListApplicationsItemsInnerStatus.md => ApplicationsListApplicationsInnerStatus.md} (87%) delete mode 100644 docs/Model/ApplicationsListApplicationsItemsInner.md create mode 100644 docs/Model/AssignEmployeesToBreakPolicyRequest.md rename docs/Model/{TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md => AssignTimeOffPoliciesRequestInner.md} (71%) create mode 100644 docs/Model/AssignedTimeOffPolicy.md create mode 100644 docs/Model/AssignedTimeOffPolicyV11.md create mode 100644 docs/Model/AvailableAction.md create mode 100644 docs/Model/BadRequestV1.md create mode 100644 docs/Model/BadRequestV1Error.md create mode 100644 docs/Model/BankHoliday.md create mode 100644 docs/Model/BenefitCoveragesResponse.md create mode 100644 docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md create mode 100644 docs/Model/BenefitDeductionSubType.md create mode 100644 docs/Model/BenefitDeductionType.md rename docs/Model/{Forbidden.md => BenefitDeductionTypeId.md} (82%) rename docs/Model/{PutGoalSharedWithRequest.md => BudgetBreakdownImportResponse.md} (73%) create mode 100644 docs/Model/BudgetGuidelinesView.md create mode 100644 docs/Model/BudgetGuidelinesWarnings.md create mode 100644 docs/Model/C79f9c5950f983e59d2626faa30c00a1Request.md create mode 100644 docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md create mode 100644 docs/Model/CanCreateGoalsResponse.md create mode 100644 docs/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md create mode 100644 docs/Model/ChangedEmployeeIdsResponse.md create mode 100644 docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md create mode 100644 docs/Model/ChangedEmployeeTableDataResponse.md create mode 100644 docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md create mode 100644 docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md create mode 100644 docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md rename docs/Model/{InternalServerError.md => CloseGoalRequest.md} (79%) create mode 100644 docs/Model/CompanyAlertDataObject.md create mode 100644 docs/Model/CompanyBenefitSummary.md create mode 100644 docs/Model/CompanyBenefitsListResponse.md create mode 100644 docs/Model/CompanyDeletedWebhookPayload.md create mode 100644 docs/Model/CompanyFilesResponse.md create mode 100644 docs/Model/CompanyFilesResponseCategoriesInner.md create mode 100644 docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md create mode 100644 docs/Model/CompanyIndustryDataObject.md create mode 100644 docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md create mode 100644 docs/Model/CompanyIntegrationsUpdatedWebhookPayloadData.md create mode 100644 docs/Model/CompanyProfileData.md create mode 100644 docs/Model/CompanyProfileDataAddress.md create mode 100644 docs/Model/CompanyProfileIntegrations.md create mode 100644 docs/Model/CompanyUpdatedWebhookPayload.md create mode 100644 docs/Model/CompensationBenchmarkDetailEmployee.md create mode 100644 docs/Model/CompensationBenchmarkDetailEmployeeJobTitle.md create mode 100644 docs/Model/CompensationBenchmarkDetailEmployeeSalary.md create mode 100644 docs/Model/CompensationBenchmarkDetails.md create mode 100644 docs/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.md create mode 100644 docs/Model/CompensationBenchmarkJobLocationEmployee.md create mode 100644 docs/Model/CompensationBenchmarkJobLocationEmployeeSalary.md create mode 100644 docs/Model/CompensationBenchmarkJobLocationPair.md rename docs/Model/{WebhookSubErrorPropertyPostFieldsInner.md => CompensationBenchmarkJobLocationPairJobDetails.md} (75%) create mode 100644 docs/Model/CompensationBenchmarkOverview.md create mode 100644 docs/Model/CompensationBenchmarkOverviewValues.md create mode 100644 docs/Model/CompensationBenchmarkSource.md create mode 100644 docs/Model/CompensationBenchmarkingColumnMap.md create mode 100644 docs/Model/CompensationBenchmarksList.md create mode 100644 docs/Model/CompensationEquitySettingsResponse.md create mode 100644 docs/Model/CompensationEquitySettingsResponseCompanyValuation.md create mode 100644 docs/Model/CompensationEquitySettingsResponseDisclaimers.md create mode 100644 docs/Model/CompensationEquitySettingsResponseOutstandingShares.md create mode 100644 docs/Model/CompensationEquitySettingsResponsePricePerShare.md create mode 100644 docs/Model/CompensationEquitySettingsResponseSliderMin.md create mode 100644 docs/Model/CompensationEquitySettingsResponseVestingConditions.md create mode 100644 docs/Model/CompensationEquitySettingsUpdateRequest.md create mode 100644 docs/Model/CompensationPlanningCycleAdminsResponse.md create mode 100644 docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md create mode 100644 docs/Model/CompensationPlanningCycleCompleteResponse.md create mode 100644 docs/Model/CompensationPlanningCycleCompleteResponseErrorsInner.md create mode 100644 docs/Model/CompensationToolsDataObject.md create mode 100644 docs/Model/CompensationToolsResponse.md create mode 100644 docs/Model/CompensationUpsellData.md create mode 100644 docs/Model/CompletedQuestionsAndResponseDataObject.md create mode 100644 docs/Model/ConversionRateDataObject.md create mode 100644 docs/Model/CountriesOptionsResponse.md rename docs/Model/{PostApplicationCommentRequest.md => CreateApplicationCommentRequest.md} (68%) create mode 100644 docs/Model/CreateCandidateResponse.md create mode 100644 docs/Model/CreateCommentResponse.md create mode 100644 docs/Model/CreateCompensationBenchmarkRequest.md create mode 100644 docs/Model/CreateCompensationBenchmarkSourceRequest.md create mode 100644 docs/Model/CreateEmployeeTrainingRecordRequest.md create mode 100644 docs/Model/CreateEmployeeTrainingRecordRequestCost.md create mode 100644 docs/Model/CreateGoalCommentRequest.md create mode 100644 docs/Model/CreateGoalRequest.md rename docs/Model/{PostGoalRequestMilestonesInner.md => CreateGoalRequestMilestonesInner.md} (89%) create mode 100644 docs/Model/CreateJobOpeningResponse.md create mode 100644 docs/Model/CreateLocationRequest.md create mode 100644 docs/Model/CreateLocationRequestAddress.md rename docs/Model/{AddTrainingCategoryRequest.md => CreateTrainingCategoryRequest.md} (89%) rename docs/Model/{AddTrainingTypeRequest.md => CreateTrainingTypeRequest.md} (82%) rename docs/Model/{AddTrainingTypeRequestCategory.md => CreateTrainingTypeRequestCategory.md} (66%) create mode 100644 docs/Model/CreateWebhookBadRequestResponse.md rename docs/Model/{TrainingTypeList.md => CreatedCompensationBenchmark.md} (56%) create mode 100644 docs/Model/CreatedCompensationBenchmarkSavedBenchmark.md rename docs/Model/{TimeTrackingRecordSchemaShiftDifferential.md => CreatedCompensationBenchmarkSource.md} (71%) create mode 100644 docs/Model/CreatedTimeOffRequest.md create mode 100644 docs/Model/CreatedTimeOffRequestAmount.md create mode 100644 docs/Model/CreatedTimeOffRequestNotes.md create mode 100644 docs/Model/CreatedTimeOffRequestStatus.md create mode 100644 docs/Model/CreatedTimeOffRequestType.md create mode 100644 docs/Model/CurrencyConversionsResponse.md create mode 100644 docs/Model/Dacd313af2106213fc4696175941ce65Request.md create mode 100644 docs/Model/DataRequestAggregations.md create mode 100644 docs/Model/DatasetDataResponseV2.md create mode 100644 docs/Model/DatasetDataResponseV2DataInner.md create mode 100644 docs/Model/DatasetDataResponseV2DataInnerFieldsValue.md create mode 100644 docs/Model/DatasetDataResponseV2Links.md create mode 100644 docs/Model/DatasetDataResponseV2Meta.md create mode 100644 docs/Model/DatasetResponseV1.md create mode 100644 docs/Model/DatasetV1.md create mode 100644 docs/Model/DatasetsResponseV12.md create mode 100644 docs/Model/DatasetsResponseV12DatasetsInner.md create mode 100644 docs/Model/DeleteCompensationBenchmarkSourceRequest.md create mode 100644 docs/Model/DeleteCompensationBenchmarkSourceResponse.md create mode 100644 docs/Model/DetailsAndCurrencyRequestDataObject.md create mode 100644 docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md create mode 100644 docs/Model/EmployeeBenefitFilters.md create mode 100644 docs/Model/EmployeeBenefitFiltersFilters.md create mode 100644 docs/Model/EmployeeBenefitsListResponse.md create mode 100644 docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md create mode 100644 docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md create mode 100644 docs/Model/EmployeeCreatedWebhookPayload.md create mode 100644 docs/Model/EmployeeCreatedWebhookPayloadData.md create mode 100644 docs/Model/EmployeeCursorPaginationQueryObject.md create mode 100644 docs/Model/EmployeeDeletedWebhookPayload.md create mode 100644 docs/Model/EmployeeDeletedWebhookPayloadData.md create mode 100644 docs/Model/EmployeeDependentsResponse.md create mode 100644 docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md create mode 100644 docs/Model/EmployeeOptionalField.md create mode 100644 docs/Model/EmployeePhotoJsonResponse.md create mode 100644 docs/Model/EmployeeStringCodeErrorResponseV1.md create mode 100644 docs/Model/EmployeeStringCodeErrorResponseV1Error.md create mode 100644 docs/Model/EmployeeTableRow.md create mode 100644 docs/Model/EmployeeTimeOffPolicyAssignment.md create mode 100644 docs/Model/EmployeeTimeOffPolicyAssignmentV11.md create mode 100644 docs/Model/EmployeeTimeOffRequestApproverResponseInner.md create mode 100644 docs/Model/EmployeeUpdatedWebhookPayload.md create mode 100644 docs/Model/EmployeeUpdatedWebhookPayloadData.md create mode 100644 docs/Model/EmployeeValue.md create mode 100644 docs/Model/EmployeeValueAnyOfInner.md create mode 100644 docs/Model/EmployeeVerificationIntegration.md create mode 100644 docs/Model/EmployeeVerificationIntegrationResponse.md create mode 100644 docs/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md create mode 100644 docs/Model/EmployeeVerificationPublicApiRecord.md create mode 100644 docs/Model/EmployeeVerificationUpdateResponse.md create mode 100644 docs/Model/EmployeeVerificationsListResponse.md create mode 100644 docs/Model/EmployeesDirectoryJsonResponse.md create mode 100644 docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md create mode 100644 docs/Model/EmployeesDirectoryXmlResponse.md create mode 100644 docs/Model/EmployeesDirectoryXmlResponseEmployees.md create mode 100644 docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md create mode 100644 docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md rename docs/Model/{ApplicationsListApplications.md => EmployeesDirectoryXmlResponseFieldset.md} (55%) create mode 100644 docs/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.md create mode 100644 docs/Model/ErrorResponse.md create mode 100644 docs/Model/ErrorResponseError.md create mode 100644 docs/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md create mode 100644 docs/Model/Field1.md create mode 100644 docs/Model/Field1Id.md create mode 100644 docs/Model/FieldOptionsTransformerId.md create mode 100644 docs/Model/ForbiddenV1.md create mode 100644 docs/Model/ForbiddenV1Error.md create mode 100644 docs/Model/GetBreakPolicySuggestionsRequest.md create mode 100644 docs/Model/GetCompanyReportResponse.md rename docs/Model/{DatasetResponse.md => GetCompanyReportResponseEmployeesInner.md} (71%) create mode 100644 docs/Model/GetDataFromDatasetV2Request.md create mode 100644 docs/Model/GetEmployeeResponse.md create mode 100644 docs/Model/GetEmployeesEmployeeBaseResponse.md create mode 100644 docs/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.md rename docs/Model/{AddNewEmployeeTrainingRecordRequestCost.md => GetEmployeesEmployeeResponseAllOfPayRate.md} (77%) rename docs/Model/{Dataset.md => GetEmployeesEmployeeResponseAllOfTeams.md} (78%) create mode 100644 docs/Model/GetEmployeesResponseObjectLinksNext.md create mode 100644 docs/Model/GetEmployeesResponseObjectLinksPrev.md create mode 100644 docs/Model/GetEmployeesResponseObjectLinksSelf.md delete mode 100644 docs/Model/Goal.md create mode 100644 docs/Model/GoalCommentResponse.md create mode 100644 docs/Model/GoalCommentsResponse.md create mode 100644 docs/Model/GoalCommentsResponseCommentsInner.md create mode 100644 docs/Model/GoalResponse.md delete mode 100644 docs/Model/HiringLeadsList.md create mode 100644 docs/Model/ImportCompensationBenchmarksResponse.md create mode 100644 docs/Model/Industry.md create mode 100644 docs/Model/InlineObjectInner.md delete mode 100644 docs/Model/InvalidRequest.md delete mode 100644 docs/Model/InvalidRequestError.md create mode 100644 docs/Model/JobSummary.md create mode 100644 docs/Model/JobSummaryStatus.md delete mode 100644 docs/Model/JsonDirectoryEmployee.md delete mode 100644 docs/Model/JsonDirectoryEmployeeFieldsInner.md create mode 100644 docs/Model/JsonEmployeeFiles.md create mode 100644 docs/Model/JsonEmployeeFilesCategoriesInner.md create mode 100644 docs/Model/JsonEmployeeFilesCategoriesInnerFilesInner.md create mode 100644 docs/Model/JsonEmployeeFilesEmployee.md create mode 100644 docs/Model/LevelsAndBandsColumnMap.md create mode 100644 docs/Model/LevelsAndBandsEmployee.md rename docs/Model/{FieldList.md => LevelsAndBandsErrorWarningIdentifier.md} (68%) create mode 100644 docs/Model/LevelsAndBandsGroup.md create mode 100644 docs/Model/LevelsAndBandsGroupStatusCounts.md create mode 100644 docs/Model/LevelsAndBandsJobTitle.md create mode 100644 docs/Model/LevelsAndBandsJobTitleAssignment.md create mode 100644 docs/Model/LevelsAndBandsJobTitleAssignmentsRequest.md create mode 100644 docs/Model/LevelsAndBandsJobTitleWithEmployees.md create mode 100644 docs/Model/LevelsAndBandsJobTitlesStatus.md create mode 100644 docs/Model/LevelsAndBandsLevel.md create mode 100644 docs/Model/LevelsAndBandsLevelsAndBands.md create mode 100644 docs/Model/LevelsAndBandsLevelsAndBandsStatus.md create mode 100644 docs/Model/LevelsAndBandsPayBand.md create mode 100644 docs/Model/LevelsAndBandsStepStatus.md create mode 100644 docs/Model/LevelsAndBandsUploadResponse.md create mode 100644 docs/Model/ListFieldDetail.md create mode 100644 docs/Model/ListFieldOption.md create mode 100644 docs/Model/ListFieldValuesXml.md create mode 100644 docs/Model/ListFieldValuesXmlOptionInner.md create mode 100644 docs/Model/ListUsersResponseValue.md create mode 100644 docs/Model/ListUsersXmlResponse.md create mode 100644 docs/Model/ListUsersXmlResponseUserInner.md create mode 100644 docs/Model/LocationResponseObject.md create mode 100644 docs/Model/LocationResponseObjectAddress.md create mode 100644 docs/Model/LocationResponseObjectAddressCountry.md create mode 100644 docs/Model/LocationResponseObjectAddressState.md create mode 100644 docs/Model/LoginFailureResponse.md create mode 100644 docs/Model/LoginFailureXmlResponse.md create mode 100644 docs/Model/LoginResponse.md create mode 100644 docs/Model/LoginXmlResponse.md create mode 100644 docs/Model/MemberBenefitEventCoveragesInner.md create mode 100644 docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md delete mode 100644 docs/Model/MemberBenefitEventMembersInner.md delete mode 100644 docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md delete mode 100644 docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md create mode 100644 docs/Model/MemberBenefitEventsResponse.md create mode 100644 docs/Model/MemberBenefitsGetPermissionDeniedResponse.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponse.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseDataInner.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseLinks.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseLinksNext.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md create mode 100644 docs/Model/MemberBenefitsGetSuccessResponseMeta.md create mode 100644 docs/Model/MemberBenefitsGetValidationErrorResponse.md create mode 100644 docs/Model/MetaCompanyPropertiesResponse.md create mode 100644 docs/Model/MetaCurrencyTypeItem.md create mode 100644 docs/Model/MonitorFieldList.md create mode 100644 docs/Model/MonitorFieldListFieldsInner.md create mode 100644 docs/Model/NewHirePacketGtkyAnswerVisibilityItem.md create mode 100644 docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md create mode 100644 docs/Model/NewHirePacketGtkyAnswerVisibilityResponse.md create mode 100644 docs/Model/NewHirePacketPublicApi.md create mode 100644 docs/Model/NewHirePacketPublicApiWritableBody.md create mode 100644 docs/Model/NewHirePacketsListResponse.md create mode 100644 docs/Model/NewHireWidgetItem.md create mode 100644 docs/Model/NewHireWidgetResponse.md create mode 100644 docs/Model/OnboardingExperiencePublicApi.md create mode 100644 docs/Model/OnboardingExperiencesListResponse.md create mode 100644 docs/Model/PagedLocationResponse.md create mode 100644 docs/Model/PagedResponse.md create mode 100644 docs/Model/PaginationMetaData.md create mode 100644 docs/Model/PatchCompanyProfileCompanyInformationRequest.md create mode 100644 docs/Model/PatchCompanyProfileCompanyInformationRequestAddress.md create mode 100644 docs/Model/PayGradesAndBandsPublishResponse.md create mode 100644 docs/Model/PayGradesAndBandsSaveLevelsResponse.md create mode 100644 docs/Model/PayGradesAndBandsUpdateJobTitlesResponse.md create mode 100644 docs/Model/PayGradesAndBandsUpdatePayBandsResponse.md create mode 100644 docs/Model/PersonInfoApiTransformer.md delete mode 100644 docs/Model/PostApplicantStatusRequest.md delete mode 100644 docs/Model/PostGoalRequest.md create mode 100644 docs/Model/ProblemDetailsResponse.md create mode 100644 docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md create mode 100644 docs/Model/ProjectCreateTimeTrackingProjectV1.md create mode 100644 docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md delete mode 100644 docs/Model/ProjectInfoApiTransformerTask.md create mode 100644 docs/Model/ProjectPaginatedResponseDataV1.md create mode 100644 docs/Model/ProjectPaginatedResponseDataV1Links.md create mode 100644 docs/Model/ProjectPaginatedResponseDataV1LinksNext.md create mode 100644 docs/Model/ProjectPaginatedResponseDataV1LinksPrev.md create mode 100644 docs/Model/ProjectPaginatedResponseDataV1Meta.md create mode 100644 docs/Model/ProjectPaginatedTasksResponseV1.md create mode 100644 docs/Model/ProjectPaginatedTasksResponseV1Links.md create mode 100644 docs/Model/ProjectPaginatedTasksResponseV1Meta.md create mode 100644 docs/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md create mode 100644 docs/Model/ProjectTimeTrackingProjectV1.md create mode 100644 docs/Model/ProjectTimeTrackingTaskV1.md create mode 100644 docs/Model/ProjectUpdateTimeTrackingProjectTaskV1.md create mode 100644 docs/Model/ProjectUpdateTimeTrackingProjectV1.md create mode 100644 docs/Model/ProvinceItem.md create mode 100644 docs/Model/PutCompanyIndustryCodesRequest.md create mode 100644 docs/Model/PutCompanyProfileDisplayNameRequest.md create mode 100644 docs/Model/RemoveCycleAdminSelfResponse.md create mode 100644 docs/Model/RemoveTotalRewardsEmployeesRequest.md create mode 100644 docs/Model/RequestCustomReportResponse.md create mode 100644 docs/Model/RequestCustomReportResponseEmployeesInner.md create mode 100644 docs/Model/RequestCustomReportResponseFieldsInner.md create mode 100644 docs/Model/SaveChangeCommTemplateResponse.md create mode 100644 docs/Model/SchedulingCreateScheduleRequestV1.md create mode 100644 docs/Model/SchedulingCreateSchedulingShiftRequestV1.md create mode 100644 docs/Model/SchedulingPublishShiftsFailureV1.md create mode 100644 docs/Model/SchedulingPublishShiftsRequest.md create mode 100644 docs/Model/SchedulingPublishShiftsResultV1.md create mode 100644 docs/Model/SchedulingScheduleListResponseV1.md rename docs/Model/{DataRequestAggregationsInner.md => SchedulingScheduleListResponseV1Links.md} (67%) create mode 100644 docs/Model/SchedulingScheduleListResponseV1Meta.md create mode 100644 docs/Model/SchedulingScheduleV1.md create mode 100644 docs/Model/SchedulingSchedulingShiftV1.md create mode 100644 docs/Model/SchedulingShiftListResponseV1.md create mode 100644 docs/Model/SchedulingShiftListResponseV1Links.md create mode 100644 docs/Model/SchedulingShiftListResponseV1LinksNext.md create mode 100644 docs/Model/SchedulingShiftListResponseV1LinksPrev.md create mode 100644 docs/Model/SchedulingShiftListResponseV1Meta.md create mode 100644 docs/Model/SchedulingTimezoneListResponseV1.md create mode 100644 docs/Model/SchedulingTimezoneListResponseV1Meta.md create mode 100644 docs/Model/SchedulingTimezoneV1.md create mode 100644 docs/Model/SchedulingUpdateScheduleRequestV1.md create mode 100644 docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md create mode 100644 docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md create mode 100644 docs/Model/SendRecommendationsResponse.md create mode 100644 docs/Model/SetBreakPolicyEmployeesRequest.md create mode 100644 docs/Model/SetTotalRewardsCustomDisclaimerRequest.md create mode 100644 docs/Model/SetTotalRewardsOnboardingStepRequest.md create mode 100644 docs/Model/ShareOptionsResponse.md create mode 100644 docs/Model/TabularField.md create mode 100644 docs/Model/TabularFieldFieldsInner.md create mode 100644 docs/Model/TimeOffBalanceEntry.md create mode 100644 docs/Model/TimeOffPolicy.md create mode 100644 docs/Model/TimeOffRequest1.md create mode 100644 docs/Model/TimeOffRequest1Actions.md create mode 100644 docs/Model/TimeOffRequest1Amount.md create mode 100644 docs/Model/TimeOffRequest1Notes.md create mode 100644 docs/Model/TimeOffRequest1Status.md create mode 100644 docs/Model/TimeOffRequest1Type.md create mode 100644 docs/Model/TimeOffTypesAndDefaultHours.md create mode 100644 docs/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.md create mode 100644 docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md create mode 100644 docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md create mode 100644 docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1.md create mode 100644 docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md create mode 100644 docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md create mode 100644 docs/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md create mode 100644 docs/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md create mode 100644 docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md create mode 100644 docs/Model/TimeTrackingOffsetPaginatedResponseDataV1.md create mode 100644 docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.md create mode 100644 docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md create mode 100644 docs/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md create mode 100644 docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md create mode 100644 docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md create mode 100644 docs/Model/TimeTrackingPaginatedBreaksResponseV1.md delete mode 100644 docs/Model/TimeTrackingRecordSchemaProject.md create mode 100644 docs/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakPolicyV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md create mode 100644 docs/Model/TimeTrackingTimeTrackingBreakV1.md create mode 100644 docs/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md create mode 100644 docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md create mode 100644 docs/Model/TimezoneListResponse.md create mode 100644 docs/Model/TimezoneResource.md create mode 100644 docs/Model/TotalRewardsBenefitDetailsValues.md create mode 100644 docs/Model/TotalRewardsBenefitSectionValues.md create mode 100644 docs/Model/TotalRewardsCalendarSectionValues.md create mode 100644 docs/Model/TotalRewardsCompSummaryValues.md rename docs/Model/{LocationsList.md => TotalRewardsCustomDisclaimerInfo.md} (62%) create mode 100644 docs/Model/TotalRewardsEmployeeStatement.md create mode 100644 docs/Model/TotalRewardsEquityDetailsValues.md create mode 100644 docs/Model/TotalRewardsEquityEstimatedValuationValues.md create mode 100644 docs/Model/TotalRewardsEquityGrowthChartItem.md create mode 100644 docs/Model/TotalRewardsEquityGrowthEstimation.md create mode 100644 docs/Model/TotalRewardsEquitySectionValues.md create mode 100644 docs/Model/TotalRewardsExtraPayDetailsValues.md create mode 100644 docs/Model/TotalRewardsExtraPaySectionValues.md create mode 100644 docs/Model/TotalRewardsHolidayValue.md create mode 100644 docs/Model/TotalRewardsOnboardingStep.md create mode 100644 docs/Model/TotalRewardsOverviewSectionValues.md create mode 100644 docs/Model/TotalRewardsTimeOffPolicyValue.md create mode 100644 docs/Model/TotalRewardsTimelineItem.md create mode 100644 docs/Model/TotalRewardsTimelineItemLabel.md create mode 100644 docs/Model/TotalRewardsTimelineSectionValues.md delete mode 100644 docs/Model/TrainingCategoryList.md delete mode 100644 docs/Model/TrainingRecordList.md create mode 100644 docs/Model/TrainingRecordMap.md create mode 100644 docs/Model/TrainingRecordType.md create mode 100644 docs/Model/TrainingTypeCategory.md delete mode 100644 docs/Model/TransformedApiGoalGoal.md delete mode 100644 docs/Model/TransformedApiGoalGoalActions.md delete mode 100644 docs/Model/TransformedApiGoalGoalMilestonesInner.md create mode 100644 docs/Model/TransformedApiGoalMilestonesInner.md create mode 100644 docs/Model/UnassignEmployeesFromBreakPolicyRequest.md delete mode 100644 docs/Model/Unauthorized.md delete mode 100644 docs/Model/Unauthorized1.md create mode 100644 docs/Model/UpdateApplicantStatusRequest.md rename docs/Model/{GetGoalsAlignmentOptionsRequest.md => UpdateApplicantStatusResponse.md} (59%) create mode 100644 docs/Model/UpdateCompanyIndustryCodes400Response.md create mode 100644 docs/Model/UpdateCompanyIndustryCodes403Response.md create mode 100644 docs/Model/UpdateCompanyIndustryCodes404Response.md create mode 100644 docs/Model/UpdateCompanyIndustryCodes500Response.md create mode 100644 docs/Model/UpdateCompanyIndustryCodesResponse.md create mode 100644 docs/Model/UpdateCompanyNameBadRequestResponse.md create mode 100644 docs/Model/UpdateCompanyNameBadRequestResponseError.md rename docs/Model/{XmlDirectoryEmployeeFieldset.md => UpdateCompanyNameForbiddenResponse.md} (59%) create mode 100644 docs/Model/UpdateCompanyNameForbiddenResponseError.md create mode 100644 docs/Model/UpdateCompanyNameInternalErrorResponse.md create mode 100644 docs/Model/UpdateCompanyNameSuccessResponse.md create mode 100644 docs/Model/UpdateCompensationBenchmarkRequest.md create mode 100644 docs/Model/UpdateCompensationBenchmarkSourceItem.md create mode 100644 docs/Model/UpdateCompensationBenchmarkSourcesRequest.md create mode 100644 docs/Model/UpdateCompensationBenchmarkSourcesResponse.md create mode 100644 docs/Model/UpdateEmployeeVerificationIntegrationRequest.md create mode 100644 docs/Model/UpdateEmployeeVerificationRequest.md create mode 100644 docs/Model/UpdateGoalCommentRequest.md rename docs/Model/{PutGoalMilestoneProgressRequest.md => UpdateGoalMilestoneProgressRequest.md} (88%) rename docs/Model/{PutGoalProgressRequest.md => UpdateGoalProgressRequest.md} (65%) create mode 100644 docs/Model/UpdateGoalSharingRequest.md create mode 100644 docs/Model/UpdateGoalV1.md rename docs/Model/{PutGoalV11Request.md => UpdateGoalV11Request.md} (57%) rename docs/Model/{PutGoalV11RequestMilestonesInner.md => UpdateGoalV11RequestMilestonesInner.md} (88%) create mode 100644 docs/Model/UpdateLocationRequest.md create mode 100644 docs/Model/UpdateLocationRequestAddress.md create mode 100644 docs/Model/UpdateWebhookBadRequestResponse.md create mode 100644 docs/Model/UpdatedCompensationBenchmark.md create mode 100644 docs/Model/UpdatedCompensationBenchmarkSavedBenchmark.md create mode 100644 docs/Model/UploadEmployeePhotoRequest1.md create mode 100644 docs/Model/UserPermissionData.md delete mode 100644 docs/Model/WebHookLogResponse.md create mode 100644 docs/Model/WebHookPostFieldDataObject.md create mode 100644 docs/Model/WebHookPostFieldPageDataObject.md create mode 100644 docs/Model/WebHookPostFieldResponseObject.md create mode 100644 docs/Model/WebHookPostFieldTableDataObject.md rename docs/Model/{UnauthorizedErrorsInner.md => WebhookBadRequestErrorsInner.md} (78%) create mode 100644 docs/Model/WebhookEventType.md create mode 100644 docs/Model/WebhookLogEntry.md create mode 100644 docs/Model/WebhookLogListResponse.md create mode 100644 docs/Model/WebhookLogRateLimitResponse.md create mode 100644 docs/Model/WebhookLogRateLimitResponseError.md create mode 100644 docs/Model/WebhookSubErrorPropertyMonitorFieldsInner.md create mode 100644 docs/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.md create mode 100644 docs/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.md create mode 100644 docs/Model/WhosOutEntry.md delete mode 100644 docs/Model/XmlDirectoryEmployee.md delete mode 100644 docs/Model/XmlDirectoryEmployeeEmployees.md delete mode 100644 docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.md delete mode 100644 docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md delete mode 100644 docs/Model/XmlDirectoryEmployeeFieldsetFieldInner.md create mode 100644 docs/Model/XmlEmployeeFiles.md create mode 100644 docs/Model/XmlEmployeeFilesCategoryInner.md create mode 100644 docs/Model/XmlEmployeeFilesCategoryInnerFileInner.md create mode 100644 docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md create mode 100644 docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md create mode 100644 docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md create mode 100644 docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md create mode 100644 docs/Model/_288aa996aba16d7a495c62321ea999a9Request.md create mode 100644 docs/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md create mode 100644 docs/Model/_3958585c861325ea7a2cd30a8c74f042Request.md create mode 100644 docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md create mode 100644 lib/Api/AlertApi.php create mode 100644 lib/Api/AlertConfigurationsApi.php create mode 100644 lib/Api/CompanyApi.php create mode 100644 lib/Api/CompanyProfileApi.php create mode 100644 lib/Api/CompensationApi.php create mode 100644 lib/Api/CompensationBenchmarkingApi.php create mode 100644 lib/Api/CompensationPlanningApi.php create mode 100644 lib/Api/EmployeeVerificationApi.php create mode 100644 lib/Api/LocationsApi.php create mode 100644 lib/Api/OnboardingApi.php create mode 100644 lib/Api/SchedulingApi.php create mode 100644 lib/Api/TotalRewardsApi.php create mode 100644 lib/Api/WebhookEventsApi.php create mode 100644 lib/Model/A05b6d5f564f805d688ff2c1e37c3990Request.php create mode 100644 lib/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.php create mode 100644 lib/Model/AddCycleAdminsResponse.php create mode 100644 lib/Model/AddCycleAdminsResponseAddedInner.php create mode 100644 lib/Model/AddCycleAdminsResponseSkippedInner.php create mode 100644 lib/Model/AddTotalRewardsEmployeesRequest.php create mode 100644 lib/Model/AlertTemplateListResponse.php create mode 100644 lib/Model/AlertTemplateListResponseAlertsInner.php create mode 100644 lib/Model/AlignmentOptionsResponse.php create mode 100644 lib/Model/AlignmentOptionsResponseAlignsWithOptionsInner.php create mode 100644 lib/Model/ApplicantStatus.php create mode 100644 lib/Model/ApplicationDetailsAttachmentsInner.php create mode 100644 lib/Model/ApplicationDetailsJobTitle.php rename lib/Model/{ApplicationsListApplicationsItemsInner.php => ApplicationsListApplicationsInner.php} (90%) rename lib/Model/{ApplicationsListApplicationsItemsInnerApplicant.php => ApplicationsListApplicationsInnerApplicant.php} (95%) rename lib/Model/{ApplicationsListApplicationsItemsInnerJob.php => ApplicationsListApplicationsInnerJob.php} (95%) create mode 100644 lib/Model/ApplicationsListApplicationsInnerJobTitle.php rename lib/Model/{ApplicationsListApplicationsItemsInnerStatus.php => ApplicationsListApplicationsInnerStatus.php} (97%) create mode 100644 lib/Model/AssignEmployeesToBreakPolicyRequest.php rename lib/Model/{TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.php => AssignTimeOffPoliciesRequestInner.php} (93%) create mode 100644 lib/Model/AssignedTimeOffPolicy.php create mode 100644 lib/Model/AssignedTimeOffPolicyV11.php create mode 100644 lib/Model/AvailableAction.php rename lib/Model/{InternalServerError.php => BadRequestV1.php} (96%) create mode 100644 lib/Model/BadRequestV1Error.php rename lib/Model/{FieldListFieldsInner.php => BankHoliday.php} (91%) create mode 100644 lib/Model/BenefitCoveragesResponse.php create mode 100644 lib/Model/BenefitCoveragesResponseBenefitCoveragesInner.php create mode 100644 lib/Model/BenefitDeductionSubType.php create mode 100644 lib/Model/BenefitDeductionType.php create mode 100644 lib/Model/BenefitDeductionTypeId.php create mode 100644 lib/Model/BudgetBreakdownImportResponse.php create mode 100644 lib/Model/BudgetGuidelinesView.php create mode 100644 lib/Model/BudgetGuidelinesWarnings.php create mode 100644 lib/Model/C79f9c5950f983e59d2626faa30c00a1Request.php create mode 100644 lib/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.php rename lib/Model/{HiringLeadsList.php => CanCreateGoalsResponse.php} (89%) create mode 100644 lib/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.php create mode 100644 lib/Model/ChangedEmployeeIdsResponse.php create mode 100644 lib/Model/ChangedEmployeeIdsResponseEmployeesValue.php create mode 100644 lib/Model/ChangedEmployeeTableDataResponse.php create mode 100644 lib/Model/ChangedEmployeeTableDataResponseEmployeesValue.php create mode 100644 lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.php create mode 100644 lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.php create mode 100644 lib/Model/CloseGoalRequest.php create mode 100644 lib/Model/CompanyAlertDataObject.php create mode 100644 lib/Model/CompanyBenefitSummary.php create mode 100644 lib/Model/CompanyBenefitsListResponse.php create mode 100644 lib/Model/CompanyDeletedWebhookPayload.php create mode 100644 lib/Model/CompanyFilesResponse.php create mode 100644 lib/Model/CompanyFilesResponseCategoriesInner.php create mode 100644 lib/Model/CompanyFilesResponseCategoriesInnerFilesInner.php create mode 100644 lib/Model/CompanyIndustryDataObject.php create mode 100644 lib/Model/CompanyIntegrationsUpdatedWebhookPayload.php create mode 100644 lib/Model/CompanyIntegrationsUpdatedWebhookPayloadData.php create mode 100644 lib/Model/CompanyProfileData.php create mode 100644 lib/Model/CompanyProfileDataAddress.php create mode 100644 lib/Model/CompanyProfileIntegrations.php create mode 100644 lib/Model/CompanyUpdatedWebhookPayload.php create mode 100644 lib/Model/CompensationBenchmarkDetailEmployee.php create mode 100644 lib/Model/CompensationBenchmarkDetailEmployeeJobTitle.php create mode 100644 lib/Model/CompensationBenchmarkDetailEmployeeSalary.php create mode 100644 lib/Model/CompensationBenchmarkDetails.php create mode 100644 lib/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.php create mode 100644 lib/Model/CompensationBenchmarkJobLocationEmployee.php create mode 100644 lib/Model/CompensationBenchmarkJobLocationEmployeeSalary.php create mode 100644 lib/Model/CompensationBenchmarkJobLocationPair.php create mode 100644 lib/Model/CompensationBenchmarkJobLocationPairJobDetails.php create mode 100644 lib/Model/CompensationBenchmarkOverview.php create mode 100644 lib/Model/CompensationBenchmarkOverviewValues.php create mode 100644 lib/Model/CompensationBenchmarkSource.php create mode 100644 lib/Model/CompensationBenchmarkingColumnMap.php create mode 100644 lib/Model/CompensationBenchmarksList.php create mode 100644 lib/Model/CompensationEquitySettingsResponse.php create mode 100644 lib/Model/CompensationEquitySettingsResponseCompanyValuation.php create mode 100644 lib/Model/CompensationEquitySettingsResponseDisclaimers.php create mode 100644 lib/Model/CompensationEquitySettingsResponseOutstandingShares.php create mode 100644 lib/Model/CompensationEquitySettingsResponsePricePerShare.php create mode 100644 lib/Model/CompensationEquitySettingsResponseSliderMin.php create mode 100644 lib/Model/CompensationEquitySettingsResponseVestingConditions.php create mode 100644 lib/Model/CompensationEquitySettingsUpdateRequest.php create mode 100644 lib/Model/CompensationPlanningCycleAdminsResponse.php create mode 100644 lib/Model/CompensationPlanningCycleAdminsResponseAdminsInner.php create mode 100644 lib/Model/CompensationPlanningCycleCompleteResponse.php create mode 100644 lib/Model/CompensationPlanningCycleCompleteResponseErrorsInner.php create mode 100644 lib/Model/CompensationToolsDataObject.php create mode 100644 lib/Model/CompensationToolsResponse.php create mode 100644 lib/Model/CompensationUpsellData.php create mode 100644 lib/Model/CompletedQuestionsAndResponseDataObject.php create mode 100644 lib/Model/ConversionRateDataObject.php create mode 100644 lib/Model/CountriesOptionsResponse.php rename lib/Model/{PostApplicationCommentRequest.php => CreateApplicationCommentRequest.php} (95%) create mode 100644 lib/Model/CreateCandidateResponse.php create mode 100644 lib/Model/CreateCommentResponse.php create mode 100644 lib/Model/CreateCompensationBenchmarkRequest.php create mode 100644 lib/Model/CreateCompensationBenchmarkSourceRequest.php rename lib/Model/{AddNewEmployeeTrainingRecordRequest.php => CreateEmployeeTrainingRecordRequest.php} (94%) rename lib/Model/{AddNewEmployeeTrainingRecordRequestCost.php => CreateEmployeeTrainingRecordRequestCost.php} (89%) create mode 100644 lib/Model/CreateGoalCommentRequest.php rename lib/Model/{PostGoalRequest.php => CreateGoalRequest.php} (90%) rename lib/Model/{PutGoalV11RequestMilestonesInner.php => CreateGoalRequestMilestonesInner.php} (97%) create mode 100644 lib/Model/CreateJobOpeningResponse.php create mode 100644 lib/Model/CreateLocationRequest.php create mode 100644 lib/Model/CreateLocationRequestAddress.php rename lib/Model/{AddTrainingCategoryRequest.php => CreateTrainingCategoryRequest.php} (97%) rename lib/Model/{AddTrainingTypeRequest.php => CreateTrainingTypeRequest.php} (96%) rename lib/Model/{TimeTrackingRecordSchemaShiftDifferential.php => CreateTrainingTypeRequestCategory.php} (94%) rename lib/Model/{Unauthorized.php => CreateWebhookBadRequestResponse.php} (95%) create mode 100644 lib/Model/CreatedCompensationBenchmark.php create mode 100644 lib/Model/CreatedCompensationBenchmarkSavedBenchmark.php create mode 100644 lib/Model/CreatedCompensationBenchmarkSource.php create mode 100644 lib/Model/CreatedTimeOffRequest.php rename lib/Model/{DataRequestAggregationsInner.php => CreatedTimeOffRequestAmount.php} (78%) create mode 100644 lib/Model/CreatedTimeOffRequestNotes.php create mode 100644 lib/Model/CreatedTimeOffRequestStatus.php create mode 100644 lib/Model/CreatedTimeOffRequestType.php create mode 100644 lib/Model/CurrencyConversionsResponse.php create mode 100644 lib/Model/Dacd313af2106213fc4696175941ce65Request.php create mode 100644 lib/Model/DataRequestAggregations.php create mode 100644 lib/Model/DatasetDataResponseV2.php rename lib/Model/{FieldList.php => DatasetDataResponseV2DataInner.php} (93%) create mode 100644 lib/Model/DatasetDataResponseV2DataInnerFieldsValue.php create mode 100644 lib/Model/DatasetDataResponseV2Links.php create mode 100644 lib/Model/DatasetDataResponseV2Meta.php rename lib/Model/{DatasetResponse.php => DatasetResponseV1.php} (95%) rename lib/Model/{Dataset.php => DatasetV1.php} (95%) rename lib/Model/{LocationsList.php => DatasetsResponseV12.php} (89%) create mode 100644 lib/Model/DatasetsResponseV12DatasetsInner.php create mode 100644 lib/Model/DeleteCompensationBenchmarkSourceRequest.php create mode 100644 lib/Model/DeleteCompensationBenchmarkSourceResponse.php create mode 100644 lib/Model/DetailsAndCurrencyRequestDataObject.php create mode 100644 lib/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.php create mode 100644 lib/Model/EmployeeBenefitFilters.php create mode 100644 lib/Model/EmployeeBenefitFiltersFilters.php create mode 100644 lib/Model/EmployeeBenefitsListResponse.php create mode 100644 lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.php create mode 100644 lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.php create mode 100644 lib/Model/EmployeeCreatedWebhookPayload.php create mode 100644 lib/Model/EmployeeCreatedWebhookPayloadData.php create mode 100644 lib/Model/EmployeeCursorPaginationQueryObject.php create mode 100644 lib/Model/EmployeeDeletedWebhookPayload.php create mode 100644 lib/Model/EmployeeDeletedWebhookPayloadData.php create mode 100644 lib/Model/EmployeeDependentsResponse.php create mode 100644 lib/Model/EmployeeDependentsResponseEmployeeDependentsInner.php create mode 100644 lib/Model/EmployeeOptionalField.php create mode 100644 lib/Model/EmployeePhotoJsonResponse.php create mode 100644 lib/Model/EmployeeStringCodeErrorResponseV1.php rename lib/Model/{InvalidRequestError.php => EmployeeStringCodeErrorResponseV1Error.php} (92%) create mode 100644 lib/Model/EmployeeTableRow.php create mode 100644 lib/Model/EmployeeTimeOffPolicyAssignment.php create mode 100644 lib/Model/EmployeeTimeOffPolicyAssignmentV11.php create mode 100644 lib/Model/EmployeeTimeOffRequestApproverResponseInner.php create mode 100644 lib/Model/EmployeeUpdatedWebhookPayload.php create mode 100644 lib/Model/EmployeeUpdatedWebhookPayloadData.php create mode 100644 lib/Model/EmployeeValue.php create mode 100644 lib/Model/EmployeeValueAnyOfInner.php create mode 100644 lib/Model/EmployeeVerificationIntegration.php rename lib/Model/{TrainingRecordList.php => EmployeeVerificationIntegrationResponse.php} (87%) create mode 100644 lib/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.php create mode 100644 lib/Model/EmployeeVerificationPublicApiRecord.php create mode 100644 lib/Model/EmployeeVerificationUpdateResponse.php create mode 100644 lib/Model/EmployeeVerificationsListResponse.php rename lib/Model/{JsonDirectoryEmployee.php => EmployeesDirectoryJsonResponse.php} (87%) create mode 100644 lib/Model/EmployeesDirectoryJsonResponseFieldsInner.php rename lib/Model/{XmlDirectoryEmployee.php => EmployeesDirectoryXmlResponse.php} (92%) rename lib/Model/{XmlDirectoryEmployeeEmployees.php => EmployeesDirectoryXmlResponseEmployees.php} (93%) rename lib/Model/{XmlDirectoryEmployeeEmployeesEmployeeInner.php => EmployeesDirectoryXmlResponseEmployeesEmployeeInner.php} (89%) rename lib/Model/{XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.php => EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.php} (90%) rename lib/Model/{XmlDirectoryEmployeeFieldset.php => EmployeesDirectoryXmlResponseFieldset.php} (93%) rename lib/Model/{XmlDirectoryEmployeeFieldsetFieldInner.php => EmployeesDirectoryXmlResponseFieldsetFieldInner.php} (94%) rename lib/Model/{InvalidRequest.php => ErrorResponse.php} (95%) create mode 100644 lib/Model/ErrorResponseError.php create mode 100644 lib/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.php create mode 100644 lib/Model/Field1.php create mode 100644 lib/Model/Field1Id.php create mode 100644 lib/Model/FieldOptionsTransformerId.php rename lib/Model/{Forbidden.php => ForbiddenV1.php} (96%) create mode 100644 lib/Model/ForbiddenV1Error.php create mode 100644 lib/Model/GetBreakPolicySuggestionsRequest.php create mode 100644 lib/Model/GetCompanyReportResponse.php create mode 100644 lib/Model/GetCompanyReportResponseEmployeesInner.php create mode 100644 lib/Model/GetDataFromDatasetV2Request.php create mode 100644 lib/Model/GetEmployeeResponse.php create mode 100644 lib/Model/GetEmployeesEmployeeBaseResponse.php create mode 100644 lib/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.php create mode 100644 lib/Model/GetEmployeesEmployeeResponseAllOfPayRate.php create mode 100644 lib/Model/GetEmployeesEmployeeResponseAllOfTeams.php create mode 100644 lib/Model/GetEmployeesResponseObjectLinksNext.php create mode 100644 lib/Model/GetEmployeesResponseObjectLinksPrev.php create mode 100644 lib/Model/GetEmployeesResponseObjectLinksSelf.php create mode 100644 lib/Model/GoalCommentResponse.php create mode 100644 lib/Model/GoalCommentsResponse.php create mode 100644 lib/Model/GoalCommentsResponseCommentsInner.php create mode 100644 lib/Model/GoalResponse.php create mode 100644 lib/Model/ImportCompensationBenchmarksResponse.php rename lib/Model/{TimeTrackingRecordSchemaProjectTask.php => Industry.php} (96%) create mode 100644 lib/Model/InlineObjectInner.php rename lib/Model/{TransformedApiGoalGoal.php => JobSummary.php} (57%) create mode 100644 lib/Model/JobSummaryStatus.php create mode 100644 lib/Model/JsonEmployeeFiles.php create mode 100644 lib/Model/JsonEmployeeFilesCategoriesInner.php create mode 100644 lib/Model/JsonEmployeeFilesCategoriesInnerFilesInner.php create mode 100644 lib/Model/JsonEmployeeFilesEmployee.php create mode 100644 lib/Model/LevelsAndBandsColumnMap.php rename lib/Model/{ProjectInfoApiTransformerTask.php => LevelsAndBandsEmployee.php} (96%) create mode 100644 lib/Model/LevelsAndBandsErrorWarningIdentifier.php create mode 100644 lib/Model/LevelsAndBandsGroup.php create mode 100644 lib/Model/LevelsAndBandsGroupStatusCounts.php create mode 100644 lib/Model/LevelsAndBandsJobTitle.php create mode 100644 lib/Model/LevelsAndBandsJobTitleAssignment.php create mode 100644 lib/Model/LevelsAndBandsJobTitleAssignmentsRequest.php create mode 100644 lib/Model/LevelsAndBandsJobTitleWithEmployees.php create mode 100644 lib/Model/LevelsAndBandsJobTitlesStatus.php create mode 100644 lib/Model/LevelsAndBandsLevel.php rename lib/Model/{ApplicationsListApplications.php => LevelsAndBandsLevelsAndBands.php} (88%) create mode 100644 lib/Model/LevelsAndBandsLevelsAndBandsStatus.php create mode 100644 lib/Model/LevelsAndBandsPayBand.php create mode 100644 lib/Model/LevelsAndBandsStepStatus.php create mode 100644 lib/Model/LevelsAndBandsUploadResponse.php create mode 100644 lib/Model/ListFieldDetail.php create mode 100644 lib/Model/ListFieldOption.php create mode 100644 lib/Model/ListFieldValuesXml.php create mode 100644 lib/Model/ListFieldValuesXmlOptionInner.php create mode 100644 lib/Model/ListUsersResponseValue.php create mode 100644 lib/Model/ListUsersXmlResponse.php create mode 100644 lib/Model/ListUsersXmlResponseUserInner.php create mode 100644 lib/Model/LocationResponseObject.php create mode 100644 lib/Model/LocationResponseObjectAddress.php create mode 100644 lib/Model/LocationResponseObjectAddressCountry.php create mode 100644 lib/Model/LocationResponseObjectAddressState.php create mode 100644 lib/Model/LoginFailureResponse.php create mode 100644 lib/Model/LoginFailureXmlResponse.php create mode 100644 lib/Model/LoginResponse.php create mode 100644 lib/Model/LoginXmlResponse.php rename lib/Model/{MemberBenefitEventMembersInnerCoveragesInner.php => MemberBenefitEventCoveragesInner.php} (91%) rename lib/Model/{MemberBenefitEventMembersInnerCoveragesInnerEventsInner.php => MemberBenefitEventCoveragesInnerEventsInner.php} (88%) create mode 100644 lib/Model/MemberBenefitEventsResponse.php create mode 100644 lib/Model/MemberBenefitsGetPermissionDeniedResponse.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponse.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseDataInner.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseLinks.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseLinksNext.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseLinksPrev.php create mode 100644 lib/Model/MemberBenefitsGetSuccessResponseMeta.php create mode 100644 lib/Model/MemberBenefitsGetValidationErrorResponse.php create mode 100644 lib/Model/MetaCompanyPropertiesResponse.php create mode 100644 lib/Model/MetaCurrencyTypeItem.php rename lib/Model/{TrainingTypeList.php => MonitorFieldList.php} (89%) create mode 100644 lib/Model/MonitorFieldListFieldsInner.php create mode 100644 lib/Model/NewHirePacketGtkyAnswerVisibilityItem.php create mode 100644 lib/Model/NewHirePacketGtkyAnswerVisibilityRequest.php create mode 100644 lib/Model/NewHirePacketGtkyAnswerVisibilityResponse.php create mode 100644 lib/Model/NewHirePacketPublicApi.php create mode 100644 lib/Model/NewHirePacketPublicApiWritableBody.php create mode 100644 lib/Model/NewHirePacketsListResponse.php create mode 100644 lib/Model/NewHireWidgetItem.php create mode 100644 lib/Model/NewHireWidgetResponse.php create mode 100644 lib/Model/OnboardingExperiencePublicApi.php create mode 100644 lib/Model/OnboardingExperiencesListResponse.php create mode 100644 lib/Model/PagedLocationResponse.php create mode 100644 lib/Model/PagedResponse.php create mode 100644 lib/Model/PaginationMetaData.php create mode 100644 lib/Model/PatchCompanyProfileCompanyInformationRequest.php create mode 100644 lib/Model/PatchCompanyProfileCompanyInformationRequestAddress.php create mode 100644 lib/Model/PayGradesAndBandsPublishResponse.php create mode 100644 lib/Model/PayGradesAndBandsSaveLevelsResponse.php create mode 100644 lib/Model/PayGradesAndBandsUpdateJobTitlesResponse.php create mode 100644 lib/Model/PayGradesAndBandsUpdatePayBandsResponse.php create mode 100644 lib/Model/PersonInfoApiTransformer.php create mode 100644 lib/Model/ProblemDetailsResponse.php create mode 100644 lib/Model/ProjectCreateTimeTrackingProjectTaskV1.php create mode 100644 lib/Model/ProjectCreateTimeTrackingProjectV1.php create mode 100644 lib/Model/ProjectCreateTimeTrackingProjectV1TasksInner.php rename lib/Model/{MemberBenefitEventMembersInner.php => ProjectPaginatedResponseDataV1.php} (83%) create mode 100644 lib/Model/ProjectPaginatedResponseDataV1Links.php create mode 100644 lib/Model/ProjectPaginatedResponseDataV1LinksNext.php create mode 100644 lib/Model/ProjectPaginatedResponseDataV1LinksPrev.php create mode 100644 lib/Model/ProjectPaginatedResponseDataV1Meta.php create mode 100644 lib/Model/ProjectPaginatedTasksResponseV1.php create mode 100644 lib/Model/ProjectPaginatedTasksResponseV1Links.php create mode 100644 lib/Model/ProjectPaginatedTasksResponseV1Meta.php create mode 100644 lib/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.php create mode 100644 lib/Model/ProjectTimeTrackingProjectV1.php create mode 100644 lib/Model/ProjectTimeTrackingTaskV1.php create mode 100644 lib/Model/ProjectUpdateTimeTrackingProjectTaskV1.php create mode 100644 lib/Model/ProjectUpdateTimeTrackingProjectV1.php create mode 100644 lib/Model/ProvinceItem.php create mode 100644 lib/Model/PutCompanyIndustryCodesRequest.php create mode 100644 lib/Model/PutCompanyProfileDisplayNameRequest.php create mode 100644 lib/Model/RemoveCycleAdminSelfResponse.php create mode 100644 lib/Model/RemoveTotalRewardsEmployeesRequest.php create mode 100644 lib/Model/RequestCustomReportResponse.php create mode 100644 lib/Model/RequestCustomReportResponseEmployeesInner.php rename lib/Model/{JsonDirectoryEmployeeFieldsInner.php => RequestCustomReportResponseFieldsInner.php} (95%) create mode 100644 lib/Model/SaveChangeCommTemplateResponse.php create mode 100644 lib/Model/SchedulingCreateScheduleRequestV1.php create mode 100644 lib/Model/SchedulingCreateSchedulingShiftRequestV1.php create mode 100644 lib/Model/SchedulingPublishShiftsFailureV1.php create mode 100644 lib/Model/SchedulingPublishShiftsRequest.php create mode 100644 lib/Model/SchedulingPublishShiftsResultV1.php create mode 100644 lib/Model/SchedulingScheduleListResponseV1.php create mode 100644 lib/Model/SchedulingScheduleListResponseV1Links.php create mode 100644 lib/Model/SchedulingScheduleListResponseV1Meta.php create mode 100644 lib/Model/SchedulingScheduleV1.php create mode 100644 lib/Model/SchedulingSchedulingShiftV1.php create mode 100644 lib/Model/SchedulingShiftListResponseV1.php create mode 100644 lib/Model/SchedulingShiftListResponseV1Links.php create mode 100644 lib/Model/SchedulingShiftListResponseV1LinksNext.php create mode 100644 lib/Model/SchedulingShiftListResponseV1LinksPrev.php create mode 100644 lib/Model/SchedulingShiftListResponseV1Meta.php create mode 100644 lib/Model/SchedulingTimezoneListResponseV1.php create mode 100644 lib/Model/SchedulingTimezoneListResponseV1Meta.php create mode 100644 lib/Model/SchedulingTimezoneV1.php create mode 100644 lib/Model/SchedulingUpdateScheduleRequestV1.php create mode 100644 lib/Model/SchedulingUpdateSchedulingShiftRequestV1.php create mode 100644 lib/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.php create mode 100644 lib/Model/SendRecommendationsResponse.php create mode 100644 lib/Model/SetBreakPolicyEmployeesRequest.php create mode 100644 lib/Model/SetTotalRewardsCustomDisclaimerRequest.php create mode 100644 lib/Model/SetTotalRewardsOnboardingStepRequest.php rename lib/Model/{TrainingCategoryList.php => ShareOptionsResponse.php} (89%) create mode 100644 lib/Model/TabularField.php rename lib/Model/{AddTrainingTypeRequestCategory.php => TabularFieldFieldsInner.php} (85%) create mode 100644 lib/Model/TimeOffBalanceEntry.php create mode 100644 lib/Model/TimeOffPolicy.php create mode 100644 lib/Model/TimeOffRequest1.php create mode 100644 lib/Model/TimeOffRequest1Actions.php create mode 100644 lib/Model/TimeOffRequest1Amount.php create mode 100644 lib/Model/TimeOffRequest1Notes.php create mode 100644 lib/Model/TimeOffRequest1Status.php rename lib/Model/{TimeTrackingRecordSchemaProject.php => TimeOffRequest1Type.php} (89%) create mode 100644 lib/Model/TimeOffTypesAndDefaultHours.php create mode 100644 lib/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.php create mode 100644 lib/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.php create mode 100644 lib/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.php create mode 100644 lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1.php create mode 100644 lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.php create mode 100644 lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.php create mode 100644 lib/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.php create mode 100644 lib/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.php create mode 100644 lib/Model/TimeTrackingCreateTimeTrackingBreakV1.php create mode 100644 lib/Model/TimeTrackingOffsetPaginatedResponseDataV1.php create mode 100644 lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.php create mode 100644 lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.php create mode 100644 lib/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.php create mode 100644 lib/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.php create mode 100644 lib/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.php create mode 100644 lib/Model/TimeTrackingPaginatedBreaksResponseV1.php create mode 100644 lib/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakAssessmentV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakPolicyV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.php create mode 100644 lib/Model/TimeTrackingTimeTrackingBreakV1.php create mode 100644 lib/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.php create mode 100644 lib/Model/TimeTrackingUpdateTimeTrackingBreakV1.php create mode 100644 lib/Model/TimezoneListResponse.php create mode 100644 lib/Model/TimezoneResource.php create mode 100644 lib/Model/TotalRewardsBenefitDetailsValues.php create mode 100644 lib/Model/TotalRewardsBenefitSectionValues.php create mode 100644 lib/Model/TotalRewardsCalendarSectionValues.php create mode 100644 lib/Model/TotalRewardsCompSummaryValues.php create mode 100644 lib/Model/TotalRewardsCustomDisclaimerInfo.php create mode 100644 lib/Model/TotalRewardsEmployeeStatement.php create mode 100644 lib/Model/TotalRewardsEquityDetailsValues.php create mode 100644 lib/Model/TotalRewardsEquityEstimatedValuationValues.php create mode 100644 lib/Model/TotalRewardsEquityGrowthChartItem.php create mode 100644 lib/Model/TotalRewardsEquityGrowthEstimation.php create mode 100644 lib/Model/TotalRewardsEquitySectionValues.php create mode 100644 lib/Model/TotalRewardsExtraPayDetailsValues.php create mode 100644 lib/Model/TotalRewardsExtraPaySectionValues.php create mode 100644 lib/Model/TotalRewardsHolidayValue.php create mode 100644 lib/Model/TotalRewardsOnboardingStep.php create mode 100644 lib/Model/TotalRewardsOverviewSectionValues.php create mode 100644 lib/Model/TotalRewardsTimeOffPolicyValue.php create mode 100644 lib/Model/TotalRewardsTimelineItem.php create mode 100644 lib/Model/TotalRewardsTimelineItemLabel.php create mode 100644 lib/Model/TotalRewardsTimelineSectionValues.php create mode 100644 lib/Model/TrainingRecordMap.php create mode 100644 lib/Model/TrainingRecordType.php rename lib/Model/{WebhookSubErrorPropertyPostFieldsInner.php => TrainingTypeCategory.php} (94%) delete mode 100644 lib/Model/TransformedApiGoalGoalActions.php rename lib/Model/{TransformedApiGoalGoalMilestonesInner.php => TransformedApiGoalMilestonesInner.php} (88%) create mode 100644 lib/Model/UnassignEmployeesFromBreakPolicyRequest.php rename lib/Model/{PostApplicantStatusRequest.php => UpdateApplicantStatusRequest.php} (95%) create mode 100644 lib/Model/UpdateApplicantStatusResponse.php create mode 100644 lib/Model/UpdateCompanyIndustryCodes400Response.php create mode 100644 lib/Model/UpdateCompanyIndustryCodes403Response.php create mode 100644 lib/Model/UpdateCompanyIndustryCodes404Response.php create mode 100644 lib/Model/UpdateCompanyIndustryCodes500Response.php create mode 100644 lib/Model/UpdateCompanyIndustryCodesResponse.php create mode 100644 lib/Model/UpdateCompanyNameBadRequestResponse.php create mode 100644 lib/Model/UpdateCompanyNameBadRequestResponseError.php create mode 100644 lib/Model/UpdateCompanyNameForbiddenResponse.php create mode 100644 lib/Model/UpdateCompanyNameForbiddenResponseError.php create mode 100644 lib/Model/UpdateCompanyNameInternalErrorResponse.php rename lib/Model/{GetGoalsAlignmentOptionsRequest.php => UpdateCompanyNameSuccessResponse.php} (90%) create mode 100644 lib/Model/UpdateCompensationBenchmarkRequest.php create mode 100644 lib/Model/UpdateCompensationBenchmarkSourceItem.php create mode 100644 lib/Model/UpdateCompensationBenchmarkSourcesRequest.php create mode 100644 lib/Model/UpdateCompensationBenchmarkSourcesResponse.php create mode 100644 lib/Model/UpdateEmployeeVerificationIntegrationRequest.php create mode 100644 lib/Model/UpdateEmployeeVerificationRequest.php create mode 100644 lib/Model/UpdateGoalCommentRequest.php rename lib/Model/{PutGoalMilestoneProgressRequest.php => UpdateGoalMilestoneProgressRequest.php} (96%) rename lib/Model/{PutGoalProgressRequest.php => UpdateGoalProgressRequest.php} (94%) rename lib/Model/{PutGoalSharedWithRequest.php => UpdateGoalSharingRequest.php} (96%) rename lib/Model/{Goal.php => UpdateGoalV1.php} (86%) rename lib/Model/{PutGoalV11Request.php => UpdateGoalV11Request.php} (93%) rename lib/Model/{PostGoalRequestMilestonesInner.php => UpdateGoalV11RequestMilestonesInner.php} (96%) create mode 100644 lib/Model/UpdateLocationRequest.php create mode 100644 lib/Model/UpdateLocationRequestAddress.php rename lib/Model/{Unauthorized1.php => UpdateWebhookBadRequestResponse.php} (95%) create mode 100644 lib/Model/UpdatedCompensationBenchmark.php create mode 100644 lib/Model/UpdatedCompensationBenchmarkSavedBenchmark.php create mode 100644 lib/Model/UploadEmployeePhotoRequest1.php create mode 100644 lib/Model/UserPermissionData.php create mode 100644 lib/Model/WebHookPostFieldDataObject.php create mode 100644 lib/Model/WebHookPostFieldPageDataObject.php create mode 100644 lib/Model/WebHookPostFieldResponseObject.php create mode 100644 lib/Model/WebHookPostFieldTableDataObject.php create mode 100644 lib/Model/WebhookBadRequestErrorsInner.php create mode 100644 lib/Model/WebhookEventType.php rename lib/Model/{WebHookLogResponse.php => WebhookLogEntry.php} (83%) rename lib/Model/{UnauthorizedErrorsInner.php => WebhookLogListResponse.php} (95%) create mode 100644 lib/Model/WebhookLogRateLimitResponse.php create mode 100644 lib/Model/WebhookLogRateLimitResponseError.php create mode 100644 lib/Model/WebhookSubErrorPropertyMonitorFieldsInner.php create mode 100644 lib/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.php create mode 100644 lib/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.php create mode 100644 lib/Model/WhosOutEntry.php create mode 100644 lib/Model/XmlEmployeeFiles.php create mode 100644 lib/Model/XmlEmployeeFilesCategoryInner.php create mode 100644 lib/Model/XmlEmployeeFilesCategoryInnerFileInner.php create mode 100644 lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php create mode 100644 lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.php create mode 100644 lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.php create mode 100644 lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.php create mode 100644 lib/Model/_288aa996aba16d7a495c62321ea999a9Request.php create mode 100644 lib/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.php create mode 100644 lib/Model/_3958585c861325ea7a2cd30a8c74f042Request.php create mode 100644 lib/Model/_89a5068111ec499135c7d6e9a53d5a30Request.php create mode 100644 test/Api/AlertApiTest.php create mode 100644 test/Api/AlertConfigurationsApiTest.php create mode 100644 test/Api/CompanyApiTest.php create mode 100644 test/Api/CompanyProfileApiTest.php create mode 100644 test/Api/CompensationApiTest.php create mode 100644 test/Api/CompensationBenchmarkingApiTest.php create mode 100644 test/Api/CompensationPlanningApiTest.php create mode 100644 test/Api/EmployeeVerificationApiTest.php create mode 100644 test/Api/LocationsApiTest.php create mode 100644 test/Api/OnboardingApiTest.php create mode 100644 test/Api/SchedulingApiTest.php create mode 100644 test/Api/TotalRewardsApiTest.php diff --git a/.gitignore b/.gitignore index 50a18e57..534dd829 100644 --- a/.gitignore +++ b/.gitignore @@ -29,12 +29,4 @@ composer.phar .openapi-generator/FILES.old # Environment variables -.env - -# macOS -.DS_Store - -# SDK update workflow scratch dir (sdk-update.yml). Holds the staged -# spec, oasdiff outputs, classifier results, and the composed PR body. -# Must not be swept into the auto/sdk-update PR commit. -.sdk-update/ \ No newline at end of file +.env \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e7ff2ee3..ddf0c887 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,93 +4,290 @@ README.md composer.json docs/Api/AccountInformationApi.md +docs/Api/AlertApi.md +docs/Api/AlertConfigurationsApi.md docs/Api/ApplicantTrackingApi.md docs/Api/BenefitsApi.md +docs/Api/CompanyApi.md docs/Api/CompanyFilesApi.md +docs/Api/CompanyProfileApi.md +docs/Api/CompensationApi.md +docs/Api/CompensationBenchmarkingApi.md +docs/Api/CompensationPlanningApi.md docs/Api/CustomReportsApi.md docs/Api/DatasetsApi.md docs/Api/EmployeeFilesApi.md +docs/Api/EmployeeVerificationApi.md docs/Api/EmployeesApi.md docs/Api/GoalsApi.md docs/Api/HoursApi.md docs/Api/LastChangeInformationApi.md +docs/Api/LocationsApi.md docs/Api/LoginApi.md +docs/Api/OnboardingApi.md docs/Api/PhotosApi.md docs/Api/ReportsApi.md +docs/Api/SchedulingApi.md docs/Api/TabularDataApi.md docs/Api/TimeOffApi.md docs/Api/TimeTrackingApi.md +docs/Api/TotalRewardsApi.md docs/Api/TrainingApi.md +docs/Api/WebhookEventsApi.md docs/Api/WebhooksApi.md -docs/Model/AddNewEmployeeTrainingRecordRequest.md -docs/Model/AddNewEmployeeTrainingRecordRequestCost.md -docs/Model/AddTrainingCategoryRequest.md -docs/Model/AddTrainingTypeRequest.md -docs/Model/AddTrainingTypeRequestCategory.md +docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md +docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md +docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md +docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md +docs/Model/_288aa996aba16d7a495c62321ea999a9Request.md +docs/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md +docs/Model/_3958585c861325ea7a2cd30a8c74f042Request.md +docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md +docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md +docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md +docs/Model/AddCycleAdminsResponse.md +docs/Model/AddCycleAdminsResponseAddedInner.md +docs/Model/AddCycleAdminsResponseSkippedInner.md +docs/Model/AddTotalRewardsEmployeesRequest.md docs/Model/AdjustTimeOffBalance.md docs/Model/AdjustTimeTrackingRequestSchema.md +docs/Model/AlertTemplateListResponse.md +docs/Model/AlertTemplateListResponseAlertsInner.md +docs/Model/AlignmentOptionsResponse.md +docs/Model/AlignmentOptionsResponseAlignsWithOptionsInner.md +docs/Model/ApplicantStatus.md docs/Model/ApplicationDetails.md docs/Model/ApplicationDetailsApplicant.md +docs/Model/ApplicationDetailsAttachmentsInner.md docs/Model/ApplicationDetailsJob.md +docs/Model/ApplicationDetailsJobTitle.md docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md docs/Model/ApplicationDetailsQuestionsAndAnswersInnerAnswer.md docs/Model/ApplicationDetailsQuestionsAndAnswersInnerQuestion.md docs/Model/ApplicationDetailsStatus.md docs/Model/ApplicationsList.md -docs/Model/ApplicationsListApplications.md -docs/Model/ApplicationsListApplicationsItemsInner.md -docs/Model/ApplicationsListApplicationsItemsInnerApplicant.md -docs/Model/ApplicationsListApplicationsItemsInnerJob.md -docs/Model/ApplicationsListApplicationsItemsInnerStatus.md +docs/Model/ApplicationsListApplicationsInner.md +docs/Model/ApplicationsListApplicationsInnerApplicant.md +docs/Model/ApplicationsListApplicationsInnerJob.md +docs/Model/ApplicationsListApplicationsInnerJobTitle.md +docs/Model/ApplicationsListApplicationsInnerStatus.md +docs/Model/AssignEmployeesToBreakPolicyRequest.md +docs/Model/AssignTimeOffPoliciesRequestInner.md +docs/Model/AssignedTimeOffPolicy.md +docs/Model/AssignedTimeOffPolicyV11.md +docs/Model/AvailableAction.md +docs/Model/BadRequestV1.md +docs/Model/BadRequestV1Error.md +docs/Model/BankHoliday.md +docs/Model/BenefitCoveragesResponse.md +docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md +docs/Model/BenefitDeductionSubType.md +docs/Model/BenefitDeductionType.md +docs/Model/BenefitDeductionTypeId.md +docs/Model/BudgetBreakdownImportResponse.md +docs/Model/BudgetGuidelinesView.md +docs/Model/BudgetGuidelinesWarnings.md +docs/Model/C79f9c5950f983e59d2626faa30c00a1Request.md +docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md +docs/Model/CanCreateGoalsResponse.md +docs/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md +docs/Model/ChangedEmployeeIdsResponse.md +docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md +docs/Model/ChangedEmployeeTableDataResponse.md +docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md +docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md +docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md docs/Model/ClockEntriesSchema.md docs/Model/ClockEntryIdsSchema.md docs/Model/ClockEntrySchema.md docs/Model/ClockInRequestSchema.md docs/Model/ClockOutRequestSchema.md +docs/Model/CloseGoalRequest.md +docs/Model/CompanyAlertDataObject.md +docs/Model/CompanyBenefitSummary.md +docs/Model/CompanyBenefitsListResponse.md +docs/Model/CompanyDeletedWebhookPayload.md docs/Model/CompanyFileUpdate.md +docs/Model/CompanyFilesResponse.md +docs/Model/CompanyFilesResponseCategoriesInner.md +docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md +docs/Model/CompanyIndustryDataObject.md docs/Model/CompanyInformation.md docs/Model/CompanyInformationAddress.md +docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md +docs/Model/CompanyIntegrationsUpdatedWebhookPayloadData.md +docs/Model/CompanyProfileData.md +docs/Model/CompanyProfileDataAddress.md +docs/Model/CompanyProfileIntegrations.md +docs/Model/CompanyUpdatedWebhookPayload.md +docs/Model/CompensationBenchmarkDetailEmployee.md +docs/Model/CompensationBenchmarkDetailEmployeeJobTitle.md +docs/Model/CompensationBenchmarkDetailEmployeeSalary.md +docs/Model/CompensationBenchmarkDetails.md +docs/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.md +docs/Model/CompensationBenchmarkJobLocationEmployee.md +docs/Model/CompensationBenchmarkJobLocationEmployeeSalary.md +docs/Model/CompensationBenchmarkJobLocationPair.md +docs/Model/CompensationBenchmarkJobLocationPairJobDetails.md +docs/Model/CompensationBenchmarkOverview.md +docs/Model/CompensationBenchmarkOverviewValues.md +docs/Model/CompensationBenchmarkSource.md +docs/Model/CompensationBenchmarkingColumnMap.md +docs/Model/CompensationBenchmarksList.md +docs/Model/CompensationEquitySettingsResponse.md +docs/Model/CompensationEquitySettingsResponseCompanyValuation.md +docs/Model/CompensationEquitySettingsResponseDisclaimers.md +docs/Model/CompensationEquitySettingsResponseOutstandingShares.md +docs/Model/CompensationEquitySettingsResponsePricePerShare.md +docs/Model/CompensationEquitySettingsResponseSliderMin.md +docs/Model/CompensationEquitySettingsResponseVestingConditions.md +docs/Model/CompensationEquitySettingsUpdateRequest.md +docs/Model/CompensationPlanningCycleAdminsResponse.md +docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md +docs/Model/CompensationPlanningCycleCompleteResponse.md +docs/Model/CompensationPlanningCycleCompleteResponseErrorsInner.md +docs/Model/CompensationToolsDataObject.md +docs/Model/CompensationToolsResponse.md +docs/Model/CompensationUpsellData.md +docs/Model/CompletedQuestionsAndResponseDataObject.md +docs/Model/ConversionRateDataObject.md +docs/Model/CountriesOptionsResponse.md docs/Model/Country.md docs/Model/CountrySchema.md +docs/Model/CreateApplicationCommentRequest.md +docs/Model/CreateCandidateResponse.md +docs/Model/CreateCommentResponse.md +docs/Model/CreateCompensationBenchmarkRequest.md +docs/Model/CreateCompensationBenchmarkSourceRequest.md +docs/Model/CreateEmployeeTrainingRecordRequest.md +docs/Model/CreateEmployeeTrainingRecordRequestCost.md +docs/Model/CreateGoalCommentRequest.md +docs/Model/CreateGoalRequest.md +docs/Model/CreateGoalRequestMilestonesInner.md +docs/Model/CreateJobOpeningResponse.md +docs/Model/CreateLocationRequest.md +docs/Model/CreateLocationRequestAddress.md +docs/Model/CreateTrainingCategoryRequest.md +docs/Model/CreateTrainingTypeRequest.md +docs/Model/CreateTrainingTypeRequestCategory.md +docs/Model/CreateWebhookBadRequestResponse.md +docs/Model/CreatedCompensationBenchmark.md +docs/Model/CreatedCompensationBenchmarkSavedBenchmark.md +docs/Model/CreatedCompensationBenchmarkSource.md +docs/Model/CreatedTimeOffRequest.md +docs/Model/CreatedTimeOffRequestAmount.md +docs/Model/CreatedTimeOffRequestNotes.md +docs/Model/CreatedTimeOffRequestStatus.md +docs/Model/CreatedTimeOffRequestType.md +docs/Model/CurrencyConversionsResponse.md docs/Model/CursorPagedResponseMetadata.md docs/Model/CursorPagesResponse.md docs/Model/CursorPaginationQueryObject.md +docs/Model/Dacd313af2106213fc4696175941ce65Request.md docs/Model/DataRequest.md -docs/Model/DataRequestAggregationsInner.md +docs/Model/DataRequestAggregations.md docs/Model/DataRequestFilters.md docs/Model/DataRequestFiltersFiltersInner.md docs/Model/DataRequestSortByInner.md -docs/Model/Dataset.md +docs/Model/DatasetDataResponseV2.md +docs/Model/DatasetDataResponseV2DataInner.md +docs/Model/DatasetDataResponseV2DataInnerFieldsValue.md +docs/Model/DatasetDataResponseV2Links.md +docs/Model/DatasetDataResponseV2Meta.md docs/Model/DatasetFieldsResponse.md -docs/Model/DatasetResponse.md +docs/Model/DatasetResponseV1.md +docs/Model/DatasetV1.md +docs/Model/DatasetsResponseV12.md +docs/Model/DatasetsResponseV12DatasetsInner.md +docs/Model/DeleteCompensationBenchmarkSourceRequest.md +docs/Model/DeleteCompensationBenchmarkSourceResponse.md +docs/Model/DetailsAndCurrencyRequestDataObject.md +docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md docs/Model/Employee.md +docs/Model/EmployeeBenefitFilters.md +docs/Model/EmployeeBenefitFiltersFilters.md +docs/Model/EmployeeBenefitsListResponse.md +docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md +docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md +docs/Model/EmployeeCreatedWebhookPayload.md +docs/Model/EmployeeCreatedWebhookPayloadData.md +docs/Model/EmployeeCursorPaginationQueryObject.md +docs/Model/EmployeeDeletedWebhookPayload.md +docs/Model/EmployeeDeletedWebhookPayloadData.md docs/Model/EmployeeDependent.md +docs/Model/EmployeeDependentsResponse.md +docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md docs/Model/EmployeeFileUpdate.md +docs/Model/EmployeeOptionalField.md +docs/Model/EmployeePhotoJsonResponse.md docs/Model/EmployeeResponse.md docs/Model/EmployeeResponseAggregationsInner.md +docs/Model/EmployeeStringCodeErrorResponseV1.md +docs/Model/EmployeeStringCodeErrorResponseV1Error.md +docs/Model/EmployeeTableRow.md +docs/Model/EmployeeTimeOffPolicyAssignment.md +docs/Model/EmployeeTimeOffPolicyAssignmentV11.md +docs/Model/EmployeeTimeOffRequestApproverResponseInner.md docs/Model/EmployeeTimesheetEntryTransformer.md +docs/Model/EmployeeUpdatedWebhookPayload.md +docs/Model/EmployeeUpdatedWebhookPayloadData.md +docs/Model/EmployeeValue.md +docs/Model/EmployeeValueAnyOfInner.md +docs/Model/EmployeeVerificationIntegration.md +docs/Model/EmployeeVerificationIntegrationResponse.md +docs/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md +docs/Model/EmployeeVerificationPublicApiRecord.md +docs/Model/EmployeeVerificationUpdateResponse.md +docs/Model/EmployeeVerificationsListResponse.md +docs/Model/EmployeesDirectoryJsonResponse.md +docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md +docs/Model/EmployeesDirectoryXmlResponse.md +docs/Model/EmployeesDirectoryXmlResponseEmployees.md +docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md +docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md +docs/Model/EmployeesDirectoryXmlResponseFieldset.md +docs/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.md +docs/Model/ErrorResponse.md +docs/Model/ErrorResponseError.md +docs/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md docs/Model/Field.md -docs/Model/FieldList.md -docs/Model/FieldListFieldsInner.md +docs/Model/Field1.md +docs/Model/Field1Id.md docs/Model/FieldOptionsRequestSchema.md docs/Model/FieldOptionsRequestSchemaDependentFieldsValueInner.md docs/Model/FieldOptionsTransformer.md -docs/Model/Forbidden.md +docs/Model/FieldOptionsTransformerId.md +docs/Model/ForbiddenV1.md +docs/Model/ForbiddenV1Error.md +docs/Model/GetBreakPolicySuggestionsRequest.md +docs/Model/GetCompanyReportResponse.md +docs/Model/GetCompanyReportResponseEmployeesInner.md +docs/Model/GetDataFromDatasetV2Request.md +docs/Model/GetEmployeeResponse.md +docs/Model/GetEmployeesEmployeeBaseResponse.md docs/Model/GetEmployeesEmployeeResponse.md +docs/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.md +docs/Model/GetEmployeesEmployeeResponseAllOfPayRate.md +docs/Model/GetEmployeesEmployeeResponseAllOfTeams.md docs/Model/GetEmployeesFilterRequestObject.md docs/Model/GetEmployeesResponseObject.md docs/Model/GetEmployeesResponseObjectLinks.md -docs/Model/GetGoalsAlignmentOptionsRequest.md -docs/Model/Goal.md +docs/Model/GetEmployeesResponseObjectLinksNext.md +docs/Model/GetEmployeesResponseObjectLinksPrev.md +docs/Model/GetEmployeesResponseObjectLinksSelf.md docs/Model/GoalAggregate.md docs/Model/GoalAggregateAlignsWithOptionsInner.md docs/Model/GoalAggregateCommentsInner.md docs/Model/GoalAggregatePersonsInner.md +docs/Model/GoalCommentResponse.md +docs/Model/GoalCommentsResponse.md +docs/Model/GoalCommentsResponseCommentsInner.md docs/Model/GoalFiltersV1.md docs/Model/GoalFiltersV11.md docs/Model/GoalFiltersV11FiltersInner.md docs/Model/GoalFiltersV11FiltersInnerActions.md docs/Model/GoalFiltersV1FiltersInner.md +docs/Model/GoalResponse.md docs/Model/GoalsAggregateV1.md docs/Model/GoalsAggregateV11.md docs/Model/GoalsAggregateV11CommentsInner.md @@ -100,197 +297,595 @@ docs/Model/GoalsAggregateV1CommentsInner.md docs/Model/GoalsAggregateV1PersonsInner.md docs/Model/GoalsList.md docs/Model/HiringLead.md -docs/Model/HiringLeadsList.md docs/Model/HourEntriesRequestSchema.md docs/Model/HourEntryIdsSchema.md docs/Model/HourEntrySchema.md -docs/Model/InternalServerError.md -docs/Model/InvalidRequest.md -docs/Model/InvalidRequestError.md -docs/Model/JsonDirectoryEmployee.md -docs/Model/JsonDirectoryEmployeeFieldsInner.md +docs/Model/ImportCompensationBenchmarksResponse.md +docs/Model/Industry.md +docs/Model/InlineObjectInner.md +docs/Model/JobSummary.md +docs/Model/JobSummaryStatus.md +docs/Model/JsonEmployeeFiles.md +docs/Model/JsonEmployeeFilesCategoriesInner.md +docs/Model/JsonEmployeeFilesCategoriesInnerFilesInner.md +docs/Model/JsonEmployeeFilesEmployee.md +docs/Model/LevelsAndBandsColumnMap.md +docs/Model/LevelsAndBandsEmployee.md +docs/Model/LevelsAndBandsErrorWarningIdentifier.md +docs/Model/LevelsAndBandsGroup.md +docs/Model/LevelsAndBandsGroupStatusCounts.md +docs/Model/LevelsAndBandsJobTitle.md +docs/Model/LevelsAndBandsJobTitleAssignment.md +docs/Model/LevelsAndBandsJobTitleAssignmentsRequest.md +docs/Model/LevelsAndBandsJobTitleWithEmployees.md +docs/Model/LevelsAndBandsJobTitlesStatus.md +docs/Model/LevelsAndBandsLevel.md +docs/Model/LevelsAndBandsLevelsAndBands.md +docs/Model/LevelsAndBandsLevelsAndBandsStatus.md +docs/Model/LevelsAndBandsPayBand.md +docs/Model/LevelsAndBandsStepStatus.md +docs/Model/LevelsAndBandsUploadResponse.md +docs/Model/ListFieldDetail.md +docs/Model/ListFieldOption.md docs/Model/ListFieldValues.md docs/Model/ListFieldValuesOptionsInner.md +docs/Model/ListFieldValuesXml.md +docs/Model/ListFieldValuesXmlOptionInner.md +docs/Model/ListUsersResponseValue.md +docs/Model/ListUsersXmlResponse.md +docs/Model/ListUsersXmlResponseUserInner.md docs/Model/Location.md -docs/Model/LocationsList.md +docs/Model/LocationResponseObject.md +docs/Model/LocationResponseObjectAddress.md +docs/Model/LocationResponseObjectAddressCountry.md +docs/Model/LocationResponseObjectAddressState.md +docs/Model/LoginFailureResponse.md +docs/Model/LoginFailureXmlResponse.md +docs/Model/LoginResponse.md +docs/Model/LoginXmlResponse.md docs/Model/MemberBenefitEvent.md -docs/Model/MemberBenefitEventMembersInner.md -docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md -docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md +docs/Model/MemberBenefitEventCoveragesInner.md +docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md +docs/Model/MemberBenefitEventsResponse.md +docs/Model/MemberBenefitsGetPermissionDeniedResponse.md +docs/Model/MemberBenefitsGetSuccessResponse.md +docs/Model/MemberBenefitsGetSuccessResponseDataInner.md +docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md +docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md +docs/Model/MemberBenefitsGetSuccessResponseLinks.md +docs/Model/MemberBenefitsGetSuccessResponseLinksNext.md +docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md +docs/Model/MemberBenefitsGetSuccessResponseMeta.md +docs/Model/MemberBenefitsGetValidationErrorResponse.md +docs/Model/MetaCompanyPropertiesResponse.md +docs/Model/MetaCurrencyTypeItem.md +docs/Model/MonitorFieldList.md +docs/Model/MonitorFieldListFieldsInner.md +docs/Model/NewHirePacketGtkyAnswerVisibilityItem.md +docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md +docs/Model/NewHirePacketGtkyAnswerVisibilityResponse.md +docs/Model/NewHirePacketPublicApi.md +docs/Model/NewHirePacketPublicApiWritableBody.md +docs/Model/NewHirePacketsListResponse.md +docs/Model/NewHireWidgetItem.md +docs/Model/NewHireWidgetResponse.md docs/Model/NewWebHook.md +docs/Model/OnboardingExperiencePublicApi.md +docs/Model/OnboardingExperiencesListResponse.md +docs/Model/PagedLocationResponse.md +docs/Model/PagedResponse.md docs/Model/Pagination.md -docs/Model/PostApplicantStatusRequest.md -docs/Model/PostApplicationCommentRequest.md -docs/Model/PostGoalRequest.md -docs/Model/PostGoalRequestMilestonesInner.md +docs/Model/PaginationMetaData.md +docs/Model/PatchCompanyProfileCompanyInformationRequest.md +docs/Model/PatchCompanyProfileCompanyInformationRequestAddress.md +docs/Model/PayGradesAndBandsPublishResponse.md +docs/Model/PayGradesAndBandsSaveLevelsResponse.md +docs/Model/PayGradesAndBandsUpdateJobTitlesResponse.md +docs/Model/PayGradesAndBandsUpdatePayBandsResponse.md +docs/Model/PersonInfoApiTransformer.md docs/Model/PostNewEmployee.md +docs/Model/ProblemDetailsResponse.md docs/Model/ProjectCreateRequestSchema.md +docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md +docs/Model/ProjectCreateTimeTrackingProjectV1.md +docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md docs/Model/ProjectInfoApiTransformer.md docs/Model/ProjectInfoApiTransformerProject.md -docs/Model/ProjectInfoApiTransformerTask.md -docs/Model/PutGoalMilestoneProgressRequest.md -docs/Model/PutGoalProgressRequest.md -docs/Model/PutGoalSharedWithRequest.md -docs/Model/PutGoalV11Request.md -docs/Model/PutGoalV11RequestMilestonesInner.md +docs/Model/ProjectPaginatedResponseDataV1.md +docs/Model/ProjectPaginatedResponseDataV1Links.md +docs/Model/ProjectPaginatedResponseDataV1LinksNext.md +docs/Model/ProjectPaginatedResponseDataV1LinksPrev.md +docs/Model/ProjectPaginatedResponseDataV1Meta.md +docs/Model/ProjectPaginatedTasksResponseV1.md +docs/Model/ProjectPaginatedTasksResponseV1Links.md +docs/Model/ProjectPaginatedTasksResponseV1Meta.md +docs/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md +docs/Model/ProjectTimeTrackingProjectV1.md +docs/Model/ProjectTimeTrackingTaskV1.md +docs/Model/ProjectUpdateTimeTrackingProjectTaskV1.md +docs/Model/ProjectUpdateTimeTrackingProjectV1.md +docs/Model/ProvinceItem.md +docs/Model/PutCompanyIndustryCodesRequest.md +docs/Model/PutCompanyProfileDisplayNameRequest.md +docs/Model/RemoveCycleAdminSelfResponse.md +docs/Model/RemoveTotalRewardsEmployeesRequest.md docs/Model/Report.md docs/Model/ReportsResponse.md docs/Model/Request.md docs/Model/RequestCustomReport.md docs/Model/RequestCustomReportFilters.md docs/Model/RequestCustomReportFiltersLastChanged.md +docs/Model/RequestCustomReportResponse.md +docs/Model/RequestCustomReportResponseEmployeesInner.md +docs/Model/RequestCustomReportResponseFieldsInner.md +docs/Model/SaveChangeCommTemplateResponse.md +docs/Model/SchedulingCreateScheduleRequestV1.md +docs/Model/SchedulingCreateSchedulingShiftRequestV1.md +docs/Model/SchedulingPublishShiftsFailureV1.md +docs/Model/SchedulingPublishShiftsRequest.md +docs/Model/SchedulingPublishShiftsResultV1.md +docs/Model/SchedulingScheduleListResponseV1.md +docs/Model/SchedulingScheduleListResponseV1Links.md +docs/Model/SchedulingScheduleListResponseV1Meta.md +docs/Model/SchedulingScheduleV1.md +docs/Model/SchedulingSchedulingShiftV1.md +docs/Model/SchedulingShiftListResponseV1.md +docs/Model/SchedulingShiftListResponseV1Links.md +docs/Model/SchedulingShiftListResponseV1LinksNext.md +docs/Model/SchedulingShiftListResponseV1LinksPrev.md +docs/Model/SchedulingShiftListResponseV1Meta.md +docs/Model/SchedulingTimezoneListResponseV1.md +docs/Model/SchedulingTimezoneListResponseV1Meta.md +docs/Model/SchedulingTimezoneV1.md +docs/Model/SchedulingUpdateScheduleRequestV1.md +docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md +docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md +docs/Model/SendRecommendationsResponse.md +docs/Model/SetBreakPolicyEmployeesRequest.md +docs/Model/SetTotalRewardsCustomDisclaimerRequest.md +docs/Model/SetTotalRewardsOnboardingStepRequest.md +docs/Model/ShareOptionsResponse.md docs/Model/State.md docs/Model/StateProvinceResponseSchema.md docs/Model/StateProvinceSchema.md docs/Model/TableRowDeleteResponse.md docs/Model/TableRowUpdate.md +docs/Model/TabularField.md +docs/Model/TabularFieldFieldsInner.md docs/Model/TaskCreateSchema.md -docs/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md +docs/Model/TimeOffBalanceEntry.md docs/Model/TimeOffHistory.md +docs/Model/TimeOffPolicy.md docs/Model/TimeOffRequest.md +docs/Model/TimeOffRequest1.md +docs/Model/TimeOffRequest1Actions.md +docs/Model/TimeOffRequest1Amount.md +docs/Model/TimeOffRequest1Notes.md +docs/Model/TimeOffRequest1Status.md +docs/Model/TimeOffRequest1Type.md docs/Model/TimeOffRequestDatesInner.md docs/Model/TimeOffRequestNotesInner.md +docs/Model/TimeOffTypesAndDefaultHours.md +docs/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.md +docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md +docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md +docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1.md +docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md +docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md docs/Model/TimeTrackingBulkResponseSchema.md docs/Model/TimeTrackingBulkResponseSchemaResponse.md +docs/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md +docs/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md +docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md docs/Model/TimeTrackingDeleteResponseSchema.md docs/Model/TimeTrackingIdResponseSchema.md +docs/Model/TimeTrackingOffsetPaginatedResponseDataV1.md +docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.md +docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md +docs/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md +docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md +docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md +docs/Model/TimeTrackingPaginatedBreaksResponseV1.md docs/Model/TimeTrackingProjectWithTasksAndEmployeeIds.md docs/Model/TimeTrackingRecord.md docs/Model/TimeTrackingRecordSchema.md -docs/Model/TimeTrackingRecordSchemaProject.md -docs/Model/TimeTrackingRecordSchemaProjectTask.md -docs/Model/TimeTrackingRecordSchemaShiftDifferential.md +docs/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md docs/Model/TimeTrackingTask.md +docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md +docs/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md +docs/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md +docs/Model/TimeTrackingTimeTrackingBreakPolicyV1.md +docs/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md +docs/Model/TimeTrackingTimeTrackingBreakV1.md +docs/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md +docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md docs/Model/TimesheetEntryInfoApiTransformer.md +docs/Model/TimezoneListResponse.md +docs/Model/TimezoneResource.md +docs/Model/TotalRewardsBenefitDetailsValues.md +docs/Model/TotalRewardsBenefitSectionValues.md +docs/Model/TotalRewardsCalendarSectionValues.md +docs/Model/TotalRewardsCompSummaryValues.md +docs/Model/TotalRewardsCustomDisclaimerInfo.md +docs/Model/TotalRewardsEmployeeStatement.md +docs/Model/TotalRewardsEquityDetailsValues.md +docs/Model/TotalRewardsEquityEstimatedValuationValues.md +docs/Model/TotalRewardsEquityGrowthChartItem.md +docs/Model/TotalRewardsEquityGrowthEstimation.md +docs/Model/TotalRewardsEquitySectionValues.md +docs/Model/TotalRewardsExtraPayDetailsValues.md +docs/Model/TotalRewardsExtraPaySectionValues.md +docs/Model/TotalRewardsHolidayValue.md +docs/Model/TotalRewardsOnboardingStep.md +docs/Model/TotalRewardsOverviewSectionValues.md +docs/Model/TotalRewardsTimeOffPolicyValue.md +docs/Model/TotalRewardsTimelineItem.md +docs/Model/TotalRewardsTimelineItemLabel.md +docs/Model/TotalRewardsTimelineSectionValues.md docs/Model/TrainingCategory.md -docs/Model/TrainingCategoryList.md docs/Model/TrainingRecord.md -docs/Model/TrainingRecordList.md +docs/Model/TrainingRecordMap.md +docs/Model/TrainingRecordType.md docs/Model/TrainingType.md -docs/Model/TrainingTypeList.md +docs/Model/TrainingTypeCategory.md docs/Model/TransformedApiEmployeeGoalDetails.md docs/Model/TransformedApiEmployeeGoalDetailsGoal.md docs/Model/TransformedApiGoal.md -docs/Model/TransformedApiGoalGoal.md -docs/Model/TransformedApiGoalGoalActions.md -docs/Model/TransformedApiGoalGoalMilestonesInner.md -docs/Model/Unauthorized.md -docs/Model/Unauthorized1.md -docs/Model/UnauthorizedErrorsInner.md +docs/Model/TransformedApiGoalMilestonesInner.md +docs/Model/UnassignEmployeesFromBreakPolicyRequest.md +docs/Model/UpdateApplicantStatusRequest.md +docs/Model/UpdateApplicantStatusResponse.md +docs/Model/UpdateCompanyIndustryCodes400Response.md +docs/Model/UpdateCompanyIndustryCodes403Response.md +docs/Model/UpdateCompanyIndustryCodes404Response.md +docs/Model/UpdateCompanyIndustryCodes500Response.md +docs/Model/UpdateCompanyIndustryCodesResponse.md +docs/Model/UpdateCompanyNameBadRequestResponse.md +docs/Model/UpdateCompanyNameBadRequestResponseError.md +docs/Model/UpdateCompanyNameForbiddenResponse.md +docs/Model/UpdateCompanyNameForbiddenResponseError.md +docs/Model/UpdateCompanyNameInternalErrorResponse.md +docs/Model/UpdateCompanyNameSuccessResponse.md +docs/Model/UpdateCompensationBenchmarkRequest.md +docs/Model/UpdateCompensationBenchmarkSourceItem.md +docs/Model/UpdateCompensationBenchmarkSourcesRequest.md +docs/Model/UpdateCompensationBenchmarkSourcesResponse.md docs/Model/UpdateEmployeeTrainingRecordRequest.md +docs/Model/UpdateEmployeeVerificationIntegrationRequest.md +docs/Model/UpdateEmployeeVerificationRequest.md +docs/Model/UpdateGoalCommentRequest.md +docs/Model/UpdateGoalMilestoneProgressRequest.md +docs/Model/UpdateGoalProgressRequest.md +docs/Model/UpdateGoalSharingRequest.md +docs/Model/UpdateGoalV1.md +docs/Model/UpdateGoalV11Request.md +docs/Model/UpdateGoalV11RequestMilestonesInner.md +docs/Model/UpdateLocationRequest.md +docs/Model/UpdateLocationRequestAddress.md docs/Model/UpdateTrainingCategoryRequest.md docs/Model/UpdateTrainingTypeRequest.md docs/Model/UpdateTrainingTypeRequestCategory.md -docs/Model/WebHookLogResponse.md +docs/Model/UpdateWebhookBadRequestResponse.md +docs/Model/UpdatedCompensationBenchmark.md +docs/Model/UpdatedCompensationBenchmarkSavedBenchmark.md +docs/Model/UploadEmployeePhotoRequest1.md +docs/Model/UserPermissionData.md +docs/Model/WebHookPostFieldDataObject.md +docs/Model/WebHookPostFieldPageDataObject.md +docs/Model/WebHookPostFieldResponseObject.md +docs/Model/WebHookPostFieldTableDataObject.md docs/Model/WebHookResponse.md docs/Model/Webhook.md docs/Model/WebhookBadRequest.md +docs/Model/WebhookBadRequestErrorsInner.md docs/Model/WebhookError.md docs/Model/WebhookErrorErrors.md +docs/Model/WebhookEventType.md +docs/Model/WebhookLogEntry.md +docs/Model/WebhookLogListResponse.md +docs/Model/WebhookLogRateLimitResponse.md +docs/Model/WebhookLogRateLimitResponseError.md docs/Model/WebhookSubErrorProperty.md -docs/Model/WebhookSubErrorPropertyPostFieldsInner.md +docs/Model/WebhookSubErrorPropertyMonitorFieldsInner.md +docs/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.md docs/Model/WebhookSubErrorPropertyUnknownFieldsInner.md +docs/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.md docs/Model/WebhooksList.md docs/Model/WebhooksListWebhooksInner.md -docs/Model/XmlDirectoryEmployee.md -docs/Model/XmlDirectoryEmployeeEmployees.md -docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.md -docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md -docs/Model/XmlDirectoryEmployeeFieldset.md -docs/Model/XmlDirectoryEmployeeFieldsetFieldInner.md +docs/Model/WhosOutEntry.md +docs/Model/XmlEmployeeFiles.md +docs/Model/XmlEmployeeFilesCategoryInner.md +docs/Model/XmlEmployeeFilesCategoryInnerFileInner.md git_push.sh lib/Api/AccountInformationApi.php +lib/Api/AlertApi.php +lib/Api/AlertConfigurationsApi.php lib/Api/ApplicantTrackingApi.php lib/Api/BenefitsApi.php +lib/Api/CompanyApi.php lib/Api/CompanyFilesApi.php +lib/Api/CompanyProfileApi.php +lib/Api/CompensationApi.php +lib/Api/CompensationBenchmarkingApi.php +lib/Api/CompensationPlanningApi.php lib/Api/CustomReportsApi.php lib/Api/DatasetsApi.php lib/Api/EmployeeFilesApi.php +lib/Api/EmployeeVerificationApi.php lib/Api/EmployeesApi.php lib/Api/GoalsApi.php lib/Api/HoursApi.php lib/Api/LastChangeInformationApi.php +lib/Api/LocationsApi.php lib/Api/LoginApi.php +lib/Api/OnboardingApi.php lib/Api/PhotosApi.php lib/Api/ReportsApi.php +lib/Api/SchedulingApi.php lib/Api/TabularDataApi.php lib/Api/TimeOffApi.php lib/Api/TimeTrackingApi.php +lib/Api/TotalRewardsApi.php lib/Api/TrainingApi.php +lib/Api/WebhookEventsApi.php lib/Api/WebhooksApi.php lib/ApiException.php lib/Configuration.php lib/FormDataProcessor.php lib/HeaderSelector.php -lib/Model/AddNewEmployeeTrainingRecordRequest.php -lib/Model/AddNewEmployeeTrainingRecordRequestCost.php -lib/Model/AddTrainingCategoryRequest.php -lib/Model/AddTrainingTypeRequest.php -lib/Model/AddTrainingTypeRequestCategory.php +lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php +lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.php +lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.php +lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.php +lib/Model/_288aa996aba16d7a495c62321ea999a9Request.php +lib/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.php +lib/Model/_3958585c861325ea7a2cd30a8c74f042Request.php +lib/Model/_89a5068111ec499135c7d6e9a53d5a30Request.php +lib/Model/A05b6d5f564f805d688ff2c1e37c3990Request.php +lib/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.php +lib/Model/AddCycleAdminsResponse.php +lib/Model/AddCycleAdminsResponseAddedInner.php +lib/Model/AddCycleAdminsResponseSkippedInner.php +lib/Model/AddTotalRewardsEmployeesRequest.php lib/Model/AdjustTimeOffBalance.php lib/Model/AdjustTimeTrackingRequestSchema.php +lib/Model/AlertTemplateListResponse.php +lib/Model/AlertTemplateListResponseAlertsInner.php +lib/Model/AlignmentOptionsResponse.php +lib/Model/AlignmentOptionsResponseAlignsWithOptionsInner.php +lib/Model/ApplicantStatus.php lib/Model/ApplicationDetails.php lib/Model/ApplicationDetailsApplicant.php +lib/Model/ApplicationDetailsAttachmentsInner.php lib/Model/ApplicationDetailsJob.php +lib/Model/ApplicationDetailsJobTitle.php lib/Model/ApplicationDetailsQuestionsAndAnswersInner.php lib/Model/ApplicationDetailsQuestionsAndAnswersInnerAnswer.php lib/Model/ApplicationDetailsQuestionsAndAnswersInnerQuestion.php lib/Model/ApplicationDetailsStatus.php lib/Model/ApplicationsList.php -lib/Model/ApplicationsListApplications.php -lib/Model/ApplicationsListApplicationsItemsInner.php -lib/Model/ApplicationsListApplicationsItemsInnerApplicant.php -lib/Model/ApplicationsListApplicationsItemsInnerJob.php -lib/Model/ApplicationsListApplicationsItemsInnerStatus.php +lib/Model/ApplicationsListApplicationsInner.php +lib/Model/ApplicationsListApplicationsInnerApplicant.php +lib/Model/ApplicationsListApplicationsInnerJob.php +lib/Model/ApplicationsListApplicationsInnerJobTitle.php +lib/Model/ApplicationsListApplicationsInnerStatus.php +lib/Model/AssignEmployeesToBreakPolicyRequest.php +lib/Model/AssignTimeOffPoliciesRequestInner.php +lib/Model/AssignedTimeOffPolicy.php +lib/Model/AssignedTimeOffPolicyV11.php +lib/Model/AvailableAction.php +lib/Model/BadRequestV1.php +lib/Model/BadRequestV1Error.php +lib/Model/BankHoliday.php +lib/Model/BenefitCoveragesResponse.php +lib/Model/BenefitCoveragesResponseBenefitCoveragesInner.php +lib/Model/BenefitDeductionSubType.php +lib/Model/BenefitDeductionType.php +lib/Model/BenefitDeductionTypeId.php +lib/Model/BudgetBreakdownImportResponse.php +lib/Model/BudgetGuidelinesView.php +lib/Model/BudgetGuidelinesWarnings.php +lib/Model/C79f9c5950f983e59d2626faa30c00a1Request.php +lib/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.php +lib/Model/CanCreateGoalsResponse.php +lib/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.php +lib/Model/ChangedEmployeeIdsResponse.php +lib/Model/ChangedEmployeeIdsResponseEmployeesValue.php +lib/Model/ChangedEmployeeTableDataResponse.php +lib/Model/ChangedEmployeeTableDataResponseEmployeesValue.php +lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.php +lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.php lib/Model/ClockEntriesSchema.php lib/Model/ClockEntryIdsSchema.php lib/Model/ClockEntrySchema.php lib/Model/ClockInRequestSchema.php lib/Model/ClockOutRequestSchema.php +lib/Model/CloseGoalRequest.php +lib/Model/CompanyAlertDataObject.php +lib/Model/CompanyBenefitSummary.php +lib/Model/CompanyBenefitsListResponse.php +lib/Model/CompanyDeletedWebhookPayload.php lib/Model/CompanyFileUpdate.php +lib/Model/CompanyFilesResponse.php +lib/Model/CompanyFilesResponseCategoriesInner.php +lib/Model/CompanyFilesResponseCategoriesInnerFilesInner.php +lib/Model/CompanyIndustryDataObject.php lib/Model/CompanyInformation.php lib/Model/CompanyInformationAddress.php +lib/Model/CompanyIntegrationsUpdatedWebhookPayload.php +lib/Model/CompanyIntegrationsUpdatedWebhookPayloadData.php +lib/Model/CompanyProfileData.php +lib/Model/CompanyProfileDataAddress.php +lib/Model/CompanyProfileIntegrations.php +lib/Model/CompanyUpdatedWebhookPayload.php +lib/Model/CompensationBenchmarkDetailEmployee.php +lib/Model/CompensationBenchmarkDetailEmployeeJobTitle.php +lib/Model/CompensationBenchmarkDetailEmployeeSalary.php +lib/Model/CompensationBenchmarkDetails.php +lib/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.php +lib/Model/CompensationBenchmarkJobLocationEmployee.php +lib/Model/CompensationBenchmarkJobLocationEmployeeSalary.php +lib/Model/CompensationBenchmarkJobLocationPair.php +lib/Model/CompensationBenchmarkJobLocationPairJobDetails.php +lib/Model/CompensationBenchmarkOverview.php +lib/Model/CompensationBenchmarkOverviewValues.php +lib/Model/CompensationBenchmarkSource.php +lib/Model/CompensationBenchmarkingColumnMap.php +lib/Model/CompensationBenchmarksList.php +lib/Model/CompensationEquitySettingsResponse.php +lib/Model/CompensationEquitySettingsResponseCompanyValuation.php +lib/Model/CompensationEquitySettingsResponseDisclaimers.php +lib/Model/CompensationEquitySettingsResponseOutstandingShares.php +lib/Model/CompensationEquitySettingsResponsePricePerShare.php +lib/Model/CompensationEquitySettingsResponseSliderMin.php +lib/Model/CompensationEquitySettingsResponseVestingConditions.php +lib/Model/CompensationEquitySettingsUpdateRequest.php +lib/Model/CompensationPlanningCycleAdminsResponse.php +lib/Model/CompensationPlanningCycleAdminsResponseAdminsInner.php +lib/Model/CompensationPlanningCycleCompleteResponse.php +lib/Model/CompensationPlanningCycleCompleteResponseErrorsInner.php +lib/Model/CompensationToolsDataObject.php +lib/Model/CompensationToolsResponse.php +lib/Model/CompensationUpsellData.php +lib/Model/CompletedQuestionsAndResponseDataObject.php +lib/Model/ConversionRateDataObject.php +lib/Model/CountriesOptionsResponse.php lib/Model/Country.php lib/Model/CountrySchema.php +lib/Model/CreateApplicationCommentRequest.php +lib/Model/CreateCandidateResponse.php +lib/Model/CreateCommentResponse.php +lib/Model/CreateCompensationBenchmarkRequest.php +lib/Model/CreateCompensationBenchmarkSourceRequest.php +lib/Model/CreateEmployeeTrainingRecordRequest.php +lib/Model/CreateEmployeeTrainingRecordRequestCost.php +lib/Model/CreateGoalCommentRequest.php +lib/Model/CreateGoalRequest.php +lib/Model/CreateGoalRequestMilestonesInner.php +lib/Model/CreateJobOpeningResponse.php +lib/Model/CreateLocationRequest.php +lib/Model/CreateLocationRequestAddress.php +lib/Model/CreateTrainingCategoryRequest.php +lib/Model/CreateTrainingTypeRequest.php +lib/Model/CreateTrainingTypeRequestCategory.php +lib/Model/CreateWebhookBadRequestResponse.php +lib/Model/CreatedCompensationBenchmark.php +lib/Model/CreatedCompensationBenchmarkSavedBenchmark.php +lib/Model/CreatedCompensationBenchmarkSource.php +lib/Model/CreatedTimeOffRequest.php +lib/Model/CreatedTimeOffRequestAmount.php +lib/Model/CreatedTimeOffRequestNotes.php +lib/Model/CreatedTimeOffRequestStatus.php +lib/Model/CreatedTimeOffRequestType.php +lib/Model/CurrencyConversionsResponse.php lib/Model/CursorPagedResponseMetadata.php lib/Model/CursorPagesResponse.php lib/Model/CursorPaginationQueryObject.php +lib/Model/Dacd313af2106213fc4696175941ce65Request.php lib/Model/DataRequest.php -lib/Model/DataRequestAggregationsInner.php +lib/Model/DataRequestAggregations.php lib/Model/DataRequestFilters.php lib/Model/DataRequestFiltersFiltersInner.php lib/Model/DataRequestSortByInner.php -lib/Model/Dataset.php +lib/Model/DatasetDataResponseV2.php +lib/Model/DatasetDataResponseV2DataInner.php +lib/Model/DatasetDataResponseV2DataInnerFieldsValue.php +lib/Model/DatasetDataResponseV2Links.php +lib/Model/DatasetDataResponseV2Meta.php lib/Model/DatasetFieldsResponse.php -lib/Model/DatasetResponse.php +lib/Model/DatasetResponseV1.php +lib/Model/DatasetV1.php +lib/Model/DatasetsResponseV12.php +lib/Model/DatasetsResponseV12DatasetsInner.php +lib/Model/DeleteCompensationBenchmarkSourceRequest.php +lib/Model/DeleteCompensationBenchmarkSourceResponse.php +lib/Model/DetailsAndCurrencyRequestDataObject.php +lib/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.php lib/Model/Employee.php +lib/Model/EmployeeBenefitFilters.php +lib/Model/EmployeeBenefitFiltersFilters.php +lib/Model/EmployeeBenefitsListResponse.php +lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.php +lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.php +lib/Model/EmployeeCreatedWebhookPayload.php +lib/Model/EmployeeCreatedWebhookPayloadData.php +lib/Model/EmployeeCursorPaginationQueryObject.php +lib/Model/EmployeeDeletedWebhookPayload.php +lib/Model/EmployeeDeletedWebhookPayloadData.php lib/Model/EmployeeDependent.php +lib/Model/EmployeeDependentsResponse.php +lib/Model/EmployeeDependentsResponseEmployeeDependentsInner.php lib/Model/EmployeeFileUpdate.php +lib/Model/EmployeeOptionalField.php +lib/Model/EmployeePhotoJsonResponse.php lib/Model/EmployeeResponse.php lib/Model/EmployeeResponseAggregationsInner.php +lib/Model/EmployeeStringCodeErrorResponseV1.php +lib/Model/EmployeeStringCodeErrorResponseV1Error.php +lib/Model/EmployeeTableRow.php +lib/Model/EmployeeTimeOffPolicyAssignment.php +lib/Model/EmployeeTimeOffPolicyAssignmentV11.php +lib/Model/EmployeeTimeOffRequestApproverResponseInner.php lib/Model/EmployeeTimesheetEntryTransformer.php +lib/Model/EmployeeUpdatedWebhookPayload.php +lib/Model/EmployeeUpdatedWebhookPayloadData.php +lib/Model/EmployeeValue.php +lib/Model/EmployeeValueAnyOfInner.php +lib/Model/EmployeeVerificationIntegration.php +lib/Model/EmployeeVerificationIntegrationResponse.php +lib/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.php +lib/Model/EmployeeVerificationPublicApiRecord.php +lib/Model/EmployeeVerificationUpdateResponse.php +lib/Model/EmployeeVerificationsListResponse.php +lib/Model/EmployeesDirectoryJsonResponse.php +lib/Model/EmployeesDirectoryJsonResponseFieldsInner.php +lib/Model/EmployeesDirectoryXmlResponse.php +lib/Model/EmployeesDirectoryXmlResponseEmployees.php +lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.php +lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.php +lib/Model/EmployeesDirectoryXmlResponseFieldset.php +lib/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.php +lib/Model/ErrorResponse.php +lib/Model/ErrorResponseError.php +lib/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.php lib/Model/Field.php -lib/Model/FieldList.php -lib/Model/FieldListFieldsInner.php +lib/Model/Field1.php +lib/Model/Field1Id.php lib/Model/FieldOptionsRequestSchema.php lib/Model/FieldOptionsRequestSchemaDependentFieldsValueInner.php lib/Model/FieldOptionsTransformer.php -lib/Model/Forbidden.php +lib/Model/FieldOptionsTransformerId.php +lib/Model/ForbiddenV1.php +lib/Model/ForbiddenV1Error.php +lib/Model/GetBreakPolicySuggestionsRequest.php +lib/Model/GetCompanyReportResponse.php +lib/Model/GetCompanyReportResponseEmployeesInner.php +lib/Model/GetDataFromDatasetV2Request.php +lib/Model/GetEmployeeResponse.php +lib/Model/GetEmployeesEmployeeBaseResponse.php lib/Model/GetEmployeesEmployeeResponse.php +lib/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.php +lib/Model/GetEmployeesEmployeeResponseAllOfPayRate.php +lib/Model/GetEmployeesEmployeeResponseAllOfTeams.php lib/Model/GetEmployeesFilterRequestObject.php lib/Model/GetEmployeesResponseObject.php lib/Model/GetEmployeesResponseObjectLinks.php -lib/Model/GetGoalsAlignmentOptionsRequest.php -lib/Model/Goal.php +lib/Model/GetEmployeesResponseObjectLinksNext.php +lib/Model/GetEmployeesResponseObjectLinksPrev.php +lib/Model/GetEmployeesResponseObjectLinksSelf.php lib/Model/GoalAggregate.php lib/Model/GoalAggregateAlignsWithOptionsInner.php lib/Model/GoalAggregateCommentsInner.php lib/Model/GoalAggregatePersonsInner.php +lib/Model/GoalCommentResponse.php +lib/Model/GoalCommentsResponse.php +lib/Model/GoalCommentsResponseCommentsInner.php lib/Model/GoalFiltersV1.php lib/Model/GoalFiltersV11.php lib/Model/GoalFiltersV11FiltersInner.php lib/Model/GoalFiltersV11FiltersInnerActions.php lib/Model/GoalFiltersV1FiltersInner.php +lib/Model/GoalResponse.php lib/Model/GoalsAggregateV1.php lib/Model/GoalsAggregateV11.php lib/Model/GoalsAggregateV11CommentsInner.php @@ -300,104 +895,318 @@ lib/Model/GoalsAggregateV1CommentsInner.php lib/Model/GoalsAggregateV1PersonsInner.php lib/Model/GoalsList.php lib/Model/HiringLead.php -lib/Model/HiringLeadsList.php lib/Model/HourEntriesRequestSchema.php lib/Model/HourEntryIdsSchema.php lib/Model/HourEntrySchema.php -lib/Model/InternalServerError.php -lib/Model/InvalidRequest.php -lib/Model/InvalidRequestError.php -lib/Model/JsonDirectoryEmployee.php -lib/Model/JsonDirectoryEmployeeFieldsInner.php +lib/Model/ImportCompensationBenchmarksResponse.php +lib/Model/Industry.php +lib/Model/InlineObjectInner.php +lib/Model/JobSummary.php +lib/Model/JobSummaryStatus.php +lib/Model/JsonEmployeeFiles.php +lib/Model/JsonEmployeeFilesCategoriesInner.php +lib/Model/JsonEmployeeFilesCategoriesInnerFilesInner.php +lib/Model/JsonEmployeeFilesEmployee.php +lib/Model/LevelsAndBandsColumnMap.php +lib/Model/LevelsAndBandsEmployee.php +lib/Model/LevelsAndBandsErrorWarningIdentifier.php +lib/Model/LevelsAndBandsGroup.php +lib/Model/LevelsAndBandsGroupStatusCounts.php +lib/Model/LevelsAndBandsJobTitle.php +lib/Model/LevelsAndBandsJobTitleAssignment.php +lib/Model/LevelsAndBandsJobTitleAssignmentsRequest.php +lib/Model/LevelsAndBandsJobTitleWithEmployees.php +lib/Model/LevelsAndBandsJobTitlesStatus.php +lib/Model/LevelsAndBandsLevel.php +lib/Model/LevelsAndBandsLevelsAndBands.php +lib/Model/LevelsAndBandsLevelsAndBandsStatus.php +lib/Model/LevelsAndBandsPayBand.php +lib/Model/LevelsAndBandsStepStatus.php +lib/Model/LevelsAndBandsUploadResponse.php +lib/Model/ListFieldDetail.php +lib/Model/ListFieldOption.php lib/Model/ListFieldValues.php lib/Model/ListFieldValuesOptionsInner.php +lib/Model/ListFieldValuesXml.php +lib/Model/ListFieldValuesXmlOptionInner.php +lib/Model/ListUsersResponseValue.php +lib/Model/ListUsersXmlResponse.php +lib/Model/ListUsersXmlResponseUserInner.php lib/Model/Location.php -lib/Model/LocationsList.php +lib/Model/LocationResponseObject.php +lib/Model/LocationResponseObjectAddress.php +lib/Model/LocationResponseObjectAddressCountry.php +lib/Model/LocationResponseObjectAddressState.php +lib/Model/LoginFailureResponse.php +lib/Model/LoginFailureXmlResponse.php +lib/Model/LoginResponse.php +lib/Model/LoginXmlResponse.php lib/Model/MemberBenefitEvent.php -lib/Model/MemberBenefitEventMembersInner.php -lib/Model/MemberBenefitEventMembersInnerCoveragesInner.php -lib/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.php +lib/Model/MemberBenefitEventCoveragesInner.php +lib/Model/MemberBenefitEventCoveragesInnerEventsInner.php +lib/Model/MemberBenefitEventsResponse.php +lib/Model/MemberBenefitsGetPermissionDeniedResponse.php +lib/Model/MemberBenefitsGetSuccessResponse.php +lib/Model/MemberBenefitsGetSuccessResponseDataInner.php +lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.php +lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.php +lib/Model/MemberBenefitsGetSuccessResponseLinks.php +lib/Model/MemberBenefitsGetSuccessResponseLinksNext.php +lib/Model/MemberBenefitsGetSuccessResponseLinksPrev.php +lib/Model/MemberBenefitsGetSuccessResponseMeta.php +lib/Model/MemberBenefitsGetValidationErrorResponse.php +lib/Model/MetaCompanyPropertiesResponse.php +lib/Model/MetaCurrencyTypeItem.php lib/Model/ModelInterface.php +lib/Model/MonitorFieldList.php +lib/Model/MonitorFieldListFieldsInner.php +lib/Model/NewHirePacketGtkyAnswerVisibilityItem.php +lib/Model/NewHirePacketGtkyAnswerVisibilityRequest.php +lib/Model/NewHirePacketGtkyAnswerVisibilityResponse.php +lib/Model/NewHirePacketPublicApi.php +lib/Model/NewHirePacketPublicApiWritableBody.php +lib/Model/NewHirePacketsListResponse.php +lib/Model/NewHireWidgetItem.php +lib/Model/NewHireWidgetResponse.php lib/Model/NewWebHook.php +lib/Model/OnboardingExperiencePublicApi.php +lib/Model/OnboardingExperiencesListResponse.php +lib/Model/PagedLocationResponse.php +lib/Model/PagedResponse.php lib/Model/Pagination.php -lib/Model/PostApplicantStatusRequest.php -lib/Model/PostApplicationCommentRequest.php -lib/Model/PostGoalRequest.php -lib/Model/PostGoalRequestMilestonesInner.php +lib/Model/PaginationMetaData.php +lib/Model/PatchCompanyProfileCompanyInformationRequest.php +lib/Model/PatchCompanyProfileCompanyInformationRequestAddress.php +lib/Model/PayGradesAndBandsPublishResponse.php +lib/Model/PayGradesAndBandsSaveLevelsResponse.php +lib/Model/PayGradesAndBandsUpdateJobTitlesResponse.php +lib/Model/PayGradesAndBandsUpdatePayBandsResponse.php +lib/Model/PersonInfoApiTransformer.php lib/Model/PostNewEmployee.php +lib/Model/ProblemDetailsResponse.php lib/Model/ProjectCreateRequestSchema.php +lib/Model/ProjectCreateTimeTrackingProjectTaskV1.php +lib/Model/ProjectCreateTimeTrackingProjectV1.php +lib/Model/ProjectCreateTimeTrackingProjectV1TasksInner.php lib/Model/ProjectInfoApiTransformer.php lib/Model/ProjectInfoApiTransformerProject.php -lib/Model/ProjectInfoApiTransformerTask.php -lib/Model/PutGoalMilestoneProgressRequest.php -lib/Model/PutGoalProgressRequest.php -lib/Model/PutGoalSharedWithRequest.php -lib/Model/PutGoalV11Request.php -lib/Model/PutGoalV11RequestMilestonesInner.php +lib/Model/ProjectPaginatedResponseDataV1.php +lib/Model/ProjectPaginatedResponseDataV1Links.php +lib/Model/ProjectPaginatedResponseDataV1LinksNext.php +lib/Model/ProjectPaginatedResponseDataV1LinksPrev.php +lib/Model/ProjectPaginatedResponseDataV1Meta.php +lib/Model/ProjectPaginatedTasksResponseV1.php +lib/Model/ProjectPaginatedTasksResponseV1Links.php +lib/Model/ProjectPaginatedTasksResponseV1Meta.php +lib/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.php +lib/Model/ProjectTimeTrackingProjectV1.php +lib/Model/ProjectTimeTrackingTaskV1.php +lib/Model/ProjectUpdateTimeTrackingProjectTaskV1.php +lib/Model/ProjectUpdateTimeTrackingProjectV1.php +lib/Model/ProvinceItem.php +lib/Model/PutCompanyIndustryCodesRequest.php +lib/Model/PutCompanyProfileDisplayNameRequest.php +lib/Model/RemoveCycleAdminSelfResponse.php +lib/Model/RemoveTotalRewardsEmployeesRequest.php lib/Model/Report.php lib/Model/ReportsResponse.php lib/Model/Request.php lib/Model/RequestCustomReport.php lib/Model/RequestCustomReportFilters.php lib/Model/RequestCustomReportFiltersLastChanged.php +lib/Model/RequestCustomReportResponse.php +lib/Model/RequestCustomReportResponseEmployeesInner.php +lib/Model/RequestCustomReportResponseFieldsInner.php +lib/Model/SaveChangeCommTemplateResponse.php +lib/Model/SchedulingCreateScheduleRequestV1.php +lib/Model/SchedulingCreateSchedulingShiftRequestV1.php +lib/Model/SchedulingPublishShiftsFailureV1.php +lib/Model/SchedulingPublishShiftsRequest.php +lib/Model/SchedulingPublishShiftsResultV1.php +lib/Model/SchedulingScheduleListResponseV1.php +lib/Model/SchedulingScheduleListResponseV1Links.php +lib/Model/SchedulingScheduleListResponseV1Meta.php +lib/Model/SchedulingScheduleV1.php +lib/Model/SchedulingSchedulingShiftV1.php +lib/Model/SchedulingShiftListResponseV1.php +lib/Model/SchedulingShiftListResponseV1Links.php +lib/Model/SchedulingShiftListResponseV1LinksNext.php +lib/Model/SchedulingShiftListResponseV1LinksPrev.php +lib/Model/SchedulingShiftListResponseV1Meta.php +lib/Model/SchedulingTimezoneListResponseV1.php +lib/Model/SchedulingTimezoneListResponseV1Meta.php +lib/Model/SchedulingTimezoneV1.php +lib/Model/SchedulingUpdateScheduleRequestV1.php +lib/Model/SchedulingUpdateSchedulingShiftRequestV1.php +lib/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.php +lib/Model/SendRecommendationsResponse.php +lib/Model/SetBreakPolicyEmployeesRequest.php +lib/Model/SetTotalRewardsCustomDisclaimerRequest.php +lib/Model/SetTotalRewardsOnboardingStepRequest.php +lib/Model/ShareOptionsResponse.php lib/Model/State.php lib/Model/StateProvinceResponseSchema.php lib/Model/StateProvinceSchema.php lib/Model/TableRowDeleteResponse.php lib/Model/TableRowUpdate.php +lib/Model/TabularField.php +lib/Model/TabularFieldFieldsInner.php lib/Model/TaskCreateSchema.php -lib/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.php +lib/Model/TimeOffBalanceEntry.php lib/Model/TimeOffHistory.php +lib/Model/TimeOffPolicy.php lib/Model/TimeOffRequest.php +lib/Model/TimeOffRequest1.php +lib/Model/TimeOffRequest1Actions.php +lib/Model/TimeOffRequest1Amount.php +lib/Model/TimeOffRequest1Notes.php +lib/Model/TimeOffRequest1Status.php +lib/Model/TimeOffRequest1Type.php lib/Model/TimeOffRequestDatesInner.php lib/Model/TimeOffRequestNotesInner.php +lib/Model/TimeOffTypesAndDefaultHours.php +lib/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.php +lib/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.php +lib/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.php +lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1.php +lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.php +lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.php lib/Model/TimeTrackingBulkResponseSchema.php lib/Model/TimeTrackingBulkResponseSchemaResponse.php +lib/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.php +lib/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.php +lib/Model/TimeTrackingCreateTimeTrackingBreakV1.php lib/Model/TimeTrackingDeleteResponseSchema.php lib/Model/TimeTrackingIdResponseSchema.php +lib/Model/TimeTrackingOffsetPaginatedResponseDataV1.php +lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.php +lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.php +lib/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.php +lib/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.php +lib/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.php +lib/Model/TimeTrackingPaginatedBreaksResponseV1.php lib/Model/TimeTrackingProjectWithTasksAndEmployeeIds.php lib/Model/TimeTrackingRecord.php lib/Model/TimeTrackingRecordSchema.php -lib/Model/TimeTrackingRecordSchemaProject.php -lib/Model/TimeTrackingRecordSchemaProjectTask.php -lib/Model/TimeTrackingRecordSchemaShiftDifferential.php +lib/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.php lib/Model/TimeTrackingTask.php +lib/Model/TimeTrackingTimeTrackingBreakAssessmentV1.php +lib/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.php +lib/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.php +lib/Model/TimeTrackingTimeTrackingBreakPolicyV1.php +lib/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.php +lib/Model/TimeTrackingTimeTrackingBreakV1.php +lib/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.php +lib/Model/TimeTrackingUpdateTimeTrackingBreakV1.php lib/Model/TimesheetEntryInfoApiTransformer.php +lib/Model/TimezoneListResponse.php +lib/Model/TimezoneResource.php +lib/Model/TotalRewardsBenefitDetailsValues.php +lib/Model/TotalRewardsBenefitSectionValues.php +lib/Model/TotalRewardsCalendarSectionValues.php +lib/Model/TotalRewardsCompSummaryValues.php +lib/Model/TotalRewardsCustomDisclaimerInfo.php +lib/Model/TotalRewardsEmployeeStatement.php +lib/Model/TotalRewardsEquityDetailsValues.php +lib/Model/TotalRewardsEquityEstimatedValuationValues.php +lib/Model/TotalRewardsEquityGrowthChartItem.php +lib/Model/TotalRewardsEquityGrowthEstimation.php +lib/Model/TotalRewardsEquitySectionValues.php +lib/Model/TotalRewardsExtraPayDetailsValues.php +lib/Model/TotalRewardsExtraPaySectionValues.php +lib/Model/TotalRewardsHolidayValue.php +lib/Model/TotalRewardsOnboardingStep.php +lib/Model/TotalRewardsOverviewSectionValues.php +lib/Model/TotalRewardsTimeOffPolicyValue.php +lib/Model/TotalRewardsTimelineItem.php +lib/Model/TotalRewardsTimelineItemLabel.php +lib/Model/TotalRewardsTimelineSectionValues.php lib/Model/TrainingCategory.php -lib/Model/TrainingCategoryList.php lib/Model/TrainingRecord.php -lib/Model/TrainingRecordList.php +lib/Model/TrainingRecordMap.php +lib/Model/TrainingRecordType.php lib/Model/TrainingType.php -lib/Model/TrainingTypeList.php +lib/Model/TrainingTypeCategory.php lib/Model/TransformedApiEmployeeGoalDetails.php lib/Model/TransformedApiEmployeeGoalDetailsGoal.php lib/Model/TransformedApiGoal.php -lib/Model/TransformedApiGoalGoal.php -lib/Model/TransformedApiGoalGoalActions.php -lib/Model/TransformedApiGoalGoalMilestonesInner.php -lib/Model/Unauthorized.php -lib/Model/Unauthorized1.php -lib/Model/UnauthorizedErrorsInner.php +lib/Model/TransformedApiGoalMilestonesInner.php +lib/Model/UnassignEmployeesFromBreakPolicyRequest.php +lib/Model/UpdateApplicantStatusRequest.php +lib/Model/UpdateApplicantStatusResponse.php +lib/Model/UpdateCompanyIndustryCodes400Response.php +lib/Model/UpdateCompanyIndustryCodes403Response.php +lib/Model/UpdateCompanyIndustryCodes404Response.php +lib/Model/UpdateCompanyIndustryCodes500Response.php +lib/Model/UpdateCompanyIndustryCodesResponse.php +lib/Model/UpdateCompanyNameBadRequestResponse.php +lib/Model/UpdateCompanyNameBadRequestResponseError.php +lib/Model/UpdateCompanyNameForbiddenResponse.php +lib/Model/UpdateCompanyNameForbiddenResponseError.php +lib/Model/UpdateCompanyNameInternalErrorResponse.php +lib/Model/UpdateCompanyNameSuccessResponse.php +lib/Model/UpdateCompensationBenchmarkRequest.php +lib/Model/UpdateCompensationBenchmarkSourceItem.php +lib/Model/UpdateCompensationBenchmarkSourcesRequest.php +lib/Model/UpdateCompensationBenchmarkSourcesResponse.php lib/Model/UpdateEmployeeTrainingRecordRequest.php +lib/Model/UpdateEmployeeVerificationIntegrationRequest.php +lib/Model/UpdateEmployeeVerificationRequest.php +lib/Model/UpdateGoalCommentRequest.php +lib/Model/UpdateGoalMilestoneProgressRequest.php +lib/Model/UpdateGoalProgressRequest.php +lib/Model/UpdateGoalSharingRequest.php +lib/Model/UpdateGoalV1.php +lib/Model/UpdateGoalV11Request.php +lib/Model/UpdateGoalV11RequestMilestonesInner.php +lib/Model/UpdateLocationRequest.php +lib/Model/UpdateLocationRequestAddress.php lib/Model/UpdateTrainingCategoryRequest.php lib/Model/UpdateTrainingTypeRequest.php lib/Model/UpdateTrainingTypeRequestCategory.php -lib/Model/WebHookLogResponse.php +lib/Model/UpdateWebhookBadRequestResponse.php +lib/Model/UpdatedCompensationBenchmark.php +lib/Model/UpdatedCompensationBenchmarkSavedBenchmark.php +lib/Model/UploadEmployeePhotoRequest1.php +lib/Model/UserPermissionData.php +lib/Model/WebHookPostFieldDataObject.php +lib/Model/WebHookPostFieldPageDataObject.php +lib/Model/WebHookPostFieldResponseObject.php +lib/Model/WebHookPostFieldTableDataObject.php lib/Model/WebHookResponse.php lib/Model/Webhook.php lib/Model/WebhookBadRequest.php +lib/Model/WebhookBadRequestErrorsInner.php lib/Model/WebhookError.php lib/Model/WebhookErrorErrors.php +lib/Model/WebhookEventType.php +lib/Model/WebhookLogEntry.php +lib/Model/WebhookLogListResponse.php +lib/Model/WebhookLogRateLimitResponse.php +lib/Model/WebhookLogRateLimitResponseError.php lib/Model/WebhookSubErrorProperty.php -lib/Model/WebhookSubErrorPropertyPostFieldsInner.php +lib/Model/WebhookSubErrorPropertyMonitorFieldsInner.php +lib/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.php lib/Model/WebhookSubErrorPropertyUnknownFieldsInner.php +lib/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.php lib/Model/WebhooksList.php lib/Model/WebhooksListWebhooksInner.php -lib/Model/XmlDirectoryEmployee.php -lib/Model/XmlDirectoryEmployeeEmployees.php -lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.php -lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.php -lib/Model/XmlDirectoryEmployeeFieldset.php -lib/Model/XmlDirectoryEmployeeFieldsetFieldInner.php +lib/Model/WhosOutEntry.php +lib/Model/XmlEmployeeFiles.php +lib/Model/XmlEmployeeFilesCategoryInner.php +lib/Model/XmlEmployeeFilesCategoryInnerFileInner.php lib/ObjectSerializer.php phpunit.xml.dist +test/Api/AlertApiTest.php +test/Api/AlertConfigurationsApiTest.php +test/Api/CompanyApiTest.php +test/Api/CompanyProfileApiTest.php +test/Api/CompensationApiTest.php +test/Api/CompensationBenchmarkingApiTest.php +test/Api/CompensationPlanningApiTest.php +test/Api/EmployeeVerificationApiTest.php +test/Api/LocationsApiTest.php +test/Api/OnboardingApiTest.php +test/Api/SchedulingApiTest.php +test/Api/TotalRewardsApiTest.php +test/Api/WebhookEventsApiTest.php diff --git a/.sdk-update/analysis/breaking-exit b/.sdk-update/analysis/breaking-exit new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/.sdk-update/analysis/breaking-exit @@ -0,0 +1 @@ +1 diff --git a/.sdk-update/analysis/breaking-output.txt b/.sdk-update/analysis/breaking-output.txt new file mode 100644 index 00000000..0aba103e --- /dev/null +++ b/.sdk-update/analysis/breaking-output.txt @@ -0,0 +1,3524 @@ +877 changes: 863 error, 14 warning, 0 info +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications + response property `applications/items/applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications + response property `applications/items/job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications + response property `applications/items/rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications + response property `nextPageUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/availableStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/education/institution` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/phoneNumber` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/source` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/twitterUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicant/websiteUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `applicationReferences` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `attachmentCount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `attachments` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `coverLetterFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `desiredSalary` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `job/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `job/hiringLead/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `job/hiringLead/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `movedFrom` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `movedTo` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `questionsAndAnswers/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `questionsAndAnswers/items/editedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `questionsAndAnswers/items/editedEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `questionsAndAnswers/items/hasRevisions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `questionsAndAnswers/items/isArchived` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `referredBy` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `resumeFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `status/changedByUser/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `status/changedByUser/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + response property `status/changedByUser/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `applicant/address` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `applicant/education` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `applicant/education/level` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `job/hiringLead` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `job/hiringLead/jobTitle` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `status/changedByUser` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + added `subschema #1, subschema #2` to the `status/changedByUser/jobTitle` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `applicant/address` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `applicant/education` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `applicant/education/level` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `job/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `job/hiringLead/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `status/changedByUser` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/applications/{applicationId} + the `status/changedByUser/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + response property `items/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + response property `items/hiringLead/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + response property `items/postingUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + response property `items/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + added `subschema #1, subschema #2` to the `items/department` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + added `subschema #1, subschema #2` to the `items/hiringLead` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + added `subschema #1, subschema #2` to the `items/location` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + the `items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + the `items/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/jobs + the `items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/statuses + response property `items/code` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/applicant_tracking/statuses + response property `items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/allowsCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/allowsSuperCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/benefitVendorId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/companyDeductionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/deductionTypeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/company_benefit + response property `companyBenefits/items/startDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-any-of-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + removed `subschema #1, subschema #2, subschema #3` from the `filters` request property `anyOf` list + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/companyPercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/coverageLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/deductionEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/deductionStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeeAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeeAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeeAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/employeeBenefit/items/employeePercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/employee_benefit + response property `employeeBenefits/items/payFrequency` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/member_benefit + response property `members/items/coverages/items/events/items/monthlyPremiumInCents` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefit/member_benefit + response property `members/items/coverages/items/events/items/premiumTierId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefitcoverages + response property `Benefit Coverages/items/benefitPlanId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefitcoverages + response property `Benefit Coverages/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefits/member-benefits + response property `data/items/plans/items/dateRanges/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefits/settings/deduction_types/all + response property `items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/benefits/settings/deduction_types/all + response property `items/subTypes/items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + the request property `address/line1` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + the request property `address/line2` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `address/line1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `address/line2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `address/zip` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `displayName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `industryCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `legalName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `phone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `subdomain` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/company-profile-data/company-information + response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/company-profile-data/industry-codes + response property `company_industries/items/addedByUserId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/company-profile-data/industry-codes + response property `company_industries/items/addedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/sourceColor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/benchmarks/items/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/employees/items/managerName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/employees/items/managerTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/internalJobPayBand/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/internalJobPayBand/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/internalJobPayBand/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/internalJobPayBand/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + response property `jobLocationPairs/items/locationDetails/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/department` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/division` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + added `subschema #1, subschema #2` to the `jobLocationPairs/items/internalJobPayBand` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + added `subschema #1, subschema #2` to the `jobLocationPairs/items/locationDetails` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + the `jobLocationPairs/items/employees/items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + the `jobLocationPairs/items/employees/items/division` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + the `jobLocationPairs/items/internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks + the `jobLocationPairs/items/locationDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks + response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/compensation/benchmarks + response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/lastEdited` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/sourceColorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `benchmarkValues/items/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `companyPayRange/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `companyPayRange/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `companyPayRange/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `companyPayRange/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `employees/items/compaRatio` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `employees/items/compaRatioStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `employees/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `employees/items/isRemote` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `employees/items/rangePenetration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `internalJobPayBand/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `internalJobPayBand/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `internalJobPayBand/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `internalJobPayBand/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `internalJobPayBand/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/formattedJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/jobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/jobLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/lastReviewed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/values/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + response property `mercerBenchmarkDetails/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + added `subschema #1, subschema #2` to the `companyPayRange` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + added `subschema #1, subschema #2` to the `employees/items/location` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + added `subschema #1, subschema #2` to the `employees/items/varianceFromPayBand` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + added `subschema #1, subschema #2` to the `internalJobPayBand` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + added `subschema #1, subschema #2` to the `mercerBenchmarkDetails` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + the `companyPayRange` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + the `employees/items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + the `employees/items/varianceFromPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + the `internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/details + the `mercerBenchmarkDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/compensation/benchmarks/import + response property `columnMap/items/expectedColumnKey` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/benchmarks/sources + response property `items/colorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `companyValuation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `disclaimers` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `outstandingShares` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `pricePerShare` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `sliderMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `sliderMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/compensation/equity/settings + response property `vestingConditions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/custom-reports + response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/custom-reports + response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/custom-reports/{reportId} + response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/custom-reports/{reportId} + response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + the request property `aggregations/defaultAggregation` became not nullable + +error [request-property-enum-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + removed the enum value `avg` of the request property `aggregations/defaultAggregation` + +error [request-property-enum-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + removed the enum value `count` of the request property `aggregations/defaultAggregation` + +error [request-property-enum-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + removed the enum value `max` of the request property `aggregations/defaultAggregation` + +error [request-property-enum-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + removed the enum value `min` of the request property `aggregations/defaultAggregation` + +error [request-property-enum-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + removed the enum value `sum` of the request property `aggregations/defaultAggregation` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName} + response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName}/field-options + the request property `dependentFields` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/datasets/{datasetName}/field-options + the request property `filters` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/datasets/{datasetName}/fields + response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/datasets/{datasetName}/fields + response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents + response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/employeedependents + response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employeedependents/{id} + response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employeedependents/{id} + response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/status` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/departmentName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/divisionName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/employmentStatusName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/locationName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `data/items/allOf[subschema #2]/workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `meta/page/limit` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `meta/page/nextCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + response property `meta/page/prevCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-media-type-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{employeeId}/photo/{size} + removed the media type `image/jpeg` for the response with the status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/employees/{employeeId}/time_off/policies + the request property `items/accrualStartDate` became not nullable + +error [request-parameter-default-value-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + for the `query` request parameter `fields`, default value `firstName,lastName` was removed + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `address1` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `birthDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `city` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `country` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `department` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `department` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `departmentId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `division` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `division` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `divisionId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `exempt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `exempt` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `firstName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `gender` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `gender` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `hireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `homePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `lastName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `location` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `locationId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `marital` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `marital` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `middleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payRate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payRate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `payType` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `preferredName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `state` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `status` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `status` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workPhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees/{id} + response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations + response property `allOf[subschema #2]/data/items/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/address1` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/address2` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/city` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/countryId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/stateId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/timezone` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + the request property `address/zipcode` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/hris/org/locations + response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/hris/org/locations/{id} + response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/address1` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/address2` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/city` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/countryId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/stateId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/timezone` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + the request property `address/zipcode` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/hris/org/locations/{id} + response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/login + response property `employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-body-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/countries/options + added `#/components/schemas/CountriesResponseSchema, #/components/schemas/CountrySchema` to the response body `oneOf` list for the response status `200` + +error [response-body-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/countries/options + the response's body type/format changed from `array`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + response property `items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + response property `items/options/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + response property `items/options/items/createdDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + the `items/fieldId` response's property type/format changed from `string`/`` to `integer`/`` for status `200` (media type: application/json) + +error [request-body-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + the request's body type/format changed from `string`/`` to `object`/`` (media type: text/xml) + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + response property `alias` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + response property `options/items/archivedDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + response property `options/items/createdDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/time_off/policies + response property `items/effectiveDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/time_off/types + response property `timeOffTypes/items/color` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/time_off/types + response property `timeOffTypes/items/icon` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/timezones + response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands + response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles + response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/job-titles-with-employees + response property `items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/levels + response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/pay-bands + response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/pay-grades-and-bands/review + response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals + the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + the request property `alignsWithOptionId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + the request property `completionDate` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + the request property `milestones` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/aggregate + the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/shareOptions + response property `persons/items/employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/shareOptions + response property `persons/items/userId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + the request property `alignsWithOptionId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + the request property `completionDate` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + the request property `comment` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + the request property `completionDate` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/availableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/durationDifference` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/expectedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/recordedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/unavailableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/violations/items/amount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + response property `allOf[subschema #2]/data/items/violations/items/employeeTimesheetClockEntryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-assessments + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `breaks/items/availabilityEndTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `breaks/items/availabilityMaxHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `breaks/items/availabilityMinHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `breaks/items/availabilityStartTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `breaks/items/id` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + the request property `description` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id} + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id} + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id} + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/break-policies/{id} + the request property `description` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/break-policies/{id} + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/break-policies/{id} + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/break-policies/{id} + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/breaks + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + the request property `availabilityEndTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + the request property `availabilityMaxHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + the request property `availabilityMinHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + the request property `availabilityStartTime` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/break-policies/{id}/breaks + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + the request property `items/availabilityEndTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + the request property `items/availabilityMaxHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + the request property `items/availabilityMinHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + the request property `items/availabilityStartTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + the request property `items/id` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/breaks + response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + response property `allOf[subschema #2]/data/items/name` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + response property `allOf[subschema #2]/data/items/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/break-policies/{id}/employees + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `breaks/items/availabilityEndTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `breaks/items/availabilityMaxHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `breaks/items/availabilityMinHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `breaks/items/availabilityStartTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `breaks/items/id` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + the request property `description` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time-tracking/break-policies/{id}/sync + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/breaks/{id} + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + the request property `availabilityEndTime` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + the request property `availabilityMaxHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + the request property `availabilityMinHoursWorked` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + the request property `availabilityStartTime` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/breaks/{id} + response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-availabilities + response property `items/availableAfterMinutesWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-availabilities + response property `items/availableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-availabilities + response property `items/availableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-availabilities + response property `items/unavailableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-availabilities + response property `items/unavailableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/employees/{id}/break-policies + the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-body-added-required] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/projects + added required request body + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API DELETE /api/v1/time-tracking/projects/{id} + for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` + +error [api-removed-without-deprecation] at specs/public.yaml + in API GET /api/v1/time-tracking/projects/{id} + api removed without deprecation + +error [request-body-added-required] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/projects/{id} + added required request body + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/projects/{id} + for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/projects/{projectId}/tasks + for the `path` request parameter `projectId`, the type/format was changed from `string`/`` to `integer`/`` + +error [request-body-added-required] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time-tracking/projects/{projectId}/tasks + added required request body + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API DELETE /api/v1/time-tracking/tasks/{id} + for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time-tracking/tasks/{id} + for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` + +error [request-body-added-required] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/tasks/{id} + added required request body + +error [request-parameter-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PATCH /api/v1/time-tracking/tasks/{id} + for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` + +error [response-media-type-removed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/time_off/requests/{requestId}/status + removed the media type `application/json` for the response with the status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + the request property `entries/items/breakId` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/clock_entries/store + the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `breakId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `date` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `note` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `projectId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `start` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `taskId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the request property `timezone` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_in + the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/employees/{employeeId}/clock_out + the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/time_tracking/hour_entries/store + the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/approvedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/time_tracking/timesheet_entries + the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/timetracking/adjust + the request property `holidayId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/timetracking/adjust + the request property `projectId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/timetracking/adjust + the request property `shiftDifferentialId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/timetracking/adjust + the request property `taskId` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/timetracking/record + response property `response/message` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `holidayId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `jobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `jobData` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `payCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `projectId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `shiftDifferentialId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + response property `taskId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + added `subschema #1, subschema #2` to the `project` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + added `subschema #1, subschema #2` to the `project/task` response property `oneOf` list for the response status `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + added `subschema #1, subschema #2` to the `shiftDifferential` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + the `project` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + the `project/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/timetracking/record/{id} + the `shiftDifferential` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/record/employee/{employeeId} + response property `oneOf[subschema #1]/additionalProperties/cost` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/record/employee/{employeeId} + response property `oneOf[subschema #1]/additionalProperties/credits` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/record/employee/{employeeId} + response property `oneOf[subschema #1]/additionalProperties/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/record/employee/{employeeId} + response property `oneOf[subschema #1]/additionalProperties/instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/record/employee/{employeeId} + response property `oneOf[subschema #1]/additionalProperties/notes` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/record/employee/{employeeId} + response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/record/employee/{employeeId} + response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/record/employee/{employeeId} + response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/record/employee/{employeeId} + response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/record/employee/{employeeId} + response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/record/{employeeTrainingRecordId} + response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/record/{employeeTrainingRecordId} + response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/record/{employeeTrainingRecordId} + response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/record/{employeeTrainingRecordId} + response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/record/{employeeTrainingRecordId} + response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/type + response property `additionalProperties/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/type + response property `additionalProperties/linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/training/type + response property `additionalProperties/required` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/type + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/type + response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/training/type + response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/type/{trainingTypeId} + response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/type/{trainingTypeId} + response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/training/type/{trainingTypeId} + response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks + response property `webhooks/items/lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1/webhooks + response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks/monitor_fields + response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks/post-fields + response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks/post-fields + response property `fields/items/tableId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks/post-fields + response property `fields/items/type` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/webhooks/{id} + response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/webhooks/{id} + response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/employees/{employeeId}/time_off/policies + response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/employees/{employeeId}/time_off/policies + the request property `items/accrualStartDate` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/employees/{employeeId}/time_off/policies + response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate + the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + the request property `alignsWithOptionId` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + the request property `completionDate` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} + the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1_2/datasets/{datasetName}/field-options + the request property `dependentFields` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v1_2/datasets/{datasetName}/field-options + the request property `filters` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/datasets/{datasetName}/fields + response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/datasets/{datasetName}/fields + response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-one-of-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` + +error [response-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate + the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v2/datasets/{datasetName}/data + the request property `filter` became not nullable + +error [request-property-became-not-nullable] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v2/datasets/{datasetName}/data + the request property `orderBy` became not nullable + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v2/datasets/{datasetName}/data + response property `data/items/fields/additionalProperties/` list-of-types was widened by adding types `number, boolean, array, object and null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v2/datasets/{datasetName}/data + response property `links/next` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +error [response-property-list-of-types-widened] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API POST /api/v2/datasets/{datasetName}/data + response property `links/prev` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +warning [request-parameter-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/after` was changed from `integer`/`` to `string`/`` + This is a warning because parameter objects can be passed in differnt ways, some of which allow this type change and others do not. + +warning [request-parameter-property-type-changed] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/employees + for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/before` was changed from `integer`/`` to `string`/`` + This is a warning because parameter objects can be passed in differnt ways, some of which allow this type change and others do not. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `no` enum value to the `items/manageable` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `no` enum value to the `items/multiple` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `no` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `yes` enum value to the `items/manageable` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `yes` enum value to the `items/multiple` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API GET /api/v1/meta/lists + added the new `yes` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json) + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `no` enum value to the `manageable` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `no` enum value to the `multiple` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `no` enum value to the `options/items/archived` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `yes` enum value to the `manageable` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `yes` enum value to the `multiple` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + +warning [response-property-enum-value-added] at /home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml + in API PUT /api/v1/meta/lists/{listFieldId} + added the new `yes` enum value to the `options/items/archived` response property for the response status `200` + Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead. + + diff --git a/.sdk-update/analysis/changelog-stderr.log b/.sdk-update/analysis/changelog-stderr.log new file mode 100644 index 00000000..e69de29b diff --git a/.sdk-update/analysis/changelog.json b/.sdk-update/analysis/changelog.json new file mode 100644 index 00000000..c8670b7e --- /dev/null +++ b/.sdk-update/analysis/changelog.json @@ -0,0 +1 @@ +[{"id":"response-property-list-of-types-widened","text":"response property `applications/items/applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-applications","path":"/api/v1/applicant_tracking/applications","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3384,"column":907},"fingerprint":"3d471e41aa4d"},{"id":"response-property-list-of-types-widened","text":"response property `applications/items/job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-applications","path":"/api/v1/applicant_tracking/applications","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3384,"column":1322},"fingerprint":"90edb68bd16d"},{"id":"response-property-list-of-types-widened","text":"response property `applications/items/rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-applications","path":"/api/v1/applicant_tracking/applications","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3384,"column":552},"fingerprint":"06919818cfe4"},{"id":"response-property-list-of-types-widened","text":"response property `nextPageUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-applications","path":"/api/v1/applicant_tracking/applications","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3383,"column":126},"fingerprint":"345e2bb0cfcb"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":771},"fingerprint":"7e8f3803162a"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":813},"fingerprint":"4e937bc0b476"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":847},"fingerprint":"66f7a9eadbee"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":956},"fingerprint":"39ec122e9dcb"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":882},"fingerprint":"db1780b2a566"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":919},"fingerprint":"54c120c7bbf5"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/availableStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1249},"fingerprint":"3393767d389f"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":452},"fingerprint":"4186baf828ec"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/education/institution` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1433},"fingerprint":"2371aa686945"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1062},"fingerprint":"390d9ff0cdac"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/phoneNumber` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":355},"fingerprint":"b29e05188ba3"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/source` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":569},"fingerprint":"15afbf37a85f"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/twitterUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":670},"fingerprint":"0183ab9fcdcd"},{"id":"response-property-list-of-types-widened","text":"response property `applicant/websiteUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1139},"fingerprint":"d737dc617e64"},{"id":"response-property-list-of-types-widened","text":"response property `applicationReferences` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9016,"column":116},"fingerprint":"5feb3a0a00da"},{"id":"response-property-list-of-types-widened","text":"response property `attachmentCount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9004,"column":111},"fingerprint":"54053630e3a5"},{"id":"response-property-list-of-types-widened","text":"response property `attachments` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9005,"column":113},"fingerprint":"76a999bc7553"},{"id":"response-property-list-of-types-widened","text":"response property `coverLetterFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9003,"column":118},"fingerprint":"0c5c54b6af3c"},{"id":"response-property-list-of-types-widened","text":"response property `desiredSalary` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9011,"column":104},"fingerprint":"a0887f353d2a"},{"id":"response-property-list-of-types-widened","text":"response property `job/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":668},"fingerprint":"4d3b15df6dcd"},{"id":"response-property-list-of-types-widened","text":"response property `job/hiringLead/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":766},"fingerprint":"f9e5b7bc62e7"},{"id":"response-property-list-of-types-widened","text":"response property `job/hiringLead/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":802},"fingerprint":"2452b4cc7dbe"},{"id":"response-property-list-of-types-widened","text":"response property `job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":256},"fingerprint":"9a240ca676a4"},{"id":"response-property-list-of-types-widened","text":"response property `movedFrom` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9007,"column":121},"fingerprint":"defb829ecbb6"},{"id":"response-property-list-of-types-widened","text":"response property `movedTo` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9006,"column":117},"fingerprint":"ae166d8d9176"},{"id":"response-property-list-of-types-widened","text":"response property `questionsAndAnswers/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9015,"column":730},"fingerprint":"440566167b5a"},{"id":"response-property-list-of-types-widened","text":"response property `questionsAndAnswers/items/editedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9015,"column":864},"fingerprint":"efbd23c7ba4d"},{"id":"response-property-list-of-types-widened","text":"response property `questionsAndAnswers/items/editedEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9015,"column":1005},"fingerprint":"40506abaad33"},{"id":"response-property-list-of-types-widened","text":"response property `questionsAndAnswers/items/hasRevisions` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9015,"column":526},"fingerprint":"d44cb3a6fe22"},{"id":"response-property-list-of-types-widened","text":"response property `questionsAndAnswers/items/isArchived` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9015,"column":615},"fingerprint":"839028e0ca9d"},{"id":"response-property-list-of-types-widened","text":"response property `rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9001,"column":94},"fingerprint":"fb2582e5628c"},{"id":"response-property-list-of-types-widened","text":"response property `referredBy` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9010,"column":105},"fingerprint":"49784df14204"},{"id":"response-property-list-of-types-widened","text":"response property `resumeFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9002,"column":107},"fingerprint":"30fb73c1ac90"},{"id":"response-property-list-of-types-widened","text":"response property `status/changedByUser/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9000,"column":579},"fingerprint":"aa7721deddef"},{"id":"response-property-list-of-types-widened","text":"response property `status/changedByUser/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9000,"column":670},"fingerprint":"65ab34358295"},{"id":"response-property-list-of-types-widened","text":"response property `status/changedByUser/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9000,"column":706},"fingerprint":"0f36868b43fa"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `applicant/address` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13460,"column":1204},"fingerprint":"748c6f1447ca"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `applicant/education` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13460,"column":2021},"fingerprint":"587c4bf7210c"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `applicant/education/level` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13460,"column":1972},"fingerprint":"3e565abf11d2"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `job/hiringLead` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13461,"column":973},"fingerprint":"9c01a05420cd"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `job/hiringLead/jobTitle` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13461,"column":924},"fingerprint":"c89ed27270e9"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `status/changedByUser` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13443,"column":856},"fingerprint":"bb5fde59c068"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `status/changedByUser/jobTitle` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13443,"column":807},"fingerprint":"339ef2a88f86"},{"id":"response-property-type-changed","text":"the `applicant/address` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":984},"fingerprint":"2c1e7a1a58a1"},{"id":"response-property-type-changed","text":"the `applicant/education` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1675},"fingerprint":"3cd67da55809"},{"id":"response-property-type-changed","text":"the `applicant/education/level` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9017,"column":1647},"fingerprint":"410141d8a878"},{"id":"response-property-type-changed","text":"the `job/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":858},"fingerprint":"778a8688a282"},{"id":"response-property-type-changed","text":"the `job/hiringLead/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9018,"column":830},"fingerprint":"38ae1113bece"},{"id":"response-property-type-changed","text":"the `status/changedByUser` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9000,"column":762},"fingerprint":"e41ac144f58f"},{"id":"response-property-type-changed","text":"the `status/changedByUser/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9000,"column":734},"fingerprint":"e248d04f297b"},{"id":"response-property-list-of-types-widened","text":"response property `items/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":1356},"fingerprint":"b4f854ace3b8"},{"id":"response-property-list-of-types-widened","text":"response property `items/hiringLead/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":1434},"fingerprint":"7dbf22316f48"},{"id":"response-property-list-of-types-widened","text":"response property `items/postingUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":1847},"fingerprint":"3d31d3890f05"},{"id":"response-property-list-of-types-widened","text":"response property `items/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":187},"fingerprint":"75a78344ae6a"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/department` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13595,"column":907},"fingerprint":"6aaa80afcdb7"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/hiringLead` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13595,"column":1577},"fingerprint":"9763d5cc2322"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/location` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13595,"column":681},"fingerprint":"7bf4a97e3bcd"},{"id":"response-property-type-changed","text":"the `items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":855},"fingerprint":"9b615863ccd5"},{"id":"response-property-type-changed","text":"the `items/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":1462},"fingerprint":"c2e4cd979495"},{"id":"response-property-type-changed","text":"the `items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9146,"column":650},"fingerprint":"047694c5f06c"},{"id":"response-property-list-of-types-widened","text":"response property `items/code` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-statuses","path":"/api/v1/applicant_tracking/statuses","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3419,"column":155},"fingerprint":"eeeaf5d101a3"},{"id":"response-property-list-of-types-widened","text":"response property `items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-statuses","path":"/api/v1/applicant_tracking/statuses","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3419,"column":381},"fingerprint":"84f7e2de61b7"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/allowsCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12398,"column":11},"fingerprint":"19a1c4b014f3"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/allowsSuperCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12403,"column":11},"fingerprint":"5ab47ac10933"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/benefitVendorId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12371,"column":11},"fingerprint":"236e4e7ec26a"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/companyDeductionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12381,"column":11},"fingerprint":"17ae5a72db9f"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/deductionTypeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12376,"column":11},"fingerprint":"b1f096b6f182"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12392,"column":11},"fingerprint":"9ef40dc4a809"},{"id":"response-property-list-of-types-widened","text":"response property `companyBenefits/items/startDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-company-benefits","path":"/api/v1/benefit/company_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12386,"column":11},"fingerprint":"fd38e5abd36d"},{"id":"request-property-any-of-removed","text":"removed `subschema #1, subschema #2, subschema #3` from the `filters` request property `anyOf` list","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12428,"column":15},"fingerprint":"b1f718523b57"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2334},"fingerprint":"06e5f3782aab"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2442},"fingerprint":"a5ce811e3994"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2927},"fingerprint":"13979c67af50"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2700},"fingerprint":"c5ca74c73bdc"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2806},"fingerprint":"6dffca4a21ad"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/companyPercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2586},"fingerprint":"e84b96505cb0"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/coverageLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":822},"fingerprint":"fa93c5b5c84f"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":1546},"fingerprint":"068c8f8e8dee"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/deductionEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":951},"fingerprint":"5e4d036f9aaf"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/deductionStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":1098},"fingerprint":"a977eadb60e1"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeeAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":1642},"fingerprint":"63d4298f88a0"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeeAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":1752},"fingerprint":"7ccb8ad56311"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeeAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2236},"fingerprint":"294c3f7ad931"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2006},"fingerprint":"bab16c45a6ed"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":2114},"fingerprint":"339d45f88744"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/employeeBenefit/items/employeePercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":1894},"fingerprint":"4d01b76e50d7"},{"id":"response-property-list-of-types-widened","text":"response property `employeeBenefits/items/payFrequency` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-benefits","path":"/api/v1/benefit/employee_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3801,"column":351},"fingerprint":"150b6b45f759"},{"id":"response-property-list-of-types-widened","text":"response property `members/items/coverages/items/events/items/monthlyPremiumInCents` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-member-benefit-events","path":"/api/v1/benefit/member_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12456,"column":545},"fingerprint":"55d528d6eabf"},{"id":"response-property-list-of-types-widened","text":"response property `members/items/coverages/items/events/items/premiumTierId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-member-benefit-events","path":"/api/v1/benefit/member_benefit","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12456,"column":372},"fingerprint":"9e64bc887dc4"},{"id":"response-property-list-of-types-widened","text":"response property `Benefit Coverages/items/benefitPlanId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-benefit-coverages","path":"/api/v1/benefitcoverages","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9248,"column":661},"fingerprint":"ac9dc9ee6b4f"},{"id":"response-property-list-of-types-widened","text":"response property `Benefit Coverages/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-benefit-coverages","path":"/api/v1/benefitcoverages","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9248,"column":418},"fingerprint":"296447edb91e"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/plans/items/dateRanges/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-member-benefits","path":"/api/v1/benefits/member-benefits","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3889,"column":785},"fingerprint":"b8a99b29b6bf"},{"id":"response-property-list-of-types-widened","text":"response property `items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-benefit-deduction-types","path":"/api/v1/benefits/settings/deduction_types/all","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3937,"column":1214},"fingerprint":"4061b73e039a"},{"id":"response-property-list-of-types-widened","text":"response property `items/subTypes/items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-benefit-deduction-types","path":"/api/v1/benefits/settings/deduction_types/all","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3937,"column":2441},"fingerprint":"ce353a7fdc36"},{"id":"request-property-became-not-nullable","text":"the request property `address/line1` became not nullable","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"880ec757a3f3"},{"id":"request-property-became-not-nullable","text":"the request property `address/line2` became not nullable","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"41a46688df25"},{"id":"response-property-list-of-types-widened","text":"response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4136,"column":122},"fingerprint":"d0b97be3df8c"},{"id":"response-property-list-of-types-widened","text":"response property `address/line1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4136,"column":53},"fingerprint":"571a15cc48f0"},{"id":"response-property-list-of-types-widened","text":"response property `address/line2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4136,"column":88},"fingerprint":"7ec9e7d74609"},{"id":"response-property-list-of-types-widened","text":"response property `address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4136,"column":157},"fingerprint":"b02c3070da7f"},{"id":"response-property-list-of-types-widened","text":"response property `address/zip` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4136,"column":190},"fingerprint":"196dd90eccdf"},{"id":"response-property-list-of-types-widened","text":"response property `displayName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4135,"column":34},"fingerprint":"0747243edb37"},{"id":"response-property-list-of-types-widened","text":"response property `industryCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4140,"column":35},"fingerprint":"3ece69c2d14c"},{"id":"response-property-list-of-types-widened","text":"response property `legalName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4134,"column":32},"fingerprint":"01782185c191"},{"id":"response-property-list-of-types-widened","text":"response property `phone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4137,"column":28},"fingerprint":"1ad52839b027"},{"id":"response-property-list-of-types-widened","text":"response property `subdomain` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4133,"column":32},"fingerprint":"8e558beb8561"},{"id":"response-property-list-of-types-widened","text":"response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4139,"column":38},"fingerprint":"e3f9ecef7c0a"},{"id":"response-property-list-of-types-widened","text":"response property `company_industries/items/addedByUserId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"put-company-industry-codes","path":"/api/v1/company-profile-data/industry-codes","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13797,"column":11},"fingerprint":"ac1f7a5058ac"},{"id":"response-property-list-of-types-widened","text":"response property `company_industries/items/addedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"put-company-industry-codes","path":"/api/v1/company-profile-data/industry-codes","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13802,"column":11},"fingerprint":"600d5ee33550"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":1207},"fingerprint":"a768f4abb439"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/sourceColor` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":995},"fingerprint":"5d9f3dccaa97"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":954},"fingerprint":"1a32c62c8777"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":898},"fingerprint":"15bf1970a4ec"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":848},"fingerprint":"ada27028594f"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":766},"fingerprint":"666d795b684a"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/benchmarks/items/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":807},"fingerprint":"8297cb49aec7"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/employees/items/managerName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":1540},"fingerprint":"d0242f609a3d"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/employees/items/managerTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":1582},"fingerprint":"d0a438cea562"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/internalJobPayBand/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":2266},"fingerprint":"cc67ce251c7e"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/internalJobPayBand/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":2216},"fingerprint":"d111266938aa"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/internalJobPayBand/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":2134},"fingerprint":"6226d152291d"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/internalJobPayBand/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":2175},"fingerprint":"ff42284fde8e"},{"id":"response-property-list-of-types-widened","text":"response property `jobLocationPairs/items/locationDetails/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":331},"fingerprint":"6f03cbb5c6f4"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/department` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7574,"column":2048},"fingerprint":"44a7c4922eba"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/division` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7574,"column":1924},"fingerprint":"b690679045e1"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `jobLocationPairs/items/internalJobPayBand` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7574,"column":2710},"fingerprint":"4f9b26b695e3"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `jobLocationPairs/items/locationDetails` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7574,"column":390},"fingerprint":"1d8d7eec5f7c"},{"id":"response-property-type-changed","text":"the `jobLocationPairs/items/employees/items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":1786},"fingerprint":"22f9723f18c8"},{"id":"response-property-type-changed","text":"the `jobLocationPairs/items/employees/items/division` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":1683},"fingerprint":"acc7fdf0989b"},{"id":"response-property-type-changed","text":"the `jobLocationPairs/items/internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":2343},"fingerprint":"fdc06ae70cd3"},{"id":"response-property-type-changed","text":"the `jobLocationPairs/items/locationDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmarks","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4247,"column":359},"fingerprint":"180211e0de7b"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":378},"fingerprint":"6513f594b325"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":336},"fingerprint":"8d5f792c9511"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":208},"fingerprint":"a2a8924773b0"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":294},"fingerprint":"224a6c49fa2a"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":612},"fingerprint":"c32395e9a6e0"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":250},"fingerprint":"9e08f0ceffd9"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":777},"fingerprint":"7f273fd0ad76"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":660},"fingerprint":"0886f8303c02"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":926},"fingerprint":"31e1e3a4b4a8"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":822},"fingerprint":"315089d8a434"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":972},"fingerprint":"950807aed940"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":565},"fingerprint":"339dd88f6391"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":424},"fingerprint":"1da0e1950b6c"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":513},"fingerprint":"78d079fa4aa4"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":470},"fingerprint":"1f8fd7ffb0e0"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":877},"fingerprint":"0aea35fd0852"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":120},"fingerprint":"4c9bd3fae8fe"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":163},"fingerprint":"b6b71526613a"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":739},"fingerprint":"8ef61636cec3"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4446,"column":699},"fingerprint":"b80cb3d242f4"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":378},"fingerprint":"ad76784bba75"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":336},"fingerprint":"2bd31fccefea"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":208},"fingerprint":"c148ca465ce7"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":294},"fingerprint":"d5c84ebf9549"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":612},"fingerprint":"9c626cb060b1"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":250},"fingerprint":"edc421a10e9b"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":777},"fingerprint":"1973fee29f77"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":660},"fingerprint":"2cc20c9ed52b"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":926},"fingerprint":"d04cd625cd86"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":822},"fingerprint":"e48a6cb2c5cf"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":972},"fingerprint":"0bfb7469bae2"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":565},"fingerprint":"34dbc0d38842"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":424},"fingerprint":"a6bf9a4e3bd1"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":513},"fingerprint":"17d1db10dbba"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":470},"fingerprint":"6328555e75ac"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":877},"fingerprint":"25dfbbf2318a"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":120},"fingerprint":"3989d9261dca"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":163},"fingerprint":"ae246b215ede"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":739},"fingerprint":"6aa76c20aa06"},{"id":"response-property-list-of-types-widened","text":"response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-compensation-benchmark","path":"/api/v1/compensation/benchmarks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4346,"column":699},"fingerprint":"09b302dd5bcd"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":367},"fingerprint":"276b49929383"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":446},"fingerprint":"920dc0cc16eb"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":201},"fingerprint":"d244e92cb257"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/lastEdited` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":241},"fingerprint":"ea4e9e84f787"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/sourceColorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":286},"fingerprint":"42a771b771f8"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":326},"fingerprint":"ade5556ac453"},{"id":"response-property-list-of-types-widened","text":"response property `benchmarkValues/items/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4550,"column":408},"fingerprint":"0d5bd5c1c559"},{"id":"response-property-list-of-types-widened","text":"response property `companyPayRange/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4548,"column":396},"fingerprint":"c8789eb6a4eb"},{"id":"response-property-list-of-types-widened","text":"response property `companyPayRange/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4548,"column":346},"fingerprint":"35222caa6c62"},{"id":"response-property-list-of-types-widened","text":"response property `companyPayRange/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4548,"column":264},"fingerprint":"ca06c32ba524"},{"id":"response-property-list-of-types-widened","text":"response property `companyPayRange/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4548,"column":305},"fingerprint":"5e04409ce075"},{"id":"response-property-list-of-types-widened","text":"response property `employees/items/compaRatio` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":721},"fingerprint":"570f5eb39431"},{"id":"response-property-list-of-types-widened","text":"response property `employees/items/compaRatioStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":767},"fingerprint":"d038e97c5d31"},{"id":"response-property-list-of-types-widened","text":"response property `employees/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":832},"fingerprint":"a8c7a2aa590b"},{"id":"response-property-list-of-types-widened","text":"response property `employees/items/isRemote` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":870},"fingerprint":"e47c68af2759"},{"id":"response-property-list-of-types-widened","text":"response property `employees/items/rangePenetration` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":681},"fingerprint":"ba937a742345"},{"id":"response-property-list-of-types-widened","text":"response property `internalJobPayBand/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":417},"fingerprint":"121c675a7e3f"},{"id":"response-property-list-of-types-widened","text":"response property `internalJobPayBand/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":376},"fingerprint":"f6398b7d25da"},{"id":"response-property-list-of-types-widened","text":"response property `internalJobPayBand/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":326},"fingerprint":"74676156fac1"},{"id":"response-property-list-of-types-widened","text":"response property `internalJobPayBand/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":244},"fingerprint":"bdcf4c9d558d"},{"id":"response-property-list-of-types-widened","text":"response property `internalJobPayBand/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":285},"fingerprint":"461ff729eead"},{"id":"response-property-list-of-types-widened","text":"response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4546,"column":31},"fingerprint":"7f5b7bafa421"},{"id":"response-property-list-of-types-widened","text":"response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4545,"column":33},"fingerprint":"bbeb5af5b2e7"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":455},"fingerprint":"28c4c165f864"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":950},"fingerprint":"e22cb8a6e91e"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":1029},"fingerprint":"c44dbe793d01"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":503},"fingerprint":"b221998638c5"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/formattedJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":384},"fingerprint":"175fee3bc953"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/jobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":331},"fingerprint":"77a34a3e5ec2"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/jobLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":287},"fingerprint":"a1d882e0623c"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/lastReviewed` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":546},"fingerprint":"9cc00386bb1c"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":991},"fingerprint":"d9ba6c99472b"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/values/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":891},"fingerprint":"c1eeabb778a0"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":850},"fingerprint":"edfb43c6f77b"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":800},"fingerprint":"1fab3badb829"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":718},"fingerprint":"b77c6aefb75c"},{"id":"response-property-list-of-types-widened","text":"response property `mercerBenchmarkDetails/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":759},"fingerprint":"b3927f4da1f9"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `companyPayRange` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7875,"column":518},"fingerprint":"34d1711c4fbe"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `employees/items/location` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7878,"column":387},"fingerprint":"45dffe106ec4"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `employees/items/varianceFromPayBand` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7878,"column":631},"fingerprint":"109417ab69d8"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `internalJobPayBand` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7876,"column":560},"fingerprint":"ea595321267c"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `mercerBenchmarkDetails` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":7874,"column":1361},"fingerprint":"c6d8e2845c0f"},{"id":"response-property-type-changed","text":"the `companyPayRange` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4548,"column":424},"fingerprint":"fc7ed7f3adb3"},{"id":"response-property-type-changed","text":"the `employees/items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":377},"fingerprint":"35a586b07764"},{"id":"response-property-type-changed","text":"the `employees/items/varianceFromPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4551,"column":600},"fingerprint":"a80c066f709b"},{"id":"response-property-type-changed","text":"the `internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4549,"column":445},"fingerprint":"756a3668bda1"},{"id":"response-property-type-changed","text":"the `mercerBenchmarkDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-compensation-benchmark-details","path":"/api/v1/compensation/benchmarks/details","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4547,"column":1057},"fingerprint":"29e8e9574699"},{"id":"response-property-list-of-types-widened","text":"response property `columnMap/items/expectedColumnKey` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"import-compensation-benchmarks","path":"/api/v1/compensation/benchmarks/import","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13811,"column":11},"fingerprint":"69f187c46593"},{"id":"response-property-list-of-types-widened","text":"response property `items/colorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-compensation-benchmark-sources","path":"/api/v1/compensation/benchmarks/sources","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4627,"column":364},"fingerprint":"289b27337bbb"},{"id":"response-property-list-of-types-widened","text":"response property `companyValuation` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":31,"column":39},"fingerprint":"629fbed09801"},{"id":"response-property-list-of-types-widened","text":"response property `disclaimers` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":38,"column":34},"fingerprint":"a696434156c3"},{"id":"response-property-list-of-types-widened","text":"response property `outstandingShares` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":32,"column":40},"fingerprint":"f0936fdebe32"},{"id":"response-property-list-of-types-widened","text":"response property `pricePerShare` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":33,"column":36},"fingerprint":"59e795f6abb4"},{"id":"response-property-list-of-types-widened","text":"response property `sliderMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":36,"column":32},"fingerprint":"e1befd773386"},{"id":"response-property-list-of-types-widened","text":"response property `sliderMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":35,"column":32},"fingerprint":"8cd15a5f1e8c"},{"id":"response-property-list-of-types-widened","text":"response property `vestingConditions` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db49fb29f9f04d59afad7c01ce860418","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":37,"column":40},"fingerprint":"8cc06070687e"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-reports","path":"/api/v1/custom-reports","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13088,"column":11},"fingerprint":"16642fd4eb53"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-reports","path":"/api/v1/custom-reports","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13093,"column":11},"fingerprint":"af9f791c63b2"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-report-by-id","path":"/api/v1/custom-reports/{reportId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13088,"column":11},"fingerprint":"942790098bab"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-report-by-id","path":"/api/v1/custom-reports/{reportId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13093,"column":11},"fingerprint":"307628416d96"},{"id":"request-property-became-not-nullable","text":"the request property `aggregations/defaultAggregation` became not nullable","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"ef4e65a79b83"},{"id":"request-property-enum-value-removed","text":"removed the enum value `avg` of the request property `aggregations/defaultAggregation`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12994,"column":19},"fingerprint":"22f64821cf6b"},{"id":"request-property-enum-value-removed","text":"removed the enum value `count` of the request property `aggregations/defaultAggregation`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12992,"column":19},"fingerprint":"2df0e16229c1"},{"id":"request-property-enum-value-removed","text":"removed the enum value `max` of the request property `aggregations/defaultAggregation`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12996,"column":19},"fingerprint":"83227d96feb6"},{"id":"request-property-enum-value-removed","text":"removed the enum value `min` of the request property `aggregations/defaultAggregation`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12995,"column":19},"fingerprint":"d7cc890fcd20"},{"id":"request-property-enum-value-removed","text":"removed the enum value `sum` of the request property `aggregations/defaultAggregation`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12993,"column":19},"fingerprint":"88780272e293"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13088,"column":11},"fingerprint":"4f07963ed97b"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13093,"column":11},"fingerprint":"99d1427841d7"},{"id":"request-property-became-not-nullable","text":"the request property `dependentFields` became not nullable","level":3,"operation":"POST","operationId":"get-field-options-v1","path":"/api/v1/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"d736a934c30a"},{"id":"request-property-became-not-nullable","text":"the request property `filters` became not nullable","level":3,"operation":"POST","operationId":"get-field-options-v1","path":"/api/v1/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"cf163bf3a309"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-fields-from-dataset-v1","path":"/api/v1/datasets/{datasetName}/fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13088,"column":11},"fingerprint":"306bd13973ca"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-fields-from-dataset-v1","path":"/api/v1/datasets/{datasetName}/fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13093,"column":11},"fingerprint":"319e90b0e3aa"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12293,"column":17},"fingerprint":"db0824f194dc"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12298,"column":17},"fingerprint":"f205ea83091e"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12303,"column":17},"fingerprint":"3386ab8be859"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12323,"column":17},"fingerprint":"ea7ade1c4b2c"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12318,"column":17},"fingerprint":"12ce20544e86"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12336,"column":17},"fingerprint":"1468cf01e6e6"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12328,"column":17},"fingerprint":"54ef9f508de5"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12284,"column":17},"fingerprint":"aa8e94f5029b"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12279,"column":17},"fingerprint":"d28758a6c43b"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12265,"column":17},"fingerprint":"9ac3d9a88cf0"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12308,"column":17},"fingerprint":"df36f9cfd6f7"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12313,"column":17},"fingerprint":"88fdead06944"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12293,"column":17},"fingerprint":"681a25c04c23"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12298,"column":17},"fingerprint":"9e412f5789b5"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12303,"column":17},"fingerprint":"db19eb63680a"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12323,"column":17},"fingerprint":"70e14d46368b"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12318,"column":17},"fingerprint":"e6e9bebff0ac"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12336,"column":17},"fingerprint":"df7ba89472bd"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12328,"column":17},"fingerprint":"f6e778dff3ba"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12284,"column":17},"fingerprint":"37b1dd6418f7"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12279,"column":17},"fingerprint":"b571761c02b6"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12265,"column":17},"fingerprint":"88b2e386b36e"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12308,"column":17},"fingerprint":"ea0126a64542"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12313,"column":17},"fingerprint":"3f8f7838a6aa"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12293,"column":17},"fingerprint":"447138eceb3d"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12298,"column":17},"fingerprint":"57ef10ca426c"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12303,"column":17},"fingerprint":"34a58f471568"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12323,"column":17},"fingerprint":"b6e860044b2d"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12318,"column":17},"fingerprint":"5da6d1aecbd5"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12336,"column":17},"fingerprint":"c57f90a97fbd"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12328,"column":17},"fingerprint":"a08be5ba51e1"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12284,"column":17},"fingerprint":"9aa656212f2f"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12279,"column":17},"fingerprint":"5984880e7173"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12265,"column":17},"fingerprint":"ca0433021ae2"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12308,"column":17},"fingerprint":"adb630e04119"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12313,"column":17},"fingerprint":"419b14f2b2da"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12293,"column":17},"fingerprint":"0bf54e2bcc85"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12298,"column":17},"fingerprint":"2f79b1357138"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12303,"column":17},"fingerprint":"0ab1da0487bb"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12323,"column":17},"fingerprint":"877e4102420a"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12318,"column":17},"fingerprint":"b50b6e172b5e"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12336,"column":17},"fingerprint":"07813ceca1c2"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12328,"column":17},"fingerprint":"772ff91964b3"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12284,"column":17},"fingerprint":"c9a4dcb0520b"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12279,"column":17},"fingerprint":"11a44e9df230"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12265,"column":17},"fingerprint":"cf4a6dc3b788"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12308,"column":17},"fingerprint":"43ea970d671d"},{"id":"response-property-list-of-types-widened","text":"response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12313,"column":17},"fingerprint":"d6ab5a526159"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14118,"column":11},"fingerprint":"898c6893b7a8"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14138,"column":11},"fingerprint":"5825a4fe3f9c"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14123,"column":11},"fingerprint":"08b9f7f03b44"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14133,"column":11},"fingerprint":"18bb22bef366"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14128,"column":11},"fingerprint":"c13681de99f3"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/status` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14143,"column":11},"fingerprint":"471c0a1b993e"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14172,"column":15},"fingerprint":"9aba614ff8f9"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14232,"column":15},"fingerprint":"88c9df5dae7e"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14257,"column":15},"fingerprint":"50560897433a"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/departmentName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14252,"column":15},"fingerprint":"ab149901c1f1"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14247,"column":15},"fingerprint":"29d91d5a746a"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/divisionName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14242,"column":15},"fingerprint":"ca4a1c91fb52"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14282,"column":15},"fingerprint":"2aa19a52bcda"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/employmentStatusName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14277,"column":15},"fingerprint":"f3ff4ad901ca"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14212,"column":15},"fingerprint":"44670399a427"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14237,"column":15},"fingerprint":"abe17b4d9483"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14167,"column":15},"fingerprint":"1577279fdc87"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14197,"column":15},"fingerprint":"2dd6a86a4188"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14217,"column":15},"fingerprint":"33e782e516d7"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14272,"column":15},"fingerprint":"644791f05f06"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14207,"column":15},"fingerprint":"e25e05ed3002"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14267,"column":15},"fingerprint":"a1d5ebaf0e96"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/locationName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14262,"column":15},"fingerprint":"b961ca04388d"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14177,"column":15},"fingerprint":"6906de13c7ca"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14192,"column":15},"fingerprint":"4343337f25f7"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14227,"column":15},"fingerprint":"d56ef707b1bb"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14292,"column":15},"fingerprint":"1a8f5433a2cb"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14287,"column":15},"fingerprint":"b6d70307b3fb"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14202,"column":15},"fingerprint":"29850f56222c"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14222,"column":15},"fingerprint":"323ed7b523b0"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14162,"column":15},"fingerprint":"81d65ab53f14"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14182,"column":15},"fingerprint":"c9a94d27fbe8"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/allOf[subschema #2]/workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14187,"column":15},"fingerprint":"33b0b337afdd"},{"id":"response-property-list-of-types-widened","text":"response property `meta/page/limit` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11178,"column":11},"fingerprint":"ca49c0922793"},{"id":"response-property-list-of-types-widened","text":"response property `meta/page/nextCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11183,"column":11},"fingerprint":"9972de104d70"},{"id":"response-property-list-of-types-widened","text":"response property `meta/page/prevCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11188,"column":11},"fingerprint":"fc85046367f3"},{"id":"response-media-type-removed","text":"removed the media type `image/jpeg` for the response with the status `200`","level":3,"operation":"GET","operationId":"get-employee-photo","path":"/api/v1/employees/{employeeId}/photo/{size}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":8501,"column":13},"fingerprint":"7e3940b358e2"},{"id":"request-property-became-not-nullable","text":"the request property `items/accrualStartDate` became not nullable","level":3,"operation":"PUT","operationId":"assign-time-off-policies","path":"/api/v1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"cc4f13de5775"},{"id":"request-parameter-default-value-removed","text":"for the `query` request parameter `fields`, default value `firstName,lastName` was removed","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7795,"column":13},"fingerprint":"e394b18b58a6"},{"id":"response-property-list-of-types-widened","text":"response property `address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13996,"column":11},"fingerprint":"3d2455b66a4b"},{"id":"response-property-list-of-types-widened","text":"response property `address1` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13996,"column":11},"fingerprint":"ed090d4f663e"},{"id":"response-property-list-of-types-widened","text":"response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13921,"column":11},"fingerprint":"d87ca72ccddb"},{"id":"response-property-list-of-types-widened","text":"response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13921,"column":11},"fingerprint":"0d6776c8da27"},{"id":"response-property-list-of-types-widened","text":"response property `birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13976,"column":11},"fingerprint":"0aaaa8e6d21f"},{"id":"response-property-list-of-types-widened","text":"response property `birthDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13976,"column":11},"fingerprint":"6969de2880f8"},{"id":"response-property-list-of-types-widened","text":"response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14046,"column":11},"fingerprint":"e7cd28d152d3"},{"id":"response-property-list-of-types-widened","text":"response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14046,"column":11},"fingerprint":"72b86a5a0eb9"},{"id":"response-property-list-of-types-widened","text":"response property `city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14001,"column":11},"fingerprint":"b15987f771db"},{"id":"response-property-list-of-types-widened","text":"response property `city` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14001,"column":11},"fingerprint":"c7e0e8f963ef"},{"id":"response-property-list-of-types-widened","text":"response property `country` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14011,"column":11},"fingerprint":"c33635915946"},{"id":"response-property-list-of-types-widened","text":"response property `country` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14011,"column":11},"fingerprint":"d7c049c129e8"},{"id":"response-property-list-of-types-widened","text":"response property `department` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14061,"column":11},"fingerprint":"fd69933da3be"},{"id":"response-property-list-of-types-widened","text":"response property `department` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14061,"column":11},"fingerprint":"5167651f9c2a"},{"id":"response-property-list-of-types-widened","text":"response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14066,"column":11},"fingerprint":"afe668f21961"},{"id":"response-property-list-of-types-widened","text":"response property `departmentId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14066,"column":11},"fingerprint":"3622cfcc62a1"},{"id":"response-property-list-of-types-widened","text":"response property `division` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14051,"column":11},"fingerprint":"8494b11384b5"},{"id":"response-property-list-of-types-widened","text":"response property `division` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14051,"column":11},"fingerprint":"01297e59656f"},{"id":"response-property-list-of-types-widened","text":"response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14056,"column":11},"fingerprint":"cec9b949713f"},{"id":"response-property-list-of-types-widened","text":"response property `divisionId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14056,"column":11},"fingerprint":"4801e86c9086"},{"id":"response-property-list-of-types-widened","text":"response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14081,"column":11},"fingerprint":"fa040b99aeb5"},{"id":"response-property-list-of-types-widened","text":"response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14081,"column":11},"fingerprint":"0f07f2df662f"},{"id":"response-property-list-of-types-widened","text":"response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14086,"column":11},"fingerprint":"2b4c18d266af"},{"id":"response-property-list-of-types-widened","text":"response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14086,"column":11},"fingerprint":"147d25cab8a3"},{"id":"response-property-list-of-types-widened","text":"response property `exempt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14041,"column":11},"fingerprint":"1a7ab8150b69"},{"id":"response-property-list-of-types-widened","text":"response property `exempt` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14041,"column":11},"fingerprint":"5582ebddb3d4"},{"id":"response-property-list-of-types-widened","text":"response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13956,"column":11},"fingerprint":"7da157b3a9a8"},{"id":"response-property-list-of-types-widened","text":"response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13956,"column":11},"fingerprint":"0202671e7cb7"},{"id":"response-property-list-of-types-widened","text":"response property `firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13868,"column":11},"fingerprint":"bafd862aebc3"},{"id":"response-property-list-of-types-widened","text":"response property `firstName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13868,"column":11},"fingerprint":"4c8d101e2237"},{"id":"response-property-list-of-types-widened","text":"response property `gender` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14016,"column":11},"fingerprint":"4d1047dbfa8b"},{"id":"response-property-list-of-types-widened","text":"response property `gender` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14016,"column":11},"fingerprint":"54372adf7fce"},{"id":"response-property-list-of-types-widened","text":"response property `hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13981,"column":11},"fingerprint":"ffd6ead5b0c9"},{"id":"response-property-list-of-types-widened","text":"response property `hireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13981,"column":11},"fingerprint":"8cc2ef818822"},{"id":"response-property-list-of-types-widened","text":"response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13916,"column":11},"fingerprint":"a76ed06fed08"},{"id":"response-property-list-of-types-widened","text":"response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13916,"column":11},"fingerprint":"561b6b3376e7"},{"id":"response-property-list-of-types-widened","text":"response property `homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13941,"column":11},"fingerprint":"56f45400a187"},{"id":"response-property-list-of-types-widened","text":"response property `homePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13941,"column":11},"fingerprint":"3baff966c51c"},{"id":"response-property-list-of-types-widened","text":"response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13961,"column":11},"fingerprint":"12cce2866355"},{"id":"response-property-list-of-types-widened","text":"response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13961,"column":11},"fingerprint":"ce8a3143ff49"},{"id":"response-property-list-of-types-widened","text":"response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13898,"column":11},"fingerprint":"5da2df29db0b"},{"id":"response-property-list-of-types-widened","text":"response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13898,"column":11},"fingerprint":"b87908cb042b"},{"id":"response-property-list-of-types-widened","text":"response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13893,"column":11},"fingerprint":"07b51e351b68"},{"id":"response-property-list-of-types-widened","text":"response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13893,"column":11},"fingerprint":"689cfca942f1"},{"id":"response-property-list-of-types-widened","text":"response property `lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13873,"column":11},"fingerprint":"390a413dc60e"},{"id":"response-property-list-of-types-widened","text":"response property `lastName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13873,"column":11},"fingerprint":"77c96ea0dff9"},{"id":"response-property-list-of-types-widened","text":"response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13951,"column":11},"fingerprint":"763b80d81447"},{"id":"response-property-list-of-types-widened","text":"response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13951,"column":11},"fingerprint":"de0086f1f61d"},{"id":"response-property-list-of-types-widened","text":"response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14071,"column":11},"fingerprint":"f703cb8ec5f7"},{"id":"response-property-list-of-types-widened","text":"response property `location` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14071,"column":11},"fingerprint":"ec6b793688c9"},{"id":"response-property-list-of-types-widened","text":"response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14076,"column":11},"fingerprint":"3bff78746682"},{"id":"response-property-list-of-types-widened","text":"response property `locationId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14076,"column":11},"fingerprint":"a56093c7e90c"},{"id":"response-property-list-of-types-widened","text":"response property `marital` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14021,"column":11},"fingerprint":"ee37303eca68"},{"id":"response-property-list-of-types-widened","text":"response property `marital` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14021,"column":11},"fingerprint":"472bb2f98c63"},{"id":"response-property-list-of-types-widened","text":"response property `middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13883,"column":11},"fingerprint":"9726bd128842"},{"id":"response-property-list-of-types-widened","text":"response property `middleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13883,"column":11},"fingerprint":"f008759ea2f5"},{"id":"response-property-list-of-types-widened","text":"response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13936,"column":11},"fingerprint":"6792cbdfd97a"},{"id":"response-property-list-of-types-widened","text":"response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13936,"column":11},"fingerprint":"74df5f0caf71"},{"id":"response-property-list-of-types-widened","text":"response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13986,"column":11},"fingerprint":"33f5716da1c4"},{"id":"response-property-list-of-types-widened","text":"response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13986,"column":11},"fingerprint":"c264dd1fac1a"},{"id":"response-property-list-of-types-widened","text":"response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14036,"column":11},"fingerprint":"d83220acf5bb"},{"id":"response-property-list-of-types-widened","text":"response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14036,"column":11},"fingerprint":"1b387831645b"},{"id":"response-property-list-of-types-widened","text":"response property `payRate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14026,"column":11},"fingerprint":"82d617dae088"},{"id":"response-property-list-of-types-widened","text":"response property `payRate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14026,"column":11},"fingerprint":"02fa9f0e8399"},{"id":"response-property-list-of-types-widened","text":"response property `payType` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14031,"column":11},"fingerprint":"c9ac45c1a277"},{"id":"response-property-list-of-types-widened","text":"response property `payType` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14031,"column":11},"fingerprint":"00bf69ce7ea5"},{"id":"response-property-list-of-types-widened","text":"response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13888,"column":11},"fingerprint":"7a45e695e81f"},{"id":"response-property-list-of-types-widened","text":"response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13888,"column":11},"fingerprint":"6e528f4e129f"},{"id":"response-property-list-of-types-widened","text":"response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13971,"column":11},"fingerprint":"e81c4b38d5f2"},{"id":"response-property-list-of-types-widened","text":"response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13971,"column":11},"fingerprint":"43629a3a3aff"},{"id":"response-property-list-of-types-widened","text":"response property `preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13878,"column":11},"fingerprint":"74cabf48b8c7"},{"id":"response-property-list-of-types-widened","text":"response property `preferredName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13878,"column":11},"fingerprint":"6e5fe33ca9aa"},{"id":"response-property-list-of-types-widened","text":"response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14096,"column":11},"fingerprint":"f2a6726eab31"},{"id":"response-property-list-of-types-widened","text":"response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14096,"column":11},"fingerprint":"2b258cce655f"},{"id":"response-property-list-of-types-widened","text":"response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14091,"column":11},"fingerprint":"d98fe0bb5c3b"},{"id":"response-property-list-of-types-widened","text":"response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14091,"column":11},"fingerprint":"6550e1ffb389"},{"id":"response-property-list-of-types-widened","text":"response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13946,"column":11},"fingerprint":"0ccea2320292"},{"id":"response-property-list-of-types-widened","text":"response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13946,"column":11},"fingerprint":"849b4c736f32"},{"id":"response-property-list-of-types-widened","text":"response property `state` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14006,"column":11},"fingerprint":"032258a81fb8"},{"id":"response-property-list-of-types-widened","text":"response property `state` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14006,"column":11},"fingerprint":"4134faa224fe"},{"id":"response-property-list-of-types-widened","text":"response property `status` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13903,"column":11},"fingerprint":"b2d5450dadc9"},{"id":"response-property-list-of-types-widened","text":"response property `status` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13903,"column":11},"fingerprint":"bf96616fabc1"},{"id":"response-property-list-of-types-widened","text":"response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13991,"column":11},"fingerprint":"8cdcc3086994"},{"id":"response-property-list-of-types-widened","text":"response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13991,"column":11},"fingerprint":"1d71c72e2284"},{"id":"response-property-list-of-types-widened","text":"response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13966,"column":11},"fingerprint":"edff17f2aceb"},{"id":"response-property-list-of-types-widened","text":"response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13966,"column":11},"fingerprint":"2392f71456d4"},{"id":"response-property-list-of-types-widened","text":"response property `workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13911,"column":11},"fingerprint":"ae73be56ab01"},{"id":"response-property-list-of-types-widened","text":"response property `workEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13911,"column":11},"fingerprint":"152b794ad893"},{"id":"response-property-list-of-types-widened","text":"response property `workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13926,"column":11},"fingerprint":"9c7efc949a06"},{"id":"response-property-list-of-types-widened","text":"response property `workPhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13926,"column":11},"fingerprint":"567a26fe30ba"},{"id":"response-property-list-of-types-widened","text":"response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13931,"column":11},"fingerprint":"ae38b0fe4d43"},{"id":"response-property-list-of-types-widened","text":"response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/xml` of response `200`","level":3,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13931,"column":11},"fingerprint":"4511e5e3b363"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15801,"column":11},"fingerprint":"de5690248fc7"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14653,"column":15},"fingerprint":"77ab5bdaed2f"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14658,"column":15},"fingerprint":"9a36d5fba703"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14663,"column":15},"fingerprint":"f6b8a64e808b"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14691,"column":15},"fingerprint":"9161d379419a"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14668,"column":15},"fingerprint":"ad860b164ad4"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14709,"column":15},"fingerprint":"004be7bd0cd2"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14686,"column":15},"fingerprint":"41f406012792"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14724,"column":11},"fingerprint":"0877ec9b86b3"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-locations","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14718,"column":11},"fingerprint":"35da6030118d"},{"id":"request-property-became-not-nullable","text":"the request property `address/address1` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"1dd1638e1ca9"},{"id":"request-property-became-not-nullable","text":"the request property `address/address2` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"8e1999cdef64"},{"id":"request-property-became-not-nullable","text":"the request property `address/city` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"5205f8e15511"},{"id":"request-property-became-not-nullable","text":"the request property `address/countryId` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"97312f5b24dd"},{"id":"request-property-became-not-nullable","text":"the request property `address/stateId` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"059861ae6c20"},{"id":"request-property-became-not-nullable","text":"the request property `address/timezone` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"e7a572834c8d"},{"id":"request-property-became-not-nullable","text":"the request property `address/zipcode` became not nullable","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"a2c586867f2b"},{"id":"response-property-list-of-types-widened","text":"response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14653,"column":15},"fingerprint":"7065e97a516e"},{"id":"response-property-list-of-types-widened","text":"response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14658,"column":15},"fingerprint":"32f8062c91ec"},{"id":"response-property-list-of-types-widened","text":"response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14663,"column":15},"fingerprint":"2efe97dfb2fe"},{"id":"response-property-list-of-types-widened","text":"response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14691,"column":15},"fingerprint":"3ef03b4292d4"},{"id":"response-property-list-of-types-widened","text":"response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14668,"column":15},"fingerprint":"32d81dd30f76"},{"id":"response-property-list-of-types-widened","text":"response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14709,"column":15},"fingerprint":"7001a04cc949"},{"id":"response-property-list-of-types-widened","text":"response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14686,"column":15},"fingerprint":"e69cd6f4d416"},{"id":"response-property-list-of-types-widened","text":"response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14724,"column":11},"fingerprint":"9e36367d942f"},{"id":"response-property-list-of-types-widened","text":"response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14718,"column":11},"fingerprint":"32e064657bd0"},{"id":"response-property-list-of-types-widened","text":"response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14653,"column":15},"fingerprint":"77b854d285d2"},{"id":"response-property-list-of-types-widened","text":"response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14658,"column":15},"fingerprint":"3f86ca333882"},{"id":"response-property-list-of-types-widened","text":"response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14663,"column":15},"fingerprint":"160462bb8444"},{"id":"response-property-list-of-types-widened","text":"response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14691,"column":15},"fingerprint":"769eea754ffc"},{"id":"response-property-list-of-types-widened","text":"response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14668,"column":15},"fingerprint":"13a0057814e8"},{"id":"response-property-list-of-types-widened","text":"response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14709,"column":15},"fingerprint":"41986a23f404"},{"id":"response-property-list-of-types-widened","text":"response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14686,"column":15},"fingerprint":"2a7dd89c65d6"},{"id":"response-property-list-of-types-widened","text":"response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14724,"column":11},"fingerprint":"e0adc2266ea1"},{"id":"response-property-list-of-types-widened","text":"response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14718,"column":11},"fingerprint":"04f81c0370ea"},{"id":"request-property-became-not-nullable","text":"the request property `address/address1` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"61d22edb5c58"},{"id":"request-property-became-not-nullable","text":"the request property `address/address2` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"1d4362fa5050"},{"id":"request-property-became-not-nullable","text":"the request property `address/city` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"78b3c76f0fcd"},{"id":"request-property-became-not-nullable","text":"the request property `address/countryId` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"7aeeecd77496"},{"id":"request-property-became-not-nullable","text":"the request property `address/stateId` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"f57ba194d6c6"},{"id":"request-property-became-not-nullable","text":"the request property `address/timezone` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"75dda4228981"},{"id":"request-property-became-not-nullable","text":"the request property `address/zipcode` became not nullable","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"35d61726c3c5"},{"id":"response-property-list-of-types-widened","text":"response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14653,"column":15},"fingerprint":"67dc67a6e6d5"},{"id":"response-property-list-of-types-widened","text":"response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14658,"column":15},"fingerprint":"fcc8b2cf9332"},{"id":"response-property-list-of-types-widened","text":"response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14663,"column":15},"fingerprint":"9922aed10908"},{"id":"response-property-list-of-types-widened","text":"response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14691,"column":15},"fingerprint":"06a365160095"},{"id":"response-property-list-of-types-widened","text":"response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14668,"column":15},"fingerprint":"bd75dcbfe95c"},{"id":"response-property-list-of-types-widened","text":"response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14709,"column":15},"fingerprint":"b33dcc212453"},{"id":"response-property-list-of-types-widened","text":"response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14686,"column":15},"fingerprint":"6d6b4a883780"},{"id":"response-property-list-of-types-widened","text":"response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14724,"column":11},"fingerprint":"a59cd9a111cb"},{"id":"response-property-list-of-types-widened","text":"response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14718,"column":11},"fingerprint":"0a0d7ba44152"},{"id":"response-property-list-of-types-widened","text":"response property `employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"login","path":"/api/v1/login","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9598,"column":132},"fingerprint":"deff739be90d"},{"id":"response-body-one-of-added","text":"added `#/components/schemas/CountriesResponseSchema, #/components/schemas/CountrySchema` to the response body `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-countries-options","path":"/api/v1/meta/countries/options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11463,"column":23},"fingerprint":"fe74764b7dc0"},{"id":"response-body-type-changed","text":"the response's body type/format changed from `array`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-countries-options","path":"/api/v1/meta/countries/options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13733,"column":7},"fingerprint":"ac1bab653d9e"},{"id":"response-property-list-of-types-widened","text":"response property `items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15760,"column":11},"fingerprint":"d1057c52b0e4"},{"id":"response-property-list-of-types-widened","text":"response property `items/options/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15745,"column":11},"fingerprint":"ef1fcbcd49cf"},{"id":"response-property-list-of-types-widened","text":"response property `items/options/items/createdDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15740,"column":11},"fingerprint":"cddceebcf72c"},{"id":"response-property-type-changed","text":"the `items/fieldId` response's property type/format changed from `string`/`` to `integer`/`` for status `200` (media type: application/json)","level":3,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15754,"column":11},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24077,"column":11},"fingerprint":"dda9fdf44c5a"},{"id":"request-body-type-changed","text":"the request's body type/format changed from `string`/`` to `object`/`` (media type: text/xml)","level":3,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":9718,"column":15},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":17152,"column":7},"fingerprint":"475d5d710ef2"},{"id":"response-property-list-of-types-widened","text":"response property `alias` list-of-types was widened by adding types `null` to media type `text/xml` of response `200`","level":3,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15760,"column":11},"fingerprint":"97b66a4428a6"},{"id":"response-property-list-of-types-widened","text":"response property `options/items/archivedDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200`","level":3,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15745,"column":11},"fingerprint":"f2968888cd16"},{"id":"response-property-list-of-types-widened","text":"response property `options/items/createdDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200`","level":3,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15740,"column":11},"fingerprint":"d79029ed2e10"},{"id":"response-property-list-of-types-widened","text":"response property `items/effectiveDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-time-off-policies","path":"/api/v1/meta/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":10044,"column":304},"fingerprint":"fcffe4059248"},{"id":"response-property-list-of-types-widened","text":"response property `timeOffTypes/items/color` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-time-off-types","path":"/api/v1/meta/time_off/types","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":10283,"column":414},"fingerprint":"5eaa36c4d660"},{"id":"response-property-list-of-types-widened","text":"response property `timeOffTypes/items/icon` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-time-off-types","path":"/api/v1/meta/time_off/types","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":10283,"column":519},"fingerprint":"8c2447146c6e"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"5c5fb0f1211ae1c9451753f92f1053b6","path":"/api/v1/meta/timezones","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15801,"column":11},"fingerprint":"16f8021168cf"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14466,"column":11},"fingerprint":"9c5cbfd26166"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14461,"column":11},"fingerprint":"00ba6a29fee5"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14481,"column":11},"fingerprint":"58f2b2de474f"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14486,"column":11},"fingerprint":"c60175d4415e"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14622,"column":11},"fingerprint":"a979025f13e2"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"cfacff2b34cf1e65ccd1ab188c5e1d12","path":"/api/v1/pay-grades-and-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14605,"column":11},"fingerprint":"94b3e63112e9"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14466,"column":11},"fingerprint":"da244c75da4b"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14461,"column":11},"fingerprint":"e02de6d55a90"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14481,"column":11},"fingerprint":"6ca655d653ac"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14486,"column":11},"fingerprint":"7435fd66ec7e"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14622,"column":11},"fingerprint":"4e215003e2a4"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"4acdbb25aa278f9f94b44b42ef9f1b27","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14605,"column":11},"fingerprint":"f9144a893d4e"},{"id":"response-property-list-of-types-widened","text":"response property `items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"3af7d1ac36c35008b8ebb93fecbdb35b","path":"/api/v1/pay-grades-and-bands/job-titles-with-employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14448,"column":11},"fingerprint":"5c91fc322167"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14466,"column":11},"fingerprint":"f549c14e081b"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14461,"column":11},"fingerprint":"86be585d5a34"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14481,"column":11},"fingerprint":"9cefd31f0069"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14486,"column":11},"fingerprint":"c386da00d04b"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14622,"column":11},"fingerprint":"531b296b4aa6"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"db8c61787c931b69afbf9e501be85256","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14605,"column":11},"fingerprint":"45571644603e"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14466,"column":11},"fingerprint":"eeb84bc7535d"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14461,"column":11},"fingerprint":"315a9c86f866"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14481,"column":11},"fingerprint":"2710d489d5e9"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14486,"column":11},"fingerprint":"a5c00ea22b97"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14622,"column":11},"fingerprint":"a7ff9489ae28"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"fb29d4d4790104b6892a4b6d6db67e19","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14605,"column":11},"fingerprint":"82129d7452fa"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14466,"column":11},"fingerprint":"f4cbda1fab2d"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14461,"column":11},"fingerprint":"f92822e150f1"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14481,"column":11},"fingerprint":"4e237270a9ab"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14486,"column":11},"fingerprint":"11f9a9e9266d"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14622,"column":11},"fingerprint":"4f71eaeb428e"},{"id":"response-property-list-of-types-widened","text":"response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"12c40475623893cf0434b3ae69e36975","path":"/api/v1/pay-grades-and-bands/review","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14605,"column":11},"fingerprint":"d8b4d68b1a82"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"9c53cdcc0e00"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"493693397847"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"8eb924b7f2e8"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"d1426692f594"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"a072139bfe63"},{"id":"response-property-type-changed","text":"the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-goals","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"c55c9df130f2"},{"id":"request-property-became-not-nullable","text":"the request property `alignsWithOptionId` became not nullable","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"139211fecdae"},{"id":"request-property-became-not-nullable","text":"the request property `completionDate` became not nullable","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"47adab989ddf"},{"id":"request-property-became-not-nullable","text":"the request property `milestones` became not nullable","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"7236c6862216"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13455,"column":15},"fingerprint":"f32c9352254f"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13469,"column":15},"fingerprint":"4c69ee3d7f2b"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13475,"column":15},"fingerprint":"5b914a87ccbc"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13489,"column":15},"fingerprint":"398349d5d9e5"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18815,"column":19},"fingerprint":"ebe5bb2e4cd9"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13515,"column":15},"fingerprint":"16ecad10b6b4"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"a6e66c56684e"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"c80a658cba42"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"1a55750cb421"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"5aca66b3b1b4"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"34eba96d3568"},{"id":"response-property-type-changed","text":"the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1","path":"/api/v1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"4edee0477496"},{"id":"response-property-list-of-types-widened","text":"response property `persons/items/employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goal-share-options","path":"/api/v1/performance/employees/{employeeId}/goals/shareOptions","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11253,"column":11},"fingerprint":"5d51529a8d9f"},{"id":"response-property-list-of-types-widened","text":"response property `persons/items/userId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-goal-share-options","path":"/api/v1/performance/employees/{employeeId}/goals/shareOptions","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11258,"column":11},"fingerprint":"4e1e429b2d96"},{"id":"request-property-became-not-nullable","text":"the request property `alignsWithOptionId` became not nullable","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"cd63e2203299"},{"id":"request-property-became-not-nullable","text":"the request property `completionDate` became not nullable","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"ba3944a654de"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13455,"column":15},"fingerprint":"9898d0769f3a"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13469,"column":15},"fingerprint":"18c1eb2af639"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13475,"column":15},"fingerprint":"71d4c29128f9"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13489,"column":15},"fingerprint":"183958ba722f"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18815,"column":19},"fingerprint":"c085c9b918aa"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13515,"column":15},"fingerprint":"c7440397c0f0"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"3a3bce982a0d"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"eee2cf572eb1"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"e61d6613b9e8"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"5520872d904c"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"3b32071d2cd9"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-goal-aggregate","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"37916c5ff8d5"},{"id":"request-property-became-not-nullable","text":"the request property `comment` became not nullable","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"1b1864b68153"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"a483bd29a799"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"5e75db86346a"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"5604913090aa"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"eed6315bbb25"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"3151e9aa104e"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"e9426006138e"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13455,"column":15},"fingerprint":"5ff3e2508ea0"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13469,"column":15},"fingerprint":"ce1c3cbc2fca"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13475,"column":15},"fingerprint":"cb29085afe06"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13489,"column":15},"fingerprint":"d18aa8fc4db6"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18815,"column":19},"fingerprint":"9a5b091d88dd"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"PUT","operationId":"update-goal-milestone-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13515,"column":15},"fingerprint":"1418989aa4fd"},{"id":"request-property-became-not-nullable","text":"the request property `completionDate` became not nullable","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"12497402fc7a"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13455,"column":15},"fingerprint":"ce83c0876b91"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13469,"column":15},"fingerprint":"fb502045b1f3"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13475,"column":15},"fingerprint":"3afffd4202e8"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13489,"column":15},"fingerprint":"ea5c2ba3c49c"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18815,"column":19},"fingerprint":"4e4fbd8eaf5f"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13515,"column":15},"fingerprint":"740c2a0f2f2a"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"d045e2682479"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"a933ff5a119c"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"42000f1f03d4"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"b3448b46ca31"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"d410fab93dc5"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"reopen-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"17a744623664"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"6a9d0cad244c"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"c197bc673c5b"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"fd48f401a1a0"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"a15442136c57"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"f41177b74b82"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"PUT","operationId":"update-goal-sharing","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"3f6331ac39d8"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/availableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15166,"column":11},"fingerprint":"916bac706680"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/durationDifference` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15218,"column":11},"fingerprint":"d31ba6559f5c"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/expectedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15206,"column":11},"fingerprint":"2039bd33dc29"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/recordedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15212,"column":11},"fingerprint":"f2de4433ebcc"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/unavailableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15174,"column":11},"fingerprint":"29ee9da046ac"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15188,"column":11},"fingerprint":"f1ad13f5ca84"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/violations/items/amount` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15251,"column":11},"fingerprint":"89a653bf9900"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/violations/items/employeeTimesheetClockEntryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15243,"column":11},"fingerprint":"e377dce2dccb"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16404,"column":19},"fingerprint":"76ca4ddad54b"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16393,"column":19},"fingerprint":"92445faec5b3"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11312,"column":15},"fingerprint":"8e85eda959c1"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-assessments","path":"/api/v1/time-tracking/break-assessments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11303,"column":15},"fingerprint":"8fdf449dd97c"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15387,"column":11},"fingerprint":"9b50981f1bc5"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15363,"column":11},"fingerprint":"9c04eb9f0fc2"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15379,"column":11},"fingerprint":"0ae2a19adba6"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16404,"column":19},"fingerprint":"a6bc1ed29188"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16393,"column":19},"fingerprint":"18dfb9e38d57"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11312,"column":15},"fingerprint":"97452135587b"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policies","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11303,"column":15},"fingerprint":"6f5a97b4007f"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityEndTime` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"913fa9874397"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityMaxHoursWorked` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"87aef5b5a976"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityMinHoursWorked` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"acc1d8b4bc20"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityStartTime` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"23f58c93ed61"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/id` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"8ec765d72d35"},{"id":"request-property-became-not-nullable","text":"the request property `description` became not nullable","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"4c762bea95b6"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"24351707e9cf"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"da6f549a3664"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"b3cbc98ad1b8"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"b46d7e692206"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"68c4dc89abaf"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"3f8603c53962"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15433,"column":11},"fingerprint":"ad8cc01712af"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15409,"column":11},"fingerprint":"f657f8584d5c"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15425,"column":11},"fingerprint":"5f8b55b99fc6"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15387,"column":11},"fingerprint":"32c12084d826"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15363,"column":11},"fingerprint":"b1cb8b3426a4"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15379,"column":11},"fingerprint":"0594745e9c0e"},{"id":"request-property-became-not-nullable","text":"the request property `description` became not nullable","level":3,"operation":"PATCH","operationId":"update-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"dc2fb1146057"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15387,"column":11},"fingerprint":"d12bcc7b402e"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15363,"column":11},"fingerprint":"fcf7e1b403ad"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15379,"column":11},"fingerprint":"6a7e93d0aee0"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"8ab8b7d5ba84"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"e0392050d110"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"48d565ddbd52"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"e471c29c4e63"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"9a1e39f2cd98"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"e41680ee2ff4"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16404,"column":19},"fingerprint":"3499811e9d2c"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16393,"column":19},"fingerprint":"643ee244c18e"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11312,"column":15},"fingerprint":"a26c438b2888"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policy-breaks","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11303,"column":15},"fingerprint":"66d2398512ce"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityEndTime` became not nullable","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"84c8ac1f53ca"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityMaxHoursWorked` became not nullable","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"425d299e0b5a"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityMinHoursWorked` became not nullable","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"c771f21af4f9"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityStartTime` became not nullable","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"de4e987a726a"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"c94e5ec61ca9"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"68a22899d6c2"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"71890b5a8c03"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"0bb603f56873"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"1a87340d4ae2"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"2c19d2b8f106"},{"id":"request-property-became-not-nullable","text":"the request property `items/availabilityEndTime` became not nullable","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"7ca84c73e7d8"},{"id":"request-property-became-not-nullable","text":"the request property `items/availabilityMaxHoursWorked` became not nullable","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"d3092be52ea0"},{"id":"request-property-became-not-nullable","text":"the request property `items/availabilityMinHoursWorked` became not nullable","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"8cc7c5e0aee1"},{"id":"request-property-became-not-nullable","text":"the request property `items/availabilityStartTime` became not nullable","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"d0fa77dafc4d"},{"id":"request-property-became-not-nullable","text":"the request property `items/id` became not nullable","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"353f690c4cba"},{"id":"response-property-list-of-types-widened","text":"response property `items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"27528cdcc955"},{"id":"response-property-list-of-types-widened","text":"response property `items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"79cefc2ace1e"},{"id":"response-property-list-of-types-widened","text":"response property `items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"fc135e00ad68"},{"id":"response-property-list-of-types-widened","text":"response property `items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"c68f8bea5c90"},{"id":"response-property-list-of-types-widened","text":"response property `items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"e73d3037dd8f"},{"id":"response-property-list-of-types-widened","text":"response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"e96b6fe3854f"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/name` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11331,"column":13},"fingerprint":"517e7c55c8f5"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11336,"column":13},"fingerprint":"a207b1c635ab"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16404,"column":19},"fingerprint":"43882786bd23"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16393,"column":19},"fingerprint":"654239cbf5a4"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11312,"column":15},"fingerprint":"a6ed6f28666d"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-break-policy-employees","path":"/api/v1/time-tracking/break-policies/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11303,"column":15},"fingerprint":"f7bd25dbd595"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityEndTime` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"d665bac5ab20"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityMaxHoursWorked` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"98a5e48e0b69"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityMinHoursWorked` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"2b74bbab7a2d"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/availabilityStartTime` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"bb2421934d44"},{"id":"request-property-became-not-nullable","text":"the request property `breaks/items/id` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"5b49dbdb1713"},{"id":"request-property-became-not-nullable","text":"the request property `description` became not nullable","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"9ab77b43c0de"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"3b66beeb0bca"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"9fb5815ef843"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"264fc02b9d5e"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"349859cfa252"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"352366672c15"},{"id":"response-property-list-of-types-widened","text":"response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"67175f446d14"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15433,"column":11},"fingerprint":"c3db9ada5826"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15409,"column":11},"fingerprint":"095fa0c6a2e0"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15425,"column":11},"fingerprint":"eb161ae17417"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"624a6e8ed1d0"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"10be527541a9"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"9e83d9655762"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"8c8c0d142149"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"9532d1c8f376"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"e83fc381d6aa"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityEndTime` became not nullable","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"9689670b1399"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityMaxHoursWorked` became not nullable","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"2cad0796bb53"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityMinHoursWorked` became not nullable","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"5bad266bb11e"},{"id":"request-property-became-not-nullable","text":"the request property `availabilityStartTime` became not nullable","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"0d32e077a41f"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15098,"column":11},"fingerprint":"50b9978589b2"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15085,"column":11},"fingerprint":"8deda6e437d9"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15079,"column":11},"fingerprint":"253c9c9679d7"},{"id":"response-property-list-of-types-widened","text":"response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15091,"column":11},"fingerprint":"f22654d693e3"},{"id":"response-property-list-of-types-widened","text":"response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15119,"column":11},"fingerprint":"d15157133ee6"},{"id":"response-property-list-of-types-widened","text":"response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15111,"column":11},"fingerprint":"e00f1804a5aa"},{"id":"response-property-list-of-types-widened","text":"response property `items/availableAfterMinutesWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-availabilities","path":"/api/v1/time-tracking/employees/{id}/break-availabilities","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15317,"column":11},"fingerprint":"3587ae5fbe42"},{"id":"response-property-list-of-types-widened","text":"response property `items/availableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-availabilities","path":"/api/v1/time-tracking/employees/{id}/break-availabilities","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15335,"column":11},"fingerprint":"97bc31b613ed"},{"id":"response-property-list-of-types-widened","text":"response property `items/availableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-availabilities","path":"/api/v1/time-tracking/employees/{id}/break-availabilities","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15323,"column":11},"fingerprint":"50cd7005d805"},{"id":"response-property-list-of-types-widened","text":"response property `items/unavailableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-availabilities","path":"/api/v1/time-tracking/employees/{id}/break-availabilities","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15342,"column":11},"fingerprint":"6b8fe4828e2b"},{"id":"response-property-list-of-types-widened","text":"response property `items/unavailableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-availabilities","path":"/api/v1/time-tracking/employees/{id}/break-availabilities","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15329,"column":11},"fingerprint":"73944a54139c"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15387,"column":11},"fingerprint":"781a8a8e3697"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15363,"column":11},"fingerprint":"063dfa733883"},{"id":"response-property-list-of-types-widened","text":"response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15379,"column":11},"fingerprint":"ee007d96b4d1"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16404,"column":19},"fingerprint":"eb9b4c0309c6"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16393,"column":19},"fingerprint":"00b2267ec38a"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11312,"column":15},"fingerprint":"c6f2348420cf"},{"id":"response-property-type-changed","text":"the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-employee-break-policies","path":"/api/v1/time-tracking/employees/{id}/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11303,"column":15},"fingerprint":"0d6796be27b1"},{"id":"request-body-added-required","text":"added required request body","level":3,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4548,"column":7},"fingerprint":"2726b7766fff"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1620,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4665,"column":13},"fingerprint":"8d846de2d198"},{"id":"api-removed-without-deprecation","text":"api removed without deprecation","level":3,"operation":"GET","operationId":"get-project","path":"/api/v1/time-tracking/projects/{id}","source":"specs/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1582,"column":5},"fingerprint":"bc8e6d4a78e2"},{"id":"request-body-added-required","text":"added required request body","level":3,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4714,"column":7},"fingerprint":"2873bd6551d9"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1644,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4713,"column":13},"fingerprint":"60d6035540df"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `projectId`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1669,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4784,"column":13},"fingerprint":"859746c1541b"},{"id":"request-body-added-required","text":"added required request body","level":3,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4880,"column":7},"fingerprint":"d8639ac46aad"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1742,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4990,"column":13},"fingerprint":"0daf924586ce"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1718,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4938,"column":13},"fingerprint":"a435219a85bb"},{"id":"request-body-added-required","text":"added required request body","level":3,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5039,"column":7},"fingerprint":"7e24589a958a"},{"id":"request-parameter-type-changed","text":"for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/``","level":3,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1766,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5038,"column":13},"fingerprint":"4035ef1abfaa"},{"id":"response-media-type-removed","text":"removed the media type `application/json` for the response with the status `200`","level":3,"operation":"PUT","operationId":"update-time-off-request-status","path":"/api/v1/time_off/requests/{requestId}/status","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":10139,"column":13},"fingerprint":"dd8e90186345"},{"id":"request-property-became-not-nullable","text":"the request property `entries/items/breakId` became not nullable","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"72d06b16e4a9"},{"id":"response-property-list-of-types-widened","text":"response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14826,"column":11},"fingerprint":"ffe1b29cbed0"},{"id":"response-property-list-of-types-widened","text":"response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14837,"column":11},"fingerprint":"dd354d851348"},{"id":"response-property-list-of-types-widened","text":"response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14843,"column":11},"fingerprint":"0dd31240cb39"},{"id":"response-property-list-of-types-widened","text":"response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14820,"column":11},"fingerprint":"6aef72af16a5"},{"id":"response-property-list-of-types-widened","text":"response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14832,"column":11},"fingerprint":"3edceae6f07e"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":22444,"column":15},"fingerprint":"6284cb6e0934"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18844,"column":15},"fingerprint":"cbee93919567"},{"id":"response-property-type-changed","text":"the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14861,"column":11},"fingerprint":"3a935d5ecbf7"},{"id":"response-property-type-changed","text":"the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13542,"column":11},"fingerprint":"6cc7e2f6a6fd"},{"id":"request-property-became-not-nullable","text":"the request property `breakId` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"36f2536e381e"},{"id":"request-property-became-not-nullable","text":"the request property `date` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"7df1c65faa7b"},{"id":"request-property-became-not-nullable","text":"the request property `note` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"e0c4e0369c14"},{"id":"request-property-became-not-nullable","text":"the request property `projectId` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"0f3cf0420d99"},{"id":"request-property-became-not-nullable","text":"the request property `start` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"e9d18d63219e"},{"id":"request-property-became-not-nullable","text":"the request property `taskId` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"c1741a2581e7"},{"id":"request-property-became-not-nullable","text":"the request property `timezone` became not nullable","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"8829be82b9a6"},{"id":"response-property-list-of-types-widened","text":"response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14826,"column":11},"fingerprint":"04c8402d71ff"},{"id":"response-property-list-of-types-widened","text":"response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14837,"column":11},"fingerprint":"92b3c278c674"},{"id":"response-property-list-of-types-widened","text":"response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14843,"column":11},"fingerprint":"d14760616e07"},{"id":"response-property-list-of-types-widened","text":"response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14820,"column":11},"fingerprint":"307f3ad6116e"},{"id":"response-property-list-of-types-widened","text":"response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14832,"column":11},"fingerprint":"2ba6f1ac90e3"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":22444,"column":15},"fingerprint":"0ecada375163"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18844,"column":15},"fingerprint":"a78c0277c96f"},{"id":"response-property-type-changed","text":"the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14861,"column":11},"fingerprint":"d0c15ffbff93"},{"id":"response-property-type-changed","text":"the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13542,"column":11},"fingerprint":"410961ebc3e3"},{"id":"response-property-list-of-types-widened","text":"response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14826,"column":11},"fingerprint":"a880196a311b"},{"id":"response-property-list-of-types-widened","text":"response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14837,"column":11},"fingerprint":"32c17756bca7"},{"id":"response-property-list-of-types-widened","text":"response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14843,"column":11},"fingerprint":"7274a9fda237"},{"id":"response-property-list-of-types-widened","text":"response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14820,"column":11},"fingerprint":"a4e9984b86db"},{"id":"response-property-list-of-types-widened","text":"response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14832,"column":11},"fingerprint":"d0d253288574"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":22444,"column":15},"fingerprint":"14adaa832343"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18844,"column":15},"fingerprint":"84b8481d4e4e"},{"id":"response-property-type-changed","text":"the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14861,"column":11},"fingerprint":"5175761dd253"},{"id":"response-property-type-changed","text":"the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"POST","operationId":"create-timesheet-clock-out-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_out","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13542,"column":11},"fingerprint":"4e7df2663bde"},{"id":"response-property-list-of-types-widened","text":"response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14826,"column":11},"fingerprint":"0e0f16c76454"},{"id":"response-property-list-of-types-widened","text":"response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14837,"column":11},"fingerprint":"381ee9734a32"},{"id":"response-property-list-of-types-widened","text":"response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14843,"column":11},"fingerprint":"04415f0f79d0"},{"id":"response-property-list-of-types-widened","text":"response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14820,"column":11},"fingerprint":"c7e12ccddf54"},{"id":"response-property-list-of-types-widened","text":"response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14832,"column":11},"fingerprint":"72990bef3a3d"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":22444,"column":15},"fingerprint":"1dbafa804dad"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18844,"column":15},"fingerprint":"b6522417167b"},{"id":"response-property-type-changed","text":"the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14861,"column":11},"fingerprint":"904e8d5635ee"},{"id":"response-property-type-changed","text":"the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201`","level":3,"operation":"POST","operationId":"create-or-update-timesheet-hour-entries","path":"/api/v1/time_tracking/hour_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13542,"column":11},"fingerprint":"cff3e0c8be9e"},{"id":"response-property-list-of-types-widened","text":"response property `items/approvedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14785,"column":11},"fingerprint":"25e8b0a28160"},{"id":"response-property-list-of-types-widened","text":"response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14757,"column":11},"fingerprint":"652a4255bbff"},{"id":"response-property-list-of-types-widened","text":"response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14768,"column":11},"fingerprint":"7345a00fba38"},{"id":"response-property-list-of-types-widened","text":"response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14774,"column":11},"fingerprint":"a352ac79fe12"},{"id":"response-property-list-of-types-widened","text":"response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14751,"column":11},"fingerprint":"d312af3483d9"},{"id":"response-property-list-of-types-widened","text":"response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14763,"column":11},"fingerprint":"1585197c3369"},{"id":"response-property-list-of-types-widened","text":"response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14798,"column":11},"fingerprint":"54e7ecd6d535"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18844,"column":15},"fingerprint":"f4bb6654608c"},{"id":"response-property-type-changed","text":"the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"list-timesheet-entries","path":"/api/v1/time_tracking/timesheet_entries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13542,"column":11},"fingerprint":"f48bdd64ad54"},{"id":"request-property-became-not-nullable","text":"the request property `holidayId` became not nullable","level":3,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"e860d28b29e3"},{"id":"request-property-became-not-nullable","text":"the request property `projectId` became not nullable","level":3,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"028fc056a884"},{"id":"request-property-became-not-nullable","text":"the request property `shiftDifferentialId` became not nullable","level":3,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"4a6d78d2d4af"},{"id":"request-property-became-not-nullable","text":"the request property `taskId` became not nullable","level":3,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"7e465eedd66e"},{"id":"response-property-list-of-types-widened","text":"response property `response/message` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-or-update-time-tracking-hour-records","path":"/api/v1/timetracking/record","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11505,"column":15},"fingerprint":"f2e7b00c9d79"},{"id":"response-property-list-of-types-widened","text":"response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11546,"column":11},"fingerprint":"07bac4fff187"},{"id":"response-property-list-of-types-widened","text":"response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11541,"column":11},"fingerprint":"9395a761d4db"},{"id":"response-property-list-of-types-widened","text":"response property `holidayId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11612,"column":11},"fingerprint":"d3fde7404710"},{"id":"response-property-list-of-types-widened","text":"response property `jobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11587,"column":11},"fingerprint":"5106c914767f"},{"id":"response-property-list-of-types-widened","text":"response property `jobData` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11592,"column":11},"fingerprint":"50ead7e7c522"},{"id":"response-property-list-of-types-widened","text":"response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11551,"column":11},"fingerprint":"3fdc8b10c209"},{"id":"response-property-list-of-types-widened","text":"response property `payCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11556,"column":11},"fingerprint":"24960c37548e"},{"id":"response-property-list-of-types-widened","text":"response property `projectId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11597,"column":11},"fingerprint":"89e24e038a0a"},{"id":"response-property-list-of-types-widened","text":"response property `shiftDifferentialId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11607,"column":11},"fingerprint":"00d7d1ef2b50"},{"id":"response-property-list-of-types-widened","text":"response property `taskId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11602,"column":11},"fingerprint":"93275a3a24ef"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `project` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16868,"column":15},"fingerprint":"d6ca9370946f"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `project/task` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16863,"column":19},"fingerprint":"d3d92854f45f"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `shiftDifferential` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16881,"column":15},"fingerprint":"bcf563f2f8dc"},{"id":"response-property-type-changed","text":"the `project` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11632,"column":11},"fingerprint":"1598477058e2"},{"id":"response-property-type-changed","text":"the `project/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11629,"column":15},"fingerprint":"40e448f19fa3"},{"id":"response-property-type-changed","text":"the `shiftDifferential` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-time-tracking-record","path":"/api/v1/timetracking/record/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11643,"column":11},"fingerprint":"9c0e097938c9"},{"id":"response-property-list-of-types-widened","text":"response property `oneOf[subschema #1]/additionalProperties/cost` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-trainings","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12726,"column":11},"fingerprint":"88181adceccb"},{"id":"response-property-list-of-types-widened","text":"response property `oneOf[subschema #1]/additionalProperties/credits` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-trainings","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12716,"column":11},"fingerprint":"b41390ad0cf7"},{"id":"response-property-list-of-types-widened","text":"response property `oneOf[subschema #1]/additionalProperties/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-trainings","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12721,"column":11},"fingerprint":"4b7bd2597888"},{"id":"response-property-list-of-types-widened","text":"response property `oneOf[subschema #1]/additionalProperties/instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-trainings","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12711,"column":11},"fingerprint":"71ec9130ffc0"},{"id":"response-property-list-of-types-widened","text":"response property `oneOf[subschema #1]/additionalProperties/notes` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-trainings","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12706,"column":11},"fingerprint":"45f68d935c83"},{"id":"response-property-list-of-types-widened","text":"response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-employee-training-record","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12726,"column":11},"fingerprint":"7b43f0e73eb3"},{"id":"response-property-list-of-types-widened","text":"response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-employee-training-record","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12716,"column":11},"fingerprint":"94d822c4b94f"},{"id":"response-property-list-of-types-widened","text":"response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-employee-training-record","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12721,"column":11},"fingerprint":"79a246bac2d8"},{"id":"response-property-list-of-types-widened","text":"response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-employee-training-record","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12711,"column":11},"fingerprint":"c72a2f86122c"},{"id":"response-property-list-of-types-widened","text":"response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-employee-training-record","path":"/api/v1/training/record/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12706,"column":11},"fingerprint":"b26b2f3c9177"},{"id":"response-property-list-of-types-widened","text":"response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"PUT","operationId":"update-employee-training-record","path":"/api/v1/training/record/{employeeTrainingRecordId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12726,"column":11},"fingerprint":"de65f7ce5346"},{"id":"response-property-list-of-types-widened","text":"response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"PUT","operationId":"update-employee-training-record","path":"/api/v1/training/record/{employeeTrainingRecordId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12716,"column":11},"fingerprint":"0884ad80df50"},{"id":"response-property-list-of-types-widened","text":"response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"PUT","operationId":"update-employee-training-record","path":"/api/v1/training/record/{employeeTrainingRecordId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12721,"column":11},"fingerprint":"2cf722e8cec6"},{"id":"response-property-list-of-types-widened","text":"response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"PUT","operationId":"update-employee-training-record","path":"/api/v1/training/record/{employeeTrainingRecordId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12711,"column":11},"fingerprint":"dc4de29953af"},{"id":"response-property-list-of-types-widened","text":"response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"PUT","operationId":"update-employee-training-record","path":"/api/v1/training/record/{employeeTrainingRecordId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12706,"column":11},"fingerprint":"8fc43199a592"},{"id":"response-property-list-of-types-widened","text":"response property `additionalProperties/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-training-types","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12675,"column":11},"fingerprint":"130114586c15"},{"id":"response-property-list-of-types-widened","text":"response property `additionalProperties/linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-training-types","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12670,"column":11},"fingerprint":"94f02862bb3c"},{"id":"response-property-list-of-types-widened","text":"response property `additionalProperties/required` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-training-types","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12655,"column":11},"fingerprint":"bdd561052743"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-training-type","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12675,"column":11},"fingerprint":"f98430b57872"},{"id":"response-property-list-of-types-widened","text":"response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-training-type","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12670,"column":11},"fingerprint":"0146264b7bf9"},{"id":"response-property-list-of-types-widened","text":"response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-training-type","path":"/api/v1/training/type","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12655,"column":11},"fingerprint":"cb2918e1cc68"},{"id":"response-property-list-of-types-widened","text":"response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-training-type","path":"/api/v1/training/type/{trainingTypeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12675,"column":11},"fingerprint":"a93dd2e55815"},{"id":"response-property-list-of-types-widened","text":"response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-training-type","path":"/api/v1/training/type/{trainingTypeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12670,"column":11},"fingerprint":"95bef6479de1"},{"id":"response-property-list-of-types-widened","text":"response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-training-type","path":"/api/v1/training/type/{trainingTypeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12655,"column":11},"fingerprint":"852eb271c91d"},{"id":"response-property-list-of-types-widened","text":"response property `webhooks/items/lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-webhooks","path":"/api/v1/webhooks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":2299,"column":466},"fingerprint":"a78b31ea8e9b"},{"id":"response-property-list-of-types-widened","text":"response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `201`","level":3,"operation":"POST","operationId":"create-webhook","path":"/api/v1/webhooks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":2339,"column":161},"fingerprint":"3ec0188cb43a"},{"id":"response-property-list-of-types-widened","text":"response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-monitor-fields","path":"/api/v1/webhooks/monitor_fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":2619,"column":501},"fingerprint":"fc9fbe5d9e96"},{"id":"response-property-list-of-types-widened","text":"response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-post-fields","path":"/api/v1/webhooks/post-fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15617,"column":11},"fingerprint":"5610cb2f3f7e"},{"id":"response-property-list-of-types-widened","text":"response property `fields/items/tableId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-post-fields","path":"/api/v1/webhooks/post-fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15636,"column":11},"fingerprint":"f8cbebd0203a"},{"id":"response-property-list-of-types-widened","text":"response property `fields/items/type` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-post-fields","path":"/api/v1/webhooks/post-fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15625,"column":11},"fingerprint":"10564b93a520"},{"id":"response-property-list-of-types-widened","text":"response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-webhook","path":"/api/v1/webhooks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12821,"column":11},"fingerprint":"44dc5ad7870d"},{"id":"response-property-list-of-types-widened","text":"response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-webhook","path":"/api/v1/webhooks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12821,"column":11},"fingerprint":"6902aa3c53ef"},{"id":"response-property-list-of-types-widened","text":"response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"list-employee-time-off-policies-v1.1","path":"/api/v1_1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":8898,"column":332},"fingerprint":"41f0bb138300"},{"id":"request-property-became-not-nullable","text":"the request property `items/accrualStartDate` became not nullable","level":3,"operation":"PUT","operationId":"assign-time-off-policies-v1.1","path":"/api/v1_1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"be290e83d6ab"},{"id":"response-property-list-of-types-widened","text":"response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"assign-time-off-policies-v1.1","path":"/api/v1_1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":8956,"column":332},"fingerprint":"c3c2f4ab4483"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"85d1e2cb4cdc"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"96ecbb758dfc"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"db633b8dbc4c"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"09dcf35bcde7"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"3803b069e648"},{"id":"response-property-type-changed","text":"the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"9f3ea8290ebd"},{"id":"request-property-became-not-nullable","text":"the request property `alignsWithOptionId` became not nullable","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"631e6d243fc2"},{"id":"request-property-became-not-nullable","text":"the request property `completionDate` became not nullable","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"f5b1c87371ce"},{"id":"response-property-list-of-types-widened","text":"response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13455,"column":15},"fingerprint":"a912ecf337e6"},{"id":"response-property-list-of-types-widened","text":"response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13469,"column":15},"fingerprint":"9f0dc27ab995"},{"id":"response-property-list-of-types-widened","text":"response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13475,"column":15},"fingerprint":"2ee4b06c2ae6"},{"id":"response-property-list-of-types-widened","text":"response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13489,"column":15},"fingerprint":"eb01c8ae67c6"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18815,"column":19},"fingerprint":"da1f855da875"},{"id":"response-property-type-changed","text":"the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13515,"column":15},"fingerprint":"f468091b4093"},{"id":"request-property-became-not-nullable","text":"the request property `dependentFields` became not nullable","level":3,"operation":"POST","operationId":"get-field-options-v1-2","path":"/api/v1_2/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"da111458c094"},{"id":"request-property-became-not-nullable","text":"the request property `filters` became not nullable","level":3,"operation":"POST","operationId":"get-field-options-v1-2","path":"/api/v1_2/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"e153cdcca706"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-fields-from-dataset-v1-2","path":"/api/v1_2/datasets/{datasetName}/fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13088,"column":11},"fingerprint":"52e3ed90919d"},{"id":"response-property-list-of-types-widened","text":"response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-fields-from-dataset-v1-2","path":"/api/v1_2/datasets/{datasetName}/fields","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13093,"column":11},"fingerprint":"a894e75440c2"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13333,"column":11},"fingerprint":"06c0176e7d91"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13347,"column":11},"fingerprint":"0a3b4ec2a5f0"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13353,"column":11},"fingerprint":"522da3e673ac"},{"id":"response-property-list-of-types-widened","text":"response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13367,"column":11},"fingerprint":"f3c7d6926cb4"},{"id":"response-property-one-of-added","text":"added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18730,"column":15},"fingerprint":"029cf9f786f5"},{"id":"response-property-type-changed","text":"the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200`","level":3,"operation":"GET","operationId":"get-goals-aggregate-v1.2","path":"/api/v1_2/performance/employees/{employeeId}/goals/aggregate","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13429,"column":11},"fingerprint":"e7a6fd8e7b76"},{"id":"request-property-became-not-nullable","text":"the request property `filter` became not nullable","level":3,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"6c81f200a07e"},{"id":"request-property-became-not-nullable","text":"the request property `orderBy` became not nullable","level":3,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"31c38dd751c4"},{"id":"response-property-list-of-types-widened","text":"response property `data/items/fields/additionalProperties/` list-of-types was widened by adding types `null, number, boolean, array and object` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3247,"column":233},"fingerprint":"22d3a63d1f9f"},{"id":"response-property-list-of-types-widened","text":"response property `links/next` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3248,"column":147},"fingerprint":"fabc780203cb"},{"id":"response-property-list-of-types-widened","text":"response property `links/prev` list-of-types was widened by adding types `null` to media type `application/json` of response `200`","level":3,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3248,"column":181},"fingerprint":"ff1aa6a3023d"},{"id":"request-parameter-property-type-changed","text":"for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/after` was changed from `integer`/`` to `string`/``","comment":"This is a warning because parameter objects can be passed in differnt ways, some of which allow this type change and others do not.","level":2,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13850,"column":15},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19455,"column":15},"fingerprint":"1447007c4d63"},{"id":"request-parameter-property-type-changed","text":"for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/before` was changed from `integer`/`` to `string`/``","comment":"This is a warning because parameter objects can be passed in differnt ways, some of which allow this type change and others do not.","level":2,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13847,"column":15},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19452,"column":15},"fingerprint":"a78f9f7af015"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `items/manageable` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24097,"column":15},"fingerprint":"04ae8030f851"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `items/multiple` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24105,"column":15},"fingerprint":"6872f5a0e98d"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24026,"column":15},"fingerprint":"ae7c5471529b"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `items/manageable` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24096,"column":15},"fingerprint":"1f08c3c9ffa4"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `items/multiple` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24104,"column":15},"fingerprint":"cbec74ce9a8d"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json)","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24025,"column":15},"fingerprint":"ebf7630402ce"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `manageable` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24097,"column":15},"fingerprint":"6d8ca4b7ee74"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `multiple` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24105,"column":15},"fingerprint":"1690bd99f8ce"},{"id":"response-property-enum-value-added","text":"added the new `no` enum value to the `options/items/archived` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24026,"column":15},"fingerprint":"39b03ee0d067"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `manageable` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24096,"column":15},"fingerprint":"f485700715ed"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `multiple` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24104,"column":15},"fingerprint":"c5182a7384c5"},{"id":"response-property-enum-value-added","text":"added the new `yes` enum value to the `options/items/archived` response property for the response status `200`","comment":"Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.","level":2,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24025,"column":15},"fingerprint":"c716c4d7cc0b"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"6d0a073cbf3e97fe0409de42c68fe779","path":"/api/v1/alert-configurations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":15,"column":5},"fingerprint":"c5905ef3f99d"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"a05e93bc2eb9c39a40fbd71e6e07f3c6","path":"/api/v1/alert-configurations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":48,"column":5},"fingerprint":"672da65e2228"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"14e66bfb5f075043221ce1e843c97493","path":"/api/v1/alert-configurations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":91,"column":5},"fingerprint":"57d7981bb848"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"eb42aa2fa339ba5c08b147fc13c6a79e","path":"/api/v1/alert-configurations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":134,"column":5},"fingerprint":"bf60c012895f"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"0f0dcb585e5883175b6557c16cf6755a","path":"/api/v1/alerts","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":184,"column":5},"fingerprint":"a1705c176564"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"POST","operationId":"create-candidate","path":"/api/v1/applicant_tracking/application","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"3fb302ad62e3"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"GET","operationId":"get-applications","path":"/api/v1/applicant_tracking/applications","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"271a0e68a03b"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"GET","operationId":"get-application-details","path":"/api/v1/applicant_tracking/applications/{applicationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"87c43d188c5f"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"POST","operationId":"create-application-comment","path":"/api/v1/applicant_tracking/applications/{applicationId}/comments","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"29397b40d833"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"POST","operationId":"update-applicant-status","path":"/api/v1/applicant_tracking/applications/{applicationId}/status","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"22f142df1ee5"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"GET","operationId":"get-job-summaries","path":"/api/v1/applicant_tracking/jobs","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"0fb64b4ad3b6"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"GET","operationId":"get-company-locations","path":"/api/v1/applicant_tracking/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"2125eee349ac"},{"id":"api-security-added","text":"the endpoint scheme security `oauth` was added to the API","level":1,"operation":"GET","operationId":"get-statuses","path":"/api/v1/applicant_tracking/statuses","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"6294bef8e7db"},{"id":"request-property-list-of-types-widened","text":"request property `address/line1` list-of-types was widened by adding types `null` to media type `application/merge-patch+json`","level":1,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4121,"column":164},"fingerprint":"49dd9226932e"},{"id":"request-property-list-of-types-widened","text":"request property `address/line2` list-of-types was widened by adding types `null` to media type `application/merge-patch+json`","level":1,"operation":"PATCH","operationId":"patch-company-profile-company-information","path":"/api/v1/company-profile-data/company-information","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":4121,"column":321},"fingerprint":"6db046e5d257"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"c5880b509783cd9d7fce9ddf5d6af1be","path":"/api/v1/compensation/equity/settings","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":244,"column":5},"fingerprint":"1fe4641bc3d8"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"e2ac4e1535f296cb8901f209e04caa83","path":"/api/v1/compensation/planning_cycles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":332,"column":5},"fingerprint":"b012c97218d7"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"22ad75be25455279e2987c80851af5fc","path":"/api/v1/compensation/planning_cycles/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":460,"column":5},"fingerprint":"b79d5530f5a1"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"100b0cf8c5207b35697ff10370fd5fe1","path":"/api/v1/compensation/planning_cycles/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":402,"column":5},"fingerprint":"fc9d46c4118d"},{"id":"response-optional-property-added","text":"added the optional property `admins` to the response with the `200` status","level":1,"operation":"GET","operationId":"b3c51254de6918637a971fe4af382a53","path":"/api/v1/compensation/planning_cycles/{id}/admins","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":777,"column":19},"fingerprint":"9b518d7f5fbc"},{"id":"response-optional-property-added","text":"added the optional property `isFullAdmin` to the response with the `200` status","level":1,"operation":"GET","operationId":"b3c51254de6918637a971fe4af382a53","path":"/api/v1/compensation/planning_cycles/{id}/admins","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":778,"column":19},"fingerprint":"d1b379ae1224"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"c7c32ed5278ac67e2e518bf7484a75dc","path":"/api/v1/compensation/planning_cycles/{id}/admins","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":790,"column":5},"fingerprint":"891942c61ec4"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"ef7619b0ee4c8dc079aaea870cfbe81b","path":"/api/v1/compensation/planning_cycles/{id}/admins/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1558,"column":5},"fingerprint":"bae53f68a4c8"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"b1e467e0eef72350eec61fcfeaf4e19d","path":"/api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1381,"column":5},"fingerprint":"284feb72778c"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"5c4aab35a34f5760ec044104b5232bf5","path":"/api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1332,"column":5},"fingerprint":"b36594e59d6f"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"cf87b8e09a001b6fb81dfce6c20ab9e3","path":"/api/v1/compensation/planning_cycles/{id}/approvals/{templateId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1265,"column":5},"fingerprint":"f4fc3fdb9b49"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"1d64402ee192568adbd5e3179a91e6e2","path":"/api/v1/compensation/planning_cycles/{id}/budgets/breakdown","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1140,"column":5},"fingerprint":"602e108e60a9"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"dacd313af2106213fc4696175941ce65","path":"/api/v1/compensation/planning_cycles/{id}/budgets/guidelines","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1076,"column":5},"fingerprint":"11ba35ea0b33"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"1d1fc0f164cb51973a0206b8e2fb2d2d","path":"/api/v1/compensation/planning_cycles/{id}/budgets/import","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1199,"column":5},"fingerprint":"206c2118334b"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"c79f9c5950f983e59d2626faa30c00a1","path":"/api/v1/compensation/planning_cycles/{id}/change_comm/template","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1601,"column":5},"fingerprint":"ccd8ad5bb7b5"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"f4b431363af6573af46750f32632e88b","path":"/api/v1/compensation/planning_cycles/{id}/complete","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1018,"column":5},"fingerprint":"77b857100944"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"89a5068111ec499135c7d6e9a53d5a30","path":"/api/v1/compensation/planning_cycles/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":622,"column":5},"fingerprint":"125a0c2eec0e"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"3958585c861325ea7a2cd30a8c74f042","path":"/api/v1/compensation/planning_cycles/{id}/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":563,"column":5},"fingerprint":"26fbe79009dd"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"3a19f07aa737dc826ba43b9a1c1cd257","path":"/api/v1/compensation/planning_cycles/{id}/launch","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":966,"column":5},"fingerprint":"20703838bba3"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"f3883a522dadbe9e11b34f8b656e3adb","path":"/api/v1/compensation/planning_cycles/{id}/recommendations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1428,"column":5},"fingerprint":"2b499793e753"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"a05b6d5f564f805d688ff2c1e37c3990","path":"/api/v1/compensation/planning_cycles/{id}/recommendations/send","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1499,"column":5},"fingerprint":"b4d218fa0b94"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"9f398e2652ea47a6dc5121ce5184222a","path":"/api/v1/compensation/tools","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1652,"column":5},"fingerprint":"34adfc2bb2c0"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"remove-total-rewards-custom-disclaimer","path":"/api/v1/compensation/total_rewards/custom_disclaimer","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11266,"column":5},"fingerprint":"5e9b6f575800"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"set-total-rewards-custom-disclaimer","path":"/api/v1/compensation/total_rewards/custom_disclaimer","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11227,"column":5},"fingerprint":"741faf8075fa"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"remove-total-rewards-employees","path":"/api/v1/compensation/total_rewards/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11122,"column":5},"fingerprint":"4e2e04852e7d"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"add-total-rewards-employees","path":"/api/v1/compensation/total_rewards/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11076,"column":5},"fingerprint":"1bfc854b10ec"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"set-total-rewards-onboarding-step","path":"/api/v1/compensation/total_rewards/onboarding/{stepName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11169,"column":5},"fingerprint":"a2447610af2a"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"check-total-rewards-profile","path":"/api/v1/compensation/total_rewards/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":12254,"column":5},"fingerprint":"281cfcca1524"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-total-rewards-printable-statement","path":"/api/v1/compensation/total_rewards/{employeeId}/printable","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":12286,"column":5},"fingerprint":"5782fa459a91"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-total-rewards-statement","path":"/api/v1/compensation/total_rewards/{employeeId}/statement","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11294,"column":5},"fingerprint":"a53bb71b6693"},{"id":"new-optional-request-property","text":"added the new optional request property `sortBy/items/aggregationType`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":18321,"column":15},"fingerprint":"2c2e9ab835c7"},{"id":"request-property-list-of-types-widened","text":"request property `aggregations/defaultAggregation` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v1","path":"/api/v1/datasets/{datasetName}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12988,"column":15},"fingerprint":"8c76c5a38e3a"},{"id":"request-property-list-of-types-widened","text":"request property `dependentFields` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-field-options-v1","path":"/api/v1/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11662,"column":11},"fingerprint":"d13429009753"},{"id":"request-property-list-of-types-widened","text":"request property `filters` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-field-options-v1","path":"/api/v1/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11681,"column":11},"fingerprint":"4a3f280ad1b3"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"list-employee-verifications-by-employee","path":"/api/v1/employee-verifications/employees/{employeeId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1680,"column":5},"fingerprint":"4a11f7b8f618"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"update-employee-verification","path":"/api/v1/employee-verifications/employees/{employeeId}/{verificationId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1780,"column":5},"fingerprint":"30c47608f5d4"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-employee-verification-integration","path":"/api/v1/employee-verifications/integration","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1847,"column":5},"fingerprint":"e62271776cc5"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"update-employee-verification-integration","path":"/api/v1/employee-verifications/integration","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1882,"column":5},"fingerprint":"85296ae5426f"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"send-employee-verification-lifecycle-email-by-user","path":"/api/v1/employee-verifications/users/{userId}/send-email","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1726,"column":5},"fingerprint":"6dd499bde96b"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12341,"column":21},"fingerprint":"ae1a8180d9a8"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12333,"column":21},"fingerprint":"a3713b4edaef"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12340,"column":21},"fingerprint":"914e6cb6e27e"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"GET","operationId":"list-employee-dependents","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12332,"column":21},"fingerprint":"a2bdf0123f70"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12341,"column":21},"fingerprint":"be54fa1b659f"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12333,"column":21},"fingerprint":"a970fd2a236c"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12340,"column":21},"fingerprint":"04c68909f44c"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"POST","operationId":"create-employee-dependent","path":"/api/v1/employeedependents","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12332,"column":21},"fingerprint":"6c008f198f85"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12341,"column":21},"fingerprint":"53e395c9d86e"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12333,"column":21},"fingerprint":"0ef25bf06f90"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12340,"column":21},"fingerprint":"7112ab890784"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"GET","operationId":"get-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12332,"column":21},"fingerprint":"cbc935c3efcd"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12341,"column":21},"fingerprint":"4417ae65500c"},{"id":"response-property-enum-value-removed","text":"removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12333,"column":21},"fingerprint":"b61bc5037860"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200`","level":1,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12340,"column":21},"fingerprint":"525a6fec3245"},{"id":"response-property-enum-value-removed","text":"removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200`","level":1,"operation":"PUT","operationId":"update-employee-dependent","path":"/api/v1/employeedependents/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12332,"column":21},"fingerprint":"80e2e5cb5e1b"},{"id":"api-security-added","text":"the endpoint scheme security `basic` was added to the API","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","fingerprint":"fba09ae34ec6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `addressLine1` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21158,"column":11},"fingerprint":"f6cc45c4ea13"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `addressLine2` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21159,"column":11},"fingerprint":"1530ed73e243"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `age` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21160,"column":11},"fingerprint":"802e8e36e4a6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `allergies` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21161,"column":11},"fingerprint":"fe844f416cd8"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `birthplace` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21164,"column":11},"fingerprint":"14f8de88ec1a"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `citizenship` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21165,"column":11},"fingerprint":"de8859ffa6f0"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `citizenshipId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21166,"column":11},"fingerprint":"ffd37d463d61"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `city` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21167,"column":11},"fingerprint":"0124f4c9c45b"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `compensationChangeReason` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21168,"column":11},"fingerprint":"78a81c817ff6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `compensationChangeReasonId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21169,"column":11},"fingerprint":"82a1237c4824"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `compensationComment` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21170,"column":11},"fingerprint":"c6ee6611677d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `compensationEffectiveDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21171,"column":11},"fingerprint":"0125579d7eca"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `compensationEndDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21172,"column":11},"fingerprint":"005e1b370cf0"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `contractEndDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21173,"column":11},"fingerprint":"e5891b29bb14"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `country` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21174,"column":11},"fingerprint":"4edd70a3bc8a"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `countryId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21175,"column":11},"fingerprint":"b1da6acc0ea2"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `dietaryRestrictions` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21178,"column":11},"fingerprint":"dd2f52d7261e"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `displayName` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21179,"column":11},"fingerprint":"c579350562ca"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `eeoJobCategory` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21182,"column":11},"fingerprint":"327b3fa9514e"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `eeoJobCategoryId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21183,"column":11},"fingerprint":"7af558942a03"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `ein` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21184,"column":11},"fingerprint":"d02e2bda5a78"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `eligibleForRehire` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21185,"column":11},"fingerprint":"52721b09bd0d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `eligibleForRehireId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21186,"column":11},"fingerprint":"ff74e6ba609b"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employeeName` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21187,"column":11},"fingerprint":"0275ac0c682f"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employeeNumber` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21188,"column":11},"fingerprint":"927b4e24ded5"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employmentStatusComment` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21189,"column":11},"fingerprint":"da639f792ad6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employmentStatusEffectiveDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21190,"column":11},"fingerprint":"c09f6bfee6c4"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employmentType` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21193,"column":11},"fingerprint":"13dd3909c59c"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `employmentTypeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21194,"column":11},"fingerprint":"04be0fdb21f7"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `ethnicity` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21195,"column":11},"fingerprint":"ec30859ee632"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `ethnicityId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21196,"column":11},"fingerprint":"dfea0d6172ec"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `finalDoseAdministrationDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21198,"column":11},"fingerprint":"7ba10fe184dc"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `finalPayDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21199,"column":11},"fingerprint":"0dfb81be2f95"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `firstNameLastName` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21200,"column":11},"fingerprint":"3cbaf8743134"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `firstNameMiddleInitial` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21201,"column":11},"fingerprint":"f0106783b709"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `flsaCode` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21202,"column":11},"fingerprint":"0abb8c97e57f"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `flsaCodeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21203,"column":11},"fingerprint":"b7d24efee2f3"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `gender` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21204,"column":11},"fingerprint":"9aa11f6729dd"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `genderIdentity` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21205,"column":11},"fingerprint":"d4f41b21670d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `genderIdentityId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21206,"column":11},"fingerprint":"fdff1e7a95d1"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `hoursPerPayCycle` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21210,"column":11},"fingerprint":"41a1566b78e6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `isManager` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21212,"column":11},"fingerprint":"7de52a380a30"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `jacketSize` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21213,"column":11},"fingerprint":"a39e31e46c2e"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `jacketSizeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21214,"column":11},"fingerprint":"55180c6dc988"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `jobInformationEffectiveDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21215,"column":11},"fingerprint":"af52f0a14d14"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `maritalStatus` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21220,"column":11},"fingerprint":"33c7a669d8e7"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `middleInitial` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21221,"column":11},"fingerprint":"d198f18fd5ad"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nationalId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21224,"column":11},"fingerprint":"dc3d17604f16"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nationalInsuranceCategory` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21225,"column":11},"fingerprint":"5d4c691141b6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nationalInsuranceCategoryId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21226,"column":11},"fingerprint":"31fc31267403"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nationality` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21227,"column":11},"fingerprint":"c9437ce93e8e"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nationalityId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21228,"column":11},"fingerprint":"02ff98a39294"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nickName` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21229,"column":11},"fingerprint":"320c70c86f14"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `nin` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21230,"column":11},"fingerprint":"0947904b371a"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `noticePeriod` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21231,"column":11},"fingerprint":"f854e2cf007d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `noticePeriodId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21232,"column":11},"fingerprint":"b62b3831e218"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `originalHireDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21233,"column":11},"fingerprint":"d403b92e075f"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `overtime` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21234,"column":11},"fingerprint":"742ce8c8b706"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `overtimeRate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21235,"column":11},"fingerprint":"20d1ad01fc99"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `paidPer` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21236,"column":11},"fingerprint":"8142f43bbead"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `payRate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21237,"column":11},"fingerprint":"f888dd688562"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `paySchedule` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21238,"column":11},"fingerprint":"f863e4aae48e"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `payScheduleId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21239,"column":11},"fingerprint":"7c7406b4df89"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `payType` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21240,"column":11},"fingerprint":"c42a9b32535f"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `preferredNameLastName` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21242,"column":11},"fingerprint":"06c742221d30"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `probationEndDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21243,"column":11},"fingerprint":"a3a586950b3a"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `pronouns` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21244,"column":11},"fingerprint":"79955fc34247"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `pronounsId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21245,"column":11},"fingerprint":"2f09d61e7c9d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `proofOfVaccination` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21246,"column":11},"fingerprint":"b08f6d91b465"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `secondaryLanguage` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21249,"column":11},"fingerprint":"1c05a3d551e3"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `shirtSize` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21250,"column":11},"fingerprint":"e285ed6b5434"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `shirtSizeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21251,"column":11},"fingerprint":"ee64db286762"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `sin` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21252,"column":11},"fingerprint":"6073657151c1"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `ssn` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21254,"column":11},"fingerprint":"26c54ab8d5e8"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `state` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21255,"column":11},"fingerprint":"542ec65f13b6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `stateId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21256,"column":11},"fingerprint":"2f2abfd32293"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `tShirtSize` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21267,"column":11},"fingerprint":"ae31dbd331bc"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `tShirtSizeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21268,"column":11},"fingerprint":"d591bef18dce"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `taxTypeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21257,"column":11},"fingerprint":"2dd889f159d3"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `teams` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21258,"column":11},"fingerprint":"7edd929d7760"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `tenure` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21259,"column":11},"fingerprint":"ec6081f51840"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationDate` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21260,"column":11},"fingerprint":"12fc4ae764f5"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationReason` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21261,"column":11},"fingerprint":"04bcd5c367a6"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationReasonId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21262,"column":11},"fingerprint":"0f4fb50ca398"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationRegrettable` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21263,"column":11},"fingerprint":"cb4c6a08b1e8"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationRegrettableId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21264,"column":11},"fingerprint":"c3082edae852"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationType` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21265,"column":11},"fingerprint":"11470de3e30a"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `terminationTypeId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21266,"column":11},"fingerprint":"8a65370ce7e2"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `userId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21270,"column":11},"fingerprint":"6d1d97fe4884"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `vaccinationStatus` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21271,"column":11},"fingerprint":"eea552939f3d"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `vaccinationStatusId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21272,"column":11},"fingerprint":"3e2c833396bd"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `vaccineReceived` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21273,"column":11},"fingerprint":"8ec40ab343c1"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `vaccineReceivedId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21274,"column":11},"fingerprint":"372dd299b8c9"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `veteranStatus` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21275,"column":11},"fingerprint":"8d05eb9db957"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `veteranStatusId` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21276,"column":11},"fingerprint":"9a3e0d06ab62"},{"id":"request-parameter-property-enum-value-added","text":"added the enum value `zipcode` to the property `items/` of the `query` request parameter `fields`","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":21280,"column":11},"fingerprint":"ee6dccc07639"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/addressLine1` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19869,"column":13},"fingerprint":"c789af719374"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/addressLine2` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19876,"column":13},"fingerprint":"391687a49b37"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/age` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19883,"column":13},"fingerprint":"1518152cf81e"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/allergies` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19890,"column":13},"fingerprint":"9d21bc823fd1"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/birthplace` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19911,"column":13},"fingerprint":"d00fd377237a"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/citizenship` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19918,"column":13},"fingerprint":"f17da98cb11e"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/citizenshipId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19925,"column":13},"fingerprint":"35bc8db85141"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/city` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19932,"column":13},"fingerprint":"a02cd5bf6c65"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/compensationChangeReason` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19939,"column":13},"fingerprint":"3f5f0c5b352c"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/compensationChangeReasonId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19946,"column":13},"fingerprint":"86f3493435ed"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/compensationComment` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19953,"column":13},"fingerprint":"1a3f9f8f2540"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/compensationEffectiveDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19960,"column":13},"fingerprint":"e2e5f0d702a0"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/compensationEndDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19967,"column":13},"fingerprint":"66830cc88a78"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/contractEndDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19974,"column":13},"fingerprint":"f84bfc06eaa8"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/country` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19981,"column":13},"fingerprint":"a7d0cb6dc75d"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/countryId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":19988,"column":13},"fingerprint":"89d9d6ee23fb"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/dietaryRestrictions` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20009,"column":13},"fingerprint":"e76dd10372da"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/displayName` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20016,"column":13},"fingerprint":"ce3825874196"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/eeoJobCategory` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20037,"column":13},"fingerprint":"b8771a6a182a"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/eeoJobCategoryId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20044,"column":13},"fingerprint":"c0375ca35ad3"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/ein` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20051,"column":13},"fingerprint":"a4563230cf3a"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/eligibleForRehire` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20058,"column":13},"fingerprint":"aed7a06ad05f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/eligibleForRehireId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20065,"column":13},"fingerprint":"bff3687ad29d"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employeeName` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20072,"column":13},"fingerprint":"24c393114257"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employeeNumber` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20079,"column":13},"fingerprint":"07856b70a83f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employmentStatusComment` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20086,"column":13},"fingerprint":"1a7b4965dd3c"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employmentStatusEffectiveDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20093,"column":13},"fingerprint":"817918634647"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employmentType` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20114,"column":13},"fingerprint":"0d5c872a30e2"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/employmentTypeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20121,"column":13},"fingerprint":"4009160e4c0f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/ethnicity` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20128,"column":13},"fingerprint":"cfd0d44c90f8"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/ethnicityId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20135,"column":13},"fingerprint":"0df4dba5ff23"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/finalDoseAdministrationDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20149,"column":13},"fingerprint":"17329b59ffb2"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/finalPayDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20156,"column":13},"fingerprint":"8653f8740771"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/firstNameLastName` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20163,"column":13},"fingerprint":"5e6ee4039cec"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/firstNameMiddleInitial` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20170,"column":13},"fingerprint":"b5293daaddf0"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/flsaCode` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20177,"column":13},"fingerprint":"fdadd5850abe"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/flsaCodeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20184,"column":13},"fingerprint":"dc3e0de83e17"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/gender` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20191,"column":13},"fingerprint":"2d335fd6c457"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/genderIdentity` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20198,"column":13},"fingerprint":"03cc67e66a47"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/genderIdentityId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20205,"column":13},"fingerprint":"0a7a1a0703d9"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/hoursPerPayCycle` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20231,"column":13},"fingerprint":"a915bb80b0ed"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/isManager` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20245,"column":13},"fingerprint":"4bc7c650c062"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/jacketSize` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20252,"column":13},"fingerprint":"6436db919405"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/jacketSizeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20259,"column":13},"fingerprint":"17bd1a016d08"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/jobInformationEffectiveDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20266,"column":13},"fingerprint":"cbf5f73f9d2e"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/maritalStatus` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20301,"column":13},"fingerprint":"318d501fd956"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/middleInitial` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20308,"column":13},"fingerprint":"683aa44bd112"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nationalId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20329,"column":13},"fingerprint":"07069c8ae49d"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nationalInsuranceCategory` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20336,"column":13},"fingerprint":"7a770351c46e"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nationalInsuranceCategoryId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20343,"column":13},"fingerprint":"f9290d7176e0"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nationality` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20350,"column":13},"fingerprint":"35519b0bbaf1"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nationalityId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20357,"column":13},"fingerprint":"6b6a7179d249"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nickName` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20364,"column":13},"fingerprint":"3f498accb647"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/nin` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20371,"column":13},"fingerprint":"ae4872ff3435"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/noticePeriod` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20378,"column":13},"fingerprint":"250546b472e3"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/noticePeriodId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20385,"column":13},"fingerprint":"80f655a53c23"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/originalHireDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20392,"column":13},"fingerprint":"62dabba40be6"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/overtime` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20399,"column":13},"fingerprint":"50ec6be4f3eb"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/overtimeRate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20406,"column":13},"fingerprint":"e0d271238fe7"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/paidPer` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20414,"column":13},"fingerprint":"bd94f9b85df2"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/payRate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20421,"column":13},"fingerprint":"1773f0646563"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/paySchedule` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20429,"column":13},"fingerprint":"941161f0cf75"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/payScheduleId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20436,"column":13},"fingerprint":"5c34bc0de3a6"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/payType` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20443,"column":13},"fingerprint":"a99f7fd521f5"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/preferredNameLastName` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20457,"column":13},"fingerprint":"afbc8cc3ee0a"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/probationEndDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20464,"column":13},"fingerprint":"629199b5c41f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/pronouns` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20471,"column":13},"fingerprint":"f3da43d78048"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/pronounsId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20478,"column":13},"fingerprint":"f9907b44007e"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/proofOfVaccination` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20485,"column":13},"fingerprint":"2bc253279f1a"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/secondaryLanguage` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20506,"column":13},"fingerprint":"72328c4276c6"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/shirtSize` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20513,"column":13},"fingerprint":"cbe6c0df43fa"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/shirtSizeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20520,"column":13},"fingerprint":"ab11c8d2c48f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/sin` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20527,"column":13},"fingerprint":"43d9d419bbc4"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/ssn` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20541,"column":13},"fingerprint":"52a1a3e4036f"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/state` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20548,"column":13},"fingerprint":"6cc51384a0a6"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/stateId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20555,"column":13},"fingerprint":"77a7fb10c338"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/tShirtSize` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20633,"column":13},"fingerprint":"a486b0412ae0"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/tShirtSizeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20640,"column":13},"fingerprint":"ad739a2566a4"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/taxTypeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20562,"column":13},"fingerprint":"54576352cbb8"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/teams` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20569,"column":13},"fingerprint":"bc4496a25063"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/tenure` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20577,"column":13},"fingerprint":"2bf12db91b2c"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationDate` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20584,"column":13},"fingerprint":"30e085ed844c"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationReason` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20591,"column":13},"fingerprint":"59bb8907c359"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationReasonId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20598,"column":13},"fingerprint":"4cfbe9a74764"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationRegrettable` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20605,"column":13},"fingerprint":"6b6bae309864"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationRegrettableId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20612,"column":13},"fingerprint":"1cdeb55c9a09"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationType` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20619,"column":13},"fingerprint":"14e856abbfa9"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/terminationTypeId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20626,"column":13},"fingerprint":"59da51016d17"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/userId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20654,"column":13},"fingerprint":"a1701d30acb3"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/vaccinationStatus` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20661,"column":13},"fingerprint":"c6b9efafbe14"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/vaccinationStatusId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20668,"column":13},"fingerprint":"8d6cc6a15feb"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/vaccineReceived` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20675,"column":13},"fingerprint":"4f886c1f5836"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/vaccineReceivedId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20682,"column":13},"fingerprint":"4108c5e7c9a1"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/veteranStatus` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20689,"column":13},"fingerprint":"41409447baa7"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/veteranStatusId` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20696,"column":13},"fingerprint":"b587a9b6c78c"},{"id":"response-optional-property-added","text":"added the optional property `data/items/allOf[subschema #2]/zipcode` to the response with the `200` status","level":1,"operation":"GET","operationId":"list-employees","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":20722,"column":13},"fingerprint":"85f8aba2c444"},{"id":"response-media-type-added","text":"added the media type `application/json` for the response with the status `201`","level":1,"operation":"POST","operationId":"create-employee","path":"/api/v1/employees","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":8310,"column":13},"fingerprint":"c15414ad0ef8"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"GET","operationId":"get-employees-directory","path":"/api/v1/employees/directory","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":13919,"column":9},"fingerprint":"4e455c786f4a"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"0158de7cde2a4c4cf577f0b25070d809","path":"/api/v1/employees/{employeeId}/onboarding-experiences","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2269,"column":5},"fingerprint":"cab70fe29a2e"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"288aa996aba16d7a495c62321ea999a9","path":"/api/v1/employees/{employeeId}/onboarding-experiences","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2311,"column":5},"fingerprint":"95b6033cdca7"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"847dd061d1d1859e7ce8cb3adfc9faf2","path":"/api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2379,"column":5},"fingerprint":"0d0ad9f81338"},{"id":"request-body-media-type-added","text":"added the media type `application/json` to the request body","level":1,"operation":"POST","operationId":"upload-employee-photo","path":"/api/v1/employees/{employeeId}/photo","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":15578,"column":11},"fingerprint":"4e79c4e31469"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `402`","level":1,"operation":"POST","operationId":"upload-employee-photo","path":"/api/v1/employees/{employeeId}/photo","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":15593,"column":9},"fingerprint":"b4f45c046aff"},{"id":"response-media-type-added","text":"added the media type `application/json` for the response with the status `200`","level":1,"operation":"GET","operationId":"get-employee-photo","path":"/api/v1/employees/{employeeId}/photo/{size}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":12930,"column":13},"fingerprint":"abdf49aafced"},{"id":"response-media-type-added","text":"added the media type `image/*` for the response with the status `200`","level":1,"operation":"GET","operationId":"get-employee-photo","path":"/api/v1/employees/{employeeId}/photo/{size}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":12929,"column":13},"fingerprint":"b84f9b7c702e"},{"id":"request-property-list-of-types-widened","text":"request property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"assign-time-off-policies","path":"/api/v1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":8837,"column":154},"fingerprint":"c9374523cac0"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"delete-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":8622,"column":5},"fingerprint":"ffea69977663"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":8436,"column":9},"fingerprint":"364a74c12c25"},{"id":"response-property-enum-value-removed","text":"removed the `Active` enum value from the `status` response property for the response status `200` (media type: application/xml)","level":1,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13907,"column":15},"fingerprint":"ab033fc36e67"},{"id":"response-property-enum-value-removed","text":"removed the `Active` enum value from the `status` response property for the response status `200` (media type: application/json)","level":1,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13907,"column":15},"fingerprint":"ab033fc36e67"},{"id":"response-property-enum-value-removed","text":"removed the `Inactive` enum value from the `status` response property for the response status `200` (media type: application/json)","level":1,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13908,"column":15},"fingerprint":"52e9d2fa5443"},{"id":"response-property-enum-value-removed","text":"removed the `Inactive` enum value from the `status` response property for the response status `200` (media type: application/xml)","level":1,"operation":"GET","operationId":"get-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":13908,"column":15},"fingerprint":"52e9d2fa5443"},{"id":"new-optional-request-property","text":"added the new optional request property `address2` (media type: application/json)","level":1,"operation":"POST","operationId":"update-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16972,"column":9},"fingerprint":"a3021c51c01a"},{"id":"new-optional-request-property","text":"added the new optional request property `address2` (media type: text/xml)","level":1,"operation":"POST","operationId":"update-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16972,"column":9},"fingerprint":"a3021c51c01a"},{"id":"new-optional-request-property","text":"added the new optional request property `address2` (media type: application/xml)","level":1,"operation":"POST","operationId":"update-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":16972,"column":9},"fingerprint":"a3021c51c01a"},{"id":"response-media-type-added","text":"added the media type `application/json` for the response with the status `200`","level":1,"operation":"POST","operationId":"update-employee","path":"/api/v1/employees/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":8539,"column":13},"fingerprint":"1a13aeb06ce6"},{"id":"request-property-list-of-types-widened","text":"request property `address/address1` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":45},"fingerprint":"3eb07931bf68"},{"id":"request-property-list-of-types-widened","text":"request property `address/address2` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":83},"fingerprint":"94cb5b32350b"},{"id":"request-property-list-of-types-widened","text":"request property `address/city` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":117},"fingerprint":"9206b6e9bd14"},{"id":"request-property-list-of-types-widened","text":"request property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":230},"fingerprint":"dd52fe37756d"},{"id":"request-property-list-of-types-widened","text":"request property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":154},"fingerprint":"8d8c15386528"},{"id":"request-property-list-of-types-widened","text":"request property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":343},"fingerprint":"9cd26af3ec06"},{"id":"request-property-list-of-types-widened","text":"request property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-location","path":"/api/v1/hris/org/locations","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7457,"column":191},"fingerprint":"07d2891aadfa"},{"id":"request-property-list-of-types-widened","text":"request property `address/address1` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":45},"fingerprint":"23750dda8d79"},{"id":"request-property-list-of-types-widened","text":"request property `address/address2` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":83},"fingerprint":"7dfea91e8043"},{"id":"request-property-list-of-types-widened","text":"request property `address/city` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":117},"fingerprint":"e4d7943fa907"},{"id":"request-property-list-of-types-widened","text":"request property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":230},"fingerprint":"bcc0c6f6c9e8"},{"id":"request-property-list-of-types-widened","text":"request property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":154},"fingerprint":"4b4ed29dca51"},{"id":"request-property-list-of-types-widened","text":"request property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":343},"fingerprint":"13e3532f104a"},{"id":"request-property-list-of-types-widened","text":"request property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-location","path":"/api/v1/hris/org/locations/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":7599,"column":191},"fingerprint":"e27f2d5e3c86"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-bank-holidays","path":"/api/v1/meta/bank-holidays","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11766,"column":5},"fingerprint":"1d4060029303"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-meta-company","path":"/api/v1/meta/company","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11412,"column":5},"fingerprint":"3ce0f5b76da6"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `isoCode`","level":1,"operation":"GET","operationId":"get-countries-options","path":"/api/v1/meta/countries/options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11446,"column":11},"fingerprint":"dbaff1c751c5"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"GET","operationId":"get-countries-options","path":"/api/v1/meta/countries/options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11465,"column":9},"fingerprint":"762c5b2982bb"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"GET","operationId":"get-countries-options","path":"/api/v1/meta/countries/options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11467,"column":9},"fingerprint":"acdcbc65b171"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-meta-country-by-id","path":"/api/v1/meta/countries/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11520,"column":5},"fingerprint":"4dbf468da066"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-currency-conversions","path":"/api/v1/meta/currency-conversions","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11823,"column":5},"fingerprint":"fb654819f700"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-all-currency-types","path":"/api/v1/meta/currency/types","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11389,"column":5},"fingerprint":"dad9ac9620c5"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-industries","path":"/api/v1/meta/industries","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11479,"column":5},"fingerprint":"b3679ad3e6ec"},{"id":"response-optional-property-added","text":"added the optional property `items/id` to the response with the `200` status (media type: application/json)","level":1,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24070,"column":9},"fingerprint":"cbe59857287e"},{"id":"response-optional-property-added","text":"added the optional property `items/options/items/frequency` to the response with the `200` status (media type: application/json)","level":1,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24055,"column":9},"fingerprint":"b76d7dd6ccd8"},{"id":"response-optional-property-added","text":"added the optional property `items/options/items/manageable` to the response with the `200` status (media type: application/json)","level":1,"operation":"GET","operationId":"list-list-fields","path":"/api/v1/meta/lists","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24047,"column":9},"fingerprint":"53bf016c12c6"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `format`","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":14176,"column":11},"fingerprint":"97a69f803cfd"},{"id":"new-optional-request-property","text":"added the new optional request property `option` (media type: text/xml)","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":17120,"column":9},"fingerprint":"b4c4c01bc58e"},{"id":"response-media-type-added","text":"added the media type `application/json` for the response with the status `200`","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":14197,"column":13},"fingerprint":"99b30b228e13"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `405`","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":14209,"column":9},"fingerprint":"5b639d2f9d69"},{"id":"response-optional-property-added","text":"added the optional property `id` to the response with the `200` status","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24070,"column":9},"fingerprint":"8e4e971d4faf"},{"id":"response-optional-property-added","text":"added the optional property `options/items/frequency` to the response with the `200` status","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24055,"column":9},"fingerprint":"bf542af0836f"},{"id":"response-optional-property-added","text":"added the optional property `options/items/manageable` to the response with the `200` status","level":1,"operation":"PUT","operationId":"update-list-field-values","path":"/api/v1/meta/lists/{listFieldId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":24047,"column":9},"fingerprint":"44e5597a3338"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"get-all-provinces","path":"/api/v1/meta/provinces","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11334,"column":5},"fingerprint":"a9032e6239cd"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"10d66d8561dd7dac50ff9c21ef63d83b","path":"/api/v1/meta/timezones/by-zip/{zip}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11707,"column":5},"fingerprint":"28ae83ee39b6"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"baa7162824294d030115568d1d8e6ca7","path":"/api/v1/meta/timezones/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":11656,"column":5},"fingerprint":"ab5adcbcd250"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"f44b802c30cdea2b9076b3f82f99c74d","path":"/api/v1/new-hire-packets","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1936,"column":5},"fingerprint":"4632b66e43b3"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"ec1ba8e76f33960b018d0d7518fe97b5","path":"/api/v1/new-hire-packets","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":1983,"column":5},"fingerprint":"a34f39e8134b"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"caa7fc488bcfaef14125398f2ebb987d","path":"/api/v1/new-hire-packets/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2090,"column":5},"fingerprint":"1f976f39501d"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"696f0a229cdde60b733568e3c4d043d9","path":"/api/v1/new-hire-packets/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2020,"column":5},"fingerprint":"b7915e362671"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"1ab0279d46023eb951a434f24df885f1","path":"/api/v1/new-hire-packets/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2051,"column":5},"fingerprint":"78abadd2a60a"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"19c7e26a1347ae7eb22919e9b0595c19","path":"/api/v1/new-hire-packets/{id}/cancel","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2207,"column":5},"fingerprint":"6bbc4ba6d4b9"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"update-new-hire-packet-gtky-answer-visibility","path":"/api/v1/new-hire-packets/{id}/question-visibility","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2118,"column":5},"fingerprint":"1ce25c08d7d3"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"f49b0f1f2fb1ef2c408ba12916ee9baa","path":"/api/v1/new-hire-packets/{id}/send","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2173,"column":5},"fingerprint":"ba7950370eb6"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"044949386f2d655c6a627ef53f9434b7","path":"/api/v1/onboarding/new-hire-widget","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2241,"column":5},"fingerprint":"d1de6fba488e"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"cdd8659ca89fb38042fd56feab507edf","path":"/api/v1/pay-grades-and-bands/import","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9462,"column":5},"fingerprint":"89ddaec1b1bd"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"2a0b847ceec3a4f9bfe20cf27e10e81a","path":"/api/v1/pay-grades-and-bands/job-titles","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9318,"column":5},"fingerprint":"05f4de756f29"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"432e469fe5959a6ccd765d02018e7db4","path":"/api/v1/pay-grades-and-bands/levels","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9160,"column":5},"fingerprint":"52d8118d665c"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"0da9c9f851462d2e44dfe866b8e67e74","path":"/api/v1/pay-grades-and-bands/levels/{segment}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9517,"column":5},"fingerprint":"da45dac5b133"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PUT","operationId":"ad7871529b2a9c6612f8dd3c62192c08","path":"/api/v1/pay-grades-and-bands/pay-bands","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9234,"column":5},"fingerprint":"43c7359d5322"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"22932a81ba129f22114ccdef397af933","path":"/api/v1/pay-grades-and-bands/publish","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":9423,"column":5},"fingerprint":"e33564950f6f"},{"id":"request-property-list-of-types-widened","text":"request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":5824,"column":19},"fingerprint":"df7cf671ec4e"},{"id":"request-property-list-of-types-widened","text":"request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-goal","path":"/api/v1/performance/employees/{employeeId}/goals","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":5814,"column":19},"fingerprint":"a8d9d277b88c"},{"id":"request-property-list-of-types-widened","text":"request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12559,"column":11},"fingerprint":"c428b3854947"},{"id":"request-property-list-of-types-widened","text":"request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-goal-v1","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":12573,"column":11},"fingerprint":"e62ada79c133"},{"id":"request-property-list-of-types-widened","text":"request property `comment` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"close-goal","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/close","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":6643,"column":19},"fingerprint":"9cb435f23d98"},{"id":"request-property-list-of-types-widened","text":"request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-goal-progress","path":"/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":5991,"column":19},"fingerprint":"62ae06735b71"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-list-schedules","path":"/api/v1/scheduling/schedules","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2494,"column":5},"fingerprint":"aeb86771e6ca"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"scheduling-create-schedule","path":"/api/v1/scheduling/schedules","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2571,"column":5},"fingerprint":"4522fb9f3d54"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"scheduling-delete-schedule","path":"/api/v1/scheduling/schedules/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2663,"column":5},"fingerprint":"207ab3cee2e9"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-get-schedule","path":"/api/v1/scheduling/schedules/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2613,"column":5},"fingerprint":"1c703f1e3c8d"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PATCH","operationId":"scheduling-update-schedule","path":"/api/v1/scheduling/schedules/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2709,"column":5},"fingerprint":"f47a4d03e111"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-get-schedule-pdf","path":"/api/v1/scheduling/schedules/{id}/pdf","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2766,"column":5},"fingerprint":"ccc32b45e77b"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-list-shifts","path":"/api/v1/scheduling/shifts","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":3099,"column":5},"fingerprint":"65a0e44c1f23"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"scheduling-create-shift","path":"/api/v1/scheduling/shifts","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":3221,"column":5},"fingerprint":"45b2fe39a379"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"scheduling-publish-shifts","path":"/api/v1/scheduling/shifts/publish","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":3269,"column":5},"fingerprint":"6f6b2beef42b"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"DELETE","operationId":"scheduling-delete-shift","path":"/api/v1/scheduling/shifts/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2983,"column":5},"fingerprint":"2cd88f3361e8"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-get-shift","path":"/api/v1/scheduling/shifts/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2933,"column":5},"fingerprint":"4b783e7d5ba6"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"PATCH","operationId":"scheduling-update-shift","path":"/api/v1/scheduling/shifts/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":3042,"column":5},"fingerprint":"7bb3a944f234"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"GET","operationId":"scheduling-list-timezones","path":"/api/v1/scheduling/timezones","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":2861,"column":5},"fingerprint":"1e314e94cc20"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14941,"column":11},"fingerprint":"ba72cf413322"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14929,"column":11},"fingerprint":"328226d0eebe"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14923,"column":11},"fingerprint":"61ddd93b639b"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14935,"column":11},"fingerprint":"5a00a8976c9e"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/id` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14900,"column":11},"fingerprint":"9ed09329bc66"},{"id":"request-property-list-of-types-widened","text":"request property `description` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break-policy","path":"/api/v1/time-tracking/break-policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15006,"column":11},"fingerprint":"f5275f81641c"},{"id":"endpoint-added","text":"endpoint added","level":1,"operation":"POST","operationId":"get-break-policy-suggestions","path":"/api/v1/time-tracking/break-policies/suggestions","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4416,"column":5},"fingerprint":"0a05e33cd24b"},{"id":"request-property-list-of-types-widened","text":"request property `description` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PATCH","operationId":"update-break-policy","path":"/api/v1/time-tracking/break-policies/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15507,"column":11},"fingerprint":"384ea06a7c81"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14990,"column":11},"fingerprint":"ebf9a0f73b2b"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14978,"column":11},"fingerprint":"1c310c66a6d4"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14972,"column":11},"fingerprint":"079c74ac7a05"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-break","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14984,"column":11},"fingerprint":"850a36f9650e"},{"id":"request-property-list-of-types-widened","text":"request property `items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14941,"column":11},"fingerprint":"15d98381214c"},{"id":"request-property-list-of-types-widened","text":"request property `items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14929,"column":11},"fingerprint":"d6613ba08604"},{"id":"request-property-list-of-types-widened","text":"request property `items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14923,"column":11},"fingerprint":"2c8abbc78926"},{"id":"request-property-list-of-types-widened","text":"request property `items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14935,"column":11},"fingerprint":"a5f4bcc75b99"},{"id":"request-property-list-of-types-widened","text":"request property `items/id` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"replace-breaks-for-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/breaks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14900,"column":11},"fingerprint":"94cfa7d99d13"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14941,"column":11},"fingerprint":"5d1f728f23b4"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14929,"column":11},"fingerprint":"e257bbfef79f"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14923,"column":11},"fingerprint":"8547142fb050"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14935,"column":11},"fingerprint":"cc3fdd05f4a8"},{"id":"request-property-list-of-types-widened","text":"request property `breaks/items/id` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":14900,"column":11},"fingerprint":"4231c508121a"},{"id":"request-property-list-of-types-widened","text":"request property `description` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"sync-break-policy","path":"/api/v1/time-tracking/break-policies/{id}/sync","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15031,"column":11},"fingerprint":"8bc714ce858b"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15493,"column":11},"fingerprint":"27d117311b9a"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15481,"column":11},"fingerprint":"5ef72852c1b0"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15475,"column":11},"fingerprint":"9e8479477d63"},{"id":"request-property-list-of-types-widened","text":"request property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PATCH","operationId":"update-break","path":"/api/v1/time-tracking/breaks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15487,"column":11},"fingerprint":"e9f19293040e"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `filter`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4474,"column":11},"fingerprint":"2d6fc43a4571"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `page`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4488,"column":11},"fingerprint":"dcc88bbc5d0f"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `pageSize`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4497,"column":11},"fingerprint":"7c65b4108e4f"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `sort`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4481,"column":11},"fingerprint":"ac4287936b57"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4517,"column":9},"fingerprint":"be479d98e741"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4523,"column":9},"fingerprint":"74b1f1afdb1b"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4529,"column":9},"fingerprint":"2bbb777bd6c9"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1557,"column":9},"fingerprint":"9efe6c514c16"},{"id":"response-success-status-added","text":"added the success response with the status `200`","level":1,"operation":"GET","operationId":"list-projects","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4507,"column":9},"fingerprint":"3753aee20cd9"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `400`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4561,"column":9},"fingerprint":"a538253c08f1"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4567,"column":9},"fingerprint":"4bceceeeb33a"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4573,"column":9},"fingerprint":"bfec595a37f3"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `409`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4579,"column":9},"fingerprint":"b88158b78ab5"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4585,"column":9},"fingerprint":"b71c5e13c5b0"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1573,"column":9},"fingerprint":"7a26af82c1bc"},{"id":"response-success-status-added","text":"added the success response with the status `201`","level":1,"operation":"POST","operationId":"create-project","path":"/api/v1/time-tracking/projects","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4555,"column":9},"fingerprint":"4ffb987d4601"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4669,"column":9},"fingerprint":"c905891af894"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4675,"column":9},"fingerprint":"c6cfb5324391"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4681,"column":9},"fingerprint":"d0f975329cb9"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4687,"column":9},"fingerprint":"49f03398408b"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1622,"column":9},"fingerprint":"3865ada49ff4"},{"id":"response-success-status-added","text":"added the success response with the status `204`","level":1,"operation":"DELETE","operationId":"delete-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4667,"column":9},"fingerprint":"845468a8ee8a"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `400`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4727,"column":9},"fingerprint":"43eb97282ba8"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4733,"column":9},"fingerprint":"3e5d6842d76b"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4739,"column":9},"fingerprint":"927e73eb8abb"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4745,"column":9},"fingerprint":"cd7a90309c0b"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `409`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4751,"column":9},"fingerprint":"cc6734948d8a"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4757,"column":9},"fingerprint":"5fbef050e086"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1646,"column":9},"fingerprint":"d531497161b4"},{"id":"response-success-status-added","text":"added the success response with the status `200`","level":1,"operation":"PATCH","operationId":"update-project","path":"/api/v1/time-tracking/projects/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4721,"column":9},"fingerprint":"c98ab837915b"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `page`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4801,"column":11},"fingerprint":"d1ebfcfb5377"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `pageSize`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4810,"column":11},"fingerprint":"03bc2a0c0627"},{"id":"new-optional-request-parameter","text":"added the new optional `query` request parameter `statuses[]`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4786,"column":11},"fingerprint":"9c4b728d9919"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4835,"column":9},"fingerprint":"4dc252fb7d61"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4841,"column":9},"fingerprint":"ed586ebe652c"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4847,"column":9},"fingerprint":"f868c08505c5"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4853,"column":9},"fingerprint":"2955e0262353"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1671,"column":9},"fingerprint":"e74a5fd1c256"},{"id":"response-success-status-added","text":"added the success response with the status `200`","level":1,"operation":"GET","operationId":"list-project-tasks","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4820,"column":9},"fingerprint":"61717385e990"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4893,"column":9},"fingerprint":"44652299ad5e"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4899,"column":9},"fingerprint":"dd23125825ad"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `409`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4905,"column":9},"fingerprint":"f416e552b0a4"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4911,"column":9},"fingerprint":"3eaa49045773"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1695,"column":9},"fingerprint":"1bdd1eba09e5"},{"id":"response-success-status-added","text":"added the success response with the status `201`","level":1,"operation":"POST","operationId":"create-project-task","path":"/api/v1/time-tracking/projects/{projectId}/tasks","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4887,"column":9},"fingerprint":"f048810378a4"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4994,"column":9},"fingerprint":"e49a05318d3c"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5000,"column":9},"fingerprint":"236ee5a05c3a"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5006,"column":9},"fingerprint":"8f23fd6bdc0a"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5012,"column":9},"fingerprint":"1215fe1cf925"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1744,"column":9},"fingerprint":"9760af3458fd"},{"id":"response-success-status-added","text":"added the success response with the status `204`","level":1,"operation":"DELETE","operationId":"delete-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4992,"column":9},"fingerprint":"3e1e06d9d4af"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `401`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4946,"column":9},"fingerprint":"6cbc10f70c13"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4952,"column":9},"fingerprint":"459e989908e7"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4958,"column":9},"fingerprint":"6ddcbe473ca1"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4964,"column":9},"fingerprint":"51e9f4962e8b"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1720,"column":9},"fingerprint":"a5f780d3e247"},{"id":"response-success-status-added","text":"added the success response with the status `200`","level":1,"operation":"GET","operationId":"get-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":4940,"column":9},"fingerprint":"a0b2a85f7bb2"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `403`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5052,"column":9},"fingerprint":"46ee3fe7b604"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `404`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5058,"column":9},"fingerprint":"c5a40443f50e"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `409`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5064,"column":9},"fingerprint":"c18b4e08c48f"},{"id":"response-non-success-status-added","text":"added the non-success response with the status `422`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5070,"column":9},"fingerprint":"97845a181950"},{"id":"response-non-success-status-removed","text":"removed the non-success response with the status `501`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":1768,"column":9},"fingerprint":"baa2694609c2"},{"id":"response-success-status-added","text":"added the success response with the status `200`","level":1,"operation":"PATCH","operationId":"update-task","path":"/api/v1/time-tracking/tasks/{id}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":5046,"column":9},"fingerprint":"cc1f16570958"},{"id":"request-property-list-of-types-widened","text":"request property `entries/items/breakId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-or-update-timesheet-clock-entries","path":"/api/v1/time_tracking/clock_entries/store","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":15584,"column":11},"fingerprint":"0743fa28b8b0"},{"id":"request-property-list-of-types-widened","text":"request property `breakId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11422,"column":11},"fingerprint":"dce2cad9aca1"},{"id":"request-property-list-of-types-widened","text":"request property `date` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11402,"column":11},"fingerprint":"31e9cbcd6ce6"},{"id":"request-property-list-of-types-widened","text":"request property `note` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11396,"column":11},"fingerprint":"89ae6496fd71"},{"id":"request-property-list-of-types-widened","text":"request property `projectId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11384,"column":11},"fingerprint":"90cf9519d987"},{"id":"request-property-list-of-types-widened","text":"request property `start` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11409,"column":11},"fingerprint":"0fc3018a1703"},{"id":"request-property-list-of-types-widened","text":"request property `taskId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11390,"column":11},"fingerprint":"c85f9172be80"},{"id":"request-property-list-of-types-widened","text":"request property `timezone` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11416,"column":11},"fingerprint":"07e14f95a9d7"},{"id":"request-property-pattern-removed","text":"removed the pattern `^([01]?[0-9]|2[0-3]):[0-5][0-9]$` from the request property `start`","level":1,"operation":"POST","operationId":"create-timesheet-clock-in-entry","path":"/api/v1/time_tracking/employees/{employeeId}/clock_in","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11412,"column":11},"fingerprint":"64a546781bbf"},{"id":"request-property-list-of-types-widened","text":"request property `holidayId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11374,"column":11},"fingerprint":"03a6c4d0dfb0"},{"id":"request-property-list-of-types-widened","text":"request property `projectId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11356,"column":11},"fingerprint":"5dabf07ce822"},{"id":"request-property-list-of-types-widened","text":"request property `shiftDifferentialId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11368,"column":11},"fingerprint":"6739c1bb1bd8"},{"id":"request-property-list-of-types-widened","text":"request property `taskId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-time-tracking-record","path":"/api/v1/timetracking/adjust","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11362,"column":11},"fingerprint":"2dd21a3e1e17"},{"id":"request-property-list-of-types-widened","text":"request property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"assign-time-off-policies-v1.1","path":"/api/v1_1/employees/{employeeId}/time_off/policies","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":8937,"column":154},"fingerprint":"45e0016cb210"},{"id":"request-property-list-of-types-widened","text":"request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":6870,"column":19},"fingerprint":"9f729ff07b5d"},{"id":"request-property-list-of-types-widened","text":"request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"PUT","operationId":"update-goal-v1.1","path":"/api/v1_1/performance/employees/{employeeId}/goals/{goalId}","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":6861,"column":19},"fingerprint":"88fae0e42df6"},{"id":"request-property-list-of-types-widened","text":"request property `dependentFields` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-field-options-v1-2","path":"/api/v1_2/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11662,"column":11},"fingerprint":"fdeeec05361b"},{"id":"request-property-list-of-types-widened","text":"request property `filters` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-field-options-v1-2","path":"/api/v1_2/datasets/{datasetName}/field-options","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":11681,"column":11},"fingerprint":"d40cbcbdbc03"},{"id":"request-property-list-of-types-widened","text":"request property `filter` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3214,"column":19},"fingerprint":"bced7b453692"},{"id":"request-property-list-of-types-widened","text":"request property `orderBy` list-of-types was widened by adding types `null` to media type `application/json`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3218,"column":19},"fingerprint":"c0cdf3338d67"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `400`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3254,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6569,"column":13},"fingerprint":"0a2841d14313"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `403`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3262,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6577,"column":13},"fingerprint":"d68a295451c0"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `404`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3268,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6583,"column":13},"fingerprint":"2f053c002f7b"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `413`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3274,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6589,"column":13},"fingerprint":"f63a8789ece2"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `422`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3280,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6595,"column":13},"fingerprint":"ad78090dd38c"},{"id":"response-media-type-name-specialized","text":"media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `500`","level":1,"operation":"POST","operationId":"get-data-from-dataset-v2","path":"/api/v2/datasets/{datasetName}/data","source":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","section":"paths","baseSource":{"file":"specs/public.yaml","line":3286,"column":13},"revisionSource":{"file":"/home/runner/work/bhr-api-php/bhr-api-php/.sdk-update/public.yaml","line":6601,"column":13},"fingerprint":"564d44b4e0af"}] diff --git a/.sdk-update/analysis/changelog.md b/.sdk-update/analysis/changelog.md new file mode 100644 index 00000000..699f4bef --- /dev/null +++ b/.sdk-update/analysis/changelog.md @@ -0,0 +1,1961 @@ +# API Changelog 1.0 vs. 1.0 + + +## API Changes + +### GET /api/v1/alert-configurations +- endpoint added + + +### POST /api/v1/alert-configurations +- endpoint added + + +### GET /api/v1/alert-configurations/{id} +- endpoint added + + +### PUT /api/v1/alert-configurations/{id} +- endpoint added + + +### GET /api/v1/alerts +- endpoint added + + +### POST /api/v1/applicant_tracking/application +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/applications +- :warning: response property `applications/items/applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applications/items/job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applications/items/rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `nextPageUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/applications/{applicationId} +- :warning: response property `applicant/address/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/availableStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/education/institution` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/phoneNumber` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/source` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/twitterUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/websiteUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicationReferences` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `attachmentCount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `attachments` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `coverLetterFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `desiredSalary` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `movedFrom` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `movedTo` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/editedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/editedEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/hasRevisions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/isArchived` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `referredBy` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `resumeFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/address` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/education` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/education/level` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `job/hiringLead` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `job/hiringLead/jobTitle` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `status/changedByUser` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `status/changedByUser/jobTitle` response property `oneOf` list for the response status `200` +- :warning: the `applicant/address` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `applicant/education` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `applicant/education/level` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `job/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `job/hiringLead/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `status/changedByUser` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `status/changedByUser/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- the endpoint scheme security `oauth` was added to the API + + +### POST /api/v1/applicant_tracking/applications/{applicationId}/comments +- the endpoint scheme security `oauth` was added to the API + + +### POST /api/v1/applicant_tracking/applications/{applicationId}/status +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/jobs +- :warning: response property `items/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/hiringLead/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/postingUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `items/department` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `items/hiringLead` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `items/location` response property `oneOf` list for the response status `200` +- :warning: the `items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `items/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/locations +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/statuses +- :warning: response property `items/code` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/benefit/company_benefit +- :warning: response property `companyBenefits/items/allowsCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/allowsSuperCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/benefitVendorId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/companyDeductionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/deductionTypeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/startDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefit/employee_benefit +- :warning: removed `subschema #1, subschema #2, subschema #3` from the `filters` request property `anyOf` list +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyPercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/coverageLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/deductionEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/deductionStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeePercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/payFrequency` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefit/member_benefit +- :warning: response property `members/items/coverages/items/events/items/monthlyPremiumInCents` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `members/items/coverages/items/events/items/premiumTierId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefitcoverages +- :warning: response property `Benefit Coverages/items/benefitPlanId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Benefit Coverages/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefits/member-benefits +- :warning: response property `data/items/plans/items/dateRanges/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefits/settings/deduction_types/all +- :warning: response property `items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/subTypes/items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PATCH /api/v1/company-profile-data/company-information +- :warning: the request property `address/line1` became not nullable +- :warning: the request property `address/line2` became not nullable +- :warning: response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/line1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/line2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/zip` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `displayName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `industryCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `legalName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `phone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `subdomain` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `address/line1` list-of-types was widened by adding types `null` to media type `application/merge-patch+json` +- request property `address/line2` list-of-types was widened by adding types `null` to media type `application/merge-patch+json` + + +### PUT /api/v1/company-profile-data/industry-codes +- :warning: response property `company_industries/items/addedByUserId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `company_industries/items/addedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks +- :warning: response property `jobLocationPairs/items/benchmarks/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/sourceColor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/employees/items/managerName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/employees/items/managerTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/locationDetails/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/department` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/division` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/internalJobPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/locationDetails` response property `oneOf` list for the response status `200` +- :warning: the `jobLocationPairs/items/employees/items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/employees/items/division` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/locationDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/compensation/benchmarks +- :warning: response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/compensation/benchmarks +- :warning: response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks/details +- :warning: response property `benchmarkValues/items/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/lastEdited` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/sourceColorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/compaRatio` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/compaRatioStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/isRemote` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/rangePenetration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/formattedJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/jobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/jobLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/lastReviewed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `companyPayRange` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `employees/items/location` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `employees/items/varianceFromPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `internalJobPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `mercerBenchmarkDetails` response property `oneOf` list for the response status `200` +- :warning: the `companyPayRange` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `employees/items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `employees/items/varianceFromPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `mercerBenchmarkDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/compensation/benchmarks/import +- :warning: response property `columnMap/items/expectedColumnKey` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks/sources +- :warning: response property `items/colorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/equity/settings +- :warning: response property `companyValuation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `disclaimers` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `outstandingShares` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pricePerShare` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `sliderMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `sliderMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `vestingConditions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/compensation/equity/settings +- endpoint added + + +### POST /api/v1/compensation/planning_cycles +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id} +- endpoint added + + +### GET /api/v1/compensation/planning_cycles/{id}/admins +- added the optional property `admins` to the response with the `200` status +- added the optional property `isFullAdmin` to the response with the `200` status + + +### POST /api/v1/compensation/planning_cycles/{id}/admins +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/budgets/breakdown +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/budgets/guidelines +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/budgets/import +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/change_comm/template +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/complete +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/employees +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/employees +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/launch +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/recommendations +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/recommendations/send +- endpoint added + + +### GET /api/v1/compensation/tools +- endpoint added + + +### DELETE /api/v1/compensation/total_rewards/custom_disclaimer +- endpoint added + + +### PUT /api/v1/compensation/total_rewards/custom_disclaimer +- endpoint added + + +### DELETE /api/v1/compensation/total_rewards/employees +- endpoint added + + +### POST /api/v1/compensation/total_rewards/employees +- endpoint added + + +### PUT /api/v1/compensation/total_rewards/onboarding/{stepName} +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId} +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId}/printable +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId}/statement +- endpoint added + + +### GET /api/v1/custom-reports +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/custom-reports/{reportId} +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/datasets/{datasetName} +- :warning: the request property `aggregations/defaultAggregation` became not nullable +- :warning: removed the enum value `avg` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `count` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `max` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `min` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `sum` of the request property `aggregations/defaultAggregation` +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- added the new optional request property `sortBy/items/aggregationType` +- request property `aggregations/defaultAggregation` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/datasets/{datasetName}/field-options +- :warning: the request property `dependentFields` became not nullable +- :warning: the request property `filters` became not nullable +- request property `dependentFields` list-of-types was widened by adding types `null` to media type `application/json` +- request property `filters` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/datasets/{datasetName}/fields +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/employee-verifications/employees/{employeeId} +- endpoint added + + +### PUT /api/v1/employee-verifications/employees/{employeeId}/{verificationId} +- endpoint added + + +### GET /api/v1/employee-verifications/integration +- endpoint added + + +### PUT /api/v1/employee-verifications/integration +- endpoint added + + +### POST /api/v1/employee-verifications/users/{userId}/send-email +- endpoint added + + +### GET /api/v1/employeedependents +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### POST /api/v1/employeedependents +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### GET /api/v1/employeedependents/{id} +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### PUT /api/v1/employeedependents/{id} +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### GET /api/v1/employees +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/status` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/departmentName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/divisionName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/employmentStatusName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/locationName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `meta/page/limit` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `meta/page/nextCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `meta/page/prevCursor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/after` was changed from `integer`/`` to `string`/`` +- :warning: for the `query` request parameter `page`, the type/format of property `allOf[subschema #2]/before` was changed from `integer`/`` to `string`/`` +- the endpoint scheme security `basic` was added to the API +- added the enum value `addressLine1` to the property `items/` of the `query` request parameter `fields` +- added the enum value `addressLine2` to the property `items/` of the `query` request parameter `fields` +- added the enum value `age` to the property `items/` of the `query` request parameter `fields` +- added the enum value `allergies` to the property `items/` of the `query` request parameter `fields` +- added the enum value `birthplace` to the property `items/` of the `query` request parameter `fields` +- added the enum value `citizenship` to the property `items/` of the `query` request parameter `fields` +- added the enum value `citizenshipId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `city` to the property `items/` of the `query` request parameter `fields` +- added the enum value `compensationChangeReason` to the property `items/` of the `query` request parameter `fields` +- added the enum value `compensationChangeReasonId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `compensationComment` to the property `items/` of the `query` request parameter `fields` +- added the enum value `compensationEffectiveDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `compensationEndDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `contractEndDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `country` to the property `items/` of the `query` request parameter `fields` +- added the enum value `countryId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `dietaryRestrictions` to the property `items/` of the `query` request parameter `fields` +- added the enum value `displayName` to the property `items/` of the `query` request parameter `fields` +- added the enum value `eeoJobCategory` to the property `items/` of the `query` request parameter `fields` +- added the enum value `eeoJobCategoryId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `ein` to the property `items/` of the `query` request parameter `fields` +- added the enum value `eligibleForRehire` to the property `items/` of the `query` request parameter `fields` +- added the enum value `eligibleForRehireId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employeeName` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employeeNumber` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employmentStatusComment` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employmentStatusEffectiveDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employmentType` to the property `items/` of the `query` request parameter `fields` +- added the enum value `employmentTypeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `ethnicity` to the property `items/` of the `query` request parameter `fields` +- added the enum value `ethnicityId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `finalDoseAdministrationDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `finalPayDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `firstNameLastName` to the property `items/` of the `query` request parameter `fields` +- added the enum value `firstNameMiddleInitial` to the property `items/` of the `query` request parameter `fields` +- added the enum value `flsaCode` to the property `items/` of the `query` request parameter `fields` +- added the enum value `flsaCodeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `gender` to the property `items/` of the `query` request parameter `fields` +- added the enum value `genderIdentity` to the property `items/` of the `query` request parameter `fields` +- added the enum value `genderIdentityId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `hoursPerPayCycle` to the property `items/` of the `query` request parameter `fields` +- added the enum value `isManager` to the property `items/` of the `query` request parameter `fields` +- added the enum value `jacketSize` to the property `items/` of the `query` request parameter `fields` +- added the enum value `jacketSizeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `jobInformationEffectiveDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `maritalStatus` to the property `items/` of the `query` request parameter `fields` +- added the enum value `middleInitial` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nationalId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nationalInsuranceCategory` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nationalInsuranceCategoryId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nationality` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nationalityId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nickName` to the property `items/` of the `query` request parameter `fields` +- added the enum value `nin` to the property `items/` of the `query` request parameter `fields` +- added the enum value `noticePeriod` to the property `items/` of the `query` request parameter `fields` +- added the enum value `noticePeriodId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `originalHireDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `overtime` to the property `items/` of the `query` request parameter `fields` +- added the enum value `overtimeRate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `paidPer` to the property `items/` of the `query` request parameter `fields` +- added the enum value `payRate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `paySchedule` to the property `items/` of the `query` request parameter `fields` +- added the enum value `payScheduleId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `payType` to the property `items/` of the `query` request parameter `fields` +- added the enum value `preferredNameLastName` to the property `items/` of the `query` request parameter `fields` +- added the enum value `probationEndDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `pronouns` to the property `items/` of the `query` request parameter `fields` +- added the enum value `pronounsId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `proofOfVaccination` to the property `items/` of the `query` request parameter `fields` +- added the enum value `secondaryLanguage` to the property `items/` of the `query` request parameter `fields` +- added the enum value `shirtSize` to the property `items/` of the `query` request parameter `fields` +- added the enum value `shirtSizeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `sin` to the property `items/` of the `query` request parameter `fields` +- added the enum value `ssn` to the property `items/` of the `query` request parameter `fields` +- added the enum value `state` to the property `items/` of the `query` request parameter `fields` +- added the enum value `stateId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `tShirtSize` to the property `items/` of the `query` request parameter `fields` +- added the enum value `tShirtSizeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `taxTypeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `teams` to the property `items/` of the `query` request parameter `fields` +- added the enum value `tenure` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationDate` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationReason` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationReasonId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationRegrettable` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationRegrettableId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationType` to the property `items/` of the `query` request parameter `fields` +- added the enum value `terminationTypeId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `userId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `vaccinationStatus` to the property `items/` of the `query` request parameter `fields` +- added the enum value `vaccinationStatusId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `vaccineReceived` to the property `items/` of the `query` request parameter `fields` +- added the enum value `vaccineReceivedId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `veteranStatus` to the property `items/` of the `query` request parameter `fields` +- added the enum value `veteranStatusId` to the property `items/` of the `query` request parameter `fields` +- added the enum value `zipcode` to the property `items/` of the `query` request parameter `fields` +- added the optional property `data/items/allOf[subschema #2]/addressLine1` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/addressLine2` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/age` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/allergies` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/birthplace` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/citizenship` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/citizenshipId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/city` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/compensationChangeReason` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/compensationChangeReasonId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/compensationComment` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/compensationEffectiveDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/compensationEndDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/contractEndDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/country` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/countryId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/dietaryRestrictions` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/displayName` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/eeoJobCategory` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/eeoJobCategoryId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/ein` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/eligibleForRehire` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/eligibleForRehireId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employeeName` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employeeNumber` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employmentStatusComment` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employmentStatusEffectiveDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employmentType` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/employmentTypeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/ethnicity` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/ethnicityId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/finalDoseAdministrationDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/finalPayDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/firstNameLastName` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/firstNameMiddleInitial` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/flsaCode` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/flsaCodeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/gender` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/genderIdentity` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/genderIdentityId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/hoursPerPayCycle` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/isManager` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/jacketSize` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/jacketSizeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/jobInformationEffectiveDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/maritalStatus` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/middleInitial` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nationalId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nationalInsuranceCategory` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nationalInsuranceCategoryId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nationality` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nationalityId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nickName` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/nin` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/noticePeriod` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/noticePeriodId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/originalHireDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/overtime` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/overtimeRate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/paidPer` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/payRate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/paySchedule` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/payScheduleId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/payType` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/preferredNameLastName` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/probationEndDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/pronouns` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/pronounsId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/proofOfVaccination` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/secondaryLanguage` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/shirtSize` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/shirtSizeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/sin` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/ssn` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/state` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/stateId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/tShirtSize` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/tShirtSizeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/taxTypeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/teams` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/tenure` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationDate` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationReason` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationReasonId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationRegrettable` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationRegrettableId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationType` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/terminationTypeId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/userId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/vaccinationStatus` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/vaccinationStatusId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/vaccineReceived` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/vaccineReceivedId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/veteranStatus` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/veteranStatusId` to the response with the `200` status +- added the optional property `data/items/allOf[subschema #2]/zipcode` to the response with the `200` status + + +### POST /api/v1/employees +- added the media type `application/json` for the response with the status `201` + + +### GET /api/v1/employees/directory +- added the non-success response with the status `401` + + +### GET /api/v1/employees/{employeeId}/onboarding-experiences +- endpoint added + + +### POST /api/v1/employees/{employeeId}/onboarding-experiences +- endpoint added + + +### GET /api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId} +- endpoint added + + +### POST /api/v1/employees/{employeeId}/photo +- added the media type `application/json` to the request body +- added the non-success response with the status `402` + + +### GET /api/v1/employees/{employeeId}/photo/{size} +- :warning: removed the media type `image/jpeg` for the response with the status `200` +- added the media type `application/json` for the response with the status `200` +- added the media type `image/*` for the response with the status `200` + + +### PUT /api/v1/employees/{employeeId}/time_off/policies +- :warning: the request property `items/accrualStartDate` became not nullable +- request property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### DELETE /api/v1/employees/{id} +- endpoint added + + +### GET /api/v1/employees/{id} +- :warning: for the `query` request parameter `fields`, default value `firstName,lastName` was removed +- :warning: response property `address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address1` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `bestEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `birthDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `canUploadPhoto` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `city` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `country` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `department` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `department` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `departmentId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `division` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `division` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `divisionId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employmentStatus` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employmentStatusId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `exempt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `exempt` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `facebookUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `firstName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `gender` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `gender` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `hireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `hireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `homeEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `homePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `instagramUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobTitleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `lastName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `linkedinUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `location` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `locationId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `marital` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `marital` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `middleName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mobilePhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `originalHireDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `payPeriod` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `payRate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `payRate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `payType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `payType` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `photoUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pinterestUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `preferredName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `reportsToId` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `reportsToName` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `skypeUsername` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `state` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `status` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `twitterUrl` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `workEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `workEmail` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `workPhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `workPhone` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- :warning: response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `workPhoneExtension` list-of-types was widened by adding types `null` to media type `application/xml` of response `200` +- added the non-success response with the status `401` +- removed the `Active` enum value from the `status` response property for the response status `200` (media type: application/xml) +- removed the `Active` enum value from the `status` response property for the response status `200` (media type: application/json) +- removed the `Inactive` enum value from the `status` response property for the response status `200` (media type: application/xml) +- removed the `Inactive` enum value from the `status` response property for the response status `200` (media type: application/json) + + +### POST /api/v1/employees/{id} +- added the new optional request property `address2` (media type: text/xml) +- added the new optional request property `address2` (media type: application/xml) +- added the new optional request property `address2` (media type: application/json) +- added the media type `application/json` for the response with the status `200` + + +### GET /api/v1/hris/org/locations +- :warning: response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/hris/org/locations +- :warning: the request property `address/address1` became not nullable +- :warning: the request property `address/address2` became not nullable +- :warning: the request property `address/city` became not nullable +- :warning: the request property `address/countryId` became not nullable +- :warning: the request property `address/stateId` became not nullable +- :warning: the request property `address/timezone` became not nullable +- :warning: the request property `address/zipcode` became not nullable +- :warning: response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- request property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/city` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/hris/org/locations/{id} +- :warning: response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/hris/org/locations/{id} +- :warning: the request property `address/address1` became not nullable +- :warning: the request property `address/address2` became not nullable +- :warning: the request property `address/city` became not nullable +- :warning: the request property `address/countryId` became not nullable +- :warning: the request property `address/stateId` became not nullable +- :warning: the request property `address/timezone` became not nullable +- :warning: the request property `address/zipcode` became not nullable +- :warning: response property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `archivedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `address/address1` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/address2` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/city` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/countryId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/stateId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/timezone` list-of-types was widened by adding types `null` to media type `application/json` +- request property `address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/login +- :warning: response property `employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/meta/bank-holidays +- endpoint added + + +### GET /api/v1/meta/company +- endpoint added + + +### GET /api/v1/meta/countries/options +- :warning: added `#/components/schemas/CountriesResponseSchema, #/components/schemas/CountrySchema` to the response body `oneOf` list for the response status `200` +- :warning: the response's body type/format changed from `array`/`` to ``/`` for status `200` +- added the new optional `query` request parameter `isoCode` +- added the non-success response with the status `404` +- added the non-success response with the status `422` + + +### GET /api/v1/meta/countries/{id} +- endpoint added + + +### GET /api/v1/meta/currency-conversions +- endpoint added + + +### GET /api/v1/meta/currency/types +- endpoint added + + +### GET /api/v1/meta/industries +- endpoint added + + +### GET /api/v1/meta/lists +- :warning: response property `items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/options/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/options/items/createdDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: the `items/fieldId` response's property type/format changed from `string`/`` to `integer`/`` for status `200` (media type: application/json) +- :warning: added the new `no` enum value to the `items/manageable` response property for the response status `200` (media type: application/json) +- :warning: added the new `no` enum value to the `items/multiple` response property for the response status `200` (media type: application/json) +- :warning: added the new `no` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json) +- :warning: added the new `yes` enum value to the `items/manageable` response property for the response status `200` (media type: application/json) +- :warning: added the new `yes` enum value to the `items/multiple` response property for the response status `200` (media type: application/json) +- :warning: added the new `yes` enum value to the `items/options/items/archived` response property for the response status `200` (media type: application/json) +- added the optional property `items/id` to the response with the `200` status (media type: application/json) +- added the optional property `items/options/items/frequency` to the response with the `200` status (media type: application/json) +- added the optional property `items/options/items/manageable` to the response with the `200` status (media type: application/json) + + +### PUT /api/v1/meta/lists/{listFieldId} +- :warning: the request's body type/format changed from `string`/`` to `object`/`` (media type: text/xml) +- :warning: response property `alias` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` +- :warning: response property `options/items/archivedDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` +- :warning: response property `options/items/createdDate` list-of-types was widened by adding types `null` to media type `text/xml` of response `200` +- :warning: added the new `no` enum value to the `manageable` response property for the response status `200` +- :warning: added the new `no` enum value to the `multiple` response property for the response status `200` +- :warning: added the new `no` enum value to the `options/items/archived` response property for the response status `200` +- :warning: added the new `yes` enum value to the `manageable` response property for the response status `200` +- :warning: added the new `yes` enum value to the `multiple` response property for the response status `200` +- :warning: added the new `yes` enum value to the `options/items/archived` response property for the response status `200` +- added the new optional `query` request parameter `format` +- added the new optional request property `option` (media type: text/xml) +- added the media type `application/json` for the response with the status `200` +- added the non-success response with the status `405` +- added the optional property `id` to the response with the `200` status +- added the optional property `options/items/frequency` to the response with the `200` status +- added the optional property `options/items/manageable` to the response with the `200` status + + +### GET /api/v1/meta/provinces +- endpoint added + + +### GET /api/v1/meta/time_off/policies +- :warning: response property `items/effectiveDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/meta/time_off/types +- :warning: response property `timeOffTypes/items/color` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `timeOffTypes/items/icon` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/meta/timezones +- :warning: response property `allOf[#/components/schemas/PagedResponse]/_links` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/meta/timezones/by-zip/{zip} +- endpoint added + + +### GET /api/v1/meta/timezones/{id} +- endpoint added + + +### GET /api/v1/new-hire-packets +- endpoint added + + +### POST /api/v1/new-hire-packets +- endpoint added + + +### DELETE /api/v1/new-hire-packets/{id} +- endpoint added + + +### GET /api/v1/new-hire-packets/{id} +- endpoint added + + +### PUT /api/v1/new-hire-packets/{id} +- endpoint added + + +### POST /api/v1/new-hire-packets/{id}/cancel +- endpoint added + + +### PUT /api/v1/new-hire-packets/{id}/question-visibility +- endpoint added + + +### POST /api/v1/new-hire-packets/{id}/send +- endpoint added + + +### GET /api/v1/onboarding/new-hire-widget +- endpoint added + + +### GET /api/v1/pay-grades-and-bands +- :warning: response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/pay-grades-and-bands/import +- endpoint added + + +### GET /api/v1/pay-grades-and-bands/job-titles +- :warning: response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/pay-grades-and-bands/job-titles +- endpoint added + + +### GET /api/v1/pay-grades-and-bands/job-titles-with-employees +- :warning: response property `items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/pay-grades-and-bands/levels +- :warning: response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/pay-grades-and-bands/levels +- endpoint added + + +### DELETE /api/v1/pay-grades-and-bands/levels/{segment} +- endpoint added + + +### GET /api/v1/pay-grades-and-bands/pay-bands +- :warning: response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/pay-grades-and-bands/pay-bands +- endpoint added + + +### POST /api/v1/pay-grades-and-bands/publish +- endpoint added + + +### GET /api/v1/pay-grades-and-bands/review +- :warning: response property `groups/items/groupName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/levelName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `groups/items/levels/items/payBand/levelId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/performance/employees/{employeeId}/goals +- :warning: response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` +- :warning: the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/performance/employees/{employeeId}/goals +- :warning: the request property `alignsWithOptionId` became not nullable +- :warning: the request property `completionDate` became not nullable +- :warning: the request property `milestones` became not nullable +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` +- request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/performance/employees/{employeeId}/goals/aggregate +- :warning: response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` +- :warning: the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### GET /api/v1/performance/employees/{employeeId}/goals/shareOptions +- :warning: response property `persons/items/employeeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `persons/items/userId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} +- :warning: the request property `alignsWithOptionId` became not nullable +- :warning: the request property `completionDate` became not nullable +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close +- :warning: the request property `comment` became not nullable +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` +- request property `comment` list-of-types was widened by adding types `null` to media type `application/json` + + +### PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress +- :warning: the request property `completionDate` became not nullable +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `201` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + + +### PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### GET /api/v1/scheduling/schedules +- endpoint added + + +### POST /api/v1/scheduling/schedules +- endpoint added + + +### DELETE /api/v1/scheduling/schedules/{id} +- endpoint added + + +### GET /api/v1/scheduling/schedules/{id} +- endpoint added + + +### PATCH /api/v1/scheduling/schedules/{id} +- endpoint added + + +### GET /api/v1/scheduling/schedules/{id}/pdf +- endpoint added + + +### GET /api/v1/scheduling/shifts +- endpoint added + + +### POST /api/v1/scheduling/shifts +- endpoint added + + +### POST /api/v1/scheduling/shifts/publish +- endpoint added + + +### DELETE /api/v1/scheduling/shifts/{id} +- endpoint added + + +### GET /api/v1/scheduling/shifts/{id} +- endpoint added + + +### PATCH /api/v1/scheduling/shifts/{id} +- endpoint added + + +### GET /api/v1/scheduling/timezones +- endpoint added + + +### GET /api/v1/time-tracking/break-assessments +- :warning: response property `allOf[subschema #2]/data/items/availableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/durationDifference` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/expectedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/recordedDuration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/unavailableYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/violations/items/amount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/violations/items/employeeTimesheetClockEntryId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### GET /api/v1/time-tracking/break-policies +- :warning: response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/time-tracking/break-policies +- :warning: the request property `breaks/items/availabilityEndTime` became not nullable +- :warning: the request property `breaks/items/availabilityMaxHoursWorked` became not nullable +- :warning: the request property `breaks/items/availabilityMinHoursWorked` became not nullable +- :warning: the request property `breaks/items/availabilityStartTime` became not nullable +- :warning: the request property `breaks/items/id` became not nullable +- :warning: the request property `description` became not nullable +- :warning: response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- request property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/id` list-of-types was widened by adding types `null` to media type `application/json` +- request property `description` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/time-tracking/break-policies/suggestions +- endpoint added + + +### GET /api/v1/time-tracking/break-policies/{id} +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PATCH /api/v1/time-tracking/break-policies/{id} +- :warning: the request property `description` became not nullable +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `description` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/time-tracking/break-policies/{id}/breaks +- :warning: response property `allOf[subschema #2]/data/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/time-tracking/break-policies/{id}/breaks +- :warning: the request property `availabilityEndTime` became not nullable +- :warning: the request property `availabilityMaxHoursWorked` became not nullable +- :warning: the request property `availabilityMinHoursWorked` became not nullable +- :warning: the request property `availabilityStartTime` became not nullable +- :warning: response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- request property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` + + +### PUT /api/v1/time-tracking/break-policies/{id}/breaks +- :warning: the request property `items/availabilityEndTime` became not nullable +- :warning: the request property `items/availabilityMaxHoursWorked` became not nullable +- :warning: the request property `items/availabilityMinHoursWorked` became not nullable +- :warning: the request property `items/availabilityStartTime` became not nullable +- :warning: the request property `items/id` became not nullable +- :warning: response property `items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `items/id` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/time-tracking/break-policies/{id}/employees +- :warning: response property `allOf[subschema #2]/data/items/name` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### PUT /api/v1/time-tracking/break-policies/{id}/sync +- :warning: the request property `breaks/items/availabilityEndTime` became not nullable +- :warning: the request property `breaks/items/availabilityMaxHoursWorked` became not nullable +- :warning: the request property `breaks/items/availabilityMinHoursWorked` became not nullable +- :warning: the request property `breaks/items/availabilityStartTime` became not nullable +- :warning: the request property `breaks/items/id` became not nullable +- :warning: the request property `description` became not nullable +- :warning: response property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `breaks/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `breaks/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `breaks/items/availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `breaks/items/id` list-of-types was widened by adding types `null` to media type `application/json` +- request property `description` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/time-tracking/breaks/{id} +- :warning: response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PATCH /api/v1/time-tracking/breaks/{id} +- :warning: the request property `availabilityEndTime` became not nullable +- :warning: the request property `availabilityMaxHoursWorked` became not nullable +- :warning: the request property `availabilityMinHoursWorked` became not nullable +- :warning: the request property `availabilityStartTime` became not nullable +- :warning: response property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `availabilityEndTime` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityMaxHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityMinHoursWorked` list-of-types was widened by adding types `null` to media type `application/json` +- request property `availabilityStartTime` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/time-tracking/employees/{id}/break-availabilities +- :warning: response property `items/availableAfterMinutesWorked` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/availableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/availableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/unavailableAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/unavailableIn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/time-tracking/employees/{id}/break-policies +- :warning: response property `allOf[subschema #2]/data/items/deletedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `allOf[subschema #2]/data/items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response property `oneOf` list for the response status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/next` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `allOf[#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1]/_links/prev` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### GET /api/v1/time-tracking/projects +- added the new optional `query` request parameter `filter` +- added the new optional `query` request parameter `page` +- added the new optional `query` request parameter `pageSize` +- added the new optional `query` request parameter `sort` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `200` + + +### POST /api/v1/time-tracking/projects +- :warning: added required request body +- added the non-success response with the status `400` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `409` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `201` + + +### DELETE /api/v1/time-tracking/projects/{id} +- :warning: for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `204` + + +### GET /api/v1/time-tracking/projects/{id} +- :warning: api removed without deprecation + + +### PATCH /api/v1/time-tracking/projects/{id} +- :warning: added required request body +- :warning: for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` +- added the non-success response with the status `400` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `409` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `200` + + +### GET /api/v1/time-tracking/projects/{projectId}/tasks +- :warning: for the `path` request parameter `projectId`, the type/format was changed from `string`/`` to `integer`/`` +- added the new optional `query` request parameter `page` +- added the new optional `query` request parameter `pageSize` +- added the new optional `query` request parameter `statuses[]` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `200` + + +### POST /api/v1/time-tracking/projects/{projectId}/tasks +- :warning: added required request body +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `409` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `201` + + +### DELETE /api/v1/time-tracking/tasks/{id} +- :warning: for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `204` + + +### GET /api/v1/time-tracking/tasks/{id} +- :warning: for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` +- added the non-success response with the status `401` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `200` + + +### PATCH /api/v1/time-tracking/tasks/{id} +- :warning: added required request body +- :warning: for the `path` request parameter `id`, the type/format was changed from `string`/`` to `integer`/`` +- added the non-success response with the status `403` +- added the non-success response with the status `404` +- added the non-success response with the status `409` +- added the non-success response with the status `422` +- removed the non-success response with the status `501` +- added the success response with the status `200` + + +### PUT /api/v1/time_off/requests/{requestId}/status +- :warning: removed the media type `application/json` for the response with the status `200` + + +### POST /api/v1/time_tracking/clock_entries/store +- :warning: the request property `entries/items/breakId` became not nullable +- :warning: response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201` +- :warning: added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201` +- :warning: the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201` +- :warning: the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201` +- request property `entries/items/breakId` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/time_tracking/employees/{employeeId}/clock_in +- :warning: the request property `breakId` became not nullable +- :warning: the request property `date` became not nullable +- :warning: the request property `note` became not nullable +- :warning: the request property `projectId` became not nullable +- :warning: the request property `start` became not nullable +- :warning: the request property `taskId` became not nullable +- :warning: the request property `timezone` became not nullable +- :warning: response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` +- :warning: the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- request property `breakId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `date` list-of-types was widened by adding types `null` to media type `application/json` +- request property `note` list-of-types was widened by adding types `null` to media type `application/json` +- request property `projectId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `start` list-of-types was widened by adding types `null` to media type `application/json` +- request property `taskId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `timezone` list-of-types was widened by adding types `null` to media type `application/json` +- removed the pattern `^([01]?[0-9]|2[0-3]):[0-5][0-9]$` from the request property `start` + + +### POST /api/v1/time_tracking/employees/{employeeId}/clock_out +- :warning: response property `end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `breakInfo` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` +- :warning: the `breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/time_tracking/hour_entries/store +- :warning: response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: added `subschema #1, subschema #2` to the `items/breakInfo` response property `oneOf` list for the response status `201` +- :warning: added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `201` +- :warning: the `items/breakInfo` response's property type/format changed from `object, null`/`` to ``/`` for status `201` +- :warning: the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `201` + + +### GET /api/v1/time_tracking/timesheet_entries +- :warning: response property `items/approvedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/end` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/note` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/start` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/timezone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/updatedAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response property `oneOf` list for the response status `200` +- :warning: the `items/projectInfo/oneOf[#/components/schemas/ProjectInfoApiTransformer]/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### PUT /api/v1/timetracking/adjust +- :warning: the request property `holidayId` became not nullable +- :warning: the request property `projectId` became not nullable +- :warning: the request property `shiftDifferentialId` became not nullable +- :warning: the request property `taskId` became not nullable +- request property `holidayId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `projectId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `shiftDifferentialId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `taskId` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/timetracking/record +- :warning: response property `response/message` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + + +### GET /api/v1/timetracking/record/{id} +- :warning: response property `departmentId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `divisionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `holidayId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobData` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobTitleId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `payCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `projectId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `shiftDifferentialId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `taskId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `project` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `project/task` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `shiftDifferential` response property `oneOf` list for the response status `200` +- :warning: the `project` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `project/task` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `shiftDifferential` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### GET /api/v1/training/record/employee/{employeeId} +- :warning: response property `oneOf[subschema #1]/additionalProperties/cost` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `oneOf[subschema #1]/additionalProperties/credits` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `oneOf[subschema #1]/additionalProperties/hours` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `oneOf[subschema #1]/additionalProperties/instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `oneOf[subschema #1]/additionalProperties/notes` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/training/record/employee/{employeeId} +- :warning: response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + + +### PUT /api/v1/training/record/{employeeTrainingRecordId} +- :warning: response property `cost` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `credits` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `hours` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `instructor` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `notes` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + + +### GET /api/v1/training/type +- :warning: response property `additionalProperties/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `additionalProperties/linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `additionalProperties/required` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/training/type +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `201` +- :warning: response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + + +### PUT /api/v1/training/type/{trainingTypeId} +- :warning: response property `description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `linkUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `required` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/webhooks +- :warning: response property `webhooks/items/lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/webhooks +- :warning: response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `201` + + +### GET /api/v1/webhooks/monitor_fields +- :warning: response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/webhooks/post-fields +- :warning: response property `fields/items/alias` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `fields/items/tableId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `fields/items/type` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/webhooks/{id} +- :warning: response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/webhooks/{id} +- :warning: response property `lastSent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1_1/employees/{employeeId}/time_off/policies +- :warning: response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1_1/employees/{employeeId}/time_off/policies +- :warning: the request property `items/accrualStartDate` became not nullable +- :warning: response property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `items/accrualStartDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate +- :warning: response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` +- :warning: the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} +- :warning: the request property `alignsWithOptionId` became not nullable +- :warning: the request property `completionDate` became not nullable +- :warning: response property `goal/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goal/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goal/actions` response property `oneOf` list for the response status `200` +- :warning: the `goal/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- request property `alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` +- request property `completionDate` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1_2/datasets/{datasetName}/field-options +- :warning: the request property `dependentFields` became not nullable +- :warning: the request property `filters` became not nullable +- request property `dependentFields` list-of-types was widened by adding types `null` to media type `application/json` +- request property `filters` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1_2/datasets/{datasetName}/fields +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate +- :warning: response property `goals/items/alignsWithOptionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/completionDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/lastChangedDateTime` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `goals/items/milestones` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `goals/items/actions` response property `oneOf` list for the response status `200` +- :warning: the `goals/items/actions` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v2/datasets/{datasetName}/data +- :warning: the request property `filter` became not nullable +- :warning: the request property `orderBy` became not nullable +- :warning: response property `data/items/fields/additionalProperties/` list-of-types was widened by adding types `number, boolean, array, object and null` to media type `application/json` of response `200` +- :warning: response property `links/next` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `links/prev` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `filter` list-of-types was widened by adding types `null` to media type `application/json` +- request property `orderBy` list-of-types was widened by adding types `null` to media type `application/json` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `400` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `403` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `404` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `413` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `422` +- media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `500` + + + + + + diff --git a/.sdk-update/classification.txt b/.sdk-update/classification.txt new file mode 100644 index 00000000..9b400a9d --- /dev/null +++ b/.sdk-update/classification.txt @@ -0,0 +1,2 @@ +major +Reason: Breaking changes detected. 863 ERR-level change(s): api-removed-without-deprecation, request-body-added-required, request-body-type-changed, request-parameter-default-value-removed, request-parameter-type-changed, request-property-any-of-removed, request-property-became-not-nullable, request-property-enum-value-removed, response-body-one-of-added, response-body-type-changed, response-media-type-removed, response-property-list-of-types-widened, response-property-one-of-added, response-property-type-changed. diff --git a/.sdk-update/metadata.json b/.sdk-update/metadata.json new file mode 100644 index 00000000..f69183ee --- /dev/null +++ b/.sdk-update/metadata.json @@ -0,0 +1,5 @@ +{ + "source_commit": "9a3900af040817251293f457c1cfecaf6e6def77", + "generated_at": "2026-06-01T22:40:00Z", + "url": "https://d40bgjb2zs35x.cloudfront.net/main/latest/docs/openapi/public-openapi.yaml" +} diff --git a/.sdk-update/pr-body.md b/.sdk-update/pr-body.md new file mode 100644 index 00000000..07d74679 --- /dev/null +++ b/.sdk-update/pr-body.md @@ -0,0 +1,653 @@ +## Spec source + +- **Source commit:** [`9a3900af0408`](https://github.com/BambooHR/main/commit/9a3900af040817251293f457c1cfecaf6e6def77) +- **Generated at:** `2026-06-01T22:40:00Z` +- **Spec URL:** https://d40bgjb2zs35x.cloudfront.net/main/latest/docs/openapi/public-openapi.yaml + +## Semver classification + +**Bump level:** `major` + +**Reason:** Breaking changes detected. 863 ERR-level change(s): api-removed-without-deprecation, request-body-added-required, request-body-type-changed, request-parameter-default-value-removed, request-parameter-type-changed, request-property-any-of-removed, request-property-became-not-nullable, request-property-enum-value-removed, response-body-one-of-added, response-body-type-changed, response-media-type-removed, response-property-list-of-types-widened, response-property-one-of-added, response-property-type-changed. + +
+API changelog (from oasdiff) + +# API Changelog 1.0 vs. 1.0 + + +## API Changes + +### GET /api/v1/alert-configurations +- endpoint added + + +### POST /api/v1/alert-configurations +- endpoint added + + +### GET /api/v1/alert-configurations/{id} +- endpoint added + + +### PUT /api/v1/alert-configurations/{id} +- endpoint added + + +### GET /api/v1/alerts +- endpoint added + + +### POST /api/v1/applicant_tracking/application +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/applications +- :warning: response property `applications/items/applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applications/items/job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applications/items/rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `nextPageUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/applications/{applicationId} +- :warning: response property `applicant/address/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/address/zipcode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/availableStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/education/institution` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/linkedinUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/phoneNumber` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/source` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/twitterUsername` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicant/websiteUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `applicationReferences` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `attachmentCount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `attachments` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `coverLetterFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `desiredSalary` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/hiringLead/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `job/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `movedFrom` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `movedTo` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/archivedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/editedDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/editedEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/hasRevisions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `questionsAndAnswers/items/isArchived` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `rating` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `referredBy` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `resumeFileId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/jobTitle/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `status/changedByUser/jobTitle/label` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/address` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/education` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `applicant/education/level` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `job/hiringLead` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `job/hiringLead/jobTitle` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `status/changedByUser` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `status/changedByUser/jobTitle` response property `oneOf` list for the response status `200` +- :warning: the `applicant/address` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `applicant/education` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `applicant/education/level` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `job/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `job/hiringLead/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `status/changedByUser` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `status/changedByUser/jobTitle` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- the endpoint scheme security `oauth` was added to the API + + +### POST /api/v1/applicant_tracking/applications/{applicationId}/comments +- the endpoint scheme security `oauth` was added to the API + + +### POST /api/v1/applicant_tracking/applications/{applicationId}/status +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/jobs +- :warning: response property `items/hiringLead/avatar` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/hiringLead/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/postingUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/title/id` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `items/department` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `items/hiringLead` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `items/location` response property `oneOf` list for the response status `200` +- :warning: the `items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `items/hiringLead` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/locations +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/applicant_tracking/statuses +- :warning: response property `items/code` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- the endpoint scheme security `oauth` was added to the API + + +### GET /api/v1/benefit/company_benefit +- :warning: response property `companyBenefits/items/allowsCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/allowsSuperCatchUp` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/benefitVendorId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/companyDeductionId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/deductionTypeId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyBenefits/items/startDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefit/employee_benefit +- :warning: removed `subschema #1, subschema #2, subschema #3` from the `filters` request property `anyOf` list +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/companyPercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/coverageLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/deductionEndDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/deductionStartDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeAnnualMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmount` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeeCapAmountType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/employeeBenefit/items/employeePercentBasedOn` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employeeBenefits/items/payFrequency` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefit/member_benefit +- :warning: response property `members/items/coverages/items/events/items/monthlyPremiumInCents` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `members/items/coverages/items/events/items/premiumTierId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefitcoverages +- :warning: response property `Benefit Coverages/items/benefitPlanId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Benefit Coverages/items/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefits/member-benefits +- :warning: response property `data/items/plans/items/dateRanges/items/endDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/benefits/settings/deduction_types/all +- :warning: response property `items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `items/subTypes/items/managedDeductionType` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PATCH /api/v1/company-profile-data/company-information +- :warning: the request property `address/line1` became not nullable +- :warning: the request property `address/line2` became not nullable +- :warning: response property `address/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/line1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/line2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `address/zip` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `displayName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `industryCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `legalName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `phone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `subdomain` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `terminationDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- request property `address/line1` list-of-types was widened by adding types `null` to media type `application/merge-patch+json` +- request property `address/line2` list-of-types was widened by adding types `null` to media type `application/merge-patch+json` + + +### PUT /api/v1/company-profile-data/industry-codes +- :warning: response property `company_industries/items/addedByUserId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `company_industries/items/addedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks +- :warning: response property `jobLocationPairs/items/benchmarks/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/sourceColor` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/benchmarks/items/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/employees/items/managerName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/employees/items/managerTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/internalJobPayBand/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `jobLocationPairs/items/locationDetails/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/department` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/employees/items/division` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/internalJobPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `jobLocationPairs/items/locationDetails` response property `oneOf` list for the response status `200` +- :warning: the `jobLocationPairs/items/employees/items/department` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/employees/items/division` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `jobLocationPairs/items/locationDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/compensation/benchmarks +- :warning: response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/compensation/benchmarks +- :warning: response property `savedBenchmark/benchmarkMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkSource` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/benchmarkValue` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/currencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCompanySize` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalCountry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalIndustry` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalJobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/externalSecondaryLocation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/jobLocationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/mercerJobCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `savedBenchmark/sourceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks/details +- :warning: response property `benchmarkValues/items/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/jobTitle` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/lastEdited` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/sourceColorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/sourceDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `benchmarkValues/items/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `companyPayRange/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/compaRatio` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/compaRatioStatus` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/isRemote` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `employees/items/rangePenetration` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `internalJobPayBand/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `location` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `locationId` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/companiesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/createdYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/dataYear` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/employeesSurveyed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/formattedJobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/jobDescription` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/jobLevel` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/lastReviewed` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/updatedYmdt` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/description` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalCurrencyCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMedian` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `mercerBenchmarkDetails/values/originalMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: added `subschema #1, subschema #2` to the `companyPayRange` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `employees/items/location` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `employees/items/varianceFromPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `internalJobPayBand` response property `oneOf` list for the response status `200` +- :warning: added `subschema #1, subschema #2` to the `mercerBenchmarkDetails` response property `oneOf` list for the response status `200` +- :warning: the `companyPayRange` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `employees/items/location` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `employees/items/varianceFromPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `internalJobPayBand` response's property type/format changed from `object, null`/`` to ``/`` for status `200` +- :warning: the `mercerBenchmarkDetails` response's property type/format changed from `object, null`/`` to ``/`` for status `200` + + +### POST /api/v1/compensation/benchmarks/import +- :warning: response property `columnMap/items/expectedColumnKey` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/benchmarks/sources +- :warning: response property `items/colorCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/compensation/equity/settings +- :warning: response property `companyValuation` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `disclaimers` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `outstandingShares` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pricePerShare` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `sliderMax` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `sliderMin` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `vestingConditions` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### PUT /api/v1/compensation/equity/settings +- endpoint added + + +### POST /api/v1/compensation/planning_cycles +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id} +- endpoint added + + +### GET /api/v1/compensation/planning_cycles/{id}/admins +- added the optional property `admins` to the response with the `200` status +- added the optional property `isFullAdmin` to the response with the `200` status + + +### POST /api/v1/compensation/planning_cycles/{id}/admins +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/budgets/breakdown +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/budgets/guidelines +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/budgets/import +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/change_comm/template +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/complete +- endpoint added + + +### DELETE /api/v1/compensation/planning_cycles/{id}/employees +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/employees +- endpoint added + + +### PUT /api/v1/compensation/planning_cycles/{id}/launch +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/recommendations +- endpoint added + + +### POST /api/v1/compensation/planning_cycles/{id}/recommendations/send +- endpoint added + + +### GET /api/v1/compensation/tools +- endpoint added + + +### DELETE /api/v1/compensation/total_rewards/custom_disclaimer +- endpoint added + + +### PUT /api/v1/compensation/total_rewards/custom_disclaimer +- endpoint added + + +### DELETE /api/v1/compensation/total_rewards/employees +- endpoint added + + +### POST /api/v1/compensation/total_rewards/employees +- endpoint added + + +### PUT /api/v1/compensation/total_rewards/onboarding/{stepName} +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId} +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId}/printable +- endpoint added + + +### GET /api/v1/compensation/total_rewards/{employeeId}/statement +- endpoint added + + +### GET /api/v1/custom-reports +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/custom-reports/{reportId} +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### POST /api/v1/datasets/{datasetName} +- :warning: the request property `aggregations/defaultAggregation` became not nullable +- :warning: removed the enum value `avg` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `count` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `max` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `min` of the request property `aggregations/defaultAggregation` +- :warning: removed the enum value `sum` of the request property `aggregations/defaultAggregation` +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- added the new optional request property `sortBy/items/aggregationType` +- request property `aggregations/defaultAggregation` list-of-types was widened by adding types `null` to media type `application/json` + + +### POST /api/v1/datasets/{datasetName}/field-options +- :warning: the request property `dependentFields` became not nullable +- :warning: the request property `filters` became not nullable +- request property `dependentFields` list-of-types was widened by adding types `null` to media type `application/json` +- request property `filters` list-of-types was widened by adding types `null` to media type `application/json` + + +### GET /api/v1/datasets/{datasetName}/fields +- :warning: response property `pagination/next_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `pagination/prev_page` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + + +### GET /api/v1/employee-verifications/employees/{employeeId} +- endpoint added + + +### PUT /api/v1/employee-verifications/employees/{employeeId}/{verificationId} +- endpoint added + + +### GET /api/v1/employee-verifications/integration +- endpoint added + + +### PUT /api/v1/employee-verifications/integration +- endpoint added + + +### POST /api/v1/employee-verifications/users/{userId}/send-email +- endpoint added + + +### GET /api/v1/employeedependents +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### POST /api/v1/employeedependents +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### GET /api/v1/employeedependents/{id} +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### PUT /api/v1/employeedependents/{id} +- :warning: response property `Employee Dependents/items/addressLine1` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/addressLine2` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/city` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/country` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/homePhone` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isStudent` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/isUsCitizen` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSIN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/maskedSSN` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/middleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/state` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `Employee Dependents/items/zipCode` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- removed the `no` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `no` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isStudent` response property for the response status `200` +- removed the `yes` enum value from the `Employee Dependents/items/isUsCitizen` response property for the response status `200` + + +### GET /api/v1/employees +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/firstName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/jobTitleName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/lastName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/photoUrl` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/preferredName` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[#/components/schemas/GetEmployeesEmployeeBaseResponse]/status` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/bestEmail` list-of-types was widened by adding types `null` to media type `application/json` of response `200` +- :warning: response property `data/items/allOf[subschema #2]/birthDate` list-of-types was widened by adding types `null` to media type `application/json` of response `200` + +_…changelog truncated to fit GitHub's PR body size limit. Full changelog available as `.sdk-update/analysis/changelog.md` in the workflow run: https://github.com/BambooHR/bhr-api-php/actions/runs/26786891938_ +
+ +
+Changes since last review + +```diff +.openapi-generator/FILES | 32 +- + .sdk-update/analysis/breaking-output.txt | 2 +- + .sdk-update/analysis/changelog.json | 2 +- + .sdk-update/analysis/changelog.md | 6 +- + .sdk-update/metadata.json | 5 - + .sdk-update/pr-body.md | 643 --------------------- + .sdk-update/since-last-review.txt | 8 - + Makefile | 3 +- + README.md | 16 +- + docs/Api/CompensationPlanningApi.md | 16 +- + docs/Api/OnboardingApi.md | 4 +- + ...=> _1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md} | 4 +- + ...3a0206b8e2fb2d2dRequestBudgetBreakdownInner.md} | 2 +- + ...d64402ee192568adbd5e3179a91e6e2RequestInner.md} | 4 +- + ...d5e3179a91e6e2RequestInnerBudgetAllocations.md} | 2 +- + ...=> _288aa996aba16d7a495c62321ea999a9Request.md} | 4 +- + ...aba16d7a495c62321ea999a9RequestSentDateTime.md} | 2 +- + ...=> _3958585c861325ea7a2cd30a8c74f042Request.md} | 2 +- + ...=> _89a5068111ec499135c7d6e9a53d5a30Request.md} | 2 +- + lib/Api/CompensationPlanningApi.php | 30 +- + lib/Api/OnboardingApi.php | 10 +- + ...> _1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php} | 6 +- + ...a0206b8e2fb2d2dRequestBudgetBreakdownInner.php} | 6 +- + ...64402ee192568adbd5e3179a91e6e2RequestInner.php} | 6 +- + ...5e3179a91e6e2RequestInnerBudgetAllocations.php} | 6 +- + ...> _288aa996aba16d7a495c62321ea999a9Request.php} | 6 +- + ...ba16d7a495c62321ea999a9RequestSentDateTime.php} | 6 +- + ...> _3958585c861325ea7a2cd30a8c74f042Request.php} | 6 +- + ...> _89a5068111ec499135c7d6e9a53d5a30Request.php} | 6 +- + scripts/fix_invalid_class_names.php | 269 +++++++++ + specs/spec-source.json | 4 +- + 31 files changed, 367 insertions(+), 753 deletions(-) +``` +
+ +--- +_This PR was opened automatically by the `sdk-update` workflow._ +_Trigger: `workflow_dispatch`._ diff --git a/.sdk-update/public.yaml b/.sdk-update/public.yaml new file mode 100644 index 00000000..8cc8f45a --- /dev/null +++ b/.sdk-update/public.yaml @@ -0,0 +1,24796 @@ +openapi: 3.1.0 +info: + title: 'BambooHR API' + description: 'BambooHR API documentation. https://www.bamboohr.com/api/documentation/' + version: '1.0' +servers: + - + url: 'https://{companyDomain}.bamboohr.com' + variables: + companyDomain: + default: companySubDomain + description: 'Company domain' +paths: + /api/v1/alert-configurations: + get: + tags: + - 'Alert Configurations' + - 'Public API' + summary: 'List alert configurations' + description: 'Returns all company alert configurations for the authenticated company.' + operationId: 6d0a073cbf3e97fe0409de42c68fe779 + responses: + '200': + description: 'List of alert configurations' + content: + application/json: + schema: + title: AlertConfigurationListResponse + type: array + items: + $ref: '#/components/schemas/CompanyAlertDataObject' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - alerts + post: + tags: + - 'Alert Configurations' + - 'Public API' + summary: 'Create an alert configuration' + description: 'Creates a new company alert configuration.' + operationId: a05e93bc2eb9c39a40fbd71e6e07f3c6 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' + '400': + description: 'Bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - alerts.write + '/api/v1/alert-configurations/{id}': + get: + tags: + - 'Alert Configurations' + - 'Public API' + summary: 'Get an alert configuration' + description: 'Returns a single company alert configuration by ID.' + operationId: 14e66bfb5f075043221ce1e843c97493 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: 'Alert configuration' + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - alerts + put: + tags: + - 'Alert Configurations' + - 'Public API' + summary: 'Update an alert configuration' + description: 'Updates an existing company alert configuration.' + operationId: eb42aa2fa339ba5c08b147fc13c6a79e + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' + responses: + '200': + description: Updated + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' + '400': + description: 'Bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - alerts.write + /api/v1/alerts: + get: + tags: + - Alert + - 'Public API' + summary: 'List alert templates' + description: 'Returns all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations.' + operationId: 0f0dcb585e5883175b6557c16cf6755a + responses: + '200': + description: 'List of alert templates' + content: + application/json: + schema: + title: AlertTemplateListResponse + properties: + alerts: { type: array, items: { properties: { id: { description: 'Alert template ID (bambooAlertId)', type: integer }, name: { description: 'Display name of the alert', type: string }, groupName: { description: 'Category group the alert belongs to', type: string } }, type: object } } + type: object + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - alerts + /api/v1/compensation/equity/settings: + get: + tags: + - Compensation + - 'Public API' + summary: 'Get company equity settings' + description: 'Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration.' + operationId: db49fb29f9f04d59afad7c01ce860418 + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationEquitySettingsResponse + properties: + calculationType: { type: string } + companyValuation: { oneOf: [{ type: number }, { type: 'null' }] } + outstandingShares: { oneOf: [{ type: integer }, { type: 'null' }] } + pricePerShare: { oneOf: [{ type: number }, { type: 'null' }] } + currencyCode: { type: string } + sliderMin: { oneOf: [{ type: integer }, { type: 'null' }] } + sliderMax: { oneOf: [{ type: integer }, { type: 'null' }] } + vestingConditions: { oneOf: [{ type: string }, { type: 'null' }] } + disclaimers: { oneOf: [{ type: string }, { type: 'null' }] } + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - equity + put: + tags: + - Compensation + - 'Public API' + summary: 'Update company equity settings' + description: 'Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration.' + operationId: c5880b509783cd9d7fce9ddf5d6af1be + requestBody: + required: true + content: + application/json: + schema: + title: CompensationEquitySettingsUpdateRequest + properties: + calculationType: + type: string + companyValuation: + oneOf: [{ type: number }, { type: 'null' }] + outstandingShares: + oneOf: [{ type: integer }, { type: 'null' }] + pricePerShare: + oneOf: [{ type: number }, { type: 'null' }] + currencyCode: + type: string + sliderMin: + oneOf: [{ type: integer }, { type: 'null' }] + sliderMax: + oneOf: [{ type: integer }, { type: 'null' }] + vestingConditions: + oneOf: [{ type: string }, { type: 'null' }] + disclaimers: + oneOf: [{ type: string }, { type: 'null' }] + type: object + additionalProperties: true + responses: + '200': + description: 'Settings updated successfully' + content: + application/json: + schema: + title: CompensationEquitySettingsResponse + properties: + calculationType: { type: string } + companyValuation: { oneOf: [{ type: number }, { type: 'null' }] } + outstandingShares: { oneOf: [{ type: integer }, { type: 'null' }] } + pricePerShare: { oneOf: [{ type: number }, { type: 'null' }] } + currencyCode: { type: string } + sliderMin: { oneOf: [{ type: integer }, { type: 'null' }] } + sliderMax: { oneOf: [{ type: integer }, { type: 'null' }] } + vestingConditions: { oneOf: [{ type: string }, { type: 'null' }] } + disclaimers: { oneOf: [{ type: string }, { type: 'null' }] } + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - equity.write + /api/v1/compensation/planning_cycles: + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'List compensation planning cycles' + description: 'List all compensation planning cycles for the company, including status and employee counts.' + operationId: b65f246186b41a9783a9397c11c703b4 + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCyclesListResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Create compensation planning cycle' + description: 'Create a new compensation planning cycle with default settings.' + operationId: e2ac4e1535f296cb8901f209e04caa83 + responses: + '201': + description: 'Cycle created successfully' + content: + application/json: + schema: + title: CompensationPlanningCycleCreateResponse + type: object + additionalProperties: true + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning cycle details' + description: 'Get compensation planning cycle details and currency settings for a cycle.' + operationId: 5c2b55158b0950b1e9211655666645b6 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleDetailsResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Update compensation planning cycle' + description: 'Update compensation planning cycle details and currency settings.' + operationId: 100b0cf8c5207b35697ff10370fd5fe1 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Cycle details and currency settings to update' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DetailsAndCurrencyRequestDataObject' + responses: + '200': + description: 'Cycle updated successfully' + content: + application/json: + schema: + title: CompensationPlanningCycleUpdateResponse + type: object + additionalProperties: true + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + delete: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Delete compensation planning cycle' + description: 'Delete a compensation planning cycle.' + operationId: 22ad75be25455279e2987c80851af5fc + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '204': + description: 'Cycle deleted successfully' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/summary': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning cycle summary' + description: 'Get compensation planning cycle summary (progress, stats).' + operationId: 9bc279d788f6e86b4cd8b2e0d3de91b1 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleSummaryResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/employees': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'List employees in compensation planning cycle' + description: 'List employees in the compensation planning cycle (picker data: company roster and membership).' + operationId: a6b8da1348a3151fe95adc03aaf64447 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleEmployeesResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Add employees to cycle' + description: 'Add employees to a compensation planning cycle.' + operationId: 3958585c861325ea7a2cd30a8c74f042 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Employee IDs to add' + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to add to the cycle' + type: array + items: { type: string } + type: object + responses: + '204': + description: 'Employees added successfully' + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + delete: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Remove employees from cycle' + description: 'Remove employees from a compensation planning cycle.' + operationId: 89a5068111ec499135c7d6e9a53d5a30 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Employee IDs to remove' + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to remove from the cycle' + type: array + items: { type: string } + type: object + responses: + '204': + description: 'Employees removed successfully' + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning cycle budgets' + description: 'Get budget guidelines and breakdown for the compensation planning cycle.' + operationId: 7efceaee2c010f88244dd01ee81e6e7b + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleBudgetsResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/approvals': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning approval flows' + description: 'Get approval flows for the compensation planning cycle (grouped by department by default).' + operationId: 4e886b18264480611f380805301c49c4 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: groupBy + in: query + description: 'Optional grouping for flows (e.g. department)' + required: false + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleApprovalsResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '404': + description: 'Cycle not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/admins': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'List compensation planning cycle admins' + description: 'List compensation planning cycle admins.' + operationId: b3c51254de6918637a971fe4af382a53 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleAdminsResponse + properties: + admins: { description: 'List of admins for the cycle', type: array, items: { properties: { employeeId: { description: 'ID of the employee associated with this admin. Null if user has no associated employee.', oneOf: [{ type: string }, { type: 'null' }] }, displayName: { description: 'Display name of the admin', type: string }, firstName: { description: 'First name of the admin', type: string }, lastName: { description: 'Last name of the admin', type: string }, jobTitle: { description: 'Job title of the admin', type: string }, photoUrl: { description: 'URL to the admin profile photo', type: string }, adminType: { description: 'Type of admin', type: string, enum: [FULL_ACCOUNT_ADMIN, CYCLE_ADMIN] }, isRemovable: { description: 'Whether this admin can be removed from the cycle', type: boolean }, addedAt: { description: 'ISO 8601 timestamp when the admin was added. Null for full account admins.', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, addedByEmployeeId: { description: 'ID of the employee who added this admin. Null for full account admins or if user has no associated employee.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } + isFullAdmin: { description: 'Whether the requesting user is a full compensation plan admin', type: boolean } + type: object + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Add cycle admins' + description: 'Add one or more cycle admins by employee IDs.' + operationId: c7c32ed5278ac67e2e518bf7484a75dc + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to add as cycle admins' + type: array + items: { type: string } + notifyAdmins: + description: 'Whether to send email notifications to new admins' + type: boolean + type: object + responses: + '200': + description: 'Result of adding cycle admins' + content: + application/json: + schema: + title: AddCycleAdminsResponse + properties: + added: { type: array, items: { properties: { employeeId: { type: string }, displayName: { type: string } }, type: object } } + skipped: { type: array, items: { properties: { employeeId: { type: string }, reason: { type: string, enum: [ALREADY_ADMIN, EMPLOYEE_NOT_FOUND, FULL_ACCOUNT_ADMIN] } }, type: object } } + type: object + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/change_comm': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get change communication letter details' + description: 'Get change communication letter details for the compensation planning cycle.' + operationId: d6987e300672a00c7cfe59afebb64156 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleChangeCommResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/worksheet': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning cycle worksheet' + description: 'Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user.' + operationId: 329acecaa6df729733d0752aa9f6b204 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: type + in: query + description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' + required: false + schema: + type: string + enum: + - recommendations + - approvals + - overview + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationPlanningCycleWorksheetResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/worksheet/export': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Export compensation planning cycle worksheet to CSV' + description: 'Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view.' + operationId: 593d5bff120edf2a218a92022a682728 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: type + in: query + description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' + required: false + schema: + type: string + enum: + - recommendations + - approvals + - overview + responses: + '200': + description: 'CSV file download' + content: + text/csv: + schema: + title: CompensationPlanningCycleWorksheetCsvExport + type: string + format: binary + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Worksheet not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/launch': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Launch compensation planning cycle' + description: 'Launch a compensation planning cycle. Validates all cycle data and sets status to Live.' + operationId: 3a19f07aa737dc826ba43b9a1c1cd257 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '204': + description: 'Cycle launched successfully' + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Cycle is not ready to launch' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/complete': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Complete compensation planning cycle' + description: 'Complete a compensation planning cycle and finalize employee compensation records.' + operationId: f4b431363af6573af46750f32632e88b + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: 'Cycle completed successfully' + content: + application/json: + schema: + title: CompensationPlanningCycleCompleteResponse + properties: + cycleId: { type: integer } + updatedEmployeesCount: { type: integer } + cycleClosedEmailError: { description: 'Present when cycle completed successfully but sending closed-cycle emails failed', oneOf: [{ type: string }, { type: 'null' }] } + errors: { type: array, items: { properties: { employeeId: { type: string }, message: { type: string } }, type: object } } + type: object + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Cycle cannot be completed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Employees with pay rate errors' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/guidelines': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Save budget guidelines' + description: 'Save budget guidelines for a compensation planning cycle.' + operationId: dacd313af2106213fc4696175941ce65 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Budget guideline settings' + required: true + content: + application/json: + schema: + properties: + useGuidelines: + type: boolean + softMin: + type: number + softMax: + type: number + type: object + responses: + '200': + description: 'Guidelines saved successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/BudgetGuidelinesView' + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/breakdown': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Save budget breakdown' + description: 'Save budget breakdown for a compensation planning cycle.' + operationId: 1d64402ee192568adbd5e3179a91e6e2 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Budget breakdown data' + required: true + content: + application/json: + schema: + type: array + items: + properties: + id: { type: string } + employeeId: { type: string } + budgetAllocations: { properties: { salaryIncrease: { type: number }, bonuses: { type: number }, equity: { type: number } }, type: object } + type: object + responses: + '204': + description: 'Budget breakdown saved successfully' + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/import': + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Import budget breakdown' + description: 'Import budget breakdown from structured data and apply to allocations.' + operationId: 1d1fc0f164cb51973a0206b8e2fb2d2d + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + description: 'Budget breakdown import data' + required: true + content: + application/json: + schema: + required: + - budgetBreakdown + properties: + budgetBreakdown: + type: array + items: { properties: { employeeName: { type: string }, emailAddress: { type: string }, salaryBudget: { oneOf: [{ type: number }, { type: 'null' }] }, bonusBudget: { oneOf: [{ type: number }, { type: 'null' }] }, equityBudget: { oneOf: [{ type: number }, { type: 'null' }] } }, type: object } + type: object + responses: + '200': + description: 'Budget breakdown imported successfully' + content: + application/json: + schema: + title: BudgetBreakdownImportResponse + properties: + message: { type: string } + type: object + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/{templateId}': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Update approval flow' + description: 'Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template.' + operationId: cf87b8e09a001b6fb81dfce6c20ab9e3 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: templateId + in: path + required: true + schema: + type: string + - + name: groupBy + in: query + description: 'Optional grouping for returned flows (e.g. department)' + required: false + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - assignees + - flowData + properties: + assignees: + description: 'Array of assignee employee IDs' + type: array + items: { type: string } + flowData: + description: 'Flow data for the approval' + type: object + additionalProperties: true + type: object + responses: + '200': + description: 'Updated approval flows for the cycle' + content: + application/json: + schema: + title: UpdateApprovalFlowResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId}': + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Set final approver' + description: 'Set or update the final approver for all approval flows in a cycle.' + operationId: 5c4aab35a34f5760ec044104b5232bf5 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: employeeId + in: path + required: true + schema: + type: string + - + name: groupBy + in: query + description: 'Optional grouping for returned flows (e.g. department)' + required: false + schema: + type: string + responses: + '200': + description: 'Updated approval flows for the cycle' + content: + application/json: + schema: + title: SetFinalApproverResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId}': + delete: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Remove from approval flow' + description: 'Remove an employee from all approval chains for a specific cycle.' + operationId: b1e467e0eef72350eec61fcfeaf4e19d + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: employeeId + in: path + required: true + schema: + type: string + - + name: groupBy + in: query + description: 'Optional grouping for returned flows (e.g. department)' + required: false + schema: + type: string + responses: + '200': + description: 'Updated approval flows after removal' + content: + application/json: + schema: + title: RemoveFromApprovalFlowResponse + type: object + additionalProperties: true + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/recommendations': + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Save recommendations' + description: 'Save compensation recommendations for an employee in a cycle.' + operationId: f3883a522dadbe9e11b34f8b656e3adb + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeId + - assigneeEmployeeId + - approvalStage + properties: + employeeId: + description: 'The ID of the employee receiving the recommendation' + type: string + assigneeEmployeeId: + description: 'The ID of the employee making the recommendation' + type: string + approvalFlowId: + description: 'The ID of the approval flow' + type: integer + approvalStage: + description: 'The approval stage' + type: integer + enum: [0, 1, 2, 3, 4, 5, 999] + recSalaryIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + recBonusIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + recEquityIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + type: object + responses: + '200': + description: 'Saved recommendation' + content: + application/json: + schema: + title: SaveRecommendationResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '409': + description: Conflict + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/recommendations/send': + post: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Send recommendations to next stage' + description: 'Send recommendations to the next approval stage for a specific approval flow template.' + operationId: a05b6d5f564f805d688ff2c1e37c3990 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - templateId + - assigneeEmployeeId + - approvalStage + properties: + templateId: + description: 'The ID of the template' + type: string + assigneeEmployeeId: + description: 'The ID of the assignee employee' + type: string + approvalStage: + description: 'The current approval stage' + type: integer + type: object + responses: + '200': + description: 'Recommendations sent successfully' + content: + application/json: + schema: + title: SendRecommendationsResponse + properties: + message: { type: string } + type: object + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '409': + description: Conflict + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/admins/{employeeId}': + delete: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Remove cycle admin' + description: 'Remove a cycle admin by employee ID. Full account admins cannot be removed.' + operationId: ef7619b0ee4c8dc079aaea870cfbe81b + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: employeeId + in: path + required: true + schema: + type: string + responses: + '200': + description: 'Admin removed - current user removed themselves' + content: + application/json: + schema: + title: RemoveCycleAdminSelfResponse + properties: + selfRemoved: { type: boolean } + type: object + '204': + description: 'Cycle admin successfully removed' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/change_comm/template': + put: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Save change comm template' + description: 'Save the change communication email template for a compensation planning cycle.' + operationId: c79f9c5950f983e59d2626faa30c00a1 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - messageText + - subjectText + properties: + messageText: + description: 'The email body template text' + type: string + subjectText: + description: 'The email subject template text' + type: string + type: object + responses: + '200': + description: 'Template saved successfully' + content: + application/json: + schema: + title: SaveChangeCommTemplateResponse + properties: + message: { type: string } + type: object + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles.write + /api/v1/compensation/tools: + get: + tags: + - Compensation + - 'Public API' + summary: 'List available compensation tools' + description: 'Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable.' + operationId: 9f398e2652ea47a6dc5121ce5184222a + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationToolsResponse + properties: + success: { type: boolean } + tools: { $ref: '#/components/schemas/CompensationToolsDataObject' } + upsell: { $ref: '#/components/schemas/CompensationUpsellData' } + type: object + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - compensation_tools + '/api/v1/employee-verifications/employees/{employeeId}': + get: + tags: + - EmployeeVerification + - 'Public API' + summary: 'List employee verification records for an employee' + description: 'Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves.' + operationId: list-employee-verifications-by-employee + parameters: + - + name: employeeId + in: path + description: 'Company employee id whose verification history is returned.' + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + title: EmployeeVerificationsListResponse + required: + - employeeVerifications + properties: + employeeVerifications: { description: 'Verification records for the employee, newest first.', type: array, items: { $ref: '#/components/schemas/EmployeeVerificationPublicApiRecord' } } + type: object + additionalProperties: true + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - employee_verifications + '/api/v1/employee-verifications/users/{userId}/send-email': + post: + tags: + - EmployeeVerification + - 'Public API' + summary: 'Send employee verification lifecycle email by user and email type' + description: 'Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`.' + operationId: send-employee-verification-lifecycle-email-by-user + parameters: + - + name: userId + in: path + description: 'Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send.' + required: true + schema: + type: integer + format: int64 + requestBody: + required: true + content: + application/json: + schema: + required: + - emailType + properties: + emailType: + description: 'Which employee verification lifecycle email to send; must be {@see EverifyEmailType::SIGNUP_SURVEY} or {@see EverifyEmailType::APP_INSTALLED} (string values `signup_survey`, `app_installed`).' + type: string + enum: [signup_survey, app_installed] + type: object + responses: + '202': + description: 'Request accepted; email has been queued for delivery.' + content: + application/json: + schema: + title: EmployeeVerificationLifecycleEmailAcceptedResponse + required: + - status + properties: + status: { type: string, example: accepted } + message: { type: string, example: 'Employee verification email has been queued for delivery.' } + type: object + additionalProperties: true + '400': + description: 'Bad request (invalid body, unknown user id, or integration disabled)' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - employee_verifications.write + '/api/v1/employee-verifications/employees/{employeeId}/{verificationId}': + put: + tags: + - EmployeeVerification + - 'Public API' + summary: 'Update an employee verification record' + description: 'Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee.' + operationId: update-employee-verification + parameters: + - + name: employeeId + in: path + description: 'Company employee id that owns the verification row.' + required: true + schema: + type: integer + format: int64 + - + name: verificationId + in: path + description: 'Identifier of the verification record to update.' + required: true + schema: + type: integer + format: int64 + requestBody: + description: 'Fields to update on the verification record. At least one field must be supplied.' + required: true + content: + application/json: + schema: + properties: + verificationType: + oneOf: [{ type: string, enum: [in-person, hybrid, remote] }, { type: 'null' }] + verificationStatus: + oneOf: [{ type: string, enum: [pending, inprogress-section-1, inprogress-section-2, completed, failed] }, { type: 'null' }] + verificationStatusNotes: + oneOf: [{ type: string }, { type: 'null' }] + remoteAccessUrl: + oneOf: [{ type: string }, { type: 'null' }] + eVerifyStatus: + oneOf: [{ type: string, enum: [pending, inprogress, completed, failed] }, { type: 'null' }] + type: object + responses: + '200': + description: 'Success — returns the updated verification record.' + content: + application/json: + schema: + title: EmployeeVerificationUpdateResponse + required: + - employeeVerification + properties: + employeeVerification: { $ref: '#/components/schemas/EmployeeVerificationPublicApiRecord' } + type: object + '400': + description: 'Invalid request body (unknown enum value or no updatable fields supplied).' + '403': + description: Forbidden + '404': + description: 'Verification id not found for the supplied employee.' + '500': + description: 'Internal server error' + security: + - + oauth: + - employee_verifications.write + /api/v1/employee-verifications/integration: + get: + tags: + - EmployeeVerification + - 'Public API' + summary: 'Get employee verification integration status' + description: "Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner." + operationId: get-employee-verification-integration + responses: + '200': + description: Success + content: + application/json: + schema: + title: EmployeeVerificationIntegrationResponse + required: + - integration + properties: + integration: { $ref: '#/components/schemas/EmployeeVerificationIntegration' } + type: object + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - employee_verifications + put: + tags: + - EmployeeVerification + - 'Public API' + summary: 'Enable or disable the employee verification integration' + description: "Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers." + operationId: update-employee-verification-integration + requestBody: + required: true + content: + application/json: + schema: + required: + - enabled + properties: + enabled: + description: 'Desired enabled state for the integration.' + type: boolean + type: object + responses: + '200': + description: Success + content: + application/json: + schema: + title: EmployeeVerificationIntegrationResponse + required: + - integration + properties: + integration: { $ref: '#/components/schemas/EmployeeVerificationIntegration' } + type: object + '400': + description: 'Invalid request body or partner configuration prevented the change.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - employee_verifications.write + /api/v1/new-hire-packets: + get: + tags: + - Onboarding + - 'Public API' + summary: 'List new hire packets' + description: 'Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients).' + operationId: f44b802c30cdea2b9076b3f82f99c74d + parameters: + - + name: page + in: query + required: false + schema: + type: integer + minimum: 1 + - + name: pageSize + in: query + required: false + schema: + type: integer + maximum: 100 + minimum: 1 + responses: + '200': + description: Success + content: + application/json: + schema: + title: NewHirePacketsListResponse + properties: + newHirePackets: { description: 'Packet summaries for the current page.', type: array, items: { $ref: '#/components/schemas/NewHirePacketPublicApi' } } + page: { description: 'Current page number (1-based).', type: integer } + pageSize: { description: 'Page size used for this response.', type: integer } + totalCount: { description: 'Total packet rows matching visibility (across all pages).', type: integer } + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding + post: + tags: + - Onboarding + - 'Public API' + summary: 'Create new hire packet' + description: 'Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags.' + operationId: ec1ba8e76f33960b018d0d7518fe97b5 + requestBody: + required: true + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/NewHirePacketPublicApiWritableBody' + - + required: [employeeId] + properties: { employeeId: { description: 'Employee to attach the new packet to.', type: integer } } + type: object + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}': + get: + tags: + - Onboarding + - 'Public API' + summary: 'Get new hire packet by id' + description: 'Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included.' + operationId: 696f0a229cdde60b733568e3c4d043d9 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApi' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding + put: + tags: + - Onboarding + - 'Public API' + summary: 'Update new hire packet' + description: 'Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint.' + operationId: 1ab0279d46023eb951a434f24df885f1 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApiWritableBody' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + delete: + tags: + - Onboarding + - 'Public API' + summary: 'Delete new hire packet' + description: 'Deletes a new hire packet instance by primary key.' + operationId: caa7fc488bcfaef14125398f2ebb987d + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '204': + description: 'No content' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/question-visibility': + put: + tags: + - Onboarding + - 'Public API' + summary: 'Update GTKY answer visibility for a new hire packet' + description: 'Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked.' + operationId: update-new-hire-packet-gtky-answer-visibility + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + title: NewHirePacketGtkyAnswerVisibilityRequest + required: + - hidden + properties: + hidden: + description: 'When true, answers are hidden from typical manager views; when false, answers are shown.' + type: boolean + questionIds: + description: 'Optional. When omitted or null, hidden applies to every GTKY answer row for the packet. When a non-empty array of employee personal question ids, only those questions (must belong to this packet) are updated.' + oneOf: [{ type: array, items: { type: integer, format: int64 } }, { type: 'null' }] + type: object + responses: + '200': + description: 'Success — returns the current visibility for each GTKY answer row on the packet.' + content: + application/json: + schema: + title: NewHirePacketGtkyAnswerVisibilityResponse + required: + - gtkys + properties: + gtkys: { description: 'GTKY personal-question answer rows with visibility flags.', type: array, items: { title: NewHirePacketGtkyAnswerVisibilityItem, required: [responseId, questionId, hidden], properties: { responseId: { type: integer, format: int64 }, questionId: { type: integer, format: int64 }, hidden: { type: boolean } }, type: object } } + type: object + '400': + description: 'Bad request — invalid body (e.g. hidden type, questionIds shape, ids not linked to this packet), or visibility change not allowed on or after the employee hire date when a hire date is set' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/send': + post: + tags: + - Onboarding + - 'Public API' + summary: 'Send new hire packet' + description: "Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state." + operationId: f49b0f1f2fb1ef2c408ba12916ee9baa + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/cancel': + post: + tags: + - Onboarding + - 'Public API' + summary: 'Cancel new hire packet' + description: 'Cancels the new hire packet. Completed packets cannot be cancelled.' + operationId: 19c7e26a1347ae7eb22919e9b0595c19 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + /api/v1/onboarding/new-hire-widget: + get: + tags: + - Onboarding + - 'Public API' + summary: 'Get welcome new hires widget' + description: 'Returns the upcoming-new-hires data that powers the BambooHR home "Welcome New Hires" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user''s new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned.' + operationId: 044949386f2d655c6a627ef53f9434b7 + responses: + '200': + description: Success + content: + application/json: + schema: + title: NewHireWidgetResponse + required: + - newHires + properties: + newHires: { description: 'Upcoming new hires visible to the authenticated user, sorted by hire date descending. Empty when the user lacks new-hire-packet or company-directory access.', type: array, items: { $ref: '#/components/schemas/NewHireWidgetItem' } } + type: object + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding + '/api/v1/employees/{employeeId}/onboarding-experiences': + get: + tags: + - Onboarding + - 'Public API' + summary: 'List employee onboarding experiences' + description: 'Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload).' + operationId: 0158de7cde2a4c4cf577f0b25070d809 + parameters: + - + name: employeeId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + title: OnboardingExperiencesListResponse + properties: + onboardingExperiences: { description: 'Onboarding experience summaries (empty when no running workflow for this employee).', type: array, items: { $ref: '#/components/schemas/OnboardingExperiencePublicApi' } } + type: object + additionalProperties: true + '403': + description: 'Forbidden — missing OAuth permission, onboarding experience phase-1 / workflow framework feature not enabled for the company, or caller cannot access the employee.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - onboarding + post: + tags: + - Onboarding + - 'Public API' + summary: 'Create employee onboarding experience' + description: 'Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty).' + operationId: 288aa996aba16d7a495c62321ea999a9 + parameters: + - + name: employeeId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + required: false + content: + application/json: + schema: + properties: + sentDateTime: + description: 'Optional sent datetime for the packet when starting the experience (string).' + oneOf: [{ type: string }, { type: 'null' }] + type: object + additionalProperties: true + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingExperiencePublicApi' + '400': + description: 'Bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 'Forbidden — missing OAuth permission, or onboarding experience phase-1 / workflow framework feature not enabled for the company.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '409': + description: 'Conflict — an onboarding experience workflow already exists for this employee.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '422': + description: 'Workflow instance could not be started or is not running.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - onboarding.write + '/api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId}': + get: + tags: + - Onboarding + - 'Public API' + summary: 'Get employee onboarding experience by id' + description: 'Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only.' + operationId: 847dd061d1d1859e7ce8cb3adfc9faf2 + parameters: + - + name: employeeId + in: path + required: true + schema: + type: integer + format: int64 + - + name: onboardingExperienceId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingExperiencePublicApi' + '403': + description: 'Forbidden — missing OAuth permission, onboarding experience phase-1 / workflow framework feature not enabled for the company, or caller cannot access the employee.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 'Not found — no matching running workflow, id does not match the employee’s current packet instance, or no such row.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + oauth: + - onboarding + /api/v1/time_tracking/projects: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Time Tracking Project' + description: "Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access.\n\nBy default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees." + operationId: create-time-tracking-project + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCreateRequestSchema' + responses: + '201': + description: 'Project created successfully. Returns the new project with tasks. The `employeeIds` field is included only when `allowAllEmployees` is false.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingProjectWithTasksAndEmployeeIds' + '400': + description: 'Bad request parameters - invalid or missing required fields.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'Request not acceptable.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'There was a conflict with the request.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/scheduling/schedules: + get: + tags: + - Scheduling + - 'Public API' + summary: 'List Schedules' + description: 'Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting.' + operationId: scheduling-list-schedules + parameters: + - + name: filter + in: query + description: "OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`." + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination' + required: false + schema: + type: integer + default: 1 + - + name: pageSize + in: query + description: 'The number of items to be returned' + required: false + schema: + type: integer + default: 100 + responses: + '200': + description: 'A list of schedules' + content: + application/json: + schema: + title: Scheduling-ScheduleListResponse-V1 + properties: + data: { description: 'Array of schedule resource objects', type: array, items: { $ref: '#/components/schemas/Scheduling-Schedule-V1' } } + meta: { properties: { totalItems: { description: 'Total number of schedules matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page, or null if on the first page.', properties: { href: { description: 'URL for the previous page.', type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { description: 'Link to the next page, or null if on the last page.', properties: { href: { description: 'URL for the next page.', type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '400': + description: 'Bad request - invalid filter, sort, or pagination parameters.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden - insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid filter or sort syntax.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules' + - + oauth: + - time_tracking + post: + tags: + - Scheduling + - 'Public API' + summary: 'Create Schedule' + description: 'Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration.' + operationId: scheduling-create-schedule + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-CreateScheduleRequest-V1' + responses: + '201': + description: 'Schedule created successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-Schedule-V1' + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + '/api/v1/scheduling/schedules/{id}': + get: + tags: + - Scheduling + - 'Public API' + summary: 'Get Schedule' + description: 'Retrieves a specific schedule by its UUID. Schedules organize shifts for employees.' + operationId: scheduling-get-schedule + parameters: + - + name: id + in: path + description: 'The ID of the schedule' + required: true + schema: + type: string + format: uuid + responses: + '200': + description: 'Schedule retrieved successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-Schedule-V1' + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Schedule not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid UUID format.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules' + - + oauth: + - time_tracking + delete: + tags: + - Scheduling + - 'Public API' + summary: 'Delete Schedule' + description: 'Deletes a schedule by its UUID. Unworked shifts will be deleted as a result.' + operationId: scheduling-delete-schedule + parameters: + - + name: id + in: path + description: 'The schedule UUID' + required: true + schema: + type: string + format: uuid + responses: + '204': + description: 'Schedule deleted successfully' + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Schedule not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + patch: + tags: + - Scheduling + - 'Public API' + summary: 'Update Schedule' + description: 'Partially updates an existing schedule by its UUID. Fields not provided retain their existing values.' + operationId: scheduling-update-schedule + parameters: + - + name: id + in: path + description: 'The schedule UUID' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-UpdateScheduleRequest-V1' + responses: + '200': + description: 'Schedule updated successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-Schedule-V1' + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Schedule not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + '/api/v1/scheduling/schedules/{id}/pdf': + get: + tags: + - Scheduling + - 'Public API' + summary: 'Get Schedule PDF' + description: 'Generates and streams a PDF of the schedule view for the given schedule and date range.' + operationId: scheduling-get-schedule-pdf + parameters: + - + name: id + in: path + description: 'The schedule ID' + required: true + schema: + type: string + - + name: startYmd + in: query + description: 'Start date in YYYY-MM-DD format' + required: true + schema: + type: string + format: date + - + name: endYmd + in: query + description: 'End date in YYYY-MM-DD format' + required: true + schema: + type: string + format: date + - + name: groupBy + in: query + description: 'Group employees by this field' + required: false + schema: + type: string + enum: + - location + - department + - division + - jobTitle + - team + - + name: 'employeeIds[]' + in: query + description: 'Filter by employee IDs. Pass the string "null" as an element to include open shifts.' + required: false + schema: + type: array + items: + type: string + - + name: includeEmployeesWithoutShifts + in: query + description: 'Whether to include employees who have no shifts in the date range' + required: false + schema: + type: boolean + default: false + - + name: includeHolidays + in: query + description: 'Whether to include holidays in the PDF' + required: false + schema: + type: boolean + default: false + - + name: includeTimeOff + in: query + description: 'Whether to include time-off entries in the PDF' + required: false + schema: + type: boolean + default: false + responses: + '200': + description: 'PDF binary stream' + content: + application/pdf: { } + '403': + description: Forbidden + '404': + description: 'Schedule not found' + '422': + description: 'Invalid parameters' + '500': + description: 'Failed to render PDF' + security: + - + oauth: + - 'scheduling:schedules' + /api/v1/scheduling/timezones: + get: + tags: + - Scheduling + - 'Public API' + summary: 'List Timezones' + description: 'Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field.' + operationId: scheduling-list-timezones + parameters: + - + name: filter + in: query + description: "OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`." + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc`' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + - + name: pageSize + in: query + description: 'The number of items to be returned. Defaults to 100.' + required: false + schema: + type: integer + default: 100 + responses: + '200': + description: 'A paginated list of timezones.' + content: + application/json: + schema: + title: Scheduling-TimezoneListResponse-V1 + properties: + data: { type: array, items: { $ref: '#/components/schemas/Scheduling-Timezone-V1' } } + meta: { properties: { totalItems: { description: 'Total number of timezones matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page, or null if on the first page.', properties: { href: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { description: 'Link to the next page, or null if on the last page.', properties: { href: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '403': + description: 'Forbidden - insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid filter or pagination parameters.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules' + - + oauth: + - time_tracking + '/api/v1/scheduling/shifts/{id}': + get: + tags: + - Scheduling + - 'Public API' + summary: 'Get Shift' + description: 'Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted.' + operationId: scheduling-get-shift + parameters: + - + name: id + in: path + description: 'The shift uuid' + required: true + schema: + type: string + format: uuid + responses: + '200': + description: 'Successfully fetched a shift' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' + '403': + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - shift not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts' + - + oauth: + - time_tracking + delete: + tags: + - Scheduling + - 'Public API' + summary: 'Delete Shift' + description: 'Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts' + operationId: scheduling-delete-shift + parameters: + - + name: id + in: path + description: 'The shift UUID, or the projected shift composite ID.' + required: true + schema: + type: string + format: uuid + - + name: recurrenceEditOption + in: query + description: "How should the shift be deleted? Choose 'instance' for deleting a single target shift, \n\t\t'future' for deleting the target shift and all following shifts that are in the same recurrence, \n\t\t'all' for deleting all shifts starting from now that are in the same recurrence as the target shift." + required: false + schema: + type: string + default: instance + enum: + - instance + - future + - all + example: future + responses: + '204': + description: 'Shift deleted successfully. No content returned.' + '403': + description: 'Forbidden - user does not have permission.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - shift not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + patch: + tags: + - Scheduling + - 'Public API' + summary: 'Update Shift' + description: 'Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields.' + operationId: scheduling-update-shift + parameters: + - + name: id + in: path + description: 'The shift uuid' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-UpdateSchedulingShiftRequest-V1' + responses: + '200': + description: 'Successfully updated a shift' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' + '403': + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - shift not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/scheduling/shifts: + get: + tags: + - Scheduling + - 'Public API' + summary: 'List Shifts' + description: 'Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts.' + operationId: scheduling-list-shifts + parameters: + - + name: ids + in: query + description: 'Filter by shift IDs. If provided, other filters are ignored.' + required: false + schema: + type: array + items: + type: string + format: uuid + - + name: start + in: query + description: 'Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.' + required: false + schema: + type: string + format: date-time + - + name: end + in: query + description: 'End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.' + required: false + schema: + type: string + format: date-time + - + name: employeeIds + in: query + description: 'Filter by employee IDs. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).' + required: false + schema: + type: array + items: + type: string + - + name: scheduleIds + in: query + description: 'Filter by schedule IDs.' + required: false + schema: + type: array + items: + type: string + format: uuid + - + name: statuses + in: query + description: 'Filter by shift statuses.' + required: false + schema: + type: array + items: + type: string + enum: + - planned + - published + - cancelled + - deleted + default: + - planned + - published + - + name: page + in: query + description: 'The starting page for pagination.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: pageSize + in: query + description: 'The number of items to be returned.' + required: false + schema: + type: integer + default: 1000 + maximum: 1000 + minimum: 1 + responses: + '200': + description: 'Shifts retrieved successfully' + content: + application/json: + schema: + title: Scheduling-ShiftListResponse-V1 + properties: + data: { description: 'Array of shifts', type: array, items: { $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' } } + meta: { properties: { totalItems: { description: 'Total number of shifts matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page.', properties: { href: { description: 'URL for the previous page, or null if on the first page.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, next: { description: 'Link to the next page.', properties: { href: { description: 'URL for the next page, or null if on the last page.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } }, type: object } + type: object + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts' + - + oauth: + - time_tracking + post: + tags: + - Scheduling + - 'Public API' + summary: 'Create Shift' + description: 'Creates a new shift in the specified schedule.' + operationId: scheduling-create-shift + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-CreateSchedulingShiftRequest-V1' + responses: + '201': + description: 'Successfully created a shift.' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' + '403': + description: 'Forbidden - user does not have permission.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - the referenced schedule does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/scheduling/shifts/publish: + post: + tags: + - Scheduling + - 'Public API' + summary: 'Publish Shifts' + description: 'Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts.' + operationId: scheduling-publish-shifts + requestBody: + required: true + content: + application/json: + schema: + required: + - shiftIds + properties: + shiftIds: + description: 'Shift IDs to publish.' + type: array + items: { type: string } + maxItems: 100 + minItems: 1 + type: object + responses: + '200': + description: 'All shifts published successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' + '207': + description: 'Some shifts published successfully, but one or more failed due to conflicts' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' + '409': + description: 'All shifts failed to publish due to conflicts' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' + '403': + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/time-tracking/break-assessments: + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Break Assessments' + description: 'Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500.' + operationId: list-break-assessments + parameters: + - + name: offset + in: query + description: 'Number of items to skip before returning results. Defaults to 0.' + required: false + schema: + type: integer + default: 0 + minimum: 0 + - + name: limit + in: query + description: 'Maximum number of items to return. Defaults to 100. Maximum is 500.' + required: false + schema: + type: integer + default: 100 + maximum: 500 + minimum: 0 + - + name: filter + in: query + description: "OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`." + required: false + schema: + type: string + default: '' + responses: + '200': + description: 'A list of paginated break assessments' + content: + application/json: + schema: + title: TimeTracking-PaginatedBreakAssessmentsResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentCollection-V1', description: 'The break assessments' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + '/api/v1/time-tracking/breaks/{id}': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Break' + description: 'Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration.' + operationId: get-break + parameters: + - + name: id + in: path + description: 'The break ID.' + required: true + schema: + type: string + format: uuid + responses: + '200': + description: 'Successfully retrieved the break.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `id` is not a valid UUID.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + delete: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Break' + description: 'Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with.' + operationId: delete-break + parameters: + - + name: id + in: path + description: 'The break ID.' + required: true + schema: + type: string + format: uuid + responses: + '204': + description: 'Break deleted successfully' + '400': + description: 'Invalid ID format' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + patch: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Update Break' + description: 'Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success.' + operationId: update-break + parameters: + - + name: id + in: path + description: 'The break ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreak-V1' + responses: + '200': + description: 'Successfully updated break' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/breaks': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Breaks for Break Policy' + description: 'Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering.' + operationId: list-break-policy-breaks + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + - + name: offset + in: query + description: 'The offset of items to retrieve' + schema: + type: integer + default: 0 + - + name: limit + in: query + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 + - + name: filter + in: query + description: "OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`." + schema: + type: string + default: '' + responses: + '200': + description: 'Successfully retrieved breaks for the specified break policy' + content: + application/json: + schema: + title: TimeTracking-PaginatedBreaksResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1', description: 'The breaks' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + put: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Replace Breaks for Break Policy' + description: 'Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted.' + operationId: replace-breaks-for-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' + responses: + '200': + description: 'Successfully replaced breaks for the policy' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1' + '400': + description: 'Bad request - validation errors' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Break' + description: 'Creates a new break and associates it with the specified break policy.' + operationId: create-break + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreak-V1' + responses: + '201': + description: 'Successfully created a break' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/assign': + put: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Set Employees for Break Policy' + description: 'Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list.' + operationId: set-break-policy-employees + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to assign to the break policy. Replaces all existing assignments.' + type: array + items: { type: integer } + type: object + responses: + '204': + description: 'Employees assigned successfully' + '400': + description: 'Invalid data provided.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity. The provided `id` is not a valid UUID, or `employeeIds` is not an array of positive integers.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Assign Employees to Break Policy' + description: 'Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments.' + operationId: assign-employees-to-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to assign to the break policy' + type: array + items: { type: integer } + minItems: 1 + type: object + responses: + '204': + description: 'Employees successfully assigned to the break policy' + '400': + description: 'Bad request - invalid data provided (for example: missing `employeeIds`, invalid IDs, or policy assignment constraints).' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden - insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/unassign': + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Unassign Employees from Break Policy' + description: 'Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees.' + operationId: unassign-employees-from-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to unassign from the break policy' + type: array + items: { type: integer } + minItems: 1 + type: object + responses: + '204': + description: 'Employees successfully unassigned from break policy' + '400': + description: 'Bad request - Invalid data or policy is assigned to all employees' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Break Policy' + description: 'Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks.' + operationId: get-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + - + name: includeCounts + in: query + description: 'Include employee and break counts' + required: false + schema: + type: boolean + default: false + responses: + '200': + description: 'Break policy retrieved successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + delete: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Break Policy' + description: 'Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed.' + operationId: delete-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + responses: + '204': + description: 'Break policy deleted successfully' + '400': + description: 'Invalid uuid format' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + patch: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Update Break Policy' + description: 'Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success.' + operationId: update-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreakPolicy-V1' + responses: + '200': + description: 'Break policy updated successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid uuid format' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + /api/v1/time-tracking/break-policies: + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Break Policies' + description: 'Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy.' + operationId: list-break-policies + parameters: + - + name: offset + in: query + description: 'The offset of items to retrieve' + schema: + type: integer + default: 0 + - + name: limit + in: query + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 + - + name: filter + in: query + description: "OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`." + schema: + type: string + default: '' + - + name: includeCounts + in: query + description: 'Include employee and break counts' + required: false + schema: + type: boolean + default: false + responses: + '200': + description: 'Successfully retrieved break policies' + content: + application/json: + schema: + title: TimeTracking-PaginatedBreakPoliciesResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Break Policy' + description: 'Create a break policy. Breaks and assignments can be optionally included and created at the same time.' + operationId: create-break-policy + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreakPolicy-V1' + responses: + '201': + description: 'Successfully created a break policy' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/employees/{id}/break-availabilities': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Employee Break Availabilities' + description: 'Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access.' + operationId: list-employee-break-availabilities + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: integer + - + name: effective + in: query + description: 'The employee''s local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\TH:i:s format (no timezone offset).' + required: false + schema: + type: string + pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$' + example: '2025-12-15T14:30:00' + responses: + '200': + description: 'Successfully retrieved break availabilities for the specified employee' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailabilityCollection-V1' + '403': + description: 'Forbidden - insufficient permissions to view this employee or break settings.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + '/api/v1/time-tracking/employees/{id}/break-policies': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Employee Break Policies' + description: 'Retrieves break policies assigned to a specific employee. Requires permission to view the target employee.' + operationId: list-employee-break-policies + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: integer + - + name: offset + in: query + description: 'The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.' + required: false + schema: + type: integer + default: 0 + minimum: 0 + - + name: limit + in: query + description: 'The maximum number of items to return. Must be between 0 and 500. Defaults to 100.' + required: false + schema: + type: integer + default: 100 + maximum: 500 + minimum: 0 + responses: + '200': + description: 'A list of break policies' + content: + application/json: + schema: + title: TimeTracking-PaginatedBreakPoliciesResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + '/api/v1/time-tracking/break-policies/{id}/employees': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Break Policy Employees' + description: 'Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array.' + operationId: list-break-policy-employees + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + - + name: offset + in: query + description: 'The offset of items to retrieve' + schema: + type: integer + default: 0 + - + name: limit + in: query + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 + responses: + '200': + description: 'A list of employees assigned to a break policy' + content: + application/json: + schema: + title: TimeTracking-PaginatedBreakPolicyEmployeesResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-BreakPolicyEmployeeCollection-V1', description: 'The employees' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + '/api/v1/time-tracking/break-policies/{id}/sync': + put: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Sync Break Policy' + description: 'Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request.' + operationId: sync-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-SyncTimeTrackingBreakPolicy-V1' + responses: + '200': + description: 'Break policy synced successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid data provided' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + /api/v1/time-tracking/break-policies/suggestions: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Break Policy Suggestions' + description: 'Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill.' + operationId: get-break-policy-suggestions + requestBody: + required: true + content: + application/json: + schema: + required: + - prompt + properties: + prompt: + description: 'The user''s request or question for break policy suggestions (e.g. "What policies do we need for our California employees?")' + type: string + minLength: 1 + type: object + responses: + '200': + description: 'Suggestions returned successfully' + content: + application/json: + schema: + title: TimeTracking-BreakPolicySuggestionsResponse-V1 + properties: + suggestedPolicies: { type: array, items: { required: [id, title, breaks], properties: { id: { type: string }, title: { type: string }, description: { oneOf: [{ type: string }, { type: 'null' }] }, breaks: { type: array, items: { required: [name, duration, paid, availabilityType], properties: { name: { type: string }, duration: { type: integer }, paid: { type: boolean }, availabilityType: { type: string, enum: [anytime, hours_worked, time_of_day] }, availabilityMinHoursWorked: { oneOf: [{ type: number }, { type: 'null' }] } }, type: object } } }, type: object } } + type: object + '422': + description: 'Invalid request — prompt is missing or empty' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error — agent workflow failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + /api/v1/time-tracking/projects: + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Time Tracking Projects' + description: 'Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500).' + operationId: list-projects + parameters: + - + name: filter + in: query + description: 'OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`.' + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`.' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: pageSize + in: query + description: 'The number of items per page. Defaults to 100, maximum 500.' + required: false + schema: + type: integer + default: 100 + maximum: 500 + minimum: 1 + responses: + '200': + description: 'A paginated list of projects.' + content: + application/json: + schema: + title: Project-PaginatedTimeTrackingProjectsResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/Project-PaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/Project-TimeTrackingProjectCollection-V1', description: 'The projects on the current page.' } }, type: object } + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid query parameters (e.g., invalid `page`, `pageSize`, `filter`, or `sort`).' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Time Tracking Project' + description: 'Creates a new time tracking project. Returns the newly created project resource on success.' + operationId: create-project + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-CreateTimeTrackingProject-V1' + responses: + '201': + description: 'Project created successfully.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '400': + description: 'Malformed request body.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Conflict. A project with this name already exists.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error (e.g. missing `name`, invalid `employeeIds`, name too long).' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + '/api/v1/time-tracking/projects/{projectId}': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Time Tracking Project' + description: 'Retrieves a single time tracking project by its ID, including the list of employees assigned to it.' + operationId: get-project + parameters: + - + name: projectId + in: path + description: 'The project ID.' + required: true + schema: + type: integer + responses: + '200': + description: 'Successfully retrieved the project.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `projectId` is not a valid integer.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project' + '/api/v1/time-tracking/projects/{id}': + delete: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Time Tracking Project' + description: 'Deletes a time tracking project by its ID.' + operationId: delete-project + parameters: + - + name: id + in: path + description: 'The project ID.' + required: true + schema: + type: integer + responses: + '204': + description: 'Project deleted successfully.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided project ID is not a valid integer.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + patch: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Update Time Tracking Project' + description: 'Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged.' + operationId: update-project + parameters: + - + name: id + in: path + description: 'The project ID.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-UpdateTimeTrackingProject-V1' + responses: + '200': + description: 'Successfully updated the project.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '400': + description: 'Malformed request body.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'A project with the supplied name already exists.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error (e.g., invalid `projectId`, no fields provided, invalid types, or setting `hasTasks=true` on a project with no active tasks).' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + '/api/v1/time-tracking/projects/{projectId}/tasks': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Time Tracking Project Tasks' + description: 'Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`.' + operationId: list-project-tasks + parameters: + - + name: projectId + in: path + description: 'The project ID.' + required: true + schema: + type: integer + - + name: 'statuses[]' + in: query + description: 'Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks.' + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - active + - deleted + default: + - active + - + name: page + in: query + description: 'The page number to retrieve (1-indexed).' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: pageSize + in: query + description: 'The maximum number of items per page.' + required: false + schema: + type: integer + default: 25 + maximum: 500 + minimum: 1 + responses: + '200': + description: 'Successfully retrieved tasks for the project.' + content: + application/json: + schema: + title: Project-PaginatedTasksResponse-V1 + required: + - data + - meta + - _links + properties: + data: { $ref: '#/components/schemas/Project-TimeTrackingTaskCollection-V1', description: 'Array of task resources for the current page.' } + meta: { required: [totalItems, page, pageSize, totalPages], properties: { totalItems: { type: integer, minimum: 0, example: 42 }, page: { type: integer, minimum: 1, example: 1 }, pageSize: { type: integer, minimum: 1, example: 25 }, totalPages: { type: integer, minimum: 0, example: 2 } }, type: object } + _links: { required: [prev, next], properties: { prev: { properties: { href: { type: string, format: uri } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { properties: { href: { type: string, format: uri } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'A query parameter is invalid.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Time Tracking Project Task' + description: 'Creates a new task on the specified time tracking project.' + operationId: create-project-task + parameters: + - + name: projectId + in: path + description: 'The project ID.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-CreateTimeTrackingProjectTask-V1' + responses: + '201': + description: 'Task created.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '403': + description: Forbidden. + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate task name within the project.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + '/api/v1/time-tracking/tasks/{id}': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Time Tracking Task' + description: 'Retrieves a single time tracking task by its ID.' + operationId: get-task + parameters: + - + name: id + in: path + description: 'The task ID.' + required: true + schema: + type: integer + responses: + '200': + description: 'Successfully retrieved the task.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Task not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `id` is not a valid integer.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project' + delete: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Time Tracking Task' + description: 'Deletes a time tracking task by its ID.' + operationId: delete-task + parameters: + - + name: id + in: path + description: 'The task ID.' + required: true + schema: + type: integer + responses: + '204': + description: 'The task was deleted successfully.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Task not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `id` is not a valid integer.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + patch: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Update Time Tracking Task' + description: 'Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided.' + operationId: update-task + parameters: + - + name: id + in: path + description: 'The task ID.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-UpdateTimeTrackingProjectTask-V1' + responses: + '200': + description: 'Task updated.' + content: + application/json: + schema: + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '403': + description: Forbidden. + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Task not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate task name within the project.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:project.write' + /api/v1/time_tracking/clock_entries/delete: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Timesheet Clock Entries' + description: 'Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' + operationId: delete-timesheet-clock-entries-via-post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ClockEntryIdsSchema' + responses: + '204': + description: 'Entries deleted successfully. No content returned.' + '400': + description: 'Bad request parameters - missing or invalid clockEntryIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions or timesheet already approved.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'One or more entries are still clocked in; clock out before deleting.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/time_tracking/hour_entries/delete: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Delete Timesheet Hour Entries' + description: 'Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' + operationId: delete-timesheet-hour-entries-via-post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/HourEntryIdsSchema' + responses: + '204': + description: 'Entries deleted successfully. No content returned.' + '400': + description: 'Bad request parameters - missing or invalid hourEntryIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Hour entry not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid time tracking configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/time_tracking/timesheet_entries: + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'List Timesheet Entries' + description: 'Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone.' + operationId: list-timesheet-entries + parameters: + - + name: start + in: query + description: 'YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.' + required: true + schema: + type: string + format: date + example: '2025-01-01' + - + name: end + in: query + description: 'YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.' + required: true + schema: + type: string + format: date + example: '2025-03-01' + - + name: employeeIds + in: query + description: 'A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.' + required: false + schema: + type: string + pattern: '^\d+(,\d+)*$' + example: '1,2,3' + responses: + '200': + description: 'Returns the matching timesheet entries grouped by employee.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeTimesheetEntryCollectionTransformer' + '400': + description: 'Bad request parameters - invalid dates, date range exceeds 365 days, or malformed employeeIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking + '/api/v1/time_tracking/employees/{employeeId}/clock_in': + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Timesheet Clock-In Entry' + description: 'Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`.' + operationId: create-timesheet-clock-in-entry + parameters: + - + name: employeeId + in: path + description: 'ID of the employee to clock in.' + required: true + schema: + type: integer + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/ClockInRequestSchema' + responses: + '200': + description: 'The employee was successfully clocked in. Returns the new clock entry details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + '400': + description: 'Bad request parameters - invalid date, time, timezone, project, task, or note.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Employee not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'A future clock entry exists; cannot clock in until it is resolved.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The employee is already clocked in, or timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration, invalid timezone, or employee is not configured for time tracking.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + '/api/v1/time_tracking/employees/{employeeId}/clock_out': + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Timesheet Clock-Out Entry' + description: 'Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`.' + operationId: create-timesheet-clock-out-entry + parameters: + - + name: employeeId + in: path + description: 'ID of the employee to clock out.' + required: true + schema: + type: integer + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/ClockOutRequestSchema' + responses: + '200': + description: 'The employee was successfully clocked out. Returns the completed clock entry details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + '400': + description: 'Bad request parameters - invalid date, time, or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Employee not found, or the clock entry has already been removed.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The employee is not currently clocked in (already clocked out), or a timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration, invalid timezone, no open clock entries, or employee is not configured for time tracking.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/time_tracking/clock_entries/store: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create or Update Timesheet Clock Entries' + description: 'Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' + operationId: create-or-update-timesheet-clock-entries + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ClockEntriesSchema' + responses: + '201': + description: 'Entries created or updated successfully. Returns the resulting clock entry details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' + '400': + description: 'Bad request parameters - invalid data, clock times, project, task, or note.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Employee or timesheet entry not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'Entry is beyond the end of the current period.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Conflicting entries exist, or timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/time_tracking/hour_entries/store: + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create or Update Timesheet Hour Entries' + description: 'Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' + operationId: create-or-update-timesheet-hour-entries + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/HourEntriesRequestSchema' + responses: + '201': + description: 'Entries created or updated successfully. Returns the resulting hour entry details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' + '400': + description: 'Bad request parameters - invalid hours, project, task, or note.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Employee or timesheet entry not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'Request not acceptable.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/webhooks: + get: + tags: + - Webhooks + - 'Public API' + summary: 'List Webhooks' + description: 'Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook''s ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use "Get Webhook" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events.' + operationId: list-webhooks + responses: + '200': + description: 'An object with a `webhooks` array containing one summary entry per webhook owned by the authenticated user.' + content: + application/json: + schema: + title: WebhooksList + properties: + webhooks: { type: array, items: { properties: { id: { description: 'The ID of the webhook.', type: string, example: '1' }, name: { description: 'The name of the webhook.', type: string }, created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string }, lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', oneOf: [{ type: string }, { type: 'null' }] }, url: { description: 'The URL the webhook sends data to.', type: string } }, type: object } } + type: object + '401': + description: 'Unauthorized. No response body is returned.' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks + post: + tags: + - Webhooks + - 'Public API' + summary: 'Create Webhook' + description: "Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change.\n\nThe `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required.\n\nThe response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again.\n\nFor more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks.\n\nFor details on the payloads sent by each event, see the event reference:\n- [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook)\n- [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook)\n- [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook)" + operationId: create-webhook + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewWebHook' + responses: + '201': + description: 'Webhook created successfully. The `privateKey` field is only returned in this response and cannot be retrieved again.' + content: + application/json: + schema: + title: Webhook + properties: + id: { description: 'The ID of the webhook.', type: string, example: '4' } + name: { description: 'The name of the webhook.', type: string, example: 'Example Webhook' } + created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string, example: '2021-09-20 22:38:01' } + lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', example: '2021-09-20 22:38:01', oneOf: [{ type: string }, { type: 'null' }] } + monitorFields: { description: 'A list of fields to monitor. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).', example: [firstName, lastName], oneOf: [{ type: array, items: { type: string } }, { type: 'null' }] } + postFields: { description: 'An object map of field ID or alias to the external name used in the webhook payload.', type: object, default: { }, example: { firstName: Name, lastName: Surname, dateOfBirth: DOB } } + url: { description: 'The URL the webhook sends data to.', type: string, example: 'https://www.example.com' } + format: { description: 'The payload format used by the webhook.', type: string, enum: [json, form-encoded], example: json } + privateKey: { description: 'The private key used to verify webhook authenticity via HMAC-SHA256. Only returned at creation time.', type: string } + includeCompanyDomain: { description: 'Whether the company domain is added to the webhook request header.', type: boolean, example: false } + events: { description: 'Events that trigger this webhook.', type: array, items: { $ref: '#/components/schemas/WebhookEventType' }, example: [employee.created, employee.updated, employee.deleted] } + type: object + '400': + description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + content: + application/json: + schema: + title: CreateWebhookBadRequestResponse + oneOf: + - { $ref: '#/components/schemas/WebhookBadRequest' } + - { $ref: '#/components/schemas/WebhookError' } + '401': + description: Unauthorized. + content: + application/json: { } + '403': + description: 'The authenticated user does not have permission to access one or more of the specified fields. The response lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '500': + description: 'Internal error' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks.write + - + oauth: + - webhooks + '/api/v1/webhooks/{id}': + get: + tags: + - Webhooks + - 'Public API' + summary: 'Get Webhook' + description: 'Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist.' + operationId: get-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The full configuration of the requested webhook.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebHookResponse' + '401': + description: Unauthorized. + content: + application/json: { } + '403': + description: 'The webhook exists but belongs to a different user.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'No webhook exists with the given ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks + put: + tags: + - Webhooks + - 'Public API' + summary: 'Update Webhook' + description: "Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs." + operationId: update-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewWebHook' + responses: + '200': + description: 'The updated webhook.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebHookResponse' + '400': + description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + content: + application/json: + schema: + title: UpdateWebhookBadRequestResponse + oneOf: + - { $ref: '#/components/schemas/WebhookBadRequest' } + - { $ref: '#/components/schemas/WebhookError' } + '401': + description: Unauthorized. + '403': + description: 'The authenticated user does not have permission to access one or more of the specified fields, or does not have access to the webhook. When caused by field permission violations, `errors` is an array and lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation. When caused by webhook ownership denial, `errors` is an object with a single `error` string (e.g. `{"errors":{"error":"You do not have access to webhook ID: 6"}}`).' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'The webhook to be updated does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks.write + - + oauth: + - webhooks + delete: + tags: + - Webhooks + - 'Public API' + summary: 'Delete Webhook' + description: "Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs." + operationId: delete-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Webhook deleted successfully. Returns a plain text confirmation message.' + content: + text/plain: + schema: + title: WebhookDeletedResponse + type: string + example: 'Web hook has been deleted.' + '401': + description: Unauthorized. + '403': + description: 'The authenticated user does not have permission to delete the requested webhook.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'No webhook exists with the given ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '500': + description: 'Internal error' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks.write + - + oauth: + - webhooks + '/api/v1/webhooks/{id}/log': + get: + tags: + - Webhooks + - 'Public API' + summary: 'List Webhook Logs' + description: "Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window.\n\n**Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list." + operationId: list-webhook-logs + parameters: + - + name: id + in: path + description: 'The webhook ID to get logs about.' + required: true + schema: + type: integer + responses: + '200': + description: 'An array of webhook delivery log entries for the last 14 days (up to 200 entries). Returns an empty array if no deliveries have occurred.' + content: + application/json: + schema: + title: WebhookLogListResponse + oneOf: + - { title: WebhookLogList, type: array, items: { title: WebhookLogEntry, properties: { webhookId: { description: 'The ID of the webhook.', type: string }, url: { description: 'The URL the webhook was delivered to.', type: string }, lastAttempted: { description: 'Datetime of the last delivery attempt (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when the delivery target could not be reached.', type: string }, lastSuccess: { description: 'Datetime of the last successful delivery (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when no successful delivery has been recorded.', type: string }, statusCode: { description: 'HTTP status code returned by the webhook endpoint on the last delivery attempt.', type: string }, format: { description: 'The payload format used for this delivery.', type: string }, employeeIds: { description: 'Array of employee IDs included in the webhook payload, returned as strings.', type: array, items: { type: string }, example: ['135'] } }, type: object } } + - { title: WebhookLogRateLimitResponse, properties: { error: { properties: { code: { type: integer, example: 429 }, message: { type: string, example: 'Over rate limit, please try again in 60 seconds' } }, type: object } }, type: object } + '403': + description: 'The authenticated user does not have permission to see the requested webhook.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'The webhook does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '500': + description: 'Internal error' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '503': + description: 'Log search timed out. Returns a plain text error message. Try again later.' + content: + text/plain: + schema: + title: WebhookLogTimeoutResponse + type: string + example: 'Log search timed out. Try again later.' + security: + - + basic: [] + - + oauth: + - webhooks + /api/v1/webhooks/monitor_fields: + get: + tags: + - Webhooks + - 'Public API' + summary: 'List Monitor Fields' + description: 'Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook.' + operationId: list-monitor-fields + responses: + '200': + description: 'An object with a `fields` array containing one entry per monitorable employee field, including the field ID (as a string), human-readable name, and alias (null if no alias is defined).' + content: + application/json: + schema: + title: MonitorFieldList + required: + - fields + properties: + fields: { description: 'The list of employee fields available for webhook monitoring.', type: array, items: { required: [id, name, alias], properties: { id: { description: 'The field ID, returned as a string.', type: string, example: '4175' }, name: { description: 'The human-readable field name.', type: string, example: 'Accrual Level Start Date' }, alias: { description: 'The field alias used in the BambooHR API (e.g. `firstName`). Null if no alias is defined for this field.', example: dateOfBirth, oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } + type: object + '401': + description: Unauthorized. + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks + /api/v1/webhooks/post-fields: + get: + tags: + - Webhooks + - 'Public API' + summary: 'Get Webhook Post Fields' + description: 'Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook.' + operationId: get-post-fields + responses: + '200': + description: 'An object with `fields`, `tables`, and `pages` arrays. `fields` contains the postable employee fields with their IDs, aliases, types, and associated page/table IDs. `tables` and `pages` contain the referenced metadata for those associations.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebHookPostFieldResponseObject' + '403': + description: 'Permission denied.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + security: + - + basic: [] + - + oauth: + - webhooks + '/api/v1/datasets/{datasetName}': + post: + tags: + - Datasets + - 'Public API' + summary: 'Get Data from Dataset (v1)' + description: "Deprecated. Use \"Get Data from Dataset (v2)\" instead.\n\nRetrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000).\n\nUse \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`.\n\nWhen any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`.\n\n**Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count.\n\n**Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last, next, range; int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty." + operationId: get-data-from-dataset-v1 + parameters: + - + name: datasetName + in: path + description: 'The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + required: true + schema: + type: string + - + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DataRequest' + responses: + '200': + description: 'Returns an object with `data` (array of record objects, or an object keyed by group value when `groupBy` is used), `aggregations` (array, empty when none requested), and `pagination`.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeResponse' + '400': + description: 'Invalid or missing argument(s), such as an unrecognised operator, malformed filter, invalid dataset name, or empty request body.' + '403': + description: 'Insufficient permissions to access this dataset.' + '500': + description: 'An unexpected internal error occurred while retrieving data.' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + '/api/v1/custom-reports/{reportId}': + get: + tags: + - 'Custom Reports' + - 'Public API' + summary: 'Get Report by ID' + description: "Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs.\n\nResponse shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`).\n\nThere is no schema-only response from this endpoint.\n\nThe `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults." + operationId: get-report-by-id + parameters: + - + name: reportId + in: path + description: 'The numeric ID of the saved custom report to execute.' + required: true + schema: + type: integer + - + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 + responses: + '200': + description: "Paginated report data with dynamic employee fields based on the report's configuration." + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeResponse' + '400': + description: 'Invalid or missing argument(s). Returned when the request fails validation or contains a type error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 'Access denied. The caller does not have permission to view this report.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 'Report not found. No saved custom report exists with the given ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'An unexpected error occurred while retrieving the report.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + basic: [] + - + oauth: + - report + /api/v1/datasets: + get: + tags: + - Datasets + - 'Public API' + summary: 'List Datasets (v1)' + description: "Deprecated. Use \"List Datasets (v1.2)\" instead.\n\nReturns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nThe response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint." + operationId: list-datasets-v1 + responses: + '200': + description: 'Returns an object containing a `datasets` array of available datasets.' + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetResponseV1' + '403': + description: 'Forbidden - insufficient permissions to access datasets.' + '500': + description: 'Internal server error while retrieving datasets.' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + '/api/v1/datasets/{datasetName}/fields': + get: + tags: + - Datasets + - 'Public API' + summary: 'Get Fields from Dataset (v1)' + description: "Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead.\n\nReturns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names.\n\nPagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs.\n\nError responses (400, 403, 500) return plain-text bodies, not JSON." + operationId: get-fields-from-dataset-v1 + parameters: + - + name: datasetName + in: path + description: 'The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + required: true + schema: + type: string + - + name: page + in: query + description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of field records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 + responses: + '200': + description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetFieldsResponse' + '400': + description: 'The specified dataset name was not found. The body is a plain-text message.' + '403': + description: 'Insufficient permissions to access dataset fields. The body is a plain-text message.' + '500': + description: 'Internal server error while fetching the dataset configuration. The body is a plain-text message.' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + /api/v1/custom-reports: + get: + tags: + - 'Custom Reports' + - 'Public API' + summary: 'List Reports' + description: "Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults.\n\nThe `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`." + operationId: list-reports + parameters: + - + name: page + in: query + description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 + responses: + '200': + description: 'Returns an object containing a `reports` array of report objects and a `pagination` object with page navigation metadata.' + content: + application/json: + schema: + $ref: '#/components/schemas/ReportsResponse' + '403': + description: 'The required feature toggle is not enabled for this account.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'An unexpected error occurred while retrieving the list of reports.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - + basic: [] + - + oauth: + - report + '/api/v1/datasets/{datasetName}/field-options': + post: + tags: + - Datasets + - 'Public API' + summary: 'Get Field Options (v1)' + description: "Deprecated. Use \"Get Field Options (v1.2)\" instead.\n\nReturns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value.\n\nUnrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." + operationId: get-field-options-v1 + parameters: + - + name: datasetName + in: path + description: 'The name of the dataset to retrieve field options for.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FieldOptionsRequestSchema' + responses: + '200': + description: 'An object keyed by field name, where each value is an array of available option objects for that field.' + content: + application/json: + schema: + title: FieldOptionsResponseV1 + type: object + additionalProperties: + type: array + items: { $ref: '#/components/schemas/FieldOptionsTransformer' } + example: + status: + - { id: Active, value: Active } + - { id: Inactive, value: Inactive } + '400': + description: 'Bad request - missing or invalid fields, filters, or request format.' + content: + application/json: + schema: + title: BadRequestV1 + properties: + error: { properties: { code: { type: integer, example: 0 }, message: { type: string, example: 'fields or groupBy missing' } }, type: object } + type: object + '403': + description: 'Forbidden - insufficient permissions to access this dataset.' + content: + application/json: + schema: + title: ForbiddenV1 + properties: + error: { properties: { code: { type: integer, example: 403 }, message: { type: string, example: 'You do not have permission to access this resource' } }, type: object } + type: object + '500': + description: 'Internal server error. The response body may be plain text rather than a structured JSON payload.' + deprecated: true + security: + - + basic: [] + - + oauth: + - field + /api/v1_2/datasets: + get: + tags: + - Datasets + - 'Public API' + summary: 'List Datasets (v1.2)' + description: "Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nDatasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`).\n\nNote: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." + operationId: list-datasets-v1-2 + responses: + '200': + description: 'Returns an object containing a `datasets` array of available datasets.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing' + schema: + type: string + content: + application/json: + schema: + title: 'Datasets Response (v1.2)' + properties: + datasets: { description: 'Array of available datasets', type: array, items: { properties: { name: { description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.', type: string, example: employee }, label: { description: 'Human-readable display name for the dataset.', type: string, example: Employee } }, type: object } } + type: object + '403': + description: 'Forbidden - insufficient permissions to access datasets.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error while retrieving datasets.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - report + '/api/v1_2/datasets/{datasetName}/fields': + get: + tags: + - Datasets + - 'Public API' + summary: 'Get Fields from Dataset (v1.2)' + description: "Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side.\n\nThe `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other.\n\nFor fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list.\n\nNote: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." + operationId: get-fields-from-dataset-v1-2 + parameters: + - + name: datasetName + in: path + description: 'The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + required: true + schema: + type: string + - + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 + responses: + '200': + description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing. Echoes the request header value if provided, otherwise generated server-side.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetFieldsResponse' + '403': + description: 'Insufficient permissions to access dataset fields. Uses RFC 7807 problem+json.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The specified dataset name was not found. The `code` field is `DATASET_NOT_FOUND`.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error while fetching the dataset configuration.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - report + '/api/v1_2/datasets/{datasetName}/field-options': + post: + tags: + - Datasets + - 'Public API' + summary: 'Get Field Options (v1.2)' + description: "Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset.\n\nUse this endpoint when you already have dataset field names from `get-fields-from-dataset-v1-2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. \n\nNote: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." + operationId: get-field-options-v1-2 + parameters: + - + name: datasetName + in: path + description: 'The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FieldOptionsRequestSchema' + responses: + '200': + description: 'An object keyed by field name, where each value is an array of available option objects for that field.' + content: + application/json: + schema: + title: FieldOptionsResponseV1_2 + type: object + additionalProperties: + type: array + items: { $ref: '#/components/schemas/FieldOptionsTransformer' } + example: + status: + - { id: Active, value: Active } + - { id: Inactive, value: Inactive } + '400': + description: 'Bad request - invalid fields, filters, or request format. Uses RFC 7807 problem+json.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden - insufficient permissions to access this dataset. Uses RFC 7807 problem+json.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error. The response body may be plain text rather than a structured payload.' + security: + - + basic: [] + - + oauth: + - field + x-mcp-annotations: + readOnlyHint: true + destructiveHint: false + openWorldHint: false + '/api/v2/datasets/{datasetName}/data': + post: + tags: + - Datasets + - 'Public API' + summary: 'Get Data from Dataset (v2)' + description: "Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`).\n\nUse this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead.\n\nDiscover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1-2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`); the field set is dataset-specific.\n\nField-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here.\n\nFilter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`.\n\n`orderBy` is a comma-separated list of ` ` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified.\n\nField-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence).\n\nPagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`).\n\nNote: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header." + operationId: get-data-from-dataset-v2 + parameters: + - + name: datasetName + in: path + description: 'Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`.' + required: true + schema: + type: string + example: employee + requestBody: + description: 'Request parameters for dataset data retrieval' + required: true + content: + application/json: + schema: + required: + - fields + properties: + fields: + description: "Field names to return for each row. Names are dataset-specific; discover valid names via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`). The field-name vocabulary differs from the dedicated employee endpoints (e.g., the `employee` dataset uses `jobInformationReportsTo` / `jobInformationDepartment` / `employmentStatus` rather than List Employees' `reportsTo` / `department` / `status`)." + type: array + items: { type: string } + example: [firstName, lastName, employmentStatus] + filter: + description: "OData-style filter expression. Comparison operators: `eq`, `ne`, `lt`, `le`, `gt`, `ge`. List-membership operator: `in (...)` (the parser does not support `not in`; use `ne` for the inverse). Logical operators: `and`, `or`. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type. `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields. Ordering operators (`lt`, `le`, `gt`, `ge`) work on numeric and date fields. `in (...)` is the natural fit on options-type fields like `status`, `employmentStatus`, and `jobInformationDepartment`, and is also accepted on text, numeric, and date fields when the list has a single value (equivalent to `eq`). Multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). String literals are wrapped in single quotes. Filter fields do not need to appear in `fields`." + example: "firstName eq 'Ashley' or firstName eq 'Charlotte'" + oneOf: [{ type: string }, { type: 'null' }] + orderBy: + description: 'Comma-separated sort rules; each rule is a field name followed by `asc` or `desc`. Every field referenced in `orderBy` must also appear in `fields` — otherwise the request is rejected with `400` and code `UE-1001`. Omit to leave row order unspecified.' + example: 'lastName asc, firstName desc' + oneOf: [{ type: string }, { type: 'null' }] + page: + description: 'Page number to retrieve (1-indexed). Defaults to 1.' + type: integer + default: 1 + minimum: 1 + example: 1 + pageSize: + description: 'Number of records per page. Defaults to 100. Maximum is 1000.' + type: integer + default: 100 + maximum: 1000 + minimum: 1 + example: 25 + type: object + responses: + '200': + description: 'Object containing `data` (array of record objects each wrapping requested values under a `fields` object), `links` (pagination URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (`page`, `pageSize`, `totalPages`, `totalItems`).' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing. Echoes the client-provided value or a generated identifier.' + schema: + type: string + content: + application/json: + schema: + title: DatasetDataResponseV2 + properties: + data: { description: 'Array of record objects. Each object contains a `fields` object whose keys are the requested field names. Values may be strings, numbers, booleans, arrays/objects, or null depending on the dataset field and value.', type: array, items: { properties: { fields: { type: object, additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: array, items: { } }, { type: object }, { type: 'null' }] } } }, type: object } } + links: { description: 'Pagination navigation links. Contains `next` and/or `prev` URLs when applicable.', properties: { next: { oneOf: [{ type: string }, { type: 'null' }] }, prev: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + meta: { description: 'Pagination metadata.', properties: { page: { type: integer }, pageSize: { type: integer }, totalPages: { type: integer }, totalItems: { type: integer } }, type: object } + type: object + '400': + description: 'Missing or invalid parameters.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized. + '403': + description: 'Insufficient permissions to access the requested dataset.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'The specified dataset does not exist or is not accessible.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '413': + description: 'The request produced too much data.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation failed, such as an invalid filter expression or pagination value.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - report + x-mcp-annotations: + readOnlyHint: true + destructiveHint: false + openWorldHint: false + /api/v1/applicant_tracking/applications: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Job Applications' + description: 'Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like.' + operationId: get-applications + parameters: + - + name: page + in: query + description: 'The page number' + schema: + type: integer + - + name: jobId + in: query + description: 'A Job Id to limit results to' + schema: + type: integer + - + name: applicationStatusId + in: query + description: 'One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).' + schema: + type: string + - + name: applicationStatus + in: query + description: 'One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.' + schema: + type: string + - + name: jobStatusGroups + in: query + description: 'One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.' + schema: + type: string + - + name: searchString + in: query + description: 'A general search criteria by which to find applications.' + schema: + type: string + - + name: sortBy + in: query + description: 'A specific field to sort the results by.' + schema: + type: string + enum: + - first_name + - job_title + - rating + - phone + - status + - last_updated + - created_date + - + name: sortOrder + in: query + description: 'Order by which to sort results.' + schema: + type: string + enum: + - ASC + - DESC + - + name: newSince + in: query + description: 'Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).' + schema: + type: string + example: '2024-01-01 13:00:00' + responses: + '200': + description: 'Success. Returns a paginated list of applications.' + content: + application/json: + schema: + title: ApplicationsList + properties: + paginationComplete: { description: 'Indicates whether there are more pages of results available', type: boolean } + nextPageUrl: { description: 'URL to fetch the next page of results, or null if there are no more results', oneOf: [{ type: string }, { type: 'null' }] } + applications: { description: 'List of application objects', type: array, items: { properties: { id: { description: 'Application ID', type: integer }, appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time }, status: { description: 'Current status of the application', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, rating: { description: 'Candidate rating (1-5) or null if not rated', oneOf: [{ type: integer }, { type: 'null' }] }, applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: "Applicant's first name", type: string }, lastName: { description: "Applicant's last name", type: string }, avatar: { description: "URL to applicant's avatar image, or null", oneOf: [{ type: string }, { type: 'null' }] }, email: { description: "Applicant's email address", type: string }, source: { description: 'Source of the application', type: string } }, type: object }, job: { description: 'Information about the job position', properties: { id: { description: 'Job position ID', type: integer }, title: { description: 'Job position title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object } }, type: object } }, type: object } } + type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + /api/v1/applicant_tracking/statuses: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Applicant Statuses' + description: 'Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses.' + operationId: get-statuses + responses: + '200': + description: 'Success. Returns an array of applicant status objects.' + content: + application/json: + schema: + title: ApplicantStatusList + type: array + items: + title: ApplicantStatus + properties: { id: { description: 'Status ID', type: string }, code: { description: 'Internal status code, or null for custom statuses', oneOf: [{ type: string }, { type: 'null' }] }, name: { description: 'Status display name', type: string }, translatedName: { description: 'Translated display name', type: string }, description: { description: 'Optional description of the status', oneOf: [{ type: string }, { type: 'null' }] }, enabled: { description: 'Whether the status is currently active and selectable', type: boolean }, manageable: { description: 'Whether the status can be managed (edited/deleted) by the company', type: boolean } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + /api/v1/applicant_tracking/locations: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Company Locations' + description: 'Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint.' + operationId: get-company-locations + responses: + '200': + description: 'Success. Returns an array of location objects.' + content: + application/json: + schema: + title: LocationsList + type: array + items: + $ref: '#/components/schemas/Location' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + /api/v1/applicant_tracking/hiring_leads: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Hiring Leads' + description: 'Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint.' + operationId: get-hiring-leads + responses: + '200': + description: 'Success. Returns an array of employees who can be assigned as hiring leads.' + content: + application/json: + schema: + title: HiringLeadsList + type: array + items: + title: HiringLead + properties: { employeeId: { description: 'The employee ID to use as the `hiringLead` value in the Create Job Opening request', type: integer }, preferredFullName: { description: "The employee's preferred full name", type: string } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + /api/v1/applicant_tracking/application: + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Create Candidate' + description: "Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId." + operationId: create-candidate + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - firstName + - jobId + - lastName + properties: + firstName: + description: 'The first name of the candidate.' + type: string + lastName: + description: 'The last name of the candidate.' + type: string + email: + description: 'The email address of the candidate. Must be a valid email address.' + type: string + format: email + phoneNumber: + description: 'The phone number of the candidate.' + type: string + source: + description: 'The source of the candidate application, e.g. LinkedIn, Indeed, etc.' + type: string + jobId: + description: 'The id of the job opening for the candidate application.' + type: integer + address: + description: 'The street address of the candidate.' + type: string + city: + description: 'The city of the candidate.' + type: string + state: + description: 'The state or province of the candidate. Accepts state name, abbreviation, or ISO code.' + type: string + zip: + description: 'The zip code or postal code of the candidate.' + type: string + country: + description: 'The country of the candidate. Accepts country name or ISO code.' + type: string + linkedinUrl: + description: 'The LinkedIn profile URL of the candidate. Must match `https?://(.*\.)?linkedin.com/...`.' + type: string + format: uri + dateAvailable: + description: 'The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).' + type: string + format: date + desiredSalary: + description: 'The desired salary of the candidate.' + type: string + referredBy: + description: 'The person or entity that referred the candidate.' + type: string + websiteUrl: + description: 'The personal website, blog, or online portfolio of the candidate. Must be a valid URL.' + type: string + format: uri + highestEducation: + description: 'The highest completed education level of the candidate.' + type: string + enum: ['GED or Equivalent', 'High School', 'Some College', 'College - Associates', 'College - Bachelor of Arts', 'College - Bachelor of Fine Arts', 'College - Bachelor of Science', 'College - Master of Arts', 'College - Master of Fine Arts', 'College - Master of Science', 'College - Master of Business Administration', 'College - Doctorate', 'Medical Doctor', Other] + collegeName: + description: 'The college or university of the candidate.' + type: string + references: + description: 'A list of references supplied by the candidate.' + type: string + resume: + description: 'Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' + type: string + format: binary + coverLetter: + description: 'Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' + type: string + format: binary + type: object + responses: + '200': + description: 'Success. Returns the result status and the new candidate ID.' + content: + application/json: + schema: + title: CreateCandidateResponse + properties: + result: { description: "Always 'success' on a successful request", type: string } + candidateId: { description: 'The ID of the newly created candidate', type: integer } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '422': + description: 'Unprocessable entity. One or more parameters failed validation.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications.write' + /api/v1/applicant_tracking/job_opening: + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Create Job Opening' + description: 'Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID.' + operationId: create-job-opening + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - employmentType + - hiringLead + - jobDescription + - jobStatus + - postingTitle + properties: + postingTitle: + description: 'The posting title of the job opening.' + type: string + jobStatus: + description: 'The status of the job opening.' + type: string + enum: [Draft, Open, 'On Hold', Filled, Canceled] + hiringLead: + description: 'The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.' + type: integer + department: + description: 'The department of the job opening.' + type: string + employmentType: + description: 'The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.' + type: string + minimumExperience: + description: 'The minimum experience level that qualifies a candidate for the job opening.' + type: string + enum: [Entry-level, Mid-level, Experienced, Manager/Supervisor, "Senior Manager/Supervisor'", Executive, 'Senior Executive'] + compensation: + description: 'The pay rate or compensation for the job opening.' + type: string + jobLocation: + description: 'The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.' + type: integer + jobDescription: + description: 'The long-form text description of the job opening.' + type: string + applicationQuestionResume: + description: 'Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionAddress: + description: 'Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionLinkedinUrl: + description: 'Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionDateAvailable: + description: 'Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionDesiredSalary: + description: 'Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionCoverLetter: + description: 'Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionReferredBy: + description: 'Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionWebsiteUrl: + description: 'Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionHighestEducation: + description: 'Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionCollege: + description: 'Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionReferences: + description: 'Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).' + type: string + enum: ['true', 'false', Required] + internalJobCode: + description: 'The internal job code for the job opening.' + type: string + locationType: + description: 'The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.' + type: integer + enum: [0, 1, 2] + type: object + responses: + '200': + description: 'Success. Returns the result status and the new job opening ID.' + content: + application/json: + schema: + title: CreateJobOpeningResponse + properties: + result: { description: "Always 'success' on a successful request", type: string } + jobOpeningId: { description: 'The ID of the newly created job opening', type: string } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '422': + description: 'Unprocessable entity. One or more parameters failed validation.' + content: + application/json: { } + security: + - + basic: [] + /api/v1/benefit/company_benefit: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Company Benefits' + description: 'Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use "Get a company benefit".' + operationId: list-company-benefits + responses: + '200': + description: 'An object containing a companyBenefits array of benefit plan summaries.' + content: + application/json: + schema: + title: CompanyBenefitsListResponse + properties: + companyBenefits: { description: 'List of company benefit plan summaries.', type: array, items: { $ref: '#/components/schemas/CompanyBenefitSummary' } } + type: object + '401': + description: 'Unauthorized. Invalid or missing authentication credentials.' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - benefit + /api/v1/benefit/employee_benefit: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Employee Benefits' + description: "Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields.\n\nA JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values.\n\nFuture-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them.\n\nNote: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future." + operationId: list-employee-benefits + requestBody: + description: 'Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted.' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeBenefitFilters' + responses: + '200': + description: "An object containing an employeeBenefits array, each item representing one employee's benefit enrollments." + content: + application/json: + schema: + title: EmployeeBenefitsListResponse + properties: + employeeBenefits: { description: 'List of per-employee benefit enrollment records.', type: array, items: { properties: { employeeId: { description: 'The ID of the employee.', type: integer }, payFrequency: { description: "The employee's current pay frequency (e.g., 'semi-monthly', 'biweekly'), or null if no pay schedule is set.", oneOf: [{ type: string }, { type: 'null' }] }, employeeBenefit: { description: "The employee's benefit plan enrollments, including both current and future scheduled changes.", type: array, items: { properties: { companyBenefitId: { description: 'The ID of the company benefit plan.', type: string }, companyBenefitName: { description: 'The name of the company benefit plan.', type: string }, coverageLevel: { description: 'The coverage level for this enrollment, or null if not applicable.', oneOf: [{ type: string }, { type: 'null' }] }, deductionEndDate: { description: 'The date deductions end for this enrollment (YYYY-MM-DD), or null.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, deductionStartDate: { description: 'The date deductions begin for this enrollment (YYYY-MM-DD), or null.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, enrollmentStatus: { description: 'The current or scheduled enrollment status.', type: string, enum: [Eligible, Enrolled, Waived, Withdrew, Terminated, Ineligible] }, enrollmentStatusEffectiveDate: { description: 'The date the enrollment status takes effect (YYYY-MM-DD).', type: string, format: date }, currencyCode: { description: 'ISO 4217 currency code for deduction amounts, or null if not applicable.', oneOf: [{ type: string }, { type: 'null' }] }, employeeAmount: { description: 'The employee-paid deduction amount.', oneOf: [{ type: number }, { type: 'null' }] }, employeeAmountType: { description: "The unit for employeeAmount (e.g., '%', '$').", oneOf: [{ type: string }, { type: 'null' }] }, employeePercentBasedOn: { description: "The basis for percent-based employee deductions (e.g., 'Gross'), or null.", oneOf: [{ type: string }, { type: 'null' }] }, employeeCapAmount: { description: 'The cap on employee deductions, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, employeeCapAmountType: { description: 'The unit for employeeCapAmount, or null.', oneOf: [{ type: string }, { type: 'null' }] }, employeeAnnualMax: { description: 'The annual maximum employee contribution, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, companyAmount: { description: 'The employer-paid contribution amount.', oneOf: [{ type: number }, { type: 'null' }] }, companyAmountType: { description: "The unit for companyAmount (e.g., '%', '$').", oneOf: [{ type: string }, { type: 'null' }] }, companyPercentBasedOn: { description: "The basis for percent-based employer contributions (e.g., 'Gross'), or null.", oneOf: [{ type: string }, { type: 'null' }] }, companyCapAmount: { description: 'The cap on employer contributions, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, companyCapAmountType: { description: 'The unit for companyCapAmount, or null.', oneOf: [{ type: string }, { type: 'null' }] }, companyAnnualMax: { description: 'The annual maximum employer contribution, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, occurrencesPerYear: { description: "The number of deduction occurrences per year based on the employee's pay schedule.", type: integer } }, type: object } } }, type: object } } + type: object + '400': + description: 'Bad request. The request body is missing or not valid JSON, the `filters` object is missing, none of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` was provided, or `enrollmentStatusEffectiveDate` is not in `YYYY-MM-DD` format.' + '401': + description: 'Unauthorized. Invalid or missing authentication credentials.' + '403': + description: 'Forbidden. The authenticated caller does not have permission to view benefit data.' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - benefit + /api/v1/benefit/member_benefit: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Member Benefit Events' + description: 'Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access.' + operationId: list-member-benefit-events + responses: + '200': + description: 'An object containing a members array of member benefit event records.' + content: + application/json: + schema: + title: MemberBenefitEventsResponse + properties: + members: { description: 'List of member benefit event records, one entry per employee or dependent.', type: array, items: { $ref: '#/components/schemas/MemberBenefitEvent' } } + type: object + '401': + description: 'Unauthorized. Invalid or missing authentication credentials.' + '403': + description: 'Forbidden. The authenticated user does not have benefit settings access.' + security: + - + basic: [] + - + oauth: + - benefit + /api/v1/benefits/member-benefits: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Member Benefits' + description: 'Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use "List Company Benefits" to get valid planId values.' + operationId: list-member-benefits + parameters: + - + name: calendarYear + in: query + description: 'The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.' + required: true + schema: + type: string + pattern: '^\d{4}$' + example: '2024' + - + name: page + in: query + description: 'The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.' + required: false + schema: + type: string + default: '1' + example: '1' + - + name: pageSize + in: query + description: 'The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.' + required: false + schema: + type: string + default: '25' + example: '25' + responses: + '200': + description: 'A paginated list of member benefit enrollment records for the requested calendar year.' + content: + application/json: + schema: + title: MemberBenefitsGetSuccessResponse + properties: + data: { type: array, items: { properties: { memberId: { description: 'The member identifier. Formatted as "employee.{id}" for employees and "dependent.{id}" for dependents.', type: string }, subscriberId: { description: 'The employee ID of the plan subscriber as a string. For dependent members, this is the ID of the employee they are enrolled under.', type: string }, plans: { type: array, items: { properties: { planId: { description: 'The benefit plan ID.', type: string }, dateRanges: { type: array, items: { properties: { startDate: { description: 'Start date of the enrollment period (YYYY-MM-DD).', type: string, format: date }, endDate: { description: 'End date of the enrollment period (YYYY-MM-DD), or null if the enrollment has no calculated end date.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, status: { description: 'The enrollment status for this date range.', type: string, enum: [ENROLLED, WAIVED, TERMINATED, WITHDREW, ELIGIBLE, INELIGIBLE] } }, type: object } } }, type: object } } }, type: object } } + meta: { properties: { page: { description: 'The current page number.', type: integer }, pageSize: { description: 'The number of items per page.', type: integer }, totalPages: { description: 'Total number of pages available.', type: integer }, totalItems: { description: 'Total number of member records across all pages.', type: integer } }, type: object } + _links: { properties: { next: { properties: { href: { description: 'URL for the next page of results. Points to the current page when already on the last page.', type: string } }, type: object }, prev: { properties: { href: { description: 'URL for the previous page of results. Points to page 1 when already on the first page.', type: string } }, type: object } }, type: object } + type: object + '400': + description: 'Validation error. Returned when calendarYear is missing or not a 4-digit year, or when page or pageSize are out of range.' + content: + application/json: + schema: + title: MemberBenefitsGetValidationErrorResponse + properties: + code: { type: string, example: VALIDATION_ERROR } + message: { type: string, example: 'required property calendarYear is missing' } + type: object + '403': + description: 'Permission denied. The authenticated user is not a benefit admin.' + content: + application/json: + schema: + title: MemberBenefitsGetPermissionDeniedResponse + properties: + code: { type: string, example: PERMISSION_DENIED } + message: { type: string, example: 'Must be benefit admin user' } + type: object + security: + - + basic: [] + - + oauth: + - benefit + /api/v1/benefits/settings/deduction_types/all: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Benefit Deduction Types' + description: 'Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions.' + operationId: list-benefit-deduction-types + responses: + '200': + description: 'An array of benefit deduction type objects.' + content: + application/json: + schema: + title: BenefitDeductionTypesResponse + type: array + items: + title: BenefitDeductionType + properties: { id: { description: 'The deduction type ID. Integer for leaf types (e.g. 1 for 401(k)); string slug for grouped parent types (e.g. "pretax_subtype").', oneOf: [{ type: integer }, { type: string }] }, deductionTypeName: { description: 'The display name of the deduction type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this type.', type: string }, allowableBenefitTypes: { description: 'The benefit plan types this deduction type can be applied to (e.g. "health", "dental", "retirement").', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type (e.g. garnishments).', type: boolean }, canBeCollectedByTrax: { description: 'Whether this deduction type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'An optional additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden for this deduction type.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', oneOf: [{ type: string }, { type: 'null' }] }, subTypes: { description: 'Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types.', type: array, items: { title: BenefitDeductionSubType, properties: { id: { description: 'The sub-type deduction type ID (always an integer).', type: integer }, deductionTypeName: { description: 'The display name of the sub-type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this sub-type.', type: string }, allowableBenefitTypes: { description: 'Benefit plan types this sub-type applies to.', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type.', type: boolean }, canBeCollectedByTrax: { description: 'Whether this sub-type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'Additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', oneOf: [{ type: string }, { type: 'null' }] }, subTypes: { description: 'Always an empty array for sub-types.', type: array, items: { type: object } }, subTypeText: { description: 'Sub-type selection label. Empty string for leaf types.', type: string }, deductionNote: { description: 'Informational note for this sub-type.', type: string }, deductionNoteLink: { description: 'URL for the deduction note link.', type: string }, deductionNoteLinkText: { description: 'Display text for the deduction note link.', type: string } }, type: object } }, subTypeText: { description: 'A label or question displayed alongside sub-type selection (e.g. "Reportable on the W-2?"). Empty string for types without sub-types.', type: string }, deductionNote: { description: 'An informational note to display to the user when configuring this deduction type.', type: string }, deductionNoteLink: { description: 'A URL for a "learn more" link associated with the deduction note.', type: string }, deductionNoteLinkText: { description: 'The display text for the deduction note link.', type: string } } + type: object + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + '500': + description: 'An unexpected server error occurred.' + security: + - + basic: [] + - + oauth: + - benefit + /api/v1/company-profile-data/industry-codes: + put: + tags: + - 'Public API' + - Company + summary: 'Update Company Industry Codes' + description: 'Updates the industry codes associated with a company.' + operationId: put-company-industry-codes + requestBody: + required: true + content: + application/json: + schema: + required: + - industryIds + properties: + industryIds: + description: 'List of industry IDs associated with the company. Currently limited to a single entry.' + type: array + items: { type: integer } + type: object + example: + industryIds: + - 1 + responses: + '200': + description: 'Returns the updated list of enabled industries for the company' + content: + application/json: + schema: + title: UpdateCompanyIndustryCodesResponse + properties: + company_industries: { $ref: '#/components/schemas/CompanyIndustryCollection', description: 'List of enabled industries for the company' } + type: object + example: + company_industries: [{ industryId: 4, addedByCustomer: false, addedByUserId: 1, addedYmdt: '2021-09-01T12:00:00+00:00' }] + '400': + description: 'Bad request due to invalid request structure or multiple industry IDs provided' + content: + application/json: + schema: + title: UpdateCompanyIndustryCodes400Response + properties: + message: { type: string } + type: object + example: + message: 'Multiple industries per-company are not supported at this time.' + '401': + description: 'Missing or invalid authentication' + '403': + description: 'Insufficient permissions or release toggle not enabled' + content: + application/json: + schema: + title: UpdateCompanyIndustryCodes403Response + properties: + message: { type: string } + type: object + example: + message: 'You do not have permission to access this resource.' + '404': + description: 'Industry ID not found' + content: + application/json: + schema: + title: UpdateCompanyIndustryCodes404Response + properties: + message: { type: string } + type: object + example: + message: 'The requested industry ID does not exist.' + '500': + description: 'Internal server error' + content: + application/json: + schema: + title: UpdateCompanyIndustryCodes500Response + properties: + message: { type: string } + type: object + example: + message: 'An error occurred while processing your request.' + security: + - + oauth: + - 'company:details.write' + /api/v1/company_information: + get: + tags: + - Employees + - 'Public API' + summary: 'Get Company Information' + description: "Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings." + operationId: get-company-information + responses: + '200': + description: 'Company information retrieved successfully.' + content: + application/json: + schema: + title: CompanyInformation + properties: + legalName: { description: 'The legal name of the company.', type: string } + displayName: { description: 'The display name of the company.', type: string } + address: { description: 'The primary address of the company.', properties: { line1: { description: 'The first line of the address.', type: string }, line2: { description: 'The second line of the address. May be an empty string.', type: string }, city: { description: 'The city.', type: string }, state: { description: 'The state or province abbreviation.', type: string }, zip: { description: 'The ZIP or postal code.', type: string } }, type: object } + phone: { description: 'The primary contact phone number of the company.', type: string } + type: object + example: + legalName: BambooHR + displayName: BambooHR + address: { line1: '335 S 560 W', line2: 'Suite 200', city: Lindon, state: UT, zip: '84042' } + phone: 801-724-6600 + '403': + description: 'The API user does not have permission to access company information.' + security: + - + basic: [] + - + oauth: + - 'company:info' + /api/v1/company-profile-integrations: + get: + tags: + - 'Company Profile' + - 'Public API' + summary: 'Get Company Profile Integrations' + description: "Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration." + operationId: get-company-profile-integrations + responses: + '200': + description: 'List of enabled integration identifiers for the company.' + content: + application/json: + schema: + title: CompanyProfileIntegrations + properties: + integrations: { description: 'List of installed integration identifiers.', type: array, items: { type: string } } + type: object + example: + integrations: [BAMBOOHR_PAYROLL, GOOGLE_SSO, SLACK] + '403': + description: 'The API user does not have permission to access company profile integrations.' + '500': + description: 'An unexpected error occurred while retrieving company profile integrations.' + security: + - + basic: [] + - + oauth: + - 'company:details' + /api/v1/company-profile-data/company-information: + patch: + tags: + - 'Company Profile' + - 'Public API' + summary: 'Update company information (phone, address, legal name)' + description: 'Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data.' + operationId: patch-company-profile-company-information + requestBody: + required: true + content: + application/merge-patch+json: + schema: + properties: + legalName: + description: 'Legal name of the company (name_of_employer). Required (non-empty) when this field is present in the patch.' + type: string + phone: + description: 'Contact phone number. Required (non-empty) when this field is present in the patch.' + type: string + address: + description: 'Company address. When `address` is included in the patch (non-null object), `city`, `state`, and `zip` must all be sent as non-empty strings. `line1` and `line2` are optional (JSON null removes a line per merge-patch).' + properties: { line1: { description: 'Street address line 1 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', oneOf: [{ type: string }, { type: 'null' }] }, line2: { description: 'Street address line 2 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', oneOf: [{ type: string }, { type: 'null' }] }, city: { description: 'City. Required (non-empty) when address is patched.', type: string }, state: { description: 'State. Required (non-empty) when address is patched.', type: string }, zip: { description: 'Zip or postal code. Required (non-empty) when address is patched.', type: string } } + type: object + type: object + responses: + '200': + description: 'Successful response; same shape as GET company-profile-data' + content: + application/json: + schema: + title: CompanyProfileData + properties: + id: { type: integer } + subdomain: { oneOf: [{ type: string }, { type: 'null' }] } + legalName: { oneOf: [{ type: string }, { type: 'null' }] } + displayName: { oneOf: [{ type: string }, { type: 'null' }] } + address: { properties: { line1: { oneOf: [{ type: string }, { type: 'null' }] }, line2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, state: { oneOf: [{ type: string }, { type: 'null' }] }, zip: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + phone: { oneOf: [{ type: string }, { type: 'null' }] } + status: { type: string } + terminationDate: { oneOf: [{ type: string }, { type: 'null' }] } + industryCode: { oneOf: [{ type: string }, { type: 'null' }] } + type: object + '400': + description: 'Invalid JSON or Content-Type' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Permission denied' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation failed (invalid field types or incomplete profile after merge)' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - 'company:details.write' + /api/v1/company-profile-data/display-name: + put: + tags: + - 'Company Profile' + - 'Public API' + summary: 'Update company display name' + description: 'Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services.' + operationId: put-company-profile-display-name + requestBody: + content: + application/json: + schema: + required: + - companyName + properties: + companyName: + description: 'The new display name for the company. Must be a non-empty string with a maximum length of 255 characters (character count, not bytes, so multibyte UTF-8 characters are properly supported).' + type: string + example: 'Acme Corporation' + type: object + responses: + '200': + description: 'Company name updated successfully' + content: + application/json: + schema: + title: UpdateCompanyNameSuccessResponse + properties: + success: { description: 'Indicates whether the operation was successful', type: boolean, example: true } + type: object + '400': + description: 'Invalid request body or company name' + content: + application/json: + schema: + title: UpdateCompanyNameBadRequestResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object + '403': + description: 'Permission denied' + content: + application/json: + schema: + title: UpdateCompanyNameForbiddenResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object + '500': + description: 'Internal server error' + content: + application/json: + schema: + title: UpdateCompanyNameInternalErrorResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object + security: + - + oauth: + - 'company:details.write' + /api/v1/compensation/benchmarks: + get: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'List Compensation Benchmarks' + description: "Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract." + operationId: list-compensation-benchmarks + responses: + '200': + description: 'Object with a `jobLocationPairs` array and banner-dismissal flags.' + content: + application/json: + schema: + title: CompensationBenchmarksList + properties: + jobLocationPairs: { type: array, items: { title: CompensationBenchmarkJobLocationPair, properties: { jobDetails: { properties: { id: { type: string }, title: { type: string } }, type: object }, locationDetails: { properties: { id: { type: string }, name: { type: string }, location: { type: string }, country: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, isRemote: { type: boolean }, benchmarks: { description: 'Saved benchmarks attached to this job/location. Empty when none are configured.', type: array, items: { title: CompensationBenchmarkOverview, properties: { id: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceColor: { oneOf: [{ type: string }, { type: 'null' }] }, isMercer: { type: boolean }, dataYear: { description: 'Mercer data year; defaults to the current Mercer data year when missing on a Mercer benchmark. `null` for non-Mercer benchmarks.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } }, employees: { type: array, items: { title: CompensationBenchmarkJobLocationEmployee, properties: { id: { type: string }, name: { type: string }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, photoUrl: { type: string }, managerName: { oneOf: [{ type: string }, { type: 'null' }] }, managerTitle: { oneOf: [{ type: string }, { type: 'null' }] }, division: { properties: { id: { type: string }, value: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, department: { properties: { id: { type: string }, value: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, currencyConversionFailed: { type: boolean } }, type: object } }, internalJobPayBand: { properties: { jobId: { type: string }, group: { type: string }, level: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { type: string } }, type: object } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } } + dismissReviewBanner: { type: boolean } + dismissAddLocationBanner: { type: boolean } + dismissMercerDataInfoBanner: { type: boolean } + type: object + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while loading compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks + put: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Update Compensation Benchmark' + description: 'Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`.' + operationId: update-compensation-benchmark + requestBody: + content: + application/json: + schema: + title: UpdateCompensationBenchmarkRequest + required: + - id + - currencyCode + - benchmarkValue + - benchmarkMin + - benchmarkMax + properties: + id: + description: 'ID of the benchmark to update.' + type: string + currencyCode: + description: 'ISO 4217 currency code for the benchmark values.' + type: string + mjlJobCode: + description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' + type: string + benchmarkValue: + description: 'Benchmark median value.' + type: number + benchmarkMin: + description: 'Benchmark minimum value.' + type: number + benchmarkMax: + description: 'Benchmark maximum value.' + type: number + benchmarkSource: + description: 'Free-text label describing where the benchmark came from.' + type: string + externalJobTitle: + type: string + externalLocation: + type: string + externalLevel: + type: string + externalJobDescription: + type: string + companiesSurveyed: + type: integer + employeesSurveyed: + type: integer + sourceId: + description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' + type: string + sourceDate: + description: 'Date the benchmark source data applies to.' + type: string + dataYear: + description: 'Year of the underlying survey data. Omitting this field clears `data_year` on the stored benchmark, so callers updating a Mercer benchmark should resend the existing value.' + type: string + externalCountry: + type: string + externalSecondaryLocation: + type: string + externalCompanySize: + type: string + externalIndustry: + type: string + type: object + responses: + '200': + description: 'Object containing the saved benchmark row and a status message.' + content: + application/json: + schema: + title: UpdatedCompensationBenchmark + properties: + savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { oneOf: [{ type: string }, { type: 'null' }] }, mercerJobCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkSource: { oneOf: [{ type: string }, { type: 'null' }] }, currencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkValue: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMin: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMax: { oneOf: [{ type: number }, { type: 'null' }] }, externalJobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, externalLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalLevel: { oneOf: [{ type: string }, { type: 'null' }] }, externalJobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, externalCountry: { oneOf: [{ type: string }, { type: 'null' }] }, externalSecondaryLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalCompanySize: { oneOf: [{ type: string }, { type: 'null' }] }, externalIndustry: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + message: { type: string } + type: object + '403': + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while saving the benchmark.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + post: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Create Compensation Benchmark' + description: "Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`." + operationId: create-compensation-benchmark + requestBody: + content: + application/json: + schema: + title: CreateCompensationBenchmarkRequest + required: + - jobTitleId + - currencyCode + - benchmarkValue + - benchmarkMin + - benchmarkMax + properties: + jobTitleId: + description: 'ID of the company job title the benchmark applies to.' + type: string + jobLocationId: + description: 'Optional job location ID to scope the benchmark to a specific location.' + type: string + currencyCode: + description: 'ISO 4217 currency code for the benchmark values.' + type: string + mjlJobCode: + description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' + type: string + benchmarkValue: + description: 'Benchmark median value.' + type: number + benchmarkMin: + description: 'Benchmark minimum value.' + type: number + benchmarkMax: + description: 'Benchmark maximum value.' + type: number + benchmarkSource: + description: 'Free-text label describing where the benchmark came from.' + type: string + externalJobTitle: + type: string + externalLocation: + type: string + externalLevel: + type: string + externalJobDescription: + type: string + companiesSurveyed: + type: integer + employeesSurveyed: + type: integer + sourceId: + description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' + type: string + sourceDate: + description: 'Date the benchmark source data applies to.' + type: string + dataYear: + description: 'Year of the underlying survey data.' + type: string + externalCountry: + type: string + externalSecondaryLocation: + type: string + externalCompanySize: + type: string + externalIndustry: + type: string + type: object + responses: + '200': + description: 'Object containing the newly created benchmark row and a status message.' + content: + application/json: + schema: + title: CreatedCompensationBenchmark + properties: + savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { oneOf: [{ type: string }, { type: 'null' }] }, mercerJobCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkSource: { oneOf: [{ type: string }, { type: 'null' }] }, currencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkValue: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMin: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMax: { oneOf: [{ type: number }, { type: 'null' }] }, externalJobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, externalLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalLevel: { oneOf: [{ type: string }, { type: 'null' }] }, externalJobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, externalCountry: { oneOf: [{ type: string }, { type: 'null' }] }, externalSecondaryLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalCompanySize: { oneOf: [{ type: string }, { type: 'null' }] }, externalIndustry: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + message: { type: string } + type: object + '403': + description: 'The authenticated caller lacks permission to create compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while creating the benchmark.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/details/export: + get: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Export Compensation Benchmark Details' + description: "Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job." + operationId: export-compensation-benchmark-details + parameters: + - + name: jobId + in: query + description: 'ID of the company job title to export benchmark details for.' + required: true + schema: + type: string + - + name: locationId + in: query + description: 'Optional job location ID to restrict the export to one location.' + required: false + schema: + type: string + responses: + '200': + description: 'CSV payload streamed with a `Content-Disposition: attachment` header. The filename is derived from the job title and location.' + content: + text/csv: + schema: + title: CompensationBenchmarkDetailsExport + type: string + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while generating the CSV export. Also returned when `jobId` is missing.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks + /api/v1/compensation/benchmarks/details: + get: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Get Compensation Benchmark Details' + description: 'Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values.' + operationId: get-compensation-benchmark-details + parameters: + - + name: jobId + in: query + description: 'ID of the company job title to fetch benchmark details for.' + required: true + schema: + type: string + - + name: locationId + in: query + description: 'Optional job location ID. When omitted, results aggregate across all locations for the job.' + required: false + schema: + type: string + responses: + '200': + description: 'Benchmark detail object for the requested job (and optional location).' + content: + application/json: + schema: + title: CompensationBenchmarkDetails + properties: + jobId: { type: string } + jobTitle: { type: string } + locationId: { oneOf: [{ type: string }, { type: 'null' }] } + location: { oneOf: [{ type: string }, { type: 'null' }] } + mercerBenchmarkDetails: { description: 'Populated when a Mercer benchmark is linked to this job/location.', properties: { id: { type: string }, source: { type: string }, jobCode: { type: string }, jobTitle: { type: string }, jobLocation: { type: string }, jobLevel: { oneOf: [{ type: string }, { type: 'null' }] }, jobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, formattedJobDescription: { oneOf: [{ type: array, items: { type: string } }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, lastReviewed: { oneOf: [{ type: string }, { type: 'null' }] }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, createdYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, updatedYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + companyPayRange: { description: 'Pay range aggregated from the current employees in this job and location.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + internalJobPayBand: { description: 'Company-configured internal pay band for this job.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + benchmarkValues: { description: 'All saved benchmarks for this job/location. Empty when no benchmarks exist.', type: array, items: { properties: { id: { type: integer }, jobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, lastEdited: { oneOf: [{ type: string }, { type: 'null' }] }, sourceColorCode: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, createdYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, updatedYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string } }, type: object } } + employees: { type: array, items: { title: CompensationBenchmarkDetailEmployee, properties: { id: { type: integer }, name: { type: string }, jobTitle: { properties: { id: { type: string }, value: { type: string }, jobTitle: { type: string } }, type: object }, location: { properties: { id: { type: string }, value: { type: string }, name: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, varianceFromPayBand: { properties: { amount: { type: number }, currencyCode: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, yearsAtCompany: { type: integer }, rangePenetration: { oneOf: [{ type: number }, { type: 'null' }] }, compaRatio: { oneOf: [{ type: number }, { type: 'null' }] }, compaRatioStatus: { oneOf: [{ type: string }, { type: 'null' }] }, photoUrl: { type: string }, country: { oneOf: [{ type: string }, { type: 'null' }] }, isRemote: { oneOf: [{ type: boolean }, { type: 'null' }] }, currencyConversionFailed: { type: boolean } }, type: object } } + type: object + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while loading benchmark details. Also returned when `jobId` is missing.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks + '/api/v1/compensation/benchmarks/{id}': + delete: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Delete Compensation Benchmark' + description: 'Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`.' + operationId: delete-compensation-benchmark + parameters: + - + name: id + in: path + description: 'Integer ID of the compensation benchmark to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Literal string `"Success"` indicating the benchmark was deleted.' + content: + application/json: + schema: + title: DeleteCompensationBenchmarkResponse + type: string + '403': + description: 'The authenticated caller lacks permission to delete compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while deleting the benchmark.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/sources: + get: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'List Compensation Benchmark Sources' + description: 'Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark.' + operationId: list-compensation-benchmark-sources + responses: + '200': + description: 'Array of benchmark sources. Empty when no sources are configured.' + content: + application/json: + schema: + title: CompensationBenchmarkSources + type: array + items: + title: CompensationBenchmarkSource + properties: { id: { type: string }, name: { type: string }, sort: { description: 'Sort order position, returned as a numeric string.', type: string }, count: { description: 'Number of benchmarks attached to this source, returned as a numeric string.', type: string }, colorCode: { description: 'Hex color used to display the source in the UI.', oneOf: [{ type: string }, { type: 'null' }] } } + type: object + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while loading benchmark sources.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks + put: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Update Compensation Benchmark Sources' + description: 'Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ "result": "success" }` when all updates are applied.' + operationId: update-compensation-benchmark-sources + requestBody: + content: + application/json: + schema: + title: UpdateCompensationBenchmarkSourcesRequest + required: + - benchmarkSources + properties: + benchmarkSources: + type: array + items: { title: UpdateCompensationBenchmarkSourceItem, required: [id, name], properties: { id: { description: 'ID of the existing benchmark source to update.', type: string }, name: { description: 'New display name for the source. Cannot equal `mercer`.', type: string }, sort: { description: 'Optional new sort position, as a numeric string.', type: string } }, type: object } + type: object + responses: + '200': + description: 'Object containing `{ "result": "success" }` when all source updates succeed.' + content: + application/json: + schema: + title: UpdateCompensationBenchmarkSourcesResponse + properties: + result: { type: string } + type: object + '400': + description: 'The `benchmarkSources` array is missing, empty, contains items without `id` or `name`, or contains the reserved `mercer` name.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while updating benchmark sources.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + post: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Create Compensation Benchmark Source' + description: "Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name." + operationId: create-compensation-benchmark-source + requestBody: + content: + application/json: + schema: + title: CreateCompensationBenchmarkSourceRequest + required: + - name + properties: + name: + description: 'Display name for the new benchmark source. Cannot be empty or equal to `mercer`.' + type: string + colorCode: + description: 'Optional hex color used to display the source in the UI.' + type: string + type: object + responses: + '200': + description: "Object with the newly created source's ID and name." + content: + application/json: + schema: + title: CreatedCompensationBenchmarkSource + properties: + id: { description: 'ID of the newly created benchmark source.', type: integer } + name: { type: string } + type: object + '400': + description: 'The `name` is missing, empty, or the reserved value `mercer`.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while creating the benchmark source.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + delete: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Delete Compensation Benchmark Source' + description: 'Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ "result": "success" }` when the source is removed.' + operationId: delete-compensation-benchmark-source + requestBody: + content: + application/json: + schema: + title: DeleteCompensationBenchmarkSourceRequest + required: + - id + properties: + id: + description: 'ID of the benchmark source to delete. Must be non-empty.' + type: string + type: object + responses: + '200': + description: 'Object containing `{ "result": "success" }` when the source is deleted.' + content: + application/json: + schema: + title: DeleteCompensationBenchmarkSourceResponse + properties: + result: { type: string } + type: object + '400': + description: 'The id is missing, empty, or not a valid non-zero numeric identifier.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while deleting the benchmark source.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/import: + post: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Import Compensation Benchmarks From CSV' + description: 'Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed.' + operationId: import-compensation-benchmarks + requestBody: + description: 'Multipart form containing a single `file` part with the CSV upload.' + required: true + content: + multipart/form-data: + schema: + title: ImportCompensationBenchmarksRequest + required: + - file + properties: + file: + description: 'CSV file to import.' + type: string + format: binary + type: object + responses: + '200': + description: 'Parsed CSV preview containing the raw rows and a suggested column map.' + content: + application/json: + schema: + title: ImportCompensationBenchmarksResponse + properties: + uploadData: { description: 'Parsed CSV rows. Each row is an array of cell values as strings.', type: array, items: { title: ImportCompensationBenchmarksRow, type: array, items: { type: string } } } + columnMap: { description: 'Suggested mapping between expected benchmark fields and CSV column headers.', type: array, items: { $ref: '#/components/schemas/CompensationBenchmarking-ColumnMap' } } + type: object + '400': + description: 'The multipart request is missing the `file` part.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to import compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The uploaded CSV could not be parsed (missing columns, invalid data, etc.).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while parsing the CSV upload.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/employees: + get: + tags: + - Employees + - 'Public API' + summary: 'List Employees' + description: "Returns a cursor-paginated collection of employees for the authenticated caller's company. The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead." + operationId: list-employees + parameters: + - + name: filter + in: query + description: 'Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported.' + required: false + style: deepObject + explode: true + schema: + $ref: '#/components/schemas/GetEmployeesFilterRequestObject' + - + name: sort + in: query + description: 'Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error.' + required: false + schema: + type: string + example: '-lastName,firstName' + - + name: fields + in: query + description: "Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array." + required: false + style: form + explode: false + schema: + type: array + items: + $ref: '#/components/schemas/EmployeeOptionalField' + example: 'workEmail,mobilePhone' + - + name: page + in: query + description: "Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page." + required: false + style: deepObject + explode: true + schema: + $ref: '#/components/schemas/EmployeeCursorPaginationQueryObject' + responses: + '200': + description: 'Paginated list of employees.' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeesResponseObject' + examples: + basic: + summary: 'Basic paginated result' + value: { data: [{ employeeId: '123', firstName: Ava, lastName: Nguyen, preferredName: Ava, photoUrl: 'https://cdn.example.com/p/123.jpg', jobTitleName: 'Engineering Manager', status: Active, _restrictedFields: [] }, { employeeId: '124', firstName: Sam, lastName: Park, preferredName: Sam, photoUrl: null, jobTitleName: 'Product Designer', status: Active, _restrictedFields: [photoUrl] }], meta: { total: 2456, page: { limit: 100, nextCursor: eyJuZXh0RW1wbG95ZWUiOjEyNX0=, prevCursor: null } }, _links: { self: { href: 'https://example.bamboohr.com/api/v1/employees?page%5Blimit%5D=100' }, next: { href: 'https://example.bamboohr.com/api/v1/employees?page%5Blimit%5D=100&page%5Bafter%5D=eyJuZXh0RW1wbG95ZWUiOjEyNX0%3D' } } } + batchByIds: + summary: 'Batch fetch by a list of employee IDs' + value: { data: [{ employeeId: '200', firstName: Lena, lastName: Smith, preferredName: Lena, photoUrl: null, jobTitleName: 'QA Analyst', status: Active, _restrictedFields: [] }, { employeeId: '207', firstName: Marco, lastName: Lee, preferredName: null, photoUrl: null, jobTitleName: 'Support Engineer', status: Inactive, _restrictedFields: [photoUrl] }], meta: { total: 2, page: { limit: 250, nextCursor: null, prevCursor: null } }, _links: { self: { href: 'https://example.bamboohr.com/api/v1/employees?filter%5Bids%5D=200%2C207' } } } + '400': + description: 'Invalid request parameters. The `error.code` is `BadRequest` for filter, sort, or field validation failures (for example an unknown sort field, or `filter[status]` outside `active` / `inactive`) and `BadPage` when the `page` cursor is malformed, the wrong cursor direction is supplied, or the boundary employee changed between calls (for example, was deleted or no longer matches the filter).' + content: + application/json: + schema: + $ref: '#/components/schemas/Employee-StringCodeErrorResponse-V1' + '401': + description: Unauthorized. + '429': + description: 'Too many requests.' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:name' + - + oauth: + - 'employee:job' + - + oauth: + - employee_directory + - + oauth: + - 'sensitive_employee:protected_info' + post: + tags: + - Employees + - 'Public API' + summary: 'Create Employee' + description: "Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nThis endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo.\n\nTrax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location." + operationId: create-employee + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/postNewEmployee' + application/xml: + schema: + $ref: '#/components/schemas/postNewEmployee' + text/xml: + schema: + $ref: '#/components/schemas/postNewEmployee' + responses: + '201': + description: 'Employee created successfully.' + headers: + Location: + description: 'The URL to view the employee in the web app. The ID of the employee will be included.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' + '400': + description: 'If the posted XML or JSON is invalid or the minimum fields are not provided.' + '403': + description: 'If the API user does not have permission to add an employee.' + '409': + description: 'If an employee field was given an invalid value.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:contact.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:demographic.write' + - + oauth: + - 'employee:dependent.write' + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:education.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'employee:identification.write' + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:management.write' + - + oauth: + - 'employee:name.write' + - + oauth: + - 'employee:photo.write' + - + oauth: + - 'employee:vaccination.write' + - + oauth: + - 'sensitive_employee:protected_info.write' + - + oauth: + - 'sensitive_employee:address.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:payroll.write' + - + oauth: + - employee + - + oauth: + - 'employee:job' + '/api/v1/employees/{id}': + get: + tags: + - Employees + - 'Public API' + summary: 'Get Employee' + description: 'Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead.' + operationId: get-employee + parameters: + - + name: id + in: path + description: 'The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{"id": "0"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel.' + required: true + schema: + type: string + - + name: fields + in: query + description: 'Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response.' + required: false + schema: + type: string + - + name: onlyCurrent + in: query + description: 'When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned.' + required: false + schema: + type: boolean + default: true + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'An object keyed by field name with the requested employee''s values. `id` is always present and is a string. Fields the authenticated caller cannot view are silently omitted. When `Accept: application/xml`, the body is an `` element with one `` child per returned field.' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' + '400': + description: 'The `fields` parameter contained more than 400 entries.' + '401': + description: Unauthorized. + '403': + description: 'The authenticated user does not have permission to view this employee.' + '404': + description: 'No employee was found for the supplied ID.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:assets' + - + oauth: + - 'employee:contact' + - + oauth: + - 'employee:compensation' + - + oauth: + - 'employee:custom_fields_encrypted' + - + oauth: + - 'employee:custom_fields' + - + oauth: + - 'employee:demographic' + - + oauth: + - 'employee:dependent' + - + oauth: + - 'employee:dependent:ssn' + - + oauth: + - 'employee:education' + - + oauth: + - 'employee:emergency_contacts' + - + oauth: + - 'employee:identification' + - + oauth: + - 'employee:job' + - + oauth: + - 'employee:management' + - + oauth: + - 'employee:name' + - + oauth: + - 'employee:photo' + - + oauth: + - 'employee:vaccination' + - + oauth: + - 'sensitive_employee:protected_info' + - + oauth: + - 'sensitive_employee:address' + - + oauth: + - 'sensitive_employee:creditcards' + - + oauth: + - 'employee:job.write' + post: + tags: + - Employees + - 'Public API' + summary: 'Update Employee' + description: "Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nThis endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo).\n\nTrax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location." + operationId: update-employee + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Employee' + application/xml: + schema: + $ref: '#/components/schemas/Employee' + text/xml: + schema: + $ref: '#/components/schemas/Employee' + responses: + '200': + description: 'Employee updated successfully.' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' + '400': + description: 'Provided JSON is malformed, or required fields are missing.' + '403': + description: 'The API user does not have permission to see the employee or to update any of the requested fields.' + '404': + description: 'The employee does not exist.' + '409': + description: 'A field was given an invalid value (e.g., duplicate email, invalid state/country, incompatible pay type).' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:contact.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:demographic.write' + - + oauth: + - 'employee:dependent.write' + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:education.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'employee:identification.write' + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:management.write' + - + oauth: + - 'employee:name.write' + - + oauth: + - 'employee:photo.write' + - + oauth: + - 'employee:vaccination.write' + - + oauth: + - 'sensitive_employee:protected_info.write' + - + oauth: + - 'sensitive_employee:address.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:payroll.write' + - + oauth: + - employee + - + oauth: + - 'employee:job' + delete: + tags: + - Employees + - 'Public API' + summary: 'Delete employee' + description: 'Permanently deletes an employee record and all associated data.' + operationId: delete-employee + parameters: + - + name: id + in: path + description: 'ID of the employee to delete.' + required: true + schema: + type: integer + responses: + '204': + description: 'Employee deleted successfully.' + '403': + description: 'Insufficient permissions.' + '500': + description: 'Internal server error.' + '404': + description: 'Employee not found.' + security: + - + oauth: + - employee.write + '/api/v1/employees/{id}/tables/{table}/{rowId}': + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Update Table Row' + description: 'Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML.' + operationId: update-table-row + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: rowId + in: path + description: 'The ID of the row to update.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row updated successfully. A 200 response is returned as long as at least one field was updated, even if some fields were skipped due to permissions. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee, table, or row does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + delete: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Delete Employee Table Row' + description: "Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list." + operationId: delete-employee-table-row + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: rowId + in: path + description: 'The ID of the specific row to delete.' + required: true + schema: + type: string + responses: + '200': + description: 'Returns `success: true` if the row was deleted. Returns `success: false` with an error message if the row was not found or could not be deleted.' + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowDeleteResponse' + '400': + description: 'Bad request. Invalid employee ID or table name.' + '401': + description: Unauthorized. + '403': + description: 'Permission denied. The caller lacks write access to this table for the specified employee.' + '409': + description: 'Conflict. The row has pending approval changes and cannot be deleted until they are resolved.' + '412': + description: 'Precondition failed. The row cannot be deleted because it is tied to an active pay schedule.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + '/api/v1/files/{fileId}': + get: + tags: + - 'Company Files' + - 'Public API' + summary: 'Get Company File' + description: "Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section." + operationId: get-company-file + parameters: + - + name: fileId + in: path + description: 'The ID of the company file to download.' + required: true + schema: + type: integer + responses: + '200': + description: "The raw file content. The Content-Type header reflects the file's MIME type." + content: + application/octet-stream: { } + '403': + description: 'The API user does not have permission to access this file.' + '404': + description: 'No file exists with the given ID.' + security: + - + basic: [] + - + oauth: + - company_file + post: + tags: + - 'Company Files' + - 'Public API' + summary: 'Update Company File' + description: 'Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated.' + operationId: update-company-file + parameters: + - + name: fileId + in: path + description: 'The ID of the company file to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyFileUpdate' + responses: + '200': + description: 'The company file was updated successfully.' + '400': + description: 'The request body contains malformed JSON or XML.' + '403': + description: 'The API user does not have permission to modify this file or its category.' + '404': + description: 'The file or the target category was not found.' + security: + - + basic: [] + - + oauth: + - company_file.write + delete: + tags: + - 'Company Files' + - 'Public API' + summary: 'Delete Company File' + description: 'Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use "Company Files > List Company Files" to obtain file IDs.' + operationId: delete-company-file + parameters: + - + name: fileId + in: path + description: 'The ID of the company file to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'The company file was deleted successfully. No response body is returned.' + '403': + description: 'The API user does not have permission to delete the requested file.' + '404': + description: 'The requested file was not found, or the Files tool is not enabled for the company.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{id}/files/{fileId}': + get: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Get Employee File' + description: "Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the API key.\n\nUse \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404." + operationId: get-employee-file + parameters: + - + name: id + in: path + description: 'The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key.' + required: true + schema: + type: integer + - + name: fileId + in: path + description: 'The ID of the employee file to download.' + required: true + schema: + type: integer + responses: + '200': + description: "The employee file content streamed as a binary download. The Content-Type matches the file's stored MIME type and a Content-Disposition header provides the original filename." + content: + application/octet-stream: + schema: + title: 'Employee File Download' + type: string + format: binary + '403': + description: "The API user does not have permission to access the requested employee or the file's section." + '404': + description: 'The requested employee file was not found, or it has been archived or soft-deleted.' + security: + - + basic: [] + - + oauth: + - 'employee:file' + post: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Update Employee File' + description: "Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs." + operationId: update-employee-file + parameters: + - + name: id + in: path + description: 'The ID of the employee whose file is being updated.' + required: true + schema: + type: integer + - + name: fileId + in: path + description: 'The ID of the employee file to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeFileUpdate' + application/xml: + schema: + $ref: '#/components/schemas/EmployeeFileUpdate' + responses: + '200': + description: 'The employee file metadata was updated successfully. No response body is returned.' + '400': + description: 'The request body contains malformed JSON or XML.' + '403': + description: "The API user does not have permission to modify the requested employee's file, its category, or the file belongs to a read-only section." + '404': + description: 'The requested employee file or target category was not found.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + delete: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Delete Employee File' + description: "Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the API key. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs." + operationId: delete-employee-file + parameters: + - + name: id + in: path + description: 'The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key.' + required: true + schema: + type: integer + - + name: fileId + in: path + description: 'The ID of the employee file to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'The employee file was deleted successfully, or had already been deleted for this employee.' + '403': + description: "The caller does not have permission to delete this employee's file, or the file belongs to a BambooPayroll-managed section and the caller is not a payroll admin." + '404': + description: 'The file was not found for the specified employee, or the Files tool is not enabled for this company.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + /api/v1/pay-grades-and-bands/job-titles-with-employees: + get: + tags: + - 'Public API' + summary: 'List job titles with employees' + description: 'Get job titles with their associated employees for levels and bands configuration.' + operationId: 3af7d1ac36c35008b8ebb93fecbdb35b + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + title: PayGradesAndBandsJobTitlesWithEmployeesResponse + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitleWithEmployees' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/status-counts: + get: + tags: + - 'Public API' + summary: 'Get compensation level group status counts' + description: 'Get the count of compensation level groups in each status (draft, published, historic).' + operationId: 99b887959832c80eead3a176acc0c2d4 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-GroupStatusCounts' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/status: + get: + tags: + - 'Public API' + summary: 'Get levels and bands status' + description: 'Get the validation status of each step in the levels and bands configuration wizard.' + operationId: 6fbb2fe60e374d2204f1222252105945 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBandsStatus' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/levels: + get: + tags: + - 'Public API' + summary: 'List compensation level groups and levels' + description: 'Get all compensation level groups and levels with validation errors and warnings.' + operationId: db8c61787c931b69afbf9e501be85256 + responses: + '200': + description: 'Successfully retrieved groups and levels' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + put: + tags: + - 'Public API' + summary: 'Save compensation level groups and levels' + description: 'Upsert compensation level groups and levels. Creates new groups or levels or updates existing ones. Does not delete existing data not included in the request.' + operationId: 432e469fe5959a6ccd765d02018e7db4 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + responses: + '200': + description: 'Successfully saved groups and levels' + content: + application/json: + schema: + title: PayGradesAndBandsSaveLevelsResponse + properties: + status: { type: string, example: success } + type: object + '400': + description: 'Invalid request body' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/pay-bands: + get: + tags: + - 'Public API' + summary: 'Get pay bands for levels' + description: 'Get pay bands for each compensation level with validation errors and warnings. If percentageRange is null, band type is min-mid-max; otherwise it is percentage-based.' + operationId: fb29d4d4790104b6892a4b6d6db67e19 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + put: + tags: + - 'Public API' + summary: 'Update pay bands' + description: 'Bulk update pay bands for compensation levels.' + operationId: ad7871529b2a9c6612f8dd3c62192c08 + requestBody: + required: true + content: + application/json: + schema: + required: + - payBands + - payBandType + properties: + payBandType: + type: string + enum: [percentRange, minMidMax] + payBands: + type: array + items: { $ref: '#/components/schemas/LevelsAndBands-PayBand' } + type: object + responses: + '200': + description: 'Successfully updated pay bands' + content: + application/json: + schema: + title: PayGradesAndBandsUpdatePayBandsResponse + properties: + status: { type: string, example: success } + type: object + '400': + description: 'Invalid pay bands payload' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/job-titles: + get: + tags: + - 'Public API' + summary: 'Get job titles and level assignments' + description: 'Get job titles with their associated compensation levels and all groups/levels. Returns job titles mapped to level IDs and complete group/level hierarchy.' + operationId: 4acdbb25aa278f9f94b44b42ef9f1b27 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + put: + tags: + - 'Public API' + summary: 'Update job title level assignments' + description: 'Replace draft job title-to-level assignments with the provided associations.' + operationId: 2a0b847ceec3a4f9bfe20cf27e10e81a + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-JobTitleAssignmentsRequest' + responses: + '200': + description: 'Successfully updated job title assignments' + content: + application/json: + schema: + title: PayGradesAndBandsUpdateJobTitlesResponse + properties: + status: { type: string, example: success } + type: object + '400': + description: 'Invalid request body' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/review: + get: + tags: + - 'Public API' + summary: 'Get levels and bands review data' + description: 'Get consolidated review data for levels and bands with all validation errors and warnings across all steps.' + operationId: 12c40475623893cf0434b3ae69e36975 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands: + get: + tags: + - 'Public API' + summary: 'Get published levels and bands' + description: 'Get published levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' + operationId: cfacff2b34cf1e65ccd1ab188c5e1d12 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/publish: + post: + tags: + - 'Public API' + summary: 'Publish draft compensation level groups' + description: 'Publish all draft compensation level groups and mark any published groups as historic.' + operationId: 22932a81ba129f22114ccdef397af933 + responses: + '200': + description: 'Successfully published draft groups' + content: + application/json: + schema: + title: PayGradesAndBandsPublishResponse + properties: + status: { type: string, example: success } + type: object + '400': + description: 'Invalid data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/import: + post: + tags: + - 'Public API' + summary: 'Import levels and bands from CSV' + description: 'Parse and validate a levels and bands CSV upload and return suggested mappings and validation results.' + operationId: cdd8659ca89fb38042fd56feab507edf + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + description: 'Levels and bands import CSV' + type: string + format: binary + type: object + responses: + '200': + description: 'Successfully parsed CSV' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-UploadResponse' + '400': + description: 'Multipart request missing file' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Uploaded CSV could not be parsed or validated' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + '/api/v1/pay-grades-and-bands/levels/{segment}': + delete: + tags: + - 'Public API' + summary: 'Delete groups by status or delete one level' + description: 'Delete compensation level groups when `segment` is `draft`, `published`, or `historic`, or delete a single compensation level when `segment` is a numeric level identifier.' + operationId: 0da9c9f851462d2e44dfe866b8e67e74 + parameters: + - + name: segment + in: path + description: 'Either `draft`, `published`, or `historic` to delete groups by status, or a numeric level id to delete one level.' + required: true + schema: + type: string + example: draft + responses: + '200': + description: 'Successfully deleted groups (`{"status":"success"}`) or returned updated hierarchy after deleting a level.' + content: + application/json: + schema: + title: PayGradesAndBandsDeleteResponse + type: object + '400': + description: 'Invalid segment' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Level not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - pay_grades_and_bands.write + '/api/v1/performance/employees/{employeeId}/goals/filters': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goal Filters (v1)' + description: 'Deprecated. Use "Get Goal Filters (v1.1)" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version.' + operationId: get-goals-filters-v1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: integer + responses: + '200': + description: 'Returns goal status filter counts. Goals with milestones are excluded in this version.' + content: + application/json: + schema: + $ref: '#/components/schemas/GoalFiltersV1' + '403': + description: 'The API user does not have permission to view goals for this employee.' + '500': + description: 'Something went wrong fetching filters.' + deprecated: true + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals': + get: + tags: + - Goals + - 'Public API' + summary: 'List Goals' + description: 'Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says "all goals", "including closed", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal.' + operationId: list-goals + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: string + - + name: filter + in: query + description: 'Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission.' + schema: + type: string + enum: + - status-inProgress + - status-completed + - status-closed + - status-all + responses: + '200': + description: 'The response content will be a JSON document with the requested information.' + content: + application/json: + schema: + title: GoalsList + properties: + goals: { description: 'All goals of the selected employee', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } + type: object + '403': + description: 'The API user does not have permission to view goals for this employee.' + security: + - + basic: [] + - + oauth: + - goal + post: + tags: + - Goals + - 'Public API' + summary: 'Create Goal' + description: 'Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal''s progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ "title": string }` objects; the goal''s percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal).' + operationId: create-goal + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - title + - dueDate + - sharedWithEmployeeIds + properties: + title: + description: 'The title of the goal' + type: string + example: 'New Goal To update' + description: + description: 'A detailed description of the goal' + type: string + example: 'This should be fun!' + dueDate: + description: 'The due date for the goal in YYYY-MM-DD format' + type: string + format: date + example: '2025-12-17' + percentComplete: + description: 'Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`.' + type: integer + maximum: 100 + minimum: 0 + example: 0 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error.' + example: null + oneOf: [{ type: string, format: date }, { type: 'null' }] + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + example: [1234, 5678] + alignsWithOptionId: + description: 'ID of the option this goal aligns with' + oneOf: [{ type: integer }, { type: 'null' }] + milestones: + description: 'Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal.' + type: array + items: { properties: { title: { description: 'The title of the milestone', type: string, example: 'Surprise, it is a milestone' } }, type: object } + example: [{ title: 'Surprise, it is a milestone' }, { title: 'Now there are two of them!' }] + type: object + responses: + '201': + description: 'A goal object that includes the new goal.' + content: + application/json: + schema: + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request body is invalid or required fields are missing or malformed (e.g. invalid dueDate, percentComplete out of range, completionDate provided with a non-100 percentComplete, sharedWithEmployeeIds not an array or missing the goal owner).' + content: + application/json: { } + '403': + description: 'If the API user does not have permission to create a goal for this employee.' + content: + application/json: { } + '500': + description: 'If there was a problem creating the goal.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Goal (v1)' + description: 'Deprecated. Use "Update Goal (v1.1)" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1.' + operationId: update-goal-v1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + requestBody: + description: "Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGoalV1' + responses: + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + content: + application/json: + schema: + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The posted JSON is invalid.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + '500': + description: 'If there was a problem updating the goal.' + content: + application/json: { } + deprecated: true + security: + - + basic: [] + - + oauth: + - goal.write + delete: + tags: + - Goals + - 'Public API' + summary: 'Delete Goal' + description: 'Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found.' + operationId: delete-goal + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`.' + required: true + schema: + type: string + responses: + '204': + description: 'The goal was successfully deleted.' + '403': + description: 'The API user does not have permission to delete this goal.' + '404': + description: 'The goalId is zero or non-positive after integer cast, or the goal was not found.' + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Goal Progress' + description: 'Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete.' + operationId: update-goal-progress + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: integer + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: integer + requestBody: + description: 'The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead.' + required: true + content: + application/json: + schema: + required: + - percentComplete + properties: + percentComplete: + description: 'The percentage of completion for the goal (0-100)' + type: integer + maximum: 100 + minimum: 0 + example: 100 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100.' + example: '2025-04-11' + oneOf: [{ type: string, format: date }, { type: 'null' }] + type: object + responses: + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + content: + application/json: + schema: + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request is invalid. Possible causes: percentComplete is out of range (0–100), the goal has milestones (use the milestone progress endpoint instead), or the specified employee is not associated with this goal.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'No goal found for the given goalId.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Milestone Progress' + description: "Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics." + operationId: update-goal-milestone-progress + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + - + name: milestoneId + in: path + description: 'milestoneId is the milestone ID for the specified goal.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - complete + properties: + complete: + description: 'Whether the milestone is complete or not' + type: boolean + example: true + type: object + responses: + '200': + description: 'The milestone progress was successfully updated. The response contains the updated goal details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request was invalid. Please check the request parameters and try again.' + '403': + description: 'User does not have permission to update this goal' + '404': + description: 'Goal or milestone not found' + '500': + description: 'Something went wrong updating your progress' + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Goal Sharing' + description: "Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's employee ID. Returns the updated goal object." + operationId: update-goal-sharing + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + requestBody: + description: 'Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' + required: true + content: + application/json: + schema: + properties: + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + type: object + responses: + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + content: + application/json: + schema: + title: GoalResponse + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } + type: object + '400': + description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array, sharedWithEmployeeIds is empty, or the specified employee is not associated with this goal.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'No goal found for the given goalId.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/aggregate': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goals Aggregate (v1)' + description: 'Deprecated. Use "Get Goals Aggregate (v1.1)" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' + operationId: get-goals-aggregate-v1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: string + - + name: filter + in: query + description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' + required: false + schema: + type: string + responses: + '200': + description: 'The response content will be a JSON object with the requested information.' + content: + application/json: + schema: + title: GoalsAggregateV1 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, deprecated: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: integer, example: 25, deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } + type: object + '403': + description: 'The API user does not have permission to view goals for this employee.' + deprecated: true + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals/canCreateGoals': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goal Creation Permission' + description: 'Determine if the API user has permission to create a goal for this employee.' + operationId: get-goal-creation-permission + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + responses: + '200': + description: 'Returns whether the API user can create a goal for this employee.' + content: + application/json: + schema: + title: CanCreateGoalsResponse + properties: + canCreateGoals: { description: 'Whether the API user can create a goal for this employee.', type: boolean, example: true } + type: object + '400': + description: 'The provided employeeId is invalid.' + '403': + description: 'The API user does not have permission to view goals for this employee.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals/shareOptions': + get: + tags: + - Goals + - 'Public API' + summary: 'List Goal Sharing Options' + description: 'Provides a list of employees with whom the specified employee\''s goals may be shared.' + operationId: list-goal-share-options + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to get sharing options for.' + required: true + schema: + type: string + - + name: search + in: query + description: 'The search term used to filter employees returned. Will search name, employee ID and email.' + required: true + schema: + type: string + - + name: limit + in: query + description: 'Maximum number of employees to return. Defaults to 10, maximum 100.' + schema: + type: integer + default: 10 + maximum: 100 + minimum: 1 + responses: + '200': + description: 'The response content will be a JSON document with a list of available employees with whom the goals can be shared.' + content: + application/json: + schema: + title: ShareOptionsResponse + properties: + persons: { description: 'List of employees with whom goals can be shared.', type: array, items: { $ref: '#/components/schemas/PersonInfoApiTransformer' } } + type: object + '400': + description: 'The search parameter is invalid or empty.' + '403': + description: 'Goals are not enabled, or the API user does not have permission to view sharing options for this employee.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments': + get: + tags: + - Goals + - 'Public API' + summary: 'List Goal Comments' + description: 'Returns comments for a goal, including each comment''s ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says "my comment" rather than providing a comment ID.' + operationId: list-goal-comments + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + responses: + '200': + description: 'Returns up to 50 comments for the specified goal, ordered by creation date.' + content: + application/json: + schema: + title: GoalCommentsResponse + properties: + comments: { description: 'Array of comment objects for the goal.', type: array, items: { properties: { id: { description: 'The comment ID.', type: string }, authorUserId: { description: 'The user ID of the comment author.', type: integer }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' }, text: { description: 'The text content of the comment.', type: string }, canEdit: { description: 'Whether the API user can edit this comment.', type: boolean }, canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } }, type: object } } + type: object + '403': + description: 'The API user does not have permission to view comments for this goal, or the goal does not belong to this employee.' + '404': + description: 'The specified goalId is invalid (non-positive integer).' + security: + - + basic: [] + - + oauth: + - goal + post: + tags: + - Goals + - 'Public API' + summary: 'Create Goal Comment' + description: 'Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID.' + operationId: create-goal-comment + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - text + properties: + text: + description: 'The text content of the comment.' + type: string + type: object + responses: + '201': + description: 'A goal comment object with the new goal comment ID.' + content: + application/json: + schema: + title: GoalCommentResponse + properties: + id: { description: 'The comment ID.', type: string } + authorUserId: { description: 'The user ID of the comment author.', type: integer } + createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } + text: { description: 'The text content of the comment.', type: string } + canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } + canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + type: object + '400': + description: 'The goal does not belong to the specified employee, or the comment text is blank.' + content: + application/json: { } + '403': + description: 'If the API user does not have permission to add a comment to the specified goal.' + content: + application/json: { } + '404': + description: 'The specified goalId was not found.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Goal Comment' + description: "Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification." + operationId: update-goal-comment + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + - + name: commentId + in: path + description: 'commentId is the comment ID for the specified goal.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - text + properties: + text: + description: 'The updated text content of the comment.' + type: string + type: object + responses: + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal comment response object for the specified commentId.' + content: + application/json: + schema: + title: GoalCommentResponse + properties: + id: { description: 'The comment ID.', type: string } + authorUserId: { description: 'The user ID of the comment author.', type: integer } + createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } + text: { description: 'The text content of the comment.', type: string } + canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } + canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + type: object + '400': + description: 'The goal does not belong to the specified employee, or the comment text is blank.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + delete: + tags: + - Goals + - 'Public API' + summary: 'Delete Goal Comment' + description: "Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification." + operationId: delete-goal-comment + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + - + name: commentId + in: path + description: 'commentId is the ID of a specific comment for the specified goal.' + required: true + schema: + type: string + responses: + '204': + description: 'The comment was successfully deleted. No response body is returned.' + '400': + description: 'The goal does not belong to the specified employee.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goal Aggregate' + description: 'Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request.' + operationId: get-goal-aggregate + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the Goal ID used to generate the aggregate information.' + required: true + schema: + type: string + responses: + '200': + description: 'The response content will be a JSON object with the requested information.' + content: + application/json: + schema: + title: GoalAggregate + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } + canAlign: { description: 'The selected user can align goals with other users.', type: boolean } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } + alignsWithOptions: { description: 'All possible goals that this goal could be aligned with.', type: array, items: { properties: { id: { description: 'Id of the goal that the selected goal could be aligned with.', type: integer, example: 8 }, title: { description: 'Title of the goal that the selected goal could be aligned with.', type: string, example: 'Get all team goals for January complete.' } }, type: object } } + comments: { description: 'Comments linked to selected goal.', type: array, items: { properties: { id: { description: 'Id of the comment.', type: string, example: '2' }, authorUserId: { description: 'Id of the author of the comment.', type: integer, example: 1534 }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2022-05-23T15:52:42Z' }, text: { description: 'The actual text of the comment.', type: string, example: 'This goal is taking longer than I thought.' }, canEdit: { description: 'Can the comment be edited.', type: boolean }, canDelete: { description: 'Can the comment be deleted.', type: boolean } }, type: object } } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } + type: object + '403': + description: 'The API user does not have permission to view this goal.' + '404': + description: 'The specified goalId was not found.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals/alignmentOptions': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Alignable Goal Options' + description: 'Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the API user. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as "alignment options are permission-restricted," not as proof that the goal ID is invalid.' + operationId: get-alignable-goal-options + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to get alignable goal options for.' + required: true + schema: + type: string + - + name: goalId + in: query + description: 'Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid.' + required: false + schema: + type: integer + responses: + '200': + description: 'The response content will be a JSON document with a list of goals that are available alignment options.' + content: + application/json: + schema: + title: AlignmentOptionsResponse + properties: + alignsWithOptions: { description: 'Array of goals available as alignment targets for the employee.', type: array, items: { properties: { id: { description: 'The goal ID.', type: string }, title: { description: 'The display title of the goal.', type: string } }, type: object } } + type: object + '400': + description: 'The provided goalId does not belong to the specified employee.' + '403': + description: 'The employeeId resolves to 0 (invalid path segment), or the API user lacks permission to view the specified goal.' + '404': + description: 'The provided goalId is zero or non-positive after integer cast (e.g. goalId=0, goalId=-1, or a non-numeric value such as goalId=abc).' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/close': + post: + tags: + - Goals + - 'Public API' + summary: 'Close Goal' + description: "Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed." + operationId: close-goal + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + requestBody: + description: 'An optional comment to record when closing the goal.' + required: false + content: + application/json: + schema: + properties: + comment: + description: 'Optional comment to record when closing the goal.' + example: 'Closing this goal as the deadline has passed.' + oneOf: [{ type: string }, { type: 'null' }] + type: object + responses: + '201': + description: 'The goal was successfully closed. The response body contains the updated goal object.' + content: + application/json: + schema: + title: GoalResponse + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } + type: object + '400': + description: 'The request is invalid. Possible causes: the specified employee is not associated with this goal, or the goal is a cascading goal with visible children and cannot be closed.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen': + post: + tags: + - Goals + - 'Public API' + summary: 'Reopen Goal' + description: "Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics." + operationId: reopen-goal + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + responses: + '201': + description: 'The goal was successfully reopened. The response body contains the updated goal object.' + content: + application/json: + schema: + title: GoalResponse + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } + type: object + '400': + description: 'The request is invalid. The specified employee is not associated with this goal.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1_1/performance/employees/{employeeId}/goals/filters': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goal Filters (v1.1)' + description: 'Deprecated. Use "Get Goal Filters (v1.2)" instead. Get the number of goals per status for an employee. Note: Compared to "Get Goal Filters (v1)", this version includes actions.' + operationId: get-goals-filters-v1.1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: integer + responses: + '200': + description: 'Contains the map of goal statuses, their counts, and available actions' + content: + application/json: + schema: + $ref: '#/components/schemas/GoalFiltersV1_1' + '403': + description: 'The API user does not have permission to view goals for this employee.' + '500': + description: 'Something went wrong fetching filters.' + deprecated: true + security: + - + basic: [] + - + oauth: + - goal + '/api/v1_1/performance/employees/{employeeId}/goals/aggregate': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goals Aggregate (v1.1)' + description: 'Deprecated. Use "Get Goals Aggregate (v1.2)" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to "Get Goals Aggregate (v1)", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' + operationId: get-goals-aggregate-v1.1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: string + - + name: filter + in: query + description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' + required: false + schema: + type: string + responses: + '200': + description: 'The response content will be a JSON object with the requested information.' + content: + application/json: + schema: + title: GoalsAggregateV1_1 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true, deprecated: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25', deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } + type: object + '403': + description: 'The API user does not have permission to view goals for this employee.' + deprecated: true + security: + - + basic: [] + - + oauth: + - goal + '/api/v1_1/performance/employees/{employeeId}/goals/{goalId}': + put: + tags: + - Goals + - 'Public API' + summary: 'Update Goal (v1.1)' + description: 'Update a goal''s top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to "Update Goal (v1)", this version adds milestone updates.' + operationId: update-goal-v1.1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: integer + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: integer + requestBody: + description: 'Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced.' + required: true + content: + application/json: + schema: + required: + - title + - dueDate + - sharedWithEmployeeIds + properties: + title: + description: 'The title of the goal' + type: string + example: 'Edited Goal With Milestones' + description: + description: 'A detailed description of the goal' + type: string + example: 'Lets go!' + dueDate: + description: 'The due date for the goal in YYYY-MM-DD format' + type: string + format: date + example: '2024-03-17' + percentComplete: + description: 'The percentage of completion for the goal (0-100). Defaults to 0 if omitted. Ignored when milestonesEnabled is true.' + type: integer + maximum: 100 + minimum: 0 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error. Ignored when milestonesEnabled is true.' + oneOf: [{ type: string, format: date }, { type: 'null' }] + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + example: [1234, 5678] + alignsWithOptionId: + description: 'ID of the option this goal aligns with' + oneOf: [{ type: integer }, { type: 'null' }] + milestonesEnabled: + description: 'Flag indicating whether milestones are enabled for this goal' + type: boolean + example: true + deletedMilestoneIds: + description: 'List of milestone IDs to be deleted from the goal' + type: array + items: { type: integer } + example: [490] + milestones: + description: 'Optional. New milestones to add to the goal. Each object in this array creates a new milestone — even if its title matches an existing milestone. Do not include existing milestones here unless you intentionally want duplicates. To remove milestones, use `deletedMilestoneIds`.' + type: array + items: { properties: { title: { description: 'The title of the milestone', type: string } }, type: object } + type: object + responses: + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + content: + application/json: + schema: + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array or missing the goal owner, percentComplete is out of range (0–100), the goal has milestones and percentComplete cannot be manually updated, or the goal is a cascading goal (not supported by this endpoint).' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } + '500': + description: 'Something went wrong editing your goal.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1_2/performance/employees/{employeeId}/goals/filters': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goal Filters (v1.2)' + description: 'Get the number of goals per status for an employee, including goals with milestones. Note: Compared to "Get Goal Filters (v1.1)", this version returns goals with milestones.' + operationId: get-goals-filters-v1.2 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: integer + responses: + '200': + description: 'Contains the map of goal statuses, their counts, and available actions' + content: + application/json: + schema: + $ref: '#/components/schemas/GoalFiltersV1_1' + '403': + description: 'The API user does not have permission to view goals for this employee.' + '500': + description: 'Something went wrong fetching filters.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1_2/performance/employees/{employeeId}/goals/aggregate': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goals Aggregate (v1.2)' + description: 'Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to "Get Goals Aggregate (v1.1)", this version returns goals that contain milestones.' + operationId: get-goals-aggregate-v1.2 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: integer + - + name: filter + in: query + description: "Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list." + required: false + schema: + type: string + responses: + '200': + description: 'The response content will be a JSON object with the requested information.' + content: + application/json: + schema: + title: GoalsAggregateV1_2 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25' }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2 } }, type: object } } + type: object + '403': + description: 'The API user does not have permission to view goals for this employee.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/timetracking/record/{id}': + get: + tags: + - Hours + - 'Public API' + summary: 'Get Time Tracking Record' + description: 'Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response.' + operationId: get-time-tracking-record + parameters: + - + name: id + in: path + description: 'The time tracking record ID used to originally create the record.' + required: true + schema: + type: string + responses: + '200': + description: 'Successfully retrieved the time tracking record.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingRecordSchema' + '400': + description: 'Invalid or missing argument.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions to view this record.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking + /api/v1/timetracking/add: + post: + tags: + - 'Public API' + - Hours + summary: 'Create Hour Record' + description: 'Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records.' + operationId: create-time-tracking-hour-record + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingRecord' + responses: + '201': + description: 'Record created. Returns the new time tracking ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingIdResponseSchema' + '400': + description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/timetracking/record: + post: + tags: + - 'Public API' + - Hours + summary: 'Create or Update Hour Records' + description: "Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures." + operationId: create-or-update-time-tracking-hour-records + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingRecordBulk' + responses: + '201': + description: "Returns an array of per-item results. Each item has a `success` boolean and a `response` object containing the resulting `id` on success, or a `message` describing the failure. Note: HTTP 201 is returned even when individual items fail; inspect each item's `success` field for partial failures." + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingBulkResponseSchema' + '403': + description: 'Forbidden. Insufficient user permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/timetracking/adjust: + put: + tags: + - 'Public API' + - Hours + summary: 'Update Hour Record' + description: 'Edits an existing hour record by `timeTrackingId`.' + operationId: update-time-tracking-record + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AdjustTimeTrackingRequestSchema' + responses: + '201': + description: 'Record updated. Returns the time tracking ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingIdResponseSchema' + '400': + description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient user permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + '/api/v1/timetracking/delete/{id}': + delete: + tags: + - 'Public API' + - Hours + summary: 'Delete Hour Record' + description: 'Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility.' + operationId: delete-time-tracking-hour-record + parameters: + - + name: id + in: path + description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' + required: true + schema: + type: string + responses: + '200': + description: 'Record removed.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingDeleteResponseSchema' + '400': + description: 'If the time tracking ID cannot be found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions to delete this record.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/compensation/total_rewards/employees: + post: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Add Employees to Total Rewards' + description: 'Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users.' + operationId: add-total-rewards-employees + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'List of employee IDs to add to Total Rewards.' + type: array + items: { type: integer } + type: object + responses: + '200': + description: 'Employees successfully added to Total Rewards.' + '400': + description: 'Invalid request (e.g. missing or empty employeeIds).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards employees.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Add Employees to Total Rewards' + delete: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Remove Employees from Total Rewards' + description: 'Remove employees from Total Rewards. Their Total Rewards profiles will be deleted.' + operationId: remove-total-rewards-employees + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'List of employee IDs to remove from Total Rewards.' + type: array + items: { type: integer } + type: object + responses: + '200': + description: 'Employees successfully removed from Total Rewards.' + '400': + description: 'Invalid request (e.g. missing or empty employeeIds).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards employees.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Remove Employees from Total Rewards' + '/api/v1/compensation/total_rewards/onboarding/{stepName}': + put: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Set Total Rewards Onboarding Step Status' + description: 'Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration.' + operationId: set-total-rewards-onboarding-step + parameters: + - + name: stepName + in: path + description: 'Name of the onboarding step.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - completed + properties: + completed: + description: 'Whether the step is completed.' + type: boolean + type: object + responses: + '200': + description: 'Onboarding step status updated successfully.' + content: + application/json: + schema: + $ref: '#/components/schemas/TotalRewardsOnboardingStep' + '400': + description: 'Invalid argument (e.g. invalid step name or non-boolean completed value).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards onboarding.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Set Total Rewards Onboarding Step Status' + /api/v1/compensation/total_rewards/custom_disclaimer: + put: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Set Total Rewards Custom Disclaimer' + description: 'Set the company-wide Total Rewards custom disclaimer text shown on employee statements.' + operationId: set-total-rewards-custom-disclaimer + requestBody: + required: true + content: + application/json: + schema: + required: + - customDisclaimer + properties: + customDisclaimer: + description: 'Custom disclaimer text.' + type: string + type: object + responses: + '200': + description: 'Custom disclaimer updated successfully.' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards settings.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Set Total Rewards Custom Disclaimer' + delete: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Remove Total Rewards Custom Disclaimer' + description: 'Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements.' + operationId: remove-total-rewards-custom-disclaimer + responses: + '200': + description: 'Custom disclaimer removed successfully.' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards settings.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Remove Total Rewards Custom Disclaimer' + '/api/v1/compensation/total_rewards/{employeeId}/statement': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Get Total Rewards Statement' + description: 'Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data.' + operationId: get-total-rewards-statement + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: string + responses: + '200': + description: 'Total Rewards statement for the employee.' + content: + application/json: + schema: + $ref: '#/components/schemas/TotalRewards-EmployeeStatement' + '403': + description: "The authenticated caller lacks permission to view this employee's Total Rewards statement." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards + x-description: 'Get Total Rewards Statement' + /api/v1/meta/provinces: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get All Provinces' + description: 'Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. "UT"), an ISO 3166-2 code (e.g. "US-UT"), and a full name. Use the countryId field to filter client-side.' + operationId: get-all-provinces + responses: + '200': + description: 'Flat array of all states/provinces across all countries.' + content: + application/json: + schema: + title: AllProvincesResponse + type: array + items: + title: ProvinceItem + properties: { id: { description: 'State/province ID', type: integer }, countryId: { description: 'ID of the country this state/province belongs to', type: string }, label: { description: 'State/province abbreviation (e.g. "UT")', type: string }, iso: { description: 'ISO 3166-2 code (e.g. "US-UT")', type: string }, name: { description: 'Full name of the state/province', type: string } } + type: object + security: + - + oauth: + - meta + '/api/v1/meta/provinces/{countryId}': + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List states and provinces for a country by Country ID' + description: 'Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. "UT"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. "US-UT"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list.' + operationId: get-states-by-country-id + parameters: + - + name: countryId + in: path + description: 'Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`.' + required: true + schema: + type: integer + responses: + '200': + description: 'List of states/provinces. The `options` array items match StateProvinceSchema; `label` is always the subdivision abbreviation used for sorting.' + content: + application/json: + schema: + $ref: '#/components/schemas/StateProvinceResponseSchema' + '400': + description: 'The provided country ID is invalid.' + security: + - + basic: [] + - + oauth: + - field + /api/v1/meta/currency/types: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get all currency types' + description: 'Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body.' + operationId: get-all-currency-types + responses: + '200': + description: '200 OK with a JSON array of currency objects, each with `id`, `code`, `name`, `symbol`, and `symbolPosition`.' + content: + application/json: + schema: + title: MetaCurrencyTypesListResponse + type: array + items: + title: MetaCurrencyTypeItem + properties: { id: { description: 'Internal currency id', type: integer }, code: { description: 'ISO 4217-style currency code (e.g. USD, EUR)', type: string }, name: { description: 'Human-readable currency name (HTML entities decoded in the response)', type: string }, symbol: { description: 'Display symbol for the currency in UI', type: string }, symbolPosition: { description: 'Placement of the symbol relative to the amount: 0 = prefix, 1 = postfix (this is a numeric code, not a string label).', type: integer, enum: [0, 1] } } + type: object + security: + - + basic: [] + /api/v1/meta/company: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get company properties' + description: 'Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access.' + operationId: get-meta-company + responses: + '200': + description: 'Company id, name, domain, and baseApiUrl gateway URL.' + content: + application/json: + schema: + title: MetaCompanyPropertiesResponse + properties: + id: { description: 'Bamboo company identifier (numeric).', type: integer } + name: { description: 'Company display name.', type: string } + domain: { description: 'Company’s Bamboo subdomain (same value used in the `baseApiUrl` path segment after `gateway.php/`)', type: string } + baseApiUrl: { description: 'Full HTTPS URL of the public API gateway for this company, typically `https://` + the data-center–specific API host for this tenant + ` /api/gateway.php/` + the company’s `domain` from this response. This is the entry point the integrator uses for legacy gateway-style API traffic, not a generic “base URL” name alone.', type: string } + type: object + security: + - + oauth: + - 'company:info' + /api/v1/meta/countries/options: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get Countries' + description: 'Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset).' + operationId: get-countries-options + parameters: + - + name: isoCode + in: query + description: 'ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array.' + required: false + schema: + type: string + maxLength: 2 + minLength: 2 + pattern: '^[A-Za-z]{2}$' + responses: + '200': + description: 'When `isoCode` is omitted: a JSON array of all country objects. When `isoCode` is provided: the matching country as a single object.' + content: + application/json: + schema: + title: CountriesOptionsResponse + oneOf: + - { $ref: '#/components/schemas/CountriesResponseSchema' } + - { $ref: '#/components/schemas/CountrySchema' } + '404': + description: 'No country found for the given `isoCode`.' + '422': + description: '`isoCode` is present but malformed (not exactly two alpha characters).' + security: + - + basic: [] + - + oauth: + - field + - + oauth: + - meta + /api/v1/meta/industries: + get: + tags: + - 'Public API' + summary: 'Get Industries' + description: 'Returns the complete list of industry reference data including codes. Use the returned IDs when creating or updating company profiles.' + operationId: get-industries + responses: + '200': + description: 'List of all industries.' + content: + application/json: + schema: + title: IndustriesListResponse + type: array + items: + title: Industry + properties: { id: { description: 'Industry ID', type: integer }, name: { description: 'Industry name', type: string } } + type: object + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + '/api/v1/meta/countries/{id}': + get: + tags: + - 'Public API' + summary: 'Get country by ID' + description: 'Returns a single country by catalog id. Response fields match each element of GET /api/v1/meta/countries/options (`id`, `name`, `isoCode` and nullability).' + operationId: get-meta-country-by-id + parameters: + - + name: id + in: path + description: 'Country id from GET /api/v1/meta/countries/options (`id` on the desired row).' + required: true + schema: + type: integer + minimum: 1 + responses: + '200': + description: 'Country resource.' + content: + application/json: + schema: + $ref: '#/components/schemas/CountrySchema' + '422': + description: 'Invalid path id (not a positive integer).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No country exists for the given id.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/timezones: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List timezones' + description: 'Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters.' + operationId: 5c5fb0f1211ae1c9451753f92f1053b6 + parameters: + - + name: pageSize + in: query + description: 'The number of items to return per page.' + schema: + type: integer + default: 500 + - + name: page + in: query + description: 'The page number to retrieve.' + schema: + type: integer + default: 1 + - + name: sort + in: query + description: 'Ordering by OData (Open Data Protocol) v4 specification' + schema: + type: string + default: '' + - + name: select + in: query + description: 'Projection (field selection) by OData specification' + schema: + type: string + default: '' + - + name: filter + in: query + description: 'Filter by an OData (Open Data Protocol) v4 specification' + schema: + type: string + default: '' + responses: + '200': + description: 'A paginated list of timezones' + content: + application/json: + schema: + title: TimezoneListResponse + allOf: + - { $ref: '#/components/schemas/PagedResponse' } + - { properties: { data: { description: 'Array of timezone resources for the current page', type: array, items: { $ref: '#/components/schemas/TimezoneResource' } } }, type: object } + '400': + description: 'Invalid query parameters' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: [] + '/api/v1/meta/timezones/{id}': + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get timezone by ID' + description: 'Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint.' + operationId: baa7162824294d030115568d1d8e6ca7 + parameters: + - + name: id + in: path + description: 'The numeric ID of the timezone to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The timezone resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TimezoneResource' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Timezone not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + '/api/v1/meta/timezones/by-zip/{zip}': + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get timezone by ZIP code' + description: 'Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404.' + operationId: 10d66d8561dd7dac50ff9c21ef63d83b + parameters: + - + name: zip + in: path + description: 'A 5-digit US ZIP code.' + required: true + schema: + type: string + pattern: '^\d{5}$' + example: '84604' + responses: + '200': + description: 'The timezone resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TimezoneResource' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No timezone found for the provided ZIP code' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid ZIP format' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/bank-holidays: + get: + tags: + - 'Public API' + summary: 'List bank holidays' + description: 'Returns the list of global bank holiday reference dates (US federal and related bank holidays maintained in BambooHR). This is distinct from company-configured holidays. Optionally filter to holidays whose dates fall in a single calendar year.' + operationId: get-bank-holidays + parameters: + - + name: year + in: query + description: 'When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned.' + required: false + schema: + type: integer + maximum: 9999 + minimum: 1 + responses: + '200': + description: 'Bank holidays retrieved successfully' + content: + application/json: + schema: + title: BankHolidaysListResponse + type: array + items: + title: BankHoliday + properties: { id: { description: 'Stable bank holiday identifier', type: integer }, name: { description: 'Holiday display name', type: string }, date: { description: 'Holiday date in YYYY-MM-DD form', type: string, format: date } } + type: object + '422': + description: 'Invalid query parameters' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/currency-conversions: + get: + tags: + - 'Public API' + summary: 'Get currency conversion rates' + description: 'Returns a snapshot of currency conversion rates for the specified base currency, keyed by ISO 4217 currency code. Rate map keys match the `code` field from GET /api/v1/meta/currency/types. Timestamps are ISO 8601 UTC with a Z offset.' + operationId: get-currency-conversions + parameters: + - + name: baseCurrency + in: query + description: 'ISO 4217 base currency code (e.g. USD, EUR). Defaults to USD when omitted.' + required: false + schema: + type: string + default: USD + maxLength: 3 + minLength: 3 + pattern: '^[A-Za-z]{3}$' + responses: + '200': + description: 'Currency conversion rates retrieved successfully' + content: + application/json: + schema: + title: CurrencyConversionsResponse + properties: + baseCurrency: { description: 'ISO 4217 base currency code', type: string, example: USD } + lastUpdated: { description: 'ISO 8601 UTC timestamp of the last rate update', type: string, format: date-time, example: '2026-04-07T12:00:00Z' } + nextUpdate: { description: 'ISO 8601 UTC timestamp of the next scheduled rate update', type: string, format: date-time, example: '2026-04-08T12:00:00Z' } + rates: { description: 'Map of ISO 4217 currency codes to numeric conversion rates relative to the base currency', type: object, additionalProperties: { type: number } } + type: object + '400': + description: 'Invalid parameter type for baseCurrency' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Malformed baseCurrency query parameter' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No conversion rate snapshot found for the requested base currency' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '503': + description: 'Backing store or dependency temporarily unavailable' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/hris/org/locations: + get: + tags: + - Locations + - 'Public API' + summary: 'List job locations' + description: 'Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters.' + operationId: get-locations + parameters: + - + name: pageSize + in: query + description: 'The number of items to return per page.' + schema: + type: integer + default: 500 + - + name: page + in: query + description: 'The page number to retrieve.' + schema: + type: integer + default: 0 + - + name: sort + in: query + description: 'Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' + schema: + type: string + default: '' + - + name: select + in: query + description: 'Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' + schema: + type: string + default: '' + - + name: filter + in: query + description: 'Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation' + schema: + type: string + default: '' + - + name: expand + in: query + description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' + explode: false + schema: + type: array + items: + type: string + enum: + - state + - country + default: [] + responses: + '200': + description: 'A paginated list of job locations' + content: + application/json: + schema: + title: PagedLocationResponse + allOf: + - { $ref: '#/components/schemas/PagedResponse' } + - { properties: { data: { description: 'Array of location resources for the current page', type: array, items: { $ref: '#/components/schemas/LocationResponseObject' } } }, type: object } + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '429': + description: 'Too Many Requests' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal Server Error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field + post: + tags: + - Locations + - 'Public API' + summary: 'Create a job location' + description: 'Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional.' + operationId: create-location + requestBody: + required: true + content: + application/json: + schema: + required: + - label + - address + properties: + label: + description: 'Display name for the location' + type: string + archived: + description: 'Whether the location is archived' + type: boolean + default: false + address: + description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' + required: [remoteLocation] + properties: { address1: { oneOf: [{ type: string }, { type: 'null' }] }, address2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, stateId: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, countryId: { oneOf: [{ type: string }, { type: 'null' }] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', oneOf: [{ type: string }, { type: 'null' }] }, remoteLocation: { type: boolean } } + type: object + type: object + responses: + '201': + description: 'The created location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate location label' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid fields' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + '/api/v1/hris/org/locations/{id}': + get: + tags: + - Locations + - 'Public API' + summary: 'Get a job location' + description: 'Retrieves a single job location by its ID. Returns the full location resource including address details.' + operationId: get-location + parameters: + - + name: id + in: path + description: 'The ID of the location' + required: true + schema: + type: string + - + name: expand + in: query + description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' + explode: false + schema: + type: array + items: + type: string + enum: + - state + - country + default: [] + responses: + '200': + description: 'The requested location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '422': + description: 'Invalid expand options' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field + put: + tags: + - Locations + - 'Public API' + summary: 'Update a job location' + description: 'Updates an existing job location.' + operationId: update-location + parameters: + - + name: id + in: path + description: 'The ID of the location to update' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - label + - address + properties: + label: + description: 'Updated display name' + type: string + archived: + description: 'Whether the location is archived' + type: boolean + default: false + address: + description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' + required: [remoteLocation] + properties: { address1: { oneOf: [{ type: string }, { type: 'null' }] }, address2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, stateId: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, countryId: { oneOf: [{ type: string }, { type: 'null' }] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', oneOf: [{ type: string }, { type: 'null' }] }, remoteLocation: { type: boolean } } + type: object + type: object + responses: + '200': + description: 'The updated location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate location label' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid fields' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + delete: + tags: + - Locations + - 'Public API' + summary: 'Delete a job location' + description: 'Deletes a job location by its ID. Returns 204 No Content on success.' + operationId: delete-location + parameters: + - + name: id + in: path + description: 'The ID of the location to delete' + required: true + schema: + type: string + responses: + '204': + description: 'Location deleted successfully' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The location is in use and cannot be deleted. You can archive a location in use to prevent future usage.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + '/api/v1/compensation/total_rewards/{employeeId}': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Check Total Rewards Profile Availability' + description: 'Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access.' + operationId: check-total-rewards-profile + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to check.' + required: true + schema: + type: string + responses: + '204': + description: 'Employee has an active Total Rewards profile and the user can view it.' + '404': + description: 'Employee does not have a Total Rewards profile or the user lacks permission.' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards + x-description: 'Check Total Rewards Profile Availability' + '/api/v1/compensation/total_rewards/{employeeId}/printable': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Get Printable Total Rewards Statement' + description: "Generate and return a PDF printable version of the employee's Total Rewards statement." + operationId: get-total-rewards-printable-statement + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: string + - + name: multiplier + in: query + description: 'Hours-per-week multiplier for annualizing hourly pay.' + required: false + schema: + type: number + - + name: year + in: query + description: 'Statement year. Defaults to the current year when omitted.' + required: false + schema: + type: integer + responses: + '200': + description: 'PDF document streamed with Content-Disposition: attachment.' + content: + application/pdf: { } + '400': + description: 'Invalid argument (e.g. bad year or multiplier).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: "The authenticated caller lacks permission to view this employee's Total Rewards statement." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards + x-description: 'Get Printable Total Rewards Statement' + /api/v1/meta/fields: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Fields' + description: 'Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account.' + operationId: list-fields + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A list of all available employee fields in the account.' + content: + application/json: + schema: + title: FieldsResponse + type: array + items: + title: Field + required: [id, name, type] + properties: { id: { description: 'The field identifier. For subfields this is a dotted string (e.g., "4340.4"); for top-level fields it may be an integer.', oneOf: [{ type: string }, { type: integer }] }, name: { description: 'The display name of the field.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list, checkbox).', type: string }, alias: { description: 'The API alias for the field. Only present when the field has an alias.', type: string }, deprecated: { description: 'Whether the field is deprecated and should no longer be used. Only present for deprecated fields.', type: boolean } } + type: object + application/xml: { } + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - field + /api/v1/meta/users: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Users' + description: "Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available.\n\nPass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response.\n\nThe response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML." + operationId: list-users + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: status + in: query + description: 'Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.' + required: false + schema: + type: string + example: enabled + responses: + '200': + description: 'An object whose keys are user IDs (as strings) and whose values are user objects. When the Accept header requests XML, a `` document is returned instead.' + content: + application/json: + schema: + title: ListUsersResponse + description: 'Object keyed by user ID. Each key is a user ID string; each value is a user object.' + type: object + additionalProperties: + properties: { id: { description: 'The user ID.', type: integer }, employeeId: { description: 'The ID of the employee record linked to this user. Always present in the JSON response; `0` when no employee record is associated.', type: integer }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address. Resolved in priority order: work email, home email, account email.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } } + type: object + application/xml: + schema: + title: ListUsersXmlResponse + properties: + user: { type: array, items: { properties: { id: { description: 'The user ID.', type: integer, xml: { attribute: true } }, employeeId: { description: 'The employee record ID. Present as an XML attribute only when the user has an associated employee record.', type: integer, xml: { attribute: true } }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } }, type: object, xml: { name: user } }, xml: { name: user, wrapped: false } } + type: object + xml: + name: users + '401': + description: 'Unauthorized. The API key is missing or invalid.' + '403': + description: 'Forbidden. The caller does not have permission to access this endpoint.' + security: + - + basic: [] + - + oauth: + - user + '/api/v1/employees/changed/tables/{table}': + get: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Get Changed Employee Table Data' + description: "Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps." + operationId: get-changed-employee-table-data + parameters: + - + name: table + in: path + description: 'The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: since + in: query + description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' + required: true + schema: + type: string + format: date-time + responses: + '200': + description: 'Changed table data for the specified table, grouped by employee ID.' + content: + application/json: + schema: + title: ChangedEmployeeTableDataResponse + required: + - table + - employees + properties: + table: { description: 'The requested table name.', type: string } + employees: { description: 'Map of employee IDs to changed table data for that employee.', type: object, additionalProperties: { properties: { lastChanged: { description: 'ISO 8601 timestamp of the last change for this employee.', type: string, format: date-time }, rows: { description: 'The table rows for this employee.', type: array, items: { type: object, additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } } } }, type: object } } + type: object + application/xml: { } + '400': + description: 'The since parameter is missing or is not a valid ISO 8601 date.' + '404': + description: 'The specified table does not exist.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:job' + - + oauth: + - 'employee:compensation' + - + oauth: + - 'employee:custom_fields' + - + oauth: + - 'employee:custom_fields_encrypted' + - + oauth: + - 'employee:assets' + - + oauth: + - 'employee:emergency_contacts' + - + oauth: + - 'sensitive_employee:creditcards' + - + oauth: + - 'employee:education' + '/api/v1/employees/{id}/tables/{table}': + get: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Get Employee Table Data' + description: 'Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response.' + operationId: get-employee-table-data + parameters: + - + name: id + in: path + description: 'The employee ID. Use the special value "all" to retrieve table data for all employees the API user has access to.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'All rows for the specified employee and table.' + content: + application/json: + schema: + title: EmployeeTableDataResponse + type: array + items: + title: EmployeeTableRow + description: "A single row from the requested table. The returned fields depend on the table and the caller's field-level permissions." + properties: { id: { description: 'The table row ID.', type: string }, employeeId: { description: 'The employee ID that owns this row.', type: string } } + type: object + additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } + application/xml: { } + '404': + description: 'The employee or table does not exist.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:job' + - + oauth: + - 'employee:compensation' + - + oauth: + - 'employee:custom_fields' + - + oauth: + - 'employee:custom_fields_encrypted' + - + oauth: + - 'employee:assets' + - + oauth: + - 'employee:emergency_contacts' + - + oauth: + - 'sensitive_employee:creditcards' + - + oauth: + - 'employee:education' + - + oauth: + - 'employee:job.write' + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Create Table Row' + description: 'Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history.' + operationId: create-table-row + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row added successfully. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee or table does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + - + oauth: + - employee + - + oauth: + - 'employee:job' + '/api/v1_1/employees/{id}/tables/{table}/{rowId}': + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Update Table Row v1.1' + description: 'Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases.' + operationId: update-table-row-v1-1 + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: rowId + in: path + description: 'The ID of the row to update.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row updated successfully. A 200 response is returned as long as at least one field was updated, even if some fields were skipped due to permissions. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee, table, or row does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + '/api/v1_1/employees/{id}/tables/{table}': + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Create Table Row v1.1' + description: 'Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases.' + operationId: create-table-row-v1-1 + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row added successfully. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee or table does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + /api/v1/employees/changed: + get: + tags: + - 'Last Change Information' + - 'Public API' + summary: 'Get Changed Employee IDs' + description: 'Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp.' + operationId: get-changed-employee-ids + parameters: + - + name: since + in: query + description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' + required: true + schema: + type: string + format: date-time + - + name: type + in: query + description: 'Filter by change type. If omitted, all change types are returned.' + required: false + schema: + type: string + enum: + - inserted + - updated + - deleted + - all + responses: + '200': + description: 'The latest change timestamp in the result set and a map of employees changed since the given timestamp.' + content: + application/json: + schema: + title: ChangedEmployeeIdsResponse + required: + - latest + - employees + properties: + latest: { description: 'The latest last-changed timestamp among the returned employees.', type: string, format: date-time } + employees: { description: 'Map of employee IDs to change metadata for each changed employee.', type: object, additionalProperties: { properties: { id: { description: 'The employee ID.', type: string }, action: { description: 'The type of change: Inserted, Updated, or Deleted.', type: string, enum: [Inserted, Updated, Deleted] }, lastChanged: { description: 'ISO 8601 timestamp of the last change.', type: string, format: date-time } }, type: object } } + type: object + application/xml: { } + '400': + description: 'The since parameter is missing, is not a valid ISO 8601 date, or the type parameter is invalid.' + security: + - + basic: [] + - + oauth: + - public.user + - + oauth: + - public.integration + '/api/v1/employees/{employeeId}/photo/{size}': + get: + tags: + - Photos + - 'Public API' + summary: 'Get Employee Photo' + description: "Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation: by default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`.\n\nA 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug." + operationId: get-employee-photo + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee whose photo to retrieve.' + required: true + schema: + type: integer + - + name: size + in: path + description: 'The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.' + required: true + schema: + type: string + enum: + - original + - large + - medium + - small + - xs + - tiny + - + name: width + in: query + description: 'Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.' + required: false + schema: + type: integer + - + name: height + in: query + description: 'Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.' + required: false + schema: + type: integer + responses: + '200': + description: 'Employee photo, returned in one of two shapes via standard HTTP content negotiation: binary `image/*` bytes by default (matching the stored format), or `application/json` with `{ mimeType, fileBase64 }` when the caller sends `Accept: application/json`.' + content: + 'image/*': { } + application/json: + schema: + title: EmployeePhotoJsonResponse + required: + - mimeType + - fileBase64 + properties: + mimeType: { description: 'The actual MIME type of the underlying image (e.g. `image/jpeg`, `image/png`, `image/bmp`, `image/gif`, `image/tiff`). Use this to identify the format of the decoded bytes.', type: string } + fileBase64: { description: 'Base64-encoded image bytes. Decoding produces the same bytes returned by the binary variant of this endpoint.', type: string, format: byte } + type: object + '403': + description: "The authenticated user does not have permission to view this employee's photo." + '404': + description: 'Returned in three distinct cases: the employee does not exist, the employee has no photo on file, or the requested size is not a recognized value. The `x-bamboohr-error-message` response header reports which case applies (`Employee not found`, `Employee photo not found`, or `Size: "" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`). "Employee photo not found" is the expected response for an employee who simply has not uploaded a photo and should not be treated as an error to debug.' + headers: + x-bamboohr-error-message: + description: 'Identifies which 404 case occurred. One of: `Employee not found`, `Employee photo not found`, or `Size: "" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`.' + schema: + type: string + security: + - + basic: [] + - + oauth: + - 'employee:photo' + /api/v1/reports/custom: + post: + tags: + - Reports + - 'Public API' + summary: 'Request Custom Report' + description: "**Deprecated. Use Datasets > Get Data from Dataset instead.**\n\nGenerates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default.\n\nThe request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema.\n\nThe `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404.\n\nField IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400." + operationId: request-custom-report + parameters: + - + name: Accept + in: header + description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' + schema: + type: string + enum: + - application/json + - text/xml + - text/csv + - application/pdf + - application/vnd.ms-excel + - + name: format + in: query + description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' + required: false + schema: + type: string + enum: + - json + - xml + - csv + - xls + - pdf + - + name: onlyCurrent + in: query + description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + schema: + type: boolean + default: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RequestCustomReport' + application/xml: + schema: + title: RequestCustomReportXml + description: "XML report definition. The root element must be ``. Supported child elements:\n\n- `` — optional report label string.\n- `<fields>` — required; contains one `<field id=\"fieldAlias\"/>` element per column, where `id` is the BambooHR field alias (e.g. `firstName`, `workEmail`). Unknown or inaccessible field IDs are silently omitted.\n- `<filterDuplicates>` — optional; set to `no` to disable duplicate row filtering (default is enabled).\n- `<filters>` — optional; supported child elements:\n - `<lastChanged includeNull=\"yes|no\">2025-01-01T00:00:00+0000</lastChanged>` — ISO 8601 date-time string (offset format `+0000` or `+00:00`). `includeNull` defaults to `yes`.\n - `<employeeIds>` — contains one `<employeeId>` element per integer employee ID to include." + type: object + responses: + '200': + description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each with `id`, `type`, and `name`), and an `employees` array (each with `id` and one key per requested field). For XML, returns a `<report>` document. For CSV/XLS/PDF, returns the file content with the appropriate content-type header.' + content: + application/json: + schema: + title: RequestCustomReportResponse + properties: + title: { description: 'The report title.', type: string } + fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per employee. Each object contains an `id` property plus one key per requested field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } + type: object + text/xml: { } + text/csv: { } + application/pdf: { } + application/vnd.ms-excel: { } + '400': + description: 'Bad request. Returned when the request body is malformed JSON or XML, or when more than 400 fields are requested. Unknown or inaccessible field IDs are silently omitted and do not cause a 400.' + '404': + description: 'Report format not found. Returned when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + /api/v1/employees/files/categories: + post: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Create Employee File Category' + description: 'Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `<category>` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category.' + operationId: create-employee-file-category + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PostNewEmployeeFileCategory' + application/xml: + schema: + $ref: '#/components/schemas/PostNewEmployeeFileCategory' + responses: + '200': + description: 'The request was processed but no categories were created (empty payload).' + '201': + description: 'All specified categories were created successfully. No response body is returned.' + '400': + description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + '403': + description: 'The API user does not have permission to create employee file categories.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + /api/v1/files/categories: + post: + tags: + - 'Company Files' + - 'Public API' + summary: 'Create Company File Category' + description: 'Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error.' + operationId: create-company-file-category + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewCompanyFileCategory' + application/xml: + schema: + $ref: '#/components/schemas/NewCompanyFileCategory' + responses: + '200': + description: 'The request was processed but no categories were created (empty payload).' + '201': + description: 'All specified categories were created successfully.' + '400': + description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + '403': + description: 'The API user does not have permission to create company file categories, or the category name is reserved.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{id}/files': + post: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Upload Employee File' + description: "Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled." + operationId: upload-employee-file + parameters: + - + name: id + in: path + description: '{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).' + required: true + schema: + type: string + default: '0' + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - fileName + - category + - file + properties: + fileName: + description: 'The display name for the uploaded file.' + type: string + category: + description: 'The ID of the employee file section to upload the file into.' + type: integer + share: + description: 'Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.' + type: string + enum: ['yes', 'no'] + file: + description: 'The file to upload.' + type: string + format: binary + type: object + responses: + '201': + description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' + '400': + description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '403': + description: 'The API user does not have permission to access the requested employee or their file section.' + '404': + description: 'The employee or the specified file category was not found.' + '413': + description: "The file exceeds the 20MB limit or the company's storage limit." + '503': + description: 'The file storage API is temporarily unavailable.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + /api/v1/files: + post: + tags: + - 'Company Files' + - 'Public API' + summary: 'Upload Company File' + description: 'Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation.' + operationId: upload-company-file + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - fileName + - category + - file + properties: + fileName: + description: 'The display name for the uploaded file.' + type: string + category: + description: 'The ID of the file category (section) to upload the file into.' + type: integer + share: + description: 'Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.' + type: string + enum: ['yes', 'no'] + file: + description: 'The file to upload.' + type: string + format: binary + type: object + responses: + '201': + description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' + '400': + description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '403': + description: 'The API user does not have permission to upload files, or the target category is read-only.' + '404': + description: 'The specified category ID was not found.' + '413': + description: "The file exceeds the 20MB limit or the company's storage limit." + '503': + description: 'The file storage API is temporarily unavailable.' + security: + - + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{employeeId}/time_off/policies': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Employee Time Off Policies' + description: 'Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date.' + operationId: list-employee-time-off-policies + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + responses: + '200': + description: 'The list of time off policies assigned to the employee. Only includes regular (accruing) policy types.' + content: + application/json: + schema: + title: EmployeeTimeOffPoliciesResponse + type: array + items: + title: EmployeeTimeOffPolicyAssignment + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policy assignments.' + security: + - + basic: [] + - + oauth: + - time_off + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Assign Time Off Policies' + description: 'Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies.' + operationId: assign-time-off-policies + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to assign policies to.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + required: + - timeOffPolicyId + - accrualStartDate + properties: + timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } + accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', oneOf: [{ type: string, format: date }, { type: 'null' }] } + type: object + example: + - + timeOffPolicyId: 4 + accrualStartDate: '2024-02-01' + - + timeOffPolicyId: 5 + accrualStartDate: null + responses: + '200': + description: 'The current list of assigned policies for the employee.' + content: + application/json: + schema: + title: AssignedTimeOffPoliciesResponse + type: array + items: + title: AssignedTimeOffPolicy + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } + type: object + '400': + description: 'Invalid request. Possible causes: employee not found, missing hire date, malformed JSON, missing timeOffPolicyId, or a policy is already assigned for the time off type.' + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to assign time off policies.' + '422': + description: 'Unprocessable entity. The operation is not allowed for this employee, for example because of EOR restrictions.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1_1/employees/{employeeId}/time_off/policies': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Employee Time Off Policies v1.1' + description: 'Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them.' + operationId: list-employee-time-off-policies-v1.1 + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + responses: + '200': + description: 'The list of time off policies assigned to the employee, including manual and unlimited types.' + content: + application/json: + schema: + title: EmployeeTimeOffPoliciesV1_1Response + type: array + items: + title: EmployeeTimeOffPolicyAssignmentV1_1 + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', oneOf: [{ type: string, format: date }, { type: 'null' }] } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policy assignments.' + security: + - + basic: [] + - + oauth: + - time_off + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Assign Time Off Policies v1.1' + description: 'Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types.' + operationId: assign-time-off-policies-v1.1 + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to assign policies to.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + required: + - timeOffPolicyId + - accrualStartDate + properties: + timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } + accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', oneOf: [{ type: string, format: date }, { type: 'null' }] } + type: object + example: + - + timeOffPolicyId: 4 + accrualStartDate: '2024-02-01' + - + timeOffPolicyId: 5 + accrualStartDate: null + responses: + '200': + description: 'The current list of assigned policies for the employee, including manual and unlimited types.' + content: + application/json: + schema: + title: AssignedTimeOffPoliciesV1_1Response + type: array + items: + title: AssignedTimeOffPolicyV1_1 + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', oneOf: [{ type: string, format: date }, { type: 'null' }] } } + type: object + '400': + description: 'Invalid request. Possible causes: malformed JSON, missing required fields, missing hire date, or duplicate policy type.' + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to assign time off policies.' + '422': + description: 'Unprocessable entity. The operation is not allowed for this employee (e.g., EOR restrictions).' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/applicant_tracking/applications/{applicationId}': + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Job Application Details' + description: 'Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings.' + operationId: get-application-details + parameters: + - + name: applicationId + in: path + description: 'The ID of the application to retrieve details for.' + required: true + schema: + type: integer + responses: + '200': + description: 'Success. Returns the full application detail object.' + content: + application/json: + schema: + title: ApplicationDetails + properties: + id: { description: 'Application ID', type: integer } + appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time } + status: { properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string }, dateChanged: { description: 'ISO 8601 datetime when status was last changed', type: string, format: date-time }, changedByUser: { description: 'The user who last changed the status, or null if changed by the system', properties: { id: { description: 'User ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "User's job title", properties: { id: { oneOf: [{ type: integer }, { type: 'null' }] }, label: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + rating: { description: 'Applicant rating (1-5), or null if not yet rated', oneOf: [{ type: integer }, { type: 'null' }] } + resumeFileId: { description: 'ID of the attached resume file, or null if not provided', oneOf: [{ type: integer }, { type: 'null' }] } + coverLetterFileId: { description: 'ID of the attached cover letter file, or null if not provided', oneOf: [{ type: integer }, { type: 'null' }] } + attachmentCount: { description: 'Total number of attachments on this application, or null', oneOf: [{ type: integer }, { type: 'null' }] } + attachments: { description: 'List of attachments on this application, or null if none exist', oneOf: [{ type: array, items: { properties: { id: { description: 'Attachment ID', type: integer }, name: { description: 'Attachment file name', type: string }, fileUrl: { description: 'URL to download the attachment', type: string } }, type: object } }, { type: 'null' }] } + movedTo: { description: 'List of applications this applicant was moved to, or null if not moved', oneOf: [{ type: array, items: { type: object } }, { type: 'null' }] } + movedFrom: { description: 'List of applications this applicant was moved from, or null if not moved', oneOf: [{ type: array, items: { type: object } }, { type: 'null' }] } + alsoConsideredForCount: { description: 'Count of other job openings this applicant is also being considered for', type: integer } + duplicateApplicationCount: { description: 'Count of duplicate applications from this applicant', type: integer } + referredBy: { description: 'Name of the person who referred this applicant, or null', oneOf: [{ type: string }, { type: 'null' }] } + desiredSalary: { description: "Applicant's desired salary, or null if not provided", oneOf: [{ type: string }, { type: 'null' }] } + commentCount: { description: 'Number of comments on this application', type: integer } + emailCount: { description: 'Number of emails sent for this application', type: integer } + eventCount: { description: 'Number of events associated with this application', type: integer } + questionsAndAnswers: { description: "List of custom application questions and the applicant's answers", type: array, items: { properties: { question: { properties: { id: { description: 'Question ID', type: integer }, label: { description: 'Question text', type: string } }, type: object }, answer: { properties: { id: { description: 'Answer ID', type: integer }, label: { description: 'Answer text', type: string } }, type: object }, hasRevisions: { description: 'Whether this answer has revision history', oneOf: [{ type: boolean }, { type: 'null' }] }, isArchived: { description: 'Whether this answer is archived', oneOf: [{ type: boolean }, { type: 'null' }] }, archivedDate: { description: 'ISO 8601 datetime when the answer was archived, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, editedDate: { description: 'ISO 8601 datetime when the answer was last edited, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, editedEndDate: { description: 'ISO 8601 datetime for the end date of the edit window, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] } }, type: object } } + applicationReferences: { description: 'Free-text references provided by the applicant, or null', oneOf: [{ type: string }, { type: 'null' }] } + applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, email: { description: 'Email address', type: string }, phoneNumber: { description: 'Phone number', oneOf: [{ type: string }, { type: 'null' }] }, avatar: { description: "URL to the applicant's avatar image, or null", oneOf: [{ type: string }, { type: 'null' }] }, source: { description: "Source of the application (e.g. 'LinkedIn', 'Referral'), or null", oneOf: [{ type: string }, { type: 'null' }] }, twitterUsername: { description: "Applicant's Twitter/X username, or null", oneOf: [{ type: string }, { type: 'null' }] }, address: { description: 'Applicant address', properties: { addressLine1: { oneOf: [{ type: string }, { type: 'null' }] }, addressLine2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, state: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, country: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, linkedinUrl: { description: 'LinkedIn profile URL', oneOf: [{ type: string }, { type: 'null' }] }, websiteUrl: { description: 'Personal website URL', oneOf: [{ type: string }, { type: 'null' }] }, availableStartDate: { description: "Candidate's available start date (yyyy-mm-dd)", oneOf: [{ type: string, format: date }, { type: 'null' }] }, education: { description: "Applicant's education information", properties: { institution: { description: 'Name of the educational institution', oneOf: [{ type: string }, { type: 'null' }] }, level: { description: 'Highest level of education', properties: { id: { description: 'Education level ID', type: integer }, label: { description: 'Education level name', type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + job: { description: 'Information about the job position applied to', properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID of the hiring lead', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "Hiring lead's job title", properties: { id: { oneOf: [{ type: integer }, { type: 'null' }] }, label: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient user permissions or API access is not turned on.' + '404': + description: 'Application not found.' + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + '/api/v1/applicant_tracking/applications/{applicationId}/comments': + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Create Job Application Comment' + description: 'Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted.' + operationId: create-application-comment + parameters: + - + name: applicationId + in: path + description: 'The ID of the application to add a comment to.' + required: true + schema: + type: integer + requestBody: + description: 'Comment object to post' + required: true + content: + application/json: + schema: + required: + - comment + properties: + type: + description: 'The comment type. Defaults to `comment` if omitted.' + type: string + comment: + description: 'The comment being posted.' + type: string + type: object + example: + type: comment + comment: 'I really like this applicant' + responses: + '200': + description: 'Success. Returns the type and ID of the created comment.' + content: + application/json: + schema: + title: CreateCommentResponse + properties: + type: { description: "The type of comment created, e.g. 'comment'", type: string } + id: { description: 'The ID of the newly created comment', type: integer } + type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications.write' + /api/v1/applicant_tracking/jobs: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Job Summaries' + description: 'Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings.' + operationId: get-job-summaries + parameters: + - + name: statusGroups + in: query + description: 'One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.' + schema: + type: string + - + name: status_ids + in: query + description: 'One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.' + schema: + type: string + - + name: sortBy + in: query + description: 'A specific field to sort the results by.' + schema: + type: string + enum: + - count + - title + - lead + - created + - status + - + name: sortOrder + in: query + description: 'Order by which to sort results.' + schema: + type: string + enum: + - ASC + - DESC + responses: + '200': + description: 'Success. Returns an array of job opening summary objects.' + content: + application/json: + schema: + title: JobSummariesList + type: array + items: + title: JobSummary + properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object }, postedDate: { description: 'ISO 8601 datetime when the job opening was posted', type: string, format: date-time }, location: { description: 'Location information', properties: { id: { description: 'Location ID', type: integer }, label: { description: 'Location display name', type: string }, address: { description: 'Full address of the location', type: object } }, oneOf: [{ type: object }, { type: 'null' }] }, department: { description: 'Department information', properties: { id: { description: 'Department ID', type: integer }, label: { description: 'Department name', type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, status: { description: 'Job opening status', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "Hiring lead's job title", oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, newApplicantsCount: { description: "Number of applicants in 'New' status", type: integer }, activeApplicantsCount: { description: 'Number of applicants in an active status', type: integer }, totalApplicantsCount: { description: 'Total number of applicants', type: integer }, postingUrl: { description: 'Public URL for the job posting, or null if not posted', oneOf: [{ type: string }, { type: 'null' }] } } + type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + '/api/v1/applicant_tracking/applications/{applicationId}/status': + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Update Applicant Status' + description: 'Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs.' + operationId: update-applicant-status + parameters: + - + name: applicationId + in: path + description: 'The ID of the application whose status should be updated.' + required: true + schema: + type: integer + requestBody: + description: 'The new status to assign to the application.' + required: true + content: + application/json: + schema: + required: + - status + properties: + status: + description: 'The ID of the status to assign to the application. Use the Get Applicant Statuses endpoint to get available status IDs.' + type: integer + type: object + example: + status: 2 + responses: + '200': + description: 'Success. Returns the type and ID of the status change record.' + content: + application/json: + schema: + title: UpdateApplicantStatusResponse + properties: + type: { description: "Always 'positionApplicantStatus'", type: string } + id: { description: 'The ID of the created status change record', type: integer } + type: object + '400': + description: 'Bad request. The error message is returned in the `x-bamboohr-error-message` response header; the body is empty.' + headers: + x-bamboohr-error-message: + description: "Human-readable error message describing why the request failed (e.g. 'Invalid status')." + schema: + type: string + content: + text/html: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications.write' + /api/v1/benefitcoverages: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Benefit Coverages' + description: 'Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a "Benefit Coverages" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access.' + operationId: list-benefit-coverages + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A collection of benefit coverage levels ordered by sort order.' + content: + application/json: + schema: + title: BenefitCoveragesResponse + properties: + 'Benefit Coverages': { description: 'Array of benefit coverage level objects.', type: array, items: { properties: { id: { description: 'The coverage level ID.', type: string }, shortName: { description: 'The short display name for this coverage level (e.g. "Employee + Spouse").', type: string }, description: { description: 'An optional longer description of the coverage level. Null if not set.', oneOf: [{ type: string }, { type: 'null' }] }, sortOrder: { description: 'The display sort order for this coverage level.', type: string }, benefitPlanId: { description: 'The benefit plan this coverage level belongs to, or null for company-wide coverage levels.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } + type: object + application/xml: { } + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - benefit + '/api/v1/employeedependents/{id}': + get: + tags: + - Benefits + - 'Public API' + summary: 'Get Employee Dependent' + description: 'Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key "Employee Dependents" containing a single-element array. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' + operationId: get-employee-dependent + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: id + in: path + description: 'The numeric ID of the employee dependent to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The requested employee dependent.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The specified dependent ID was not found.' + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn' + - + oauth: + - 'employee:dependent' + put: + tags: + - Benefits + - 'Public API' + summary: 'Update Employee Dependent' + description: 'Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing.' + operationId: update-employee-dependent + parameters: + - + name: id + in: path + description: 'The numeric ID of the employee dependent to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependent' + application/xml: + schema: + $ref: '#/components/schemas/EmployeeDependent' + responses: + '200': + description: 'The updated dependent record. Format matches the request Content-Type (JSON or XML).' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The request body is invalid or contains a validation error (e.g. invalid relationship, gender, state code, country code, or date format).' + '403': + description: 'The authenticated user does not have permission to update this dependent.' + '409': + description: 'A duplicate record conflict was detected.' + '500': + description: 'An unexpected server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:dependent.write' + /api/v1/employeedependents: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Employee Dependents' + description: 'Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key "Employee Dependents" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' + operationId: list-employee-dependents + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: employeeid + in: query + description: 'The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.' + required: false + schema: + type: integer + responses: + '200': + description: 'A collection of employee dependents.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn' + - + oauth: + - 'employee:dependent' + post: + tags: + - Benefits + - 'Public API' + summary: 'Create Employee Dependent' + description: 'Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing.' + operationId: create-employee-dependent + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependent' + application/xml: + schema: + $ref: '#/components/schemas/EmployeeDependent' + responses: + '200': + description: 'The newly created dependent record. Format matches the request Content-Type (JSON or XML).' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The request body is invalid or contains a validation error (e.g. missing employeeId, invalid relationship, gender, state code, country code, or date format).' + '403': + description: 'The authenticated user does not have permission to add a dependent.' + '409': + description: 'A duplicate record conflict was detected.' + '500': + description: 'An unexpected server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:dependent.write' + /api/v1/employees/directory: + get: + tags: + - Employees + - 'Public API' + summary: 'Get Employees Directory' + description: "Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. Response format follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `<directory>` document with `<fieldset>` and `<employees>` children. Employee `id` values are returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list." + operationId: get-employees-directory + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: onlyCurrent + in: query + description: 'When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected.' + required: false + schema: + type: boolean + default: true + responses: + '200': + description: 'Directory fieldset and matching employee records, encoded per the `Accept` header.' + content: + application/json: + schema: + title: EmployeesDirectoryJsonResponse + properties: + fields: { description: 'Field definitions included in this response. Each entry describes one key that appears on every employee object. The set of fields is fixed by company directory configuration; the `canUploadPhoto` entry is always appended.', type: array, items: { properties: { id: { description: 'Field identifier; appears as a key on each employee object.', type: string }, type: { description: 'Field data type. Observed values include `text`, `list`, `email`, `bool`, `url`, and `employee`.', type: string }, name: { description: 'Human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per directory employee. Every object includes `id` (employee ID as a string) and `canUploadPhoto` (1 if the authenticated caller may upload a photo for this employee, 0 otherwise), plus one key per entry in `fields`. The exact key set varies with company directory configuration. Field values are returned in the JSON type indicated by the matching `fields[].type` (for example, `bool` fields are JSON booleans).', type: array, items: { type: object, additionalProperties: true } } + type: object + application/xml: + schema: + title: EmployeesDirectoryXmlResponse + properties: + fieldset: { description: 'Field definitions included in this response.', properties: { field: { type: array, items: { properties: { id: { description: 'Field identifier; matches the `id` attribute on each `<field>` element inside `<employee>`.', type: string, xml: { attribute: true } }, value: { description: "Human-readable field label, serialized as the element's text content.", type: string } }, type: object } } }, type: object } + employees: { description: 'Directory employee records.', properties: { employee: { type: array, items: { properties: { id: { description: 'Employee ID, serialized as an attribute on the `<employee>` element.', type: string, xml: { attribute: true } }, field: { description: 'Field values for the employee. Each `<field>` element has an `id` attribute matching one of the `<fieldset>` ids and the value as element text. Currency fields additionally carry a `currency` attribute (ISO currency code). Boolean fields are serialized as the strings `true`/`false`; the appended `canUploadPhoto` field is serialized as `yes`/`no`.', type: array, items: { properties: { id: { description: 'Field identifier matching one of the ids in `<fieldset>`.', type: string, xml: { attribute: true } }, value: { description: 'Field value serialized as element text content.', type: string } }, type: object } } }, type: object } } }, type: object } + type: object + xml: + name: directory + '401': + description: Unauthorized. + '403': + description: "The authenticated user's company has neither company-wide directory sharing nor org-chart sharing enabled, so no directory is available." + '404': + description: 'The resulting directory is empty (no employees matched the filter for this company configuration).' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - employee_directory + /api/v1/files/view: + get: + tags: + - 'Company Files' + - 'Public API' + summary: 'Get Company Files and Categories' + description: 'Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML.' + operationId: list-company-files + responses: + '200': + description: 'List of company file categories and their visible files.' + content: + application/json: + schema: + title: CompanyFilesResponse + properties: + categories: { description: 'List of company file categories.', type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canUploadFiles: { description: 'Whether the requesting user can upload files to this category.', type: string, enum: ['yes', 'no'] }, files: { description: 'Files visible to the requesting user in this category.', type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename including extension.', type: string }, size: { description: 'File size in bytes.', type: string }, dateCreated: { description: 'Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployees: { description: 'Whether the file is shared with all employees.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the requesting user can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the requesting user can delete this file.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + application/xml: { } + '403': + description: 'The API user does not have permission to access company files.' + security: + - + basic: [] + - + oauth: + - company_file + '/api/v1/employees/{id}/files/view': + get: + tags: + - 'Employee Files' + - 'Public API' + summary: 'List Employee Files' + description: "Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories." + operationId: list-employee-files + parameters: + - + name: id + in: path + description: 'The ID of the employee whose files are being listed.' + required: true + schema: + type: integer + - + name: Accept + in: header + description: 'Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML.' + required: false + schema: + type: string + default: application/xml + responses: + '200': + description: "The employee's file categories and files. Each category contains permission flags and an array of file metadata." + content: + application/json: + schema: + title: JsonEmployeeFiles + properties: + employee: { properties: { id: { description: 'Employee ID.', type: integer } }, type: object } + categories: { type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canRenameCategory: { description: 'Whether the caller can rename this category.', type: string, enum: ['yes', 'no'] }, canDeleteCategory: { description: 'Whether the caller can delete this category.', type: string, enum: ['yes', 'no'] }, canUploadFiles: { description: 'Whether the caller can upload files to this category.', type: string, enum: ['yes', 'no'] }, displayIfEmpty: { description: 'Whether to display the category when it has no files.', type: string, enum: ['yes', 'no'] }, files: { type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename.', type: string }, size: { description: 'File size in bytes.', type: integer }, dateCreated: { description: 'UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployee: { description: 'Whether the file is shared with the employee.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the caller can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the caller can delete this file.', type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { description: 'Whether the caller can toggle the share-with-employee setting.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + application/xml: + schema: + title: XmlEmployeeFiles + properties: + id: { description: 'Employee ID on the root `<employee>` element.', type: string, xml: { attribute: true } } + category: { type: array, items: { properties: { id: { description: 'Category ID on the `<category>` element.', type: string, xml: { attribute: true } }, name: { type: string }, canRenameCategory: { type: string, enum: ['yes', 'no'] }, canDeleteCategory: { type: string, enum: ['yes', 'no'] }, canUploadFiles: { type: string, enum: ['yes', 'no'] }, displayIfEmpty: { type: string, enum: ['yes', 'no'] }, file: { type: array, items: { properties: { id: { description: 'File ID on the `<file>` element.', type: string, xml: { attribute: true } }, name: { type: string }, originalFileName: { type: string }, size: { description: 'File size in bytes (serialized as string in XML).', type: string }, dateCreated: { description: 'UTC creation timestamp in `YYYY-MM-DD HH:MM:SS` format.', type: string }, createdBy: { type: string }, shareWithEmployee: { type: string, enum: ['yes', 'no'] }, canRenameFile: { type: string, enum: ['yes', 'no'] }, canDeleteFile: { type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + xml: + name: employee + '403': + description: "The API user does not have permission to access the requested employee's files." + '404': + description: 'The requested employee was not found, or the employee has no accessible file categories.' + security: + - + basic: [] + - + oauth: + - 'employee:file' + /api/v1/login: + post: + tags: + - Login + - 'Public API' + summary: Login + description: "Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests.\n\nThis endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead.\n\n`applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device.\n\nResponse format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header.\n\nNote: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response." + operationId: login + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: format + in: query + description: 'When set to `json`, forces a JSON response regardless of the `Accept` header.' + required: false + schema: + type: string + enum: + - json + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Login' + responses: + '200': + description: 'Successful authentication.' + content: + application/json: + schema: + title: LoginResponse + required: + - success + - userId + - key + - apiUrl + properties: + success: { description: 'Always `true` on HTTP 200.', type: boolean } + userId: { description: 'The authenticated user ID.', type: integer } + employeeId: { description: 'The employee ID linked to this user. `null` when no employee record is associated.', oneOf: [{ type: integer }, { type: 'null' }] } + key: { description: 'The API key to use for subsequent requests.', type: string } + apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } + type: object + application/xml: + schema: + title: LoginXmlResponse + properties: + response: { description: 'Always `authenticated` on HTTP 200.', type: string } + userId: { description: 'The authenticated user ID.', type: integer } + employeeId: { description: 'The employee ID linked to this user. Rendered as `<employeeId isNull="yes"/>` when no employee record is associated.', type: integer } + key: { description: 'The API key to use for subsequent requests.', type: string } + apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } + type: object + xml: + name: auth + '403': + description: 'Forbidden. Credential or key failure. Credential and key failures include a response body; mobile application key rejections return an empty body.' + content: + application/json: + schema: + title: LoginFailureResponse + required: + - success + properties: + success: { description: 'Always `false`.', type: boolean } + type: object + application/xml: + schema: + title: LoginFailureXmlResponse + properties: + response: { description: 'Always `declined`.', type: string } + type: object + xml: + name: auth + '500': + description: 'Internal Server Error. API key creation failed.' + content: + application/json: + schema: + title: LoginFailureResponse + required: + - success + properties: + success: { description: 'Always `false`.', type: boolean } + type: object + application/xml: + schema: + title: LoginFailureXmlResponse + properties: + response: { description: 'Always `declined`.', type: string } + type: object + xml: + name: auth + deprecated: true + security: [] + /api/v1/meta/lists: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List List Fields' + description: 'Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users.' + operationId: list-list-fields + parameters: + - + name: format + in: query + description: 'Set to "json" to receive JSON output as an alternative to using the Accept header.' + required: false + schema: + type: string + enum: + - json + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'All list field details, including field IDs, option values, and manageability.' + content: + application/json: + schema: + title: ListFieldsResponse + type: array + items: + $ref: '#/components/schemas/ListFieldDetail' + application/xml: + schema: + title: ListFieldsXmlResponse + type: array + items: + $ref: '#/components/schemas/ListFieldDetail' + xml: + name: lists + wrapped: true + example: "<?xml version=\"1.0\"?>\n<lists>\n <list id=\"3\" fieldId=\"1\" alias=\"department\" manageable=\"yes\" multiple=\"no\">\n <name>Department</name>\n <options>\n <option id=\"45\" archived=\"no\" createdDate=\"2022-06-01T12:00:00+00:00\" archivedDate=\"\">Engineering</option>\n <option id=\"46\" archived=\"yes\" createdDate=\"2020-01-15T09:00:00+00:00\" archivedDate=\"2023-03-10T14:00:00+00:00\">Legacy Team</option>\n </options>\n </list>\n</lists>" + '403': + description: 'The API user does not have permission to view employee fields.' + security: + - + basic: [] + - + oauth: + - field + '/api/v1/meta/lists/{listFieldId}': + put: + tags: + - 'Account Information' + - 'Public API' + summary: 'Update List Field Values' + description: 'Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405.' + operationId: update-list-field-values + parameters: + - + name: listFieldId + in: path + description: 'The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`.' + required: true + schema: + type: string + - + name: format + in: query + description: 'Set to "json" to receive JSON output as an alternative to using the Accept header.' + required: false + schema: + type: string + enum: + - json + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ListFieldValues' + text/xml: + schema: + $ref: '#/components/schemas/ListFieldValuesXml' + responses: + '200': + description: 'All requested changes were applied. Returns the full updated list.' + content: + application/json: + schema: + $ref: '#/components/schemas/ListFieldDetail' + text/xml: + schema: + $ref: '#/components/schemas/ListFieldDetail' + '400': + description: 'The request body is invalid or malformed.' + '403': + description: 'The list is not editable, or the API user does not have sufficient permissions.' + '404': + description: 'The specified list field or option ID does not exist.' + '405': + description: 'One or more of the specified options belong to a non-manageable list field and cannot be modified.' + '409': + description: 'A duplicate list value conflicted with the value specified.' + security: + - + basic: [] + - + oauth: + - field.write + /api/v1/meta/tables: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Tabular Fields' + description: 'Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list.' + operationId: list-tabular-fields + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: "A list of all tabular fields in the account, with each table's fields and their metadata." + content: + application/json: + schema: + title: TabularFieldsResponse + type: array + items: + title: TabularField + properties: { alias: { description: 'The API alias for the table (e.g., jobInfo, compensation).', type: string }, fields: { description: 'The fields in this table.', type: array, items: { properties: { id: { description: 'The field ID.', type: integer }, name: { description: 'The display name of the field.', type: string }, alias: { description: 'The API alias for the field within this table.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list).', type: string } }, type: object } } } + type: object + application/xml: { } + security: + - + basic: [] + - + oauth: + - field + '/api/v1/reports/{id}': + get: + tags: + - Reports + - 'Public API' + summary: 'Get Company Report' + description: "**Deprecated. Use Custom Reports > Get Report by ID instead.**\n\nReturns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific.\n\nThe caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404." + operationId: get-company-report + parameters: + - + name: Accept + in: header + description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' + schema: + type: string + enum: + - application/json + - text/xml + - text/csv + - application/pdf + - application/vnd.ms-excel + - + name: id + in: path + description: 'The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.' + required: true + schema: + type: integer + - + name: format + in: query + description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' + required: false + schema: + type: string + enum: + - json + - xml + - csv + - xls + - pdf + - + name: fd + in: query + description: 'Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).' + schema: + type: string + enum: + - 'yes' + - 'no' + - + name: onlyCurrent + in: query + description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + schema: + type: boolean + default: true + responses: + '200': + description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each element has `id`, `type`, and `name`), and an `employees` array (each element has `id` plus one key per report field). For XML (`text/xml`), returns a `<report>` document. For CSV/XLS/PDF, returns file content with the appropriate content-type header.' + content: + application/json: + schema: + title: GetCompanyReportResponse + properties: + title: { description: 'The report title.', type: string } + fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per employee. Each object contains an `id` property plus one key per report field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } + type: object + text/xml: { } + text/csv: { } + application/pdf: { } + application/vnd.ms-excel: { } + '403': + description: 'Access denied. The authenticated user does not have permission to view this report.' + '404': + description: 'Not found. Returned when the report ID does not exist or belongs to a different company, when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + '/api/v1/employees/{employeeId}/time_off/calculator': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'Get Time Off Balance' + description: "Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided." + operationId: get-time-off-balance + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: end + in: query + description: 'The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.' + required: false + schema: + type: string + format: date + example: '2026-12-31' + - + name: precision + in: query + description: 'Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.' + required: false + schema: + type: integer + default: 2 + maximum: 4 + minimum: 0 + example: 2 + - + name: employeeId + in: path + description: 'The ID of the employee to get time off balances for.' + required: true + schema: + type: integer + responses: + '200': + description: 'An array of time off balance entries, one per assigned time off type.' + content: + application/json: + schema: + title: TimeOffBalanceResponse + type: array + items: + title: TimeOffBalanceEntry + properties: { timeOffType: { description: 'The ID of the time off type.', type: string }, name: { description: 'The name of the time off type.', type: string }, units: { description: "The unit of measurement for the balance (e.g. 'hours' or 'days').", type: string, example: hours }, balance: { description: 'The calculated time off balance as of the specified date, rounded using `precision`.', type: string, example: '24.50' }, end: { description: 'The date the balance was calculated as of, in YYYY-MM-DD format.', type: string, format: date }, policyType: { description: 'The type of time off policy assigned to the employee for this time off type.', type: string, enum: [accruing, discretionary, manual] }, usedYearToDate: { description: 'The amount of time off used year-to-date as of the specified date, rounded using `precision`.', type: string, example: '12.25' } } + type: object + application/xml: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '404': + description: 'Employee not found. Some clients may receive an empty HTML response body for this legacy error case.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_off + '/api/v1/employees/{employeeId}/time_off/history': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Create Time Off History Item' + description: 'Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted.' + operationId: create-time-off-history + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffHistory' + application/xml: + schema: + $ref: '#/components/schemas/TimeOffHistory' + responses: + '201': + description: 'The history item has been created.' + content: + application/json: { } + '400': + description: 'Empty or malformed JSON/XML, an invalid date format, an invalid event type, an invalid time off request, an invalid time off type, or an invalid override amount.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Invalid permissions to perform this action.' + content: + application/json: { } + '404': + description: 'Employee not found.' + '409': + description: 'The time off request already has a history item.' + content: + application/json: { } + '503': + description: 'Service unavailable due to a database error.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/employees/{employeeId}/time_off/balance_adjustment': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Adjust Time Off Balance' + description: "Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types." + operationId: adjust-time-off-balance + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AdjustTimeOffBalance' + application/xml: + schema: + $ref: '#/components/schemas/AdjustTimeOffBalance' + responses: + '201': + description: 'The balance adjustment has been created.' + content: + application/json: { } + '400': + description: 'Empty or malformed JSON/XML, an invalid date format, an invalid time off type, an invalid override amount, or an attempt to adjust a discretionary time off type.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to perform this action.' + content: + application/json: { } + '404': + description: 'Employee not found.' + '503': + description: 'Service unavailable due to a database error.' + security: + - + basic: [] + - + oauth: + - time_off.write + /api/v1/meta/time_off/policies: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Policies' + description: 'Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted.' + operationId: list-time-off-policies + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A list of all non-deleted time off policies, sorted alphabetically by name.' + content: + application/json: + schema: + title: TimeOffPoliciesResponse + type: array + items: + title: TimeOffPolicy + properties: { id: { description: 'The policy ID.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type this policy belongs to.', type: integer }, name: { description: 'The policy name.', type: string }, effectiveDate: { description: 'Deprecated. Always null.', oneOf: [{ type: string }, { type: 'null' }] }, type: { description: 'The policy type.', type: string, enum: [accruing, discretionary, manual] } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policies.' + security: + - + basic: [] + - + oauth: + - time_off + '/api/v1/employees/{employeeId}/time_off/request': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Create Time Off Request' + description: "Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies." + operationId: create-time-off-request + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to create the time off request for.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffRequest' + application/xml: + schema: + $ref: '#/components/schemas/TimeOffRequest' + responses: + '201': + description: 'Request created. The `Location` header contains the URL of the new request. When `Accept: application/json` is set, the response body contains the full created request — use the `id` field to chain follow-up operations (e.g. approve, cancel, supersede) without a separate lookup.' + content: + application/json: + schema: + title: CreatedTimeOffRequest + properties: + id: { description: 'The newly created time off request ID. Use this to chain follow-up operations such as approving, canceling, or superseding the request.', type: integer, example: 1668 } + employeeId: { description: 'The ID of the employee the request was created for.', type: integer } + name: { description: "The employee's full name. Only present when the employee record could be loaded.", type: string } + start: { description: 'The start date of the request in YYYY-MM-DD format.', type: string, format: date } + end: { description: 'The end date of the request in YYYY-MM-DD format.', type: string, format: date } + created: { description: 'The date the request was created in YYYY-MM-DD format (company timezone).', type: string, format: date } + status: { description: 'The current status of the request.', properties: { status: { description: 'The current status value (e.g. `approved`, `denied`, `requested`).', type: string }, lastChanged: { description: 'The date and time the status was last changed, formatted as `YYYY-MM-DD HH:MM:SS` in the company timezone.', type: string }, lastChangedByUserId: { description: 'The user ID who last changed the status.', type: integer } }, type: object } + type: { description: 'The time off type for this request. Only present when the underlying time off type record could be loaded.', properties: { id: { description: 'The time off type ID.', type: integer }, name: { description: 'The time off type name.', type: string } }, type: object } + amount: { description: 'The amount of time off requested. Only present when the underlying time off type record could be loaded.', properties: { unit: { description: 'The unit of measurement.', type: string, enum: [hours, days] }, amount: { description: 'The total amount requested.', type: number } }, type: object } + dates: { description: 'A map of dates (YYYY-MM-DD) to daily amounts. Only present when daily details were attached to the request.', type: object, additionalProperties: { type: number } } + notes: { description: 'Notes from employee and/or manager. The object is always present; the `employee` and `manager` keys are each included only when a non-empty note was provided.', properties: { employee: { description: 'Note from the employee.', type: string }, manager: { description: 'Note from the manager.', type: string } }, type: object } + comments: { description: 'Comments attached to the request. Always present; empty array when no comments exist.', type: array, items: { type: object } } + approvers: { description: 'The approval chain for this request. Only present when the request has approvers.', type: array, items: { $ref: '#/components/schemas/EmployeeTimeOffRequestApproverResponse' } } + actions: { description: 'Actions the current user can perform on this request. Only present when PTO action permissions are available. Keys are restricted to `view`, `edit`, `cancel`, `approve`, `deny`, `bypass`; values are booleans.', type: object, additionalProperties: { type: boolean } } + overlappingRequests: { description: 'Other existing time off requests whose date ranges overlap this request. Only present when overlap data was loaded with the request.', type: array, items: { type: object } } + policyType: { description: 'The policy type backing this request (e.g. accruing, manual, unlimited).', type: string } + usedYearToDate: { description: 'Amount of this time off type the employee has used year-to-date as of the request date.', oneOf: [{ type: number }, { type: 'null' }] } + balanceOnDateOfRequest: { description: "The employee's balance for this time off type on the date of the request.", oneOf: [{ type: number }, { type: 'null' }] } + type: object + '400': + description: 'Malformed JSON or XML, an invalid time off type, an invalid previous request ID, or other invalid request data.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Forbidden. The caller does not have permission to create or record this request for the employee, time off type, or requested status.' + content: + application/json: { } + '404': + description: 'Employee not found.' + content: + application/json: { } + '422': + description: 'Unprocessable entity. Returned when a remote/EOR time off request cannot be created for the requested action.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/time_off/requests/{requestId}/status': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Update Time Off Request Status' + description: 'Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step.' + operationId: update-time-off-request-status + parameters: + - + name: requestId + in: path + description: 'The ID of the time off request to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/request' + application/xml: + schema: + $ref: '#/components/schemas/request' + responses: + '200': + description: 'The status has been updated successfully. The response body is intentionally empty — no content is returned. Treat any empty body on a 200 response as a success indicator; do not attempt to parse the body as JSON.' + '400': + description: 'If the posted XML is invalid or the status is not "approved", "denied", "canceled", or "declined".' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'If the current user doesn\''t have access to change the status in this way.' + content: + application/json: { } + '404': + description: 'If the time off request ID doesn\''t exist.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - time_off.write + /api/v1/time_off/requests: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Requests' + description: 'Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve.' + operationId: list-time-off-requests + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: id + in: query + description: 'A particular request ID to limit the response to.' + schema: + type: integer + - + name: action + in: query + description: 'Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.' + schema: + type: string + default: view + enum: + - view + - approve + - myRequests + - + name: employeeId + in: query + description: 'A particular employee ID to limit the response to.' + schema: + type: integer + - + name: start + in: query + description: "The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date." + required: true + schema: + type: string + format: date + - + name: end + in: query + description: "The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date." + required: true + schema: + type: string + format: date + - + name: type + in: query + description: 'A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.' + schema: + type: string + - + name: status + in: query + description: 'A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.' + schema: + type: string + - + name: excludeNote + in: query + description: 'When set to any truthy value, omits the `notes` object from each request in the response.' + schema: + type: string + responses: + '200': + description: 'A list of time off requests matching the specified filters.' + content: + application/json: + schema: + title: TimeOffRequestsResponse + type: array + items: + title: TimeOffRequest + properties: { id: { description: 'The time off request ID.', type: integer, example: 1348 }, employeeId: { description: 'The ID of the employee.', type: integer, example: 5 }, name: { description: "The employee's full name.", type: string }, start: { description: 'The start date of the request in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'The end date of the request in YYYY-MM-DD format.', type: string, format: date }, created: { description: 'The date the request was created in YYYY-MM-DD format (company timezone).', type: string, format: date }, status: { description: 'The current status of the request.', properties: { lastChanged: { description: 'The date the status was last changed (company timezone).', type: string, format: date }, lastChangedByUserId: { description: 'The user ID who last changed the status.', type: integer }, status: { description: 'The current status value.', type: string } }, type: object }, type: { description: 'The time off type for this request.', properties: { id: { description: 'The time off type ID.', type: integer }, name: { description: 'The time off type name.', type: string }, icon: { description: 'The icon name for the time off type.', type: string } }, type: object }, amount: { description: 'The amount of time off requested.', properties: { unit: { description: 'The unit of measurement.', type: string, enum: [hours, days] }, amount: { description: 'The total amount requested.', type: number } }, type: object }, actions: { description: 'Actions the current user can perform on this request.', properties: { view: { description: 'Whether the user can view this request.', type: boolean }, edit: { description: 'Whether the user can edit this request.', type: boolean }, cancel: { description: 'Whether the user can cancel this request.', type: boolean }, approve: { description: 'Whether the user can approve this request.', type: boolean }, deny: { description: 'Whether the user can deny this request.', type: boolean }, bypass: { description: 'Whether the user can bypass the approval workflow.', type: boolean } }, type: object }, dates: { description: 'A map of dates (YYYY-MM-DD) to daily amounts.', type: object, additionalProperties: { type: number } }, notes: { description: 'Notes from employee and/or manager. Omitted when `excludeNote` is set.', properties: { employee: { description: 'Note from the employee.', type: string }, manager: { description: 'Note from the manager.', type: string } }, type: object } } + type: object + application/xml: { } + '400': + description: 'Invalid or missing start/end date.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + security: + - + basic: [] + - + oauth: + - time_off + /api/v1/meta/time_off/types: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Types' + description: "Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request." + operationId: list-time-off-types + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: mode + in: query + description: 'Set to `request` to limit the results to time off types the authenticated employee can request.' + schema: + type: string + enum: + - request + responses: + '200': + description: "Active time off types and the company's default hours-per-day schedule." + content: + application/json: + schema: + title: 'Time Off Types and Default Hours' + required: + - timeOffTypes + - defaultHours + properties: + timeOffTypes: { title: 'Time Off Types', type: array, items: { required: [id, name, units, color, icon, source], properties: { id: { description: 'Time off type ID', type: integer, example: 64 }, name: { description: 'Time off type name', type: string, example: Vacation }, units: { description: 'Units for time off', type: string, enum: [hours, days] }, color: { description: 'Hex color code', example: 56afdd, oneOf: [{ type: string }, { type: 'null' }] }, icon: { description: 'Icon identifier for the time off type', example: airplane, oneOf: [{ type: string }, { type: 'null' }] }, source: { description: 'Source of the time off type', type: string, enum: [internal, remote] } }, type: object } } + defaultHours: { title: 'Default Hours', type: array, items: { required: [name, amount], properties: { name: { description: 'Day of week', type: string, example: Monday }, amount: { description: 'Default hours for the day. Returned as a stringified decimal value.', type: string, example: '8' } }, type: object } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + security: + - + basic: [] + - + oauth: + - time_off + /api/v1/training/type: + get: + tags: + - Training + - 'Public API' + summary: 'List Training Types' + description: 'Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings.' + operationId: list-training-types + responses: + '200': + description: 'Returns all training types as an object keyed by training type ID.' + content: + application/json: + schema: + title: TrainingTypeMap + description: 'Object keyed by training type ID, where each value is a TrainingType.' + type: object + additionalProperties: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Training Type' + description: "Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings." + operationId: create-training-type + requestBody: + description: 'Training object to post' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the new training type.' + type: string + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + renewable: + description: 'Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals.' + type: boolean + category: + description: 'The category is optional and you can pass either a category id or a category name.' + properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: 'First Aid Trainings' } } + type: object + required: + description: 'Is this a required training?' + type: boolean + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid unless training is required.' + type: integer + linkUrl: + description: 'Optional URL that can be included with a training.' + type: string + description: + description: 'Description for the training.' + type: string + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + example: + name: 'My New Training' + frequency: '12' + renewable: '1' + category: + id: '3' + name: CustomApiCategoryName2 + required: '' + dueFromHireDate: + unit: day + amount: '30' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/type/{trainingTypeId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Training Type' + description: 'Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings.' + operationId: update-training-type + parameters: + - + name: trainingTypeId + in: path + description: 'The ID of the training type to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training type object to update to' + required: true + content: + application/json: + schema: + properties: + name: + description: 'Name of the training type.' + type: string + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + renewable: + description: 'Renewable is optional but if you are setting it to true you must pass a frequency.' + type: boolean + category: + description: 'Category is optional and passing an empty value will remove the category from the training type. Passing a name will assign the training type to the new training category.' + properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: CustomApiCategoryName2 } } + type: object + required: + description: 'Is this a required training?' + type: boolean + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid unless training is required.' + type: integer + linkUrl: + description: 'Optional URL that can be included with a training.' + type: string + description: + description: 'Description for the training.' + type: string + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + example: + name: 'My Edited Training' + frequency: '12' + renewable: '1' + category: + name: 'Existing or new training category' + required: '' + dueFromHireDate: + unit: day + amount: '30' + responses: + '200': + description: 'Returns the updated training type.' + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Training Type' + description: 'Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request.' + operationId: delete-training-type + parameters: + - + name: trainingTypeId + in: path + description: 'The ID of the training type to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '400': + description: 'Bad request. This also occurs when the training type still has associated employee records that must be removed first.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training type does not exist.' + content: + application/json: { } + '405': + description: 'Training type was unable to be deleted.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + /api/v1/training/category: + get: + tags: + - Training + - 'Public API' + summary: 'List Training Categories' + description: 'Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings.' + operationId: list-training-categories + responses: + '200': + description: 'Returns all training categories as an object keyed by category ID.' + content: + application/json: + schema: + title: TrainingCategoryMap + description: 'Object keyed by category ID, where each value is a TrainingCategory.' + type: object + additionalProperties: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Training Category' + description: "Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings." + operationId: create-training-category + requestBody: + description: 'Training category to post' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the new training category.' + type: string + type: object + example: + name: 'My New Training Category' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/category/{trainingCategoryId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Training Category' + description: 'Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings.' + operationId: update-training-category + parameters: + - + name: trainingCategoryId + in: path + description: 'The ID of the training category to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training category to update' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the training category.' + type: string + type: object + example: + name: 'My Training Category' + responses: + '200': + description: 'Returns the updated training category.' + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '409': + description: 'A training category with the same name already exists.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Training Category' + description: 'Delete an existing training category. The owner of the API key used must have access to training settings.' + operationId: delete-training-category + parameters: + - + name: trainingCategoryId + in: path + description: 'The ID of the training category to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training category does not exist.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/record/employee/{employeeId}': + get: + tags: + - Training + - 'Public API' + summary: 'List Employee Training Records' + description: "Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee." + operationId: list-employee-trainings + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to get a list of trainings for.' + required: true + schema: + type: integer + - + name: type + in: query + description: 'Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.' + schema: + type: integer + responses: + '200': + description: 'Returns training records keyed by record ID, or an empty array when the employee has no records.' + content: + application/json: + schema: + title: TrainingRecordMap + description: 'Returns an empty array when the employee has no records, or an object keyed by training record ID when records exist.' + oneOf: + - { description: 'Object keyed by training record ID, each value is a TrainingRecord.', type: object, additionalProperties: { $ref: '#/components/schemas/TrainingRecord' } } + - { description: 'Empty array returned when the employee has no training records.', type: array, items: { }, maxItems: 0 } + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Employee Training Record' + description: "Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee." + operationId: create-employee-training-record + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to add a training record to.' + required: true + schema: + type: integer + requestBody: + description: 'Training object to post' + required: true + content: + application/json: + schema: + required: + - completed + - type + properties: + completed: + description: 'Completed is a required field and must be in yyyy-mm-dd format.' + type: string + cost: + description: 'Optional cost for the training record.' + properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } + type: object + instructor: + description: 'Name of the training instructor.' + type: string + hours: + description: 'Number of hours for the training.' + type: number + credits: + description: 'Credits earned for the training.' + type: number + notes: + description: 'Optional notes about the training record.' + type: string + type: + description: 'This must be an existing training type ID.' + type: integer + type: object + example: + completed: '2026-03-12' + cost: + currency: USD + amount: '100.00' + instructor: 'Bob Jones' + hours: '16' + credits: '4' + notes: 'sample note' + type: '4' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingRecord' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/record/{employeeTrainingRecordId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Employee Training Record' + description: "Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee." + operationId: update-employee-training-record + parameters: + - + name: employeeTrainingRecordId + in: path + description: 'The ID of the training record to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training object to update' + required: true + content: + application/json: + schema: + required: + - completed + properties: + completed: + description: 'Completed is the only required field and must be in yyyy-mm-dd format. The other parameters are optional.' + type: string + cost: + description: 'Optional cost for the training record.' + properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } + type: object + instructor: + description: 'Name of the training instructor.' + type: string + hours: + description: 'Number of hours for the training.' + type: number + credits: + description: 'Credits earned for the training.' + type: number + notes: + description: 'Optional notes about the training record.' + type: string + type: object + example: + completed: '2026-03-12' + cost: + currency: USD + amount: '100.00' + instructor: 'Bob Jones' + hours: '16' + credits: '4' + notes: 'sample note' + responses: + '201': + description: Updated + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingRecord' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '405': + description: 'Training record could not be updated.' + content: + application/json: { } + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Employee Training Record' + description: 'Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type.' + operationId: delete-employee-training-record + parameters: + - + name: employeeTrainingRecordId + in: path + description: 'The ID of the training record to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training record does not exist.' + content: + application/json: { } + '405': + description: 'Unable to delete training record.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/employees/{employeeId}/photo': + post: + tags: + - Photos + - 'Public API' + summary: 'Upload Employee Photo' + description: "Uploads a new photo for an employee. Accepts either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled." + operationId: upload-employee-photo + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee whose photo is being uploaded.' + required: true + schema: + type: integer + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + description: "The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB." + type: string + format: binary + type: object + application/json: + schema: + required: + - fileBase64 + properties: + fileBase64: + description: 'Base64-encoded image bytes. Same format/size/dimension rules as the multipart `file` field: JPEG, PNG, BMP, or GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream); square within 1 pixel; at least 150×150 pixels; decoded payload no larger than 20MB. Whitespace inside the base64 string is tolerated and stripped before decoding.' + type: string + format: byte + type: object + responses: + '201': + description: 'The photo was uploaded and processed successfully. No response body is returned.' + '400': + description: 'The request is invalid: no file provided, zero-byte file, or the maximum number of photo uploads (32767) has been exceeded.' + '402': + description: 'The photo could not be processed: the image crop failed, or the file contents could not be read.' + '403': + description: 'The authenticated user does not have permission to upload photos for this employee.' + '404': + description: 'The employee does not exist.' + '413': + description: 'The uploaded file exceeds the 20MB size limit.' + '415': + description: 'The image does not meet requirements: not square (width and height differ by more than one pixel), smaller than 150×150 pixels, or the file could not be read as a supported image format.' + security: + - + basic: [] + - + oauth: + - 'employee:photo.write' + /api/v1/time_off/whos_out: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Who’s Out' + description: 'Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`.' + operationId: list-whos-out + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: start + in: query + description: 'Start date in YYYY-MM-DD format. Defaults to today.' + schema: + type: string + format: date + - + name: end + in: query + description: 'End date in YYYY-MM-DD format. Defaults to 14 days after the start date.' + schema: + type: string + format: date + - + name: filter + in: query + description: "Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`." + schema: + type: string + enum: + - 'off' + responses: + '200': + description: 'A date-sorted list of employees who are out and company holidays.' + content: + application/json: + schema: + title: WhosOutResponse + type: array + items: + title: WhosOutEntry + properties: { id: { description: 'The time off request ID or holiday ID.', type: integer }, type: { description: "Whether this entry is a time off request or a company holiday. Entries have two shapes depending on `type`: `timeOff` entries include `employeeId` and `name` (the employee's name); `holiday` entries include only `name` (the holiday name) and omit `employeeId`. Always check `type` before accessing `employeeId`.", type: string, enum: [timeOff, holiday] }, employeeId: { description: 'The employee ID. Only present for `timeOff` entries; omitted for `holiday` entries.', type: integer }, name: { description: "For `timeOff` entries, the employee's name. For `holiday` entries, the holiday's name.", type: string }, start: { description: 'Start date in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'End date in YYYY-MM-DD format.', type: string, format: date } } + type: object + application/xml: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: "The Who's Out feature is disabled for this account." + security: + - + basic: [] + - + oauth: + - time_off +components: + schemas: + CursorPagedResponseMetadata: + description: 'Metadata information for employee list responses including total count and pagination details' + required: + - total + - page + properties: + total: + description: 'Total number of employees matching the filter criteria' + type: integer + page: + $ref: '#/components/schemas/CursorPagesResponse' + description: 'Pagination information for the current response' + type: object + CursorPagesResponse: + description: 'Pagination information for employee list responses including limit and cursor-based navigation' + required: + - limit + - nextCursor + - prevCursor + properties: + limit: + description: 'Maximum number of items per page' + oneOf: + - + type: integer + - + type: 'null' + nextCursor: + description: 'Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter.' + oneOf: + - + type: string + - + type: 'null' + prevCursor: + description: 'Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter.' + oneOf: + - + type: string + - + type: 'null' + type: object + CursorPaginationQueryObject: + properties: + before: + description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' + type: string + after: + description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' + type: string + limit: + description: 'Maximum number of items to return. This can be at most 100.' + type: integer + default: 50 + maximum: 100 + minimum: 1 + type: object + EmployeeVerificationIntegration: + title: EmployeeVerificationIntegration + description: "Install state and partner metadata for the company's employee verification integration." + required: + - enabled + - integrationType + properties: + enabled: + description: 'True when the integration is installed for the company and partner endpoints are usable.' + type: boolean + integrationType: + description: 'Identifier of the configured employee verification partner (opaque string; matches `integrationType` from the integration GET response).' + type: string + type: object + EmployeeVerificationPublicApiRecord: + title: EmployeeVerificationPublicApiRecord + description: 'A single employee verification row as returned by the public list API.' + properties: + id: + type: integer + format: int64 + employeeId: + oneOf: + - + type: integer + format: int64 + - + type: 'null' + integrationType: + type: string + verificationType: + type: string + verificationStatus: + oneOf: + - + type: string + - + type: 'null' + verificationStatusNotes: + oneOf: + - + type: string + - + type: 'null' + remoteAccessUrl: + oneOf: + - + type: string + - + type: 'null' + eVerifyStatus: + oneOf: + - + type: string + - + type: 'null' + archived: + type: boolean + billingProcessed: + type: boolean + createdByUserId: + type: integer + format: int64 + createdYmdt: + description: 'Creation timestamp (company DB format).' + type: string + lastModifiedYmdt: + description: 'Last modified timestamp (company DB format).' + type: string + startDateYmdt: + type: string + type: object + NewHireWidgetItem: + description: "Single upcoming new hire as projected for the public welcome-new-hires widget endpoint. Strips sensitive contact fields (work email, home email) and normalizes the domain's dynamic BasicEmployee decorations into a stable shape." + required: + - id + - preferredFirstName + - lastName + - hireDate + - canSeeEmployee + properties: + id: + description: 'Employee id.' + type: integer + preferredFirstName: + description: 'Nickname when set, otherwise first name.' + type: string + lastName: + type: string + hireDate: + description: 'ISO 8601 date (YYYY-MM-DD).' + oneOf: + - + type: string + format: date + - + type: 'null' + profilePictureUrl: + description: 'Medium-size profile photo URL, or default silhouette URL.' + oneOf: + - + type: string + - + type: 'null' + department: + description: 'Department display name. Null when the authenticated user cannot view the department field.' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Location display name. Null when the authenticated user cannot view the location field.' + oneOf: + - + type: string + - + type: 'null' + canSeeEmployee: + description: "Whether the authenticated user can navigate to the employee's profile." + type: boolean + getToKnowYou: + description: 'Completed Get-To-Know-You questions and responses for the new hire. Null when the new hire has not completed any questions or any answer is hidden.' + oneOf: + - + type: array + items: + $ref: '#/components/schemas/CompletedQuestionsAndResponseDataObject' + - + type: 'null' + type: object + NewHirePacketPublicApi: + description: 'Flat new hire packet instance for public read APIs (list and detail).' + properties: + id: + description: 'Primary key of the new hire packet instance.' + oneOf: + - + type: integer + - + type: 'null' + employeeId: + description: 'Employee this packet belongs to.' + type: integer + contactEmployeeId: + description: 'Contact employee for the packet, if any.' + oneOf: + - + type: integer + - + type: 'null' + requiresPersonalInformation: + type: boolean + requiresPhoto: + type: boolean + requiresPersonalQuestions: + type: boolean + arriveByTime: + description: 'Expected arrival time (time portion).' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Work location label for the new hire.' + oneOf: + - + type: string + - + type: 'null' + sentDatetime: + description: 'When the packet was sent (datetime string).' + oneOf: + - + type: string + - + type: 'null' + viewedDatetime: + description: 'When the packet was first viewed (datetime string).' + oneOf: + - + type: string + - + type: 'null' + completedDatetime: + description: 'When the packet was completed (datetime string).' + oneOf: + - + type: string + - + type: 'null' + createdByUserId: + oneOf: + - + type: integer + - + type: 'null' + createdDatetime: + description: 'When the packet row was created (datetime string).' + oneOf: + - + type: string + - + type: 'null' + sendGetToKnowYouEmail: + type: boolean + getToKnowYouEmailSent: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollState: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollFederal: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollDirectDeposit: + oneOf: + - + type: boolean + - + type: 'null' + nhpConfigurationId: + description: 'Linked new hire packet configuration id, if any.' + oneOf: + - + type: integer + - + type: 'null' + nhpTemplateId: + oneOf: + - + type: integer + - + type: 'null' + countNhpGtkySent: + oneOf: + - + type: integer + - + type: 'null' + cancelled: + type: boolean + includePhotoOption: + description: 'Whether photo collection is offered based on configuration.' + type: boolean + status: + description: 'Derived lifecycle status for the instance.' + type: string + enum: + - cancelled + - completed + - sent + - draft + type: object + NewHirePacketPublicApiWritableBody: + description: 'Optional fields that may be set when creating or updating a new hire packet instance. All properties are optional for PUT; for POST, employeeId is required and supplied via a second schema in the request body allOf.' + properties: + contactEmployeeId: + description: 'Contact employee for the packet, if any.' + oneOf: + - + type: integer + - + type: 'null' + requiresPersonalInformation: + description: 'Whether personal information collection is required.' + type: boolean + requiresPhoto: + description: 'Whether a photo is required.' + type: boolean + requiresPersonalQuestions: + description: 'Whether personal questions are required.' + type: boolean + arriveByTime: + description: 'Expected arrival time (time portion).' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Work location label for the new hire.' + oneOf: + - + type: string + - + type: 'null' + sendGetToKnowYouEmail: + description: 'Whether to send the Get To Know You email.' + type: boolean + showPayrollState: + description: 'Whether to show state payroll fields.' + type: boolean + showPayrollFederal: + description: 'Whether to show federal payroll fields.' + type: boolean + showPayrollDirectDeposit: + description: 'Whether to show direct deposit payroll fields.' + type: boolean + nhpTemplateId: + description: 'Linked new hire packet template id, if any.' + oneOf: + - + type: integer + - + type: 'null' + type: object + OnboardingExperiencePublicApi: + description: 'Onboarding experience for public APIs; links to the new hire packet instance by id only.' + properties: + id: + description: 'Onboarding experience id (same as the new hire packet instance primary key).' + type: integer + employeeId: + description: 'Employee this onboarding experience belongs to.' + type: integer + newHirePacketId: + description: 'Primary key of the linked new hire packet instance (NHP row).' + type: integer + nhpTemplateId: + description: 'Linked NHP template id, if any.' + oneOf: + - + type: integer + - + type: 'null' + nhpConfigurationId: + description: 'Linked NHP configuration id, if any.' + oneOf: + - + type: integer + - + type: 'null' + status: + description: 'Derived lifecycle status for the linked new hire packet instance.' + type: string + enum: + - cancelled + - completed + - sent + - draft + type: object + ProjectCreateRequestSchema: + description: 'Schema for creating a new time tracking project with optional tasks' + required: + - name + properties: + name: + description: 'Name of the project. Must be unique and no more than 50 characters.' + type: string + maxLength: 50 + example: 'Project A' + billable: + description: 'Indicates if the project is billable. Defaults to true if not provided.' + type: boolean + allowAllEmployees: + description: 'Indicates if all employees can log time for this project. Defaults to true if not provided.' + type: boolean + employeeIds: + description: 'A list of employee IDs that can log time for this project. Only used when `allowAllEmployees` is false.' + type: array + items: + type: integer + hasTasks: + description: 'Indicates if the project has tasks. Defaults to false if not provided.' + type: boolean + tasks: + description: 'List of tasks to create and associate with the project.' + type: array + items: + $ref: '#/components/schemas/TaskCreateSchema' + type: object + TaskCreateSchema: + description: 'Schema for creating a new task for a time tracking project' + required: + - name + properties: + name: + description: 'Name of the task.' + type: string + billable: + description: 'Indicates if the task is billable. Defaults to true if not provided.' + type: boolean + type: object + Scheduling-CreateSchedulingShiftRequest-V1: + description: 'Fields required to create a scheduling shift.' + required: + - scheduleId + - status + - color + - timezone + - start + - end + properties: + scheduleId: + description: 'The ID of the schedule the shift belongs to.' + type: string + format: uuid + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the shift.' + example: 'Morning Shift' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the shift.' + enum: + - planned + - published + color: + description: '6 character color hex code.' + type: string + maxLength: 6 + minLength: 6 + example: 00FFAA + timezone: + description: 'The timezone for the shift. Defaults to schedule timezone.' + example: America/Denver + capacity: + description: 'The expected headcount for the shift. If null, has no restrictions.' + default: null + example: 1 + oneOf: + - + type: integer + minimum: 1 + - + type: 'null' + employeeIds: + description: 'What employees are assigned to this shift?' + type: array + items: + type: integer + default: [] + start: + description: 'UTC timestamp of the start of the shift.' + type: string + format: date-time + example: '2025-01-01T06:00:00Z' + end: + description: 'UTC timestamp of the end of the shift.' + type: string + format: date-time + example: '2025-01-01T14:00:00Z' + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: FREQ=WEEKLY;INTERVAL=1 + oneOf: + - + type: string + - + type: 'null' + recurrenceDtstart: + description: 'The UTC start time for a recurring shift (anchor point for the recurrence rule).' + example: '2024-01-01T09:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift.' + example: '2024-12-01T17:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE).' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + type: object + Scheduling-UpdateSchedulingShiftRequest-V1: + description: 'Fields for updating a scheduling shift. All fields are optional, and only provided fields will be updated. recurrenceEditOption is required when the shift already has recurrence settings.' + properties: + name: + description: 'The name of the shift' + example: 'Front Desk - Morning' + oneOf: + - + type: string + - + type: 'null' + color: + description: '6 character color hex code.' + type: string + maxLength: 6 + minLength: 6 + example: 00FFAA + capacity: + description: 'The expected headcount for the shift. If null, has no restrictions.' + default: null + example: 3 + oneOf: + - + type: integer + minimum: 1 + - + type: 'null' + start: + description: 'UTC timestamp of the start of the shift.' + type: string + format: date-time + example: '2026-01-14T16:00:00Z' + end: + description: 'UTC timestamp of the end of the shift.' + type: string + format: date-time + example: '2026-01-14T20:00:00Z' + timezone: + description: 'The timezone for the shift.' + type: string + example: America/Denver + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: 'FREQ=WEEKLY;BYDAY=MO,WE;INTERVAL=1' + oneOf: + - + type: string + - + type: 'null' + recurrenceEditOption: + description: 'How should recurrence edits be effective? Edits will not affect any realized shifts regardless of option.' + type: string + enum: + - instance + - future + - all + example: future + recurrenceDtstart: + description: 'The UTC start time for a recurring shift and the anchor point for the recurrence rule.' + example: '2026-01-14T09:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift.' + example: '2026-01-14T17:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE).' + example: '2026-03-31T17:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + employeeIds: + description: 'What employees are assigned to this shift?' + type: array + items: + type: integer + unpublishedChanges: + description: 'The pending changes that have not been published. Only accepts null to clear unpublished changes.' + type: 'null' + type: object + EmployeeTimeOffRequestApproverResponse: + description: 'List of time off request approvers' + type: array + items: + required: + - userId + - displayName + - employeeId + properties: + userId: + description: 'User ID of the approver' + type: integer + displayName: + description: 'Display name of the approver' + type: string + employeeId: + description: 'Employee ID of the approver' + type: integer + photoUrl: + description: "URL to the approver's photo" + oneOf: + - + type: string + - + type: 'null' + type: object + PersonInfoApiTransformer: + properties: + employeeId: + description: 'Employee ID' + oneOf: + - + type: integer + - + type: 'null' + userId: + description: 'User ID' + oneOf: + - + type: integer + - + type: 'null' + displayFirstName: + description: 'Display first name' + type: string + lastName: + description: 'Last name' + type: string + photoUrl: + description: 'Photo URL' + type: string + type: object + TimeTracking-OffsetPaginatedResponseData-V1: + description: 'Additional data for paginated responses' + properties: + meta: + description: 'Pagination metadata' + required: + - totalItems + - offset + - limit + properties: + totalItems: + type: integer + example: 3 + offset: + type: integer + example: 2 + limit: + type: integer + example: 2 + type: object + _links: + description: 'Pagination links' + required: + - prev + - next + properties: + prev: + description: 'Link object for the previous page, or null if on the first page' + properties: + href: + description: 'Full URL for the previous page' + type: string + oneOf: + - + type: object + - + type: 'null' + next: + description: 'Link object for the next page, or null if on the last page' + properties: + href: + description: 'Full URL for the next page' + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + type: object + TimeTracking-BreakPolicyEmployeeCollection-V1: + description: 'Employee data relevant for break policies' + type: array + items: + required: + - id + - name + - photoUrl + properties: + id: + description: 'The employee ID' + type: integer + name: + description: 'The employee name {Preferred Last}' + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: 'The employee profile photo' + oneOf: + - + type: string + - + type: 'null' + type: object + Project-PaginatedResponseData-V1: + description: 'Pagination envelope shared by paginated Project endpoints.' + properties: + meta: + description: 'Pagination metadata.' + required: + - totalItems + - totalPages + - page + - pageSize + properties: + totalItems: + type: integer + example: 100 + totalPages: + type: integer + example: 2 + page: + type: integer + example: 1 + pageSize: + type: integer + example: 50 + type: object + _links: + description: 'Pagination links. Keys are omitted when there is no previous/next page.' + properties: + prev: + description: 'Link object for the previous page. Omitted on the first page.' + properties: + href: + type: string + type: object + next: + description: 'Link object for the next page. Omitted on the last page.' + properties: + href: + type: string + type: object + type: object + type: object + Project-CreateTimeTrackingProject-V1: + description: 'Request body for creating a time tracking project.' + required: + - name + properties: + name: + type: string + maxLength: 50 + minLength: 1 + example: 'Project A' + billable: + type: boolean + default: false + example: true + includeInPayroll: + type: boolean + default: false + example: true + allEmployeesAssigned: + description: 'If true, every time-tracked employee is assigned to the project. Ignored when `employeeIds` is provided.' + type: boolean + default: false + employeeIds: + description: 'Specific employee IDs to assign. Minimum 1 entry required when provided. Takes precedence over `allEmployeesAssigned`.' + type: array + items: + type: integer + minItems: 1 + example: + - 1 + - 2 + - 3 + tasks: + description: 'Tasks to create alongside the project. Minimum 1 entry required when provided.' + type: array + items: + required: + - name + properties: + name: + type: string + maxLength: 50 + minLength: 1 + example: 'Task A' + billable: + type: boolean + default: false + example: true + type: object + minItems: 1 + type: object + AdjustTimeTrackingRequestSchema: + description: 'Schema for adjust time tracking request body' + required: + - timeTrackingId + - hoursWorked + properties: + timeTrackingId: + description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + hoursWorked: + description: 'The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0.' + type: number + example: 6 + projectId: + description: 'ID of the project associated with this time tracking record' + example: 123 + oneOf: + - + type: integer + - + type: 'null' + taskId: + description: 'ID of the task associated with this time tracking record' + example: 456 + oneOf: + - + type: integer + - + type: 'null' + shiftDifferentialId: + description: 'ID of the shift differential associated with this time tracking record' + example: 789 + oneOf: + - + type: integer + - + type: 'null' + holidayId: + description: 'ID of the holiday associated with this time tracking record' + example: 101 + oneOf: + - + type: integer + - + type: 'null' + type: object + ClockInRequestSchema: + description: 'Schema for clock-in request body' + properties: + projectId: + description: 'ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified.' + example: 10 + oneOf: + - + type: integer + - + type: 'null' + taskId: + description: 'ID of the time tracking task that should be associated with the timesheet entry.' + example: 25 + oneOf: + - + type: integer + - + type: 'null' + note: + description: 'The note that should be associated with the timesheet entry' + example: 'Back from lunch.' + oneOf: + - + type: string + - + type: 'null' + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + example: '2024-12-12' + oneOf: + - + type: string + format: date + - + type: 'null' + start: + description: 'The time for the clock in. In 24 hour format HH:MM' + example: '13:00' + oneOf: + - + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + - + type: 'null' + timezone: + description: 'The timezone associated with the clock in.' + example: America/Denver + oneOf: + - + type: string + - + type: 'null' + breakId: + description: 'ID of the break that should be associated with the timesheet entry.' + example: 123e4567-e89b-12d3-a456-426614174000 + oneOf: + - + type: string + format: uuid + - + type: 'null' + offline: + description: 'Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later.' + type: boolean + example: false + type: object + ClockOutRequestSchema: + description: 'Schema for clock out request body' + properties: + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + type: string + format: date + example: '2024-12-12' + end: + description: 'The time for the clock out. In 24 hour format HH:MM' + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + example: '13:00' + timezone: + description: 'The timezone associated with the clock out.' + type: string + example: America/Denver + type: object + HourEntriesRequestSchema: + description: 'Schema for timesheet hour entries request' + required: + - hours + properties: + hours: + description: 'Array of hour entries to add or update' + type: array + items: + $ref: '#/components/schemas/HourEntrySchema' + type: object + HourEntrySchema: + description: 'Schema for a single timesheet hour entry' + properties: + employeeId: + description: 'Unique identifier for the employee' + type: integer + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format' + type: string + format: date + example: '2024-12-01' + hours: + description: 'Hours worked for this timesheet entry' + type: number + format: float + example: 3.5 + id: + description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry' + type: integer + projectId: + description: 'The ID of the project to associate with the timesheet entry' + type: integer + taskId: + description: 'The ID of the task to associate with the timesheet entry' + type: integer + note: + description: 'Optional note to associate with the timesheet entry' + type: string + type: object + TimeTrackingBulkResponseSchema: + description: 'Schema for time tracking bulk operation response' + properties: + success: + description: 'Indicates whether the operation was successful' + type: boolean + response: + description: 'Response data containing ID and message' + properties: + id: + description: 'Unique identifier for the time tracking record' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + message: + description: 'Response message, typically used for error details' + oneOf: + - + type: string + - + type: 'null' + type: object + type: object + TimeTrackingDeleteResponseSchema: + description: 'Schema for time tracking delete operation response' + properties: + status: + description: 'Status of the delete operation' + type: string + example: success + message: + description: 'Response message indicating the result of the operation' + type: string + example: 'Record removed' + type: object + TimeTrackingIdResponseSchema: + description: 'Schema for time tracking ID response' + properties: + id: + description: 'Unique identifier for the time tracking record' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + type: object + TimeTrackingRecordSchema: + description: 'Schema for time tracking record response' + properties: + timeTrackingId: + description: 'Unique identifier for the time tracking record' + type: string + employeeId: + description: 'ID of the employee associated with this time tracking record' + type: string + divisionId: + description: 'ID of the division associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: 'ID of the department associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: 'ID of the job title associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + payCode: + description: 'Pay code for this time tracking record' + oneOf: + - + type: string + - + type: 'null' + dateHoursWorked: + description: 'Date the hours were worked' + type: string + format: date + type: + description: 'Type of time tracking record' + type: string + payRate: + description: 'Pay rate for this time tracking record' + type: string + format: decimal + rateType: + description: 'Rate type for this time tracking record' + type: string + hoursWorked: + description: 'Number of hours worked' + type: string + format: decimal + adjustedHours: + description: 'Number of adjusted hours' + type: string + format: decimal + dateAdjusted: + description: 'Date and time when the hours were adjusted' + type: string + format: date-time + jobCode: + description: 'Job code associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + jobData: + description: 'Additional job data for this time tracking record' + oneOf: + - + type: string + - + type: 'null' + projectId: + description: 'ID of the project associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + taskId: + description: 'ID of the task associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + shiftDifferentialId: + description: 'ID of the shift differential associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + holidayId: + description: 'ID of the holiday associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + project: + description: 'Project information associated with this time tracking record' + properties: + id: + description: 'Project information' + type: integer + name: + type: string + task: + properties: + id: + type: integer + name: + type: string + oneOf: + - + type: object + - + type: 'null' + oneOf: + - + type: object + - + type: 'null' + shiftDifferential: + description: 'Shift differential information associated with this time tracking record' + properties: + id: + description: 'Shift Differential information' + type: integer + name: + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + FieldOptionsRequestSchema: + description: 'Schema for field options request' + required: + - fields + properties: + fields: + description: 'List of field names to get options for' + type: array + items: + type: string + example: + - field_name1 + - field_name2 + dependentFields: + description: 'Dependent fields and their values that affect the options of the requested fields' + example: + field_name1: + - + field: field_name2 + value: 123 + oneOf: + - + type: object + additionalProperties: + type: array + items: + properties: { field: { type: string }, value: { type: string } } + type: object + - + type: 'null' + filters: + description: 'Optional filters to apply when retrieving field options. Filters limit the returned options based on other field values. The object contains a `match` key (`all` or `any`) and a `filters` array of objects with `field`, `operator`, and `value` keys.' + example: + match: all + filters: + - + field: employee_status + operator: includes + value: + - Active + oneOf: + - + type: object + - + type: 'null' + type: object + Employee: + title: 'Employee when updating' + description: 'A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. **Important for AI agents:** Unknown or misspelled field names are silently ignored — the endpoint returns 200 but the field is not updated. Always use the exact alias from the schema properties below or from the list-fields endpoint; do not invent aliases by adding prefixes such as `home` (e.g., `homeCity` is wrong — the correct alias is `city`). Photo data is not writable through this schema: photo-related keys are silently ignored. Use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to change a profile photo.' + properties: + firstName: + description: 'Legal first name.' + type: string + lastName: + description: 'Legal last name.' + type: string + workEmail: + description: 'Work email address.' + type: string + jobTitle: + description: 'Job title.' + type: string + department: + description: 'Department name.' + type: string + division: + description: 'Division name.' + type: string + location: + description: 'Location name.' + type: string + hireDate: + description: 'Hire date in YYYY-MM-DD format.' + type: string + format: date + mobilePhone: + description: 'Mobile phone number.' + type: string + homePhone: + description: 'Home phone number.' + type: string + workPhone: + description: 'Work phone number.' + type: string + address1: + description: 'Home street address line 1. The correct alias is `address1` — do not use `homeAddress1`, `homeStreet1`, or `street1`.' + type: string + address2: + description: 'Home street address line 2 (apartment, suite, etc.). The correct alias is `address2` — do not use `homeAddress2` or `homeStreet2`.' + type: string + city: + description: 'Home city. The correct alias is `city` — do not use `homeCity`.' + type: string + state: + description: 'Home state or province. The correct alias is `state` — do not use `homeState`. Values are normalized to standard abbreviations (e.g., "Pennsylvania" becomes "PA").' + type: string + zipcode: + description: 'Home ZIP or postal code. The correct alias is `zipcode` — do not use `homeZipcode` or `homeZip`.' + type: string + country: + description: 'Home country name. The correct alias is `country` — do not use `homeCountry`.' + type: string + type: object + example: + firstName: Panda + lastName: Bear + workEmail: panda.bear@example.com + jobTitle: 'Software Engineer' + department: Engineering + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + postNewEmployee: + title: 'New Employee' + description: 'A dictionary of employee field names and their values for the new employee. At minimum, firstName and lastName are required. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Additional fields may use string, number, boolean, array, object, or null values depending on the field type. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. Photo data is not writable through this schema: photo-related keys are silently ignored. After creation, use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to attach a profile photo.' + required: + - firstName + - lastName + properties: + firstName: + description: 'Legal first name (required).' + type: string + lastName: + description: 'Legal last name (required).' + type: string + workEmail: + description: 'Work email address.' + type: string + jobTitle: + description: 'Job title.' + type: string + department: + description: 'Department name.' + type: string + hireDate: + description: 'Hire date in YYYY-MM-DD format.' + type: string + format: date + type: object + example: + firstName: Panda + lastName: Bear + jobTitle: 'Software Engineer' + department: Engineering + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + ListFieldValues: + title: 'Create or Update List Field Values' + description: 'Payload for creating, updating, or archiving options on a list field.' + properties: + options: + description: 'The list field options to create, update, or archive.' + type: array + items: + properties: + id: + description: 'The existing option ID. Omit this field to create a new option. Required when archiving an existing option.' + type: integer + value: + description: 'The display value for the option. Required when creating a new option (i.e., when id is omitted).' + type: string + archived: + description: 'Whether the option should be archived. Use `yes` to soft-delete an option or `no` to reactivate a previously archived option. Archived options continue to appear in GET responses for historical data integrity.' + type: string + enum: + - 'yes' + - 'no' + adpCode: + description: 'Optional payroll-mapping code associated with the option.' + type: string + type: object + type: object + ListFieldValuesXml: + title: 'Create or Update List Field Values (XML)' + description: 'XML payload for creating, updating, or archiving options on a list field. The root element is <options>, containing one or more <option> elements. Each <option> element carries optional id, archived, and adpCode XML attributes; the display value is the text content of the element.' + properties: + option: + description: 'One or more options to create, update, or archive.' + type: array + items: + properties: + id: + description: 'The existing option ID. Omit to create a new option. Required when archiving.' + type: integer + xml: + attribute: true + value: + description: 'The display value for the option. In XML format, this is the text content of the <option> element.' + type: string + archived: + description: 'Whether to archive this option. Use yes to soft-delete or no to reactivate.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + adpCode: + description: 'Optional payroll-mapping code.' + type: string + xml: + attribute: true + type: object + xml: + name: option + xml: + name: option + wrapped: false + type: object + xml: + name: options + TimeOffRequest: + title: 'Create Time Off Request' + required: + - status + - start + - end + - timeOffTypeId + properties: + status: + description: 'The initial status of the request.' + type: string + enum: + - approved + - denied + - declined + - requested + start: + description: 'Start date in YYYY-MM-DD format.' + type: string + format: date + end: + description: 'End date in YYYY-MM-DD format. Must be on or after the start date.' + type: string + format: date + timeOffTypeId: + description: 'The ID of the time off type for this request.' + type: integer + amount: + description: 'Total hours or days requested. Ignored when `dates` array is provided (sum of daily amounts is used instead).' + type: number + previousRequest: + description: 'The ID of a previous time off request to supersede. The previous request will be cancelled.' + type: integer + notes: + description: 'Optional notes from the employee or manager.' + type: array + items: + properties: + from: + description: 'Who the note is from.' + type: string + enum: + - employee + - manager + note: + description: 'The note text.' + type: string + type: object + dates: + description: 'Optional per-day breakdown. When provided, the top-level `amount` is ignored and the sum of daily amounts is used.' + type: array + items: + properties: + ymd: + description: 'Date in YYYY-MM-DD format.' + type: string + format: date + amount: + description: 'Hours or days for this date.' + type: number + type: object + type: object + request: + title: 'Request Status' + required: + - status + properties: + status: + description: 'The new status for the time off request.' + type: string + enum: + - approved + - denied + - declined + - canceled + - cancelled + note: + description: 'A note to attach to the change in status.' + type: string + type: object + example: + status: approved + note: 'Looks good, approved!' + TimeOffHistory: + required: + - date + properties: + date: + description: 'The date for the history item in YYYY-MM-DD format.' + type: string + format: date + eventType: + description: 'The type of history event. Defaults to `used` for the /history path and `override` for the /balance_adjustment path when omitted.' + type: string + enum: + - used + - override + timeOffRequestId: + description: 'The ID of an approved time off request. Required when eventType is `used`.' + type: integer + timeOffTypeId: + description: 'The ID of the time off type. Required when eventType is `override`.' + type: integer + amount: + description: 'The number of hours/days to record. Required when eventType is `override`.' + type: number + note: + description: 'An optional note to show in history.' + type: string + type: object + AdjustTimeOffBalance: + required: + - amount + - date + - timeOffTypeId + properties: + date: + description: 'The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD).' + type: string + format: date + timeOffTypeId: + description: 'The ID of the time off type to add a balance adjustment for.' + type: integer + amount: + description: 'The number of hours/days to adjust the balance by.' + type: number + note: + description: 'This is an optional note to show in history.' + type: string + type: object + PostNewEmployeeFileCategory: + title: 'New Employee File Category' + type: array + items: + type: string + example: + - 'A new category' + EmployeeFileUpdate: + title: 'Employee File Update' + properties: + name: + description: 'The new display name for the file.' + type: string + categoryId: + description: 'The ID of the file category (section) to move the file into.' + type: integer + shareWithEmployee: + description: "Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'." + type: string + enum: + - 'yes' + - 'no' + shareWithEmployees: + description: 'Alias for shareWithEmployee. Whether the file is shared with the employee.' + type: string + enum: + - 'yes' + - 'no' + type: object + NewCompanyFileCategory: + title: 'New Company File Category' + type: array + items: + type: string + example: + - 'A new category' + CompanyFileUpdate: + title: 'Company File Update' + properties: + name: + description: 'The new display name for the file.' + type: string + categoryId: + description: 'The ID of the category (file section) to move the file to.' + type: string + shareWithEmployee: + description: 'Whether the file is shared with employees.' + type: string + enum: + - 'yes' + - 'no' + type: object + RequestCustomReport: + title: 'Request Custom Report' + description: 'Report definition for an ad-hoc custom report. Specify the fields to include and optionally filter the employee set. Field IDs are the internal BambooHR field names (e.g. `firstName`, `lastName`, `department`). See the fields metadata endpoint for available field IDs.' + properties: + title: + description: 'A label for the report. Included in the response and used as the file name for downloaded reports.' + type: string + fields: + description: 'Array of field IDs to include as columns in the report. Maximum of 400 fields.' + type: array + items: + type: string + filters: + description: 'Optional filters to restrict which employees appear in the report.' + properties: + lastChanged: + description: 'Filters employees to those whose data was last changed on or after the given date/time.' + properties: + value: + description: 'ISO 8601 date-time value. Only employees whose data has changed at or after this date-time will be included.' + type: string + format: date-time + includeNull: + description: 'Whether to include employees with no last-changed date. `yes` (default) includes them; `no` excludes them.' + type: string + enum: ['yes', 'no'] + type: object + employeeIds: + description: 'Restricts the report to only the specified employee IDs.' + type: array + items: + type: integer + type: object + filterDuplicates: + description: 'Whether to apply standard duplicate row filtering. Defaults to enabled. Set to `no` to return raw results without deduplication.' + type: string + enum: + - 'yes' + - 'no' + type: object + TableRowUpdate: + title: 'Table Row Update' + description: 'A dictionary of table field names and values for creating or updating a row in an employee table. The listed properties are common examples, but accepted fields depend on the specific table being targeted. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered.' + properties: + date: + description: 'The effective date for the row in YYYY-MM-DD format.' + type: string + format: date + location: + description: 'The employee location value for the row.' + type: string + division: + description: 'The division value for the row.' + type: string + department: + description: 'The department value for the row.' + type: string + jobTitle: + description: 'The job title value for the row.' + type: string + reportsTo: + description: 'The manager or reports-to value for the row.' + type: string + teams: + description: 'Team values associated with the row.' + type: array + items: + type: string + type: object + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + Login: + title: Login + required: + - applicationKey + - user + - password + properties: + applicationKey: + description: 'The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.' + type: string + user: + description: "The user's email address or username." + type: string + password: + description: "The user's password." + type: string + format: password + deviceId: + description: 'Optional device identifier. When provided, the generated API key is associated with this device.' + type: string + type: object + EmployeeDependent: + title: 'Employee Dependent' + required: + - employeeId + properties: + employeeId: + description: 'The ID of the employee this dependent belongs to. Required.' + type: string + firstName: + description: "The dependent's first name." + type: string + middleName: + description: "The dependent's middle name." + type: string + lastName: + description: "The dependent's last name." + type: string + relationship: + description: 'The dependent''s relationship to the employee (e.g. "spouse", "child", "domestic_partner").' + type: string + gender: + description: "The dependent's gender." + type: string + ssn: + description: 'The dependent''s Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. "xxx-xx-1234") on read.' + type: string + sin: + description: "The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read." + type: string + dateOfBirth: + description: "The dependent's date of birth in YYYY-MM-DD format." + type: string + format: date + addressLine1: + description: "The first line of the dependent's address." + type: string + addressLine2: + description: "The second line of the dependent's address." + type: string + city: + description: "The dependent's city." + type: string + state: + description: 'The dependent''s state, provided as a state code (e.g. "UT"). Returned as a full state name on read.' + type: string + zipCode: + description: "The dependent's ZIP or postal code." + type: string + homePhone: + description: "The dependent's home phone number." + type: string + country: + description: 'The dependent''s country, provided as an ISO 3166-1 alpha-2 country code (e.g. "US"). Returned as a full country name on read.' + type: string + isUsCitizen: + description: 'Whether the dependent is a US citizen. Accepted values: "yes" or "no".' + type: string + enum: + - 'yes' + - 'no' + isStudent: + description: 'Whether the dependent is currently a student. Accepted values: "yes" or "no".' + type: string + enum: + - 'yes' + - 'no' + type: object + EmployeeDependentsResponse: + title: 'Employee Dependents Response' + properties: + 'Employee Dependents': + description: 'Array of employee dependent objects.' + type: array + items: + properties: + id: + description: 'The unique ID of the dependent record.' + type: string + employeeId: + description: 'The ID of the employee this dependent belongs to.' + type: string + firstName: + description: "The dependent's first name." + type: string + middleName: + description: "The dependent's middle name. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + lastName: + description: "The dependent's last name." + type: string + relationship: + description: "The dependent's relationship to the employee." + type: string + gender: + description: "The dependent's gender." + type: string + maskedSSN: + description: 'The dependent''s masked SSN (e.g. "xxx-xx-1234"). Null if no SSN on file.' + oneOf: + - { type: string } + - { type: 'null' } + maskedSIN: + description: "The dependent's masked SIN. Null if no SIN on file." + oneOf: + - { type: string } + - { type: 'null' } + dateOfBirth: + description: "The dependent's date of birth in YYYY-MM-DD format." + type: string + format: date + addressLine1: + description: "The first line of the dependent's address. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + addressLine2: + description: "The second line of the dependent's address. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + city: + description: "The dependent's city. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + state: + description: 'The dependent''s state as a full name (e.g. "Utah"). Null if not set.' + oneOf: + - { type: string } + - { type: 'null' } + zipCode: + description: "The dependent's ZIP or postal code. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + homePhone: + description: "The dependent's home phone number. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + country: + description: 'The dependent''s country as a full name (e.g. "United States"). Null if not set.' + oneOf: + - { type: string } + - { type: 'null' } + isUsCitizen: + description: 'Whether the dependent is a US citizen. "yes" or "no". Null if not set.' + oneOf: + - { type: string, enum: ['yes', 'no'] } + - { type: 'null' } + isStudent: + description: 'Whether the dependent is currently a student. "yes" or "no". Null if not set.' + oneOf: + - { type: string, enum: ['yes', 'no'] } + - { type: 'null' } + type: object + type: object + CompanyBenefitSummary: + title: 'Company Benefit Summary' + description: 'A summary representation of a company benefit plan as returned by the list endpoint.' + properties: + id: + description: 'The unique identifier of the company benefit plan.' + type: string + name: + description: 'The name of the company benefit plan.' + type: string + type: + description: 'The benefit category type.' + type: string + enum: + - health + - dental + - vision + - retirement + - hsa + - flex + - life + - disability + - reimbursement + - supplemental + - other + benefitVendorId: + description: 'The ID of the benefit vendor associated with this plan, or null if none.' + oneOf: + - + type: string + - + type: 'null' + deductionTypeId: + description: 'The deduction type ID for this plan, or null if not applicable.' + oneOf: + - + type: string + - + type: 'null' + companyDeductionId: + description: 'The company-level deduction record ID linked to this plan, or null if not set.' + oneOf: + - + type: string + - + type: 'null' + startDate: + description: 'The date the benefit plan becomes effective (YYYY-MM-DD), or null if not set.' + oneOf: + - + type: string + format: date + - + type: 'null' + endDate: + description: 'The date the benefit plan ends (YYYY-MM-DD), or null if ongoing.' + oneOf: + - + type: string + format: date + - + type: 'null' + allowsCatchUp: + description: 'Whether the plan allows catch-up contributions (e.g., for HSA plans for employees 55+), or null if not applicable to this plan type.' + oneOf: + - + type: boolean + - + type: 'null' + allowsSuperCatchUp: + description: 'Whether the plan allows super catch-up contributions, or null if not applicable to this plan type.' + oneOf: + - + type: boolean + - + type: 'null' + type: object + EmployeeBenefitFilters: + title: 'Employee Benefit Filters' + required: + - filters + properties: + filters: + description: 'Scope filters for the request. At least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided; none of the three is individually required, but omitting all three returns a 400 validation error. Any combination of the three is accepted.' + minProperties: 1 + properties: + employeeId: + description: 'Return benefit enrollments for a specific employee identified by their numeric ID. Optional unless neither `companyBenefitId` nor `enrollmentStatusEffectiveDate` is supplied.' + type: integer + companyBenefitId: + description: 'Return benefit enrollments for a specific company benefit plan identified by its numeric ID. Optional unless neither `employeeId` nor `enrollmentStatusEffectiveDate` is supplied.' + type: integer + enrollmentStatusEffectiveDate: + description: 'Return benefit enrollments whose enrollment status became effective on this date. Must be in `YYYY-MM-DD` format. Optional unless neither `employeeId` nor `companyBenefitId` is supplied.' + type: string + format: date + type: object + type: object + MemberBenefitEvent: + title: 'Member Benefit Event' + description: 'A single member (employee or dependent) and their benefit coverage events across all enrolled plans.' + properties: + memberId: + description: "The unique identifier of the member. Format: 'employee.{id}' for employees, 'dependent.{id}' for dependents." + type: string + coverages: + description: 'The benefit plan coverages for this member, one entry per plan.' + type: array + items: + properties: + planId: + description: 'The ID of the benefit plan.' + type: string + events: + description: "Chronological list of benefit events for this member and plan, covering the past year. Event type 'enrollment' includes premiumTierId and monthlyPremiumInCents; 'eligibility' and 'loss' events include only effectiveDate and type." + type: array + items: + properties: { effectiveDate: { description: 'The date this event takes effect (YYYY-MM-DD).', type: string, format: date }, type: { description: 'The type of benefit event.', type: string, enum: [eligibility, enrollment, loss] }, premiumTierId: { description: "The premium tier ID for enrollment events. Only present on events with type 'enrollment'.", oneOf: [{ type: string }, { type: 'null' }] }, monthlyPremiumInCents: { description: "The monthly premium amount in cents for enrollment events. Only present on events with type 'enrollment'.", oneOf: [{ type: number }, { type: 'null' }] } } + type: object + type: object + type: object + TimeTrackingRecord: + title: 'Time Tracking Record' + required: + - dateHoursWorked + - employeeId + - hoursWorked + - rateType + - timeTrackingId + properties: + timeTrackingId: + description: 'A unique identifier for the record. Use this ID to adjust or delete these hours. It can be any ID you use to track the record up to 36 characters in length. (i.e. UUID).' + type: string + employeeId: + description: 'The ID of the employee.' + type: integer + divisionId: + description: '[Optional] The ID of the division for the employee.' + type: integer + departmentId: + description: '[Optional] The ID of the department for the employee.' + type: integer + jobTitleId: + description: '[Optional] The ID of the job title for the employee.' + type: integer + payCode: + description: '[Optional] Only necessary if the payroll provider requires a pay code' + type: string + dateHoursWorked: + description: 'The date the hours were worked. Please use the ISO-8601 date format YYYY-MM-DD.' + type: string + payRate: + description: '[Optional] The rate of pay. e.g. $15.00/hour should use 15.00 here. Only necessary if the payroll provider requires a pay rate.' + type: number + rateType: + description: 'The type of hours - regular or overtime. Please use either "REG", "OT", or "DT" here.' + type: string + hoursWorked: + description: 'The number of hours worked.' + type: number + jobCode: + description: '[Optional] A job code.' + type: integer + jobData: + description: '[Optional] A list of up to four 20 characters max job numbers in comma delimited format with no spaces.' + type: string + type: object + TimeTrackingRecordBulk: + title: 'Time Tracking Record Bulk' + type: array + items: + $ref: '#/components/schemas/TimeTrackingRecord' + TimeTrackingTask: + title: 'Time Tracking Task' + properties: + id: + description: 'ID of the task.' + type: integer + name: + description: 'Name of the task.' + type: string + type: object + TimeTrackingProjectWithTasksAndEmployeeIds: + title: 'Time tracking project with tasks and list of employee IDs.' + properties: + id: + description: 'ID of the project.' + type: integer + name: + description: 'Name of the project.' + type: string + tasks: + description: 'A list of time tracking tasks for the project.' + type: array + items: + $ref: '#/components/schemas/TimeTrackingTask' + employeeIds: + description: 'A list of employee IDs that can log time for this project. If not present, all employees can log time for the project.' + type: array + items: + type: integer + type: object + UpdateGoalV1: + title: 'Update Employee Goal (v1)' + required: + - dueDate + - sharedWithEmployeeIds + - title + properties: + title: + description: '[Required] The goal title.' + type: string + description: + description: '[Optional] The goal description. If omitted, the existing value will be overwritten with an empty string.' + type: string + percentComplete: + description: '[Optional] The goal completion percentage (0-100). If omitted, the existing value will be overwritten with 0.' + type: integer + alignsWithOptionId: + description: '[Optional] The option ID that aligns with this goal. If omitted, the existing value will be overwritten with null.' + oneOf: + - + type: string + - + type: 'null' + sharedWithEmployeeIds: + description: '[Required] Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with". This must include the employee for whom the goal is created.' + type: array + items: + type: integer + dueDate: + description: '[Required] The goal due date in YYYY-MM-DD format.' + type: string + format: date + completionDate: + description: '[Optional] The date the goal was completed, in YYYY-MM-DD format. Required when percentComplete is 100. If omitted, the existing value will be overwritten with null.' + oneOf: + - + type: string + format: date + - + type: 'null' + type: object + Location: + properties: + id: + description: 'The ID of the location' + type: integer + name: + description: 'Name of the location' + type: string + description: + description: 'Description of the location' + type: string + city: + description: 'City of the location' + type: string + state: + $ref: '#/components/schemas/State' + country: + $ref: '#/components/schemas/Country' + zipcode: + description: 'The ZIP or postal code of the location' + type: string + addressLine1: + description: 'The first address line of the location' + type: string + addressLine2: + description: 'The second address line of the location' + type: string + phone: + description: 'The phone number of the location' + type: string + type: object + State: + properties: + id: + description: 'The ID of the state' + type: integer + name: + description: 'The name of the state' + type: string + abbrev: + description: 'The abbreviation of the state' + type: string + iso_code: + description: 'The ISO standard code of the state' + type: string + type: object + Country: + properties: + id: + description: 'The ID of the country' + type: integer + name: + description: 'The name of the country' + type: string + iso_code: + description: 'The ISO standard code of the country' + type: string + type: object + TrainingType: + properties: + id: + description: 'The ID of the training' + type: integer + name: + description: 'Name of the training type.' + type: string + renewable: + description: 'If true, training will be renewed based off of frequency.' + type: boolean + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid if training is not required.' + type: integer + required: + description: 'Whether this is a required training. Null when not set.' + oneOf: + - + type: boolean + - + type: 'null' + category: + description: 'The training category when set, or an empty array when no category is assigned.' + oneOf: + - + $ref: '#/components/schemas/TrainingCategory' + - + description: 'Empty array when no category is set' + type: array + items: { } + maxItems: 0 + linkUrl: + description: 'Optional URL that can be included with a training. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + description: + description: 'Description for the training. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + TrainingCategory: + description: 'The category ID and name' + properties: + id: + description: 'The ID of the training category.' + type: integer + name: + description: 'The name of the training category.' + type: string + type: object + TrainingRecord: + properties: + id: + description: 'The ID of the training record.' + type: integer + employeeId: + description: 'The ID of the employee associated with the training, returned as a string.' + type: string + completed: + description: 'Completed is a date in the format yyyy-mm-dd.' + type: string + format: date + notes: + description: 'Notes left on the training record. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + instructor: + description: 'Name of the instructor. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + credits: + description: 'Credits earned for the training record, returned as a string. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours associated with the training record, returned as a string. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + cost: + description: "The cost in the format '{amount} {currency}', e.g. '50.00 USD'. May be null or empty string when not set." + oneOf: + - + type: string + - + type: 'null' + type: + description: 'The training type ID. Returned as a string on update/list responses, and as an integer on create responses.' + oneOf: + - + description: 'String form' + type: string + - + description: 'Integer form' + type: integer + type: object + WebhookEventType: + title: 'Webhook Event Type' + description: 'The type of event that triggers a webhook. Cannot mix employee_with_fields events with employee events. This list will be expanded in the future.' + type: string + enum: + - employee_with_fields.updated + - employee_with_fields.created + - employee_with_fields.deleted + - company-integrations.updated + - employee.created + - employee.updated + - employee.deleted + - company.updated + - company.deleted + NewWebHook: + title: 'Add Webhook' + required: + - name + - url + - format + properties: + name: + description: 'The name of the webhook.' + type: string + example: 'My new webhook' + monitorFields: + description: 'A list of fields to monitor. At least one field is required to be monitored if events is empty or contains employee_with_fields.updated or employee.updated.' + type: array + items: + type: string + example: + - firstName + - lastName + postFields: + description: 'An object map of field ID or alias to the external name used in the webhook payload (e.g. `{"firstName": "First Name"}`). Omit or send an empty object to include no extra fields.' + type: object + default: { } + example: + firstName: Name + lastName: Surname + dateOfBirth: DOB + url: + description: 'The url the webhook should send data to (must begin with https://).' + type: string + format: + description: 'The payload format the webhook uses. Required.' + type: string + enum: + - json + - form-encoded + example: json + includeCompanyDomain: + description: 'If set to true, the company domain will be added to the webhook request header.' + type: boolean + example: false + events: + description: "Events that trigger this webhook. Defaults to ['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created'] if not specified. Cannot mix employee_with_fields events with employee events." + type: array + items: + $ref: '#/components/schemas/WebhookEventType' + example: + - employee.created + - employee.updated + - employee.deleted + type: object + WebHookResponse: + title: 'Webhook Response' + properties: + id: + description: 'The ID of the webhook.' + type: string + example: '4' + name: + description: 'The name of the webhook.' + type: string + example: 'Example Webhook' + created: + description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).' + type: string + example: '2021-09-20 22:38:01' + lastSent: + description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.' + example: '2021-09-20 22:38:01' + oneOf: + - + type: string + - + type: 'null' + monitorFields: + description: 'A list of fields being monitored. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).' + example: + - firstName + - lastName + oneOf: + - + type: array + items: + type: string + - + type: 'null' + postFields: + description: 'A map of field ID or alias to the external name used in the webhook payload.' + type: object + example: + firstName: Name + lastName: Surname + dateOfBirth: DOB + url: + description: 'The URL the webhook sends data to.' + type: string + example: 'https://www.example.com' + format: + description: 'The payload format used by the webhook.' + type: string + enum: + - json + - form-encoded + example: json + includeCompanyDomain: + description: 'Whether the company domain is added to the webhook request header.' + type: boolean + example: false + events: + description: 'Events that trigger this webhook.' + type: array + items: + $ref: '#/components/schemas/WebhookEventType' + example: + - employee_with_fields.created + - employee_with_fields.updated + errors: + description: 'Field-level permission errors associated with the webhook configuration, when present.' + type: array + items: + $ref: '#/components/schemas/WebhookSubErrorProperty' + example: + - + error: 'Permission denied to the following fields' + postFields: + - + id: 2 + name: lastName + type: object + WebhookBadRequest: + properties: + errors: + type: array + items: + properties: + error: + type: string + issues: + type: array + items: + type: string + type: object + type: object + example: + errors: + - + error: 'Invalid request body' + issues: + - 'problem one' + - 'problem two' + - … + WebhookError: + title: 'Webhook Standard error' + properties: + errors: + oneOf: + - + $ref: '#/components/schemas/WebhookSubErrorProperty' + - + type: array + items: + $ref: '#/components/schemas/WebhookSubErrorProperty' + type: object + example: + errors: + - + error: 'You do not have access to webhook ID: 5' + - + error: 'No webhook was found with ID: 7.' + - + error: 'Sorry for the inconvenience, please try again later or contact BambooHR' + additionalProperties: false + WebhookSubErrorProperty: + properties: + error: + type: string + unknownFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + - { type: 'null' } + name: + type: string + type: object + monitorFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + name: + type: string + type: object + duplicatePostString: + type: array + items: + type: string + postFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + name: + type: string + type: object + type: object + additionalProperties: false + DataRequest: + title: 'Data Request' + required: + - fields + properties: + fields: + description: 'Field names to include in each returned record. Use "Get Fields from Dataset" to discover available names.' + type: array + items: + type: string + example: + - lastNameFirstName + - firstName + - employeeNumber + - hireDate + - ssn + aggregations: + description: 'Aggregation configuration. Set `defaultAggregation` to apply one aggregation type to every requested field, or use `overridingAggregations` to target specific fields. Both may be combined.' + properties: + defaultAggregation: + description: 'Aggregation type applied to all requested fields when set. Pass null to skip the default.' + example: count + oneOf: + - + type: string + enum: [count, count_unique, sum, avg, min, max] + - + type: 'null' + overridingAggregations: + description: 'Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type.' + type: array + items: + type: object + additionalProperties: + type: string + example: + - + hireDate: count + type: object + sortBy: + description: 'Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field.' + type: array + items: + properties: + field: + description: 'Field name to sort by.' + type: string + sort: + description: 'Sort direction.' + type: string + enum: + - asc + - desc + aggregationType: + description: 'Optional. Use when sorting by an aggregated value; must match the requested aggregation for this field.' + type: string + enum: + - count + - count_unique + - sum + - avg + - min + - max + type: object + example: + - + field: hireDate + sort: desc + aggregationType: count + filters: + description: 'Filter configuration. Combine multiple conditions with a `match` strategy.' + properties: + match: + description: 'Logical operator for combining filters: `all` (AND) or `any` (OR).' + type: string + enum: + - all + - any + filters: + description: 'Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array.' + type: array + items: + properties: + field: { description: 'Field name to filter on.', type: string } + operator: { description: 'Comparison operator. Available operators depend on field type (see endpoint description).', type: string, enum: [contains, does_not_contain, equal, not_equal, empty, not_empty, lt, lte, gt, gte, last, next, range, checked, not_checked, includes, does_not_include] } + value: { description: 'Filter value. For `includes`/`does_not_include` operators, pass the value as an array enclosed in square brackets, for example `["Full-Time", "Part-Time"]`.' } + type: object + type: object + example: + match: all + filters: + - + field: firstName + operator: equal + value: Pudgy + groupBy: + description: 'Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array.' + type: array + items: + type: string + example: + - hireDate + showHistory: + description: 'Entity names of historical table fields whose history rows should be included. Entity names are returned by "Get Fields from Dataset".' + type: array + items: + type: string + example: + - education + type: object + DatasetEmployee: + type: object + example: + lastNameFirstName: 'Panda, Pudgy' + firstName: Pudgy + employeeNumber: '123' + middleName: 'null' + ssn: 123-45-6478 + Pagination: + properties: + total_records: + type: integer + example: '10' + current_page: + type: integer + example: '2' + total_pages: + type: integer + example: '10' + next_page: + example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=3&page_size=1' + oneOf: + - + type: string + - + type: 'null' + prev_page: + example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=1&page_size=1' + oneOf: + - + type: string + - + type: 'null' + type: object + EmployeeResponse: + title: 'Employee Response' + properties: + data: + type: array + items: + $ref: '#/components/schemas/DatasetEmployee' + aggregations: + type: array + items: + properties: + field: + type: string + aggregationType: + type: string + groups: + type: object + all: + type: integer + type: object + pagination: + $ref: '#/components/schemas/Pagination' + type: object + DatasetV1: + title: 'Dataset (v1)' + properties: + name: + description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.' + type: string + example: employee + label: + description: 'Human-readable display name for the dataset.' + type: string + example: Employee + type: object + DatasetResponseV1: + title: 'Dataset Response (v1)' + properties: + datasets: + description: 'Array of available datasets.' + type: array + items: + $ref: '#/components/schemas/DatasetV1' + type: object + Field: + title: Field + properties: + name: + description: 'Machine-readable field identifier. Use this value in the `fields` array when querying data.' + type: string + example: status + label: + description: 'Human-readable display name for the field.' + type: string + example: Status + parentType: + description: 'The type of the parent section (e.g. `page`, `table`).' + type: string + example: page + parentName: + description: 'The name of the parent section this field belongs to.' + type: string + example: Personal + entityName: + description: 'The entity name for the field, used in `showHistory` when querying historical table fields.' + type: string + example: personal + type: object + DatasetFieldsResponse: + title: 'Dataset Fields Response' + properties: + pagination: + $ref: '#/components/schemas/Pagination' + name: + description: 'Machine-readable dataset identifier matching the requested datasetName.' + type: string + example: employee + label: + description: 'Human-readable display name for the dataset.' + type: string + example: Employee + fields: + description: 'Paginated array of field descriptors for this dataset.' + type: array + items: + $ref: '#/components/schemas/Field' + example: + - + name: status + label: Status + parentType: page + parentName: Personal + entityName: personal + - + name: employeeNumber + label: 'Employee #' + parentType: page + parentName: Personal + entityName: personal + type: object + Report: + title: 'Report (v1)' + properties: + id: + type: integer + example: 4 + name: + type: string + example: New + type: object + ReportsResponse: + title: 'Reports Response (v1)' + properties: + reports: + type: array + items: + $ref: '#/components/schemas/Report' + pagination: + $ref: '#/components/schemas/Pagination' + type: object + FieldOptionsTransformer: + title: 'Field Option' + properties: + id: + description: 'The ID of the field option. May be a string or an integer depending on the field type.' + oneOf: + - + type: string + - + type: integer + value: + description: 'The human-readable label of the field option' + type: string + type: object + TableName: + description: 'The API name of an employee table. Standard table names: `jobInfo`, `jobInformation`, `compensation`, `employmentStatus`, `contacts`, `emergencyContacts`, `dependents`, `earnings`, `bonus`, `commission`, `benefit_class`, `employeeVisas`, `employeeEducation`, `employeePassports`, `employeeDriverLicenses`, `employeeCertifications`, `employeeStockOptions`, `employeeAssets`, `employeeCreditCards`, `employeeCovidTests`, `employeeCovidVaccinations`, `employeeCovidVaccinationExemptions`, `employeeCovidExposures`, `employeeEquityGrants`, `levelsAndBands`, `employeeProjectPayRates`. Custom company-defined tables also accepted — they use a numeric suffix (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names for a specific company.' + type: string + example: employeeEducation + TableRowDeleteResponse: + description: 'Response from deleting an employee table row.' + properties: + success: + description: 'Whether the row was successfully deleted.' + type: boolean + error: + description: 'Error message when success is false. Absent when success is true.' + type: string + type: object + ErrorResponse: + description: 'Standard error response from BaseController' + properties: + error: + properties: + code: + type: integer + example: 500 + message: + type: string + example: 'Internal server error' + type: object + type: object + GoalFiltersV1: + description: 'Array containing goal filters and their counts for API v1' + properties: + filters: + description: 'Array of goal filter objects with counts' + type: array + items: + properties: + id: + description: 'Filter identifier based on goal status.' + type: string + enum: + - status-inProgress + - status-completed + example: status-inProgress + name: + description: 'Display name of the filter' + type: string + enum: + - 'In Progress' + - Completed + example: 'In Progress' + count: + description: 'Number of goals matching this filter' + type: integer + example: 1 + type: object + type: object + GoalFiltersV1_1: + description: 'Array containing goal filters, their counts, and actions' + properties: + filters: + description: 'Array of goal filter objects with counts' + type: array + items: + properties: + id: + description: 'Filter identifier based on goal status.' + type: string + enum: + - status-inProgress + - status-completed + - status-closed + example: status-inProgress + name: + description: 'Display name of the filter' + type: string + enum: + - 'In Progress' + - Completed + - Closed + example: 'In Progress' + count: + description: 'Number of goals matching this filter' + type: integer + example: 1 + actions: + description: 'Available actions for goals in this state, defined by PerformanceDefinitions::GOAL_FILTER_ACTIONS' + properties: + canCloseGoal: { description: 'Whether goals in this state can be closed', type: boolean, example: true } + canEditGoal: { description: 'Whether goals in this state can be edited', type: boolean, example: true } + canEditGoalProgressBar: { description: 'Whether progress bar can be edited for goals in this state', type: boolean, example: true } + canReopenGoal: { description: 'Whether goals in this state can be reopened', type: boolean, example: false } + canShareGoal: { description: 'Whether goals in this state can be shared', type: boolean, example: true } + type: object + type: object + type: object + TransformedApiGoal: + properties: + id: + description: 'The id of the goal.' + type: string + example: '4' + title: + description: 'Title of the goal.' + type: string + example: 'Complete Documentation Epic' + description: + description: 'A description of the goal.' + type: string + example: 'Document every endpoint for the goals API.' + percentComplete: + description: 'A percentage (0-100) that denotes how complete the goal is.' + type: integer + example: 78 + alignsWithOptionId: + description: 'The ID of the goal this goal is aligned with. Returns null when not aligned, or an empty string when the goal has no parent set.' + oneOf: + - + type: string + - + type: 'null' + sharedWithEmployeeIds: + description: 'Ids of the employees that have access to this goal.' + type: array + items: + type: integer + dueDate: + description: 'The due date of the goal.' + type: string + example: '2025-12-31' + completionDate: + description: 'ISO 8601 UTC timestamp of when the goal was completed.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + lastChangedDateTime: + description: 'ISO 8601 UTC timestamp of when the goal was last modified.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the goal.' + type: string + enum: + - in_progress + - completed + - closed + example: in_progress + milestones: + description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' + oneOf: + - + type: array + items: + properties: + id: { description: 'The id of the milestone.', type: integer, example: 2 } + employeeGoalId: { description: 'The id of the goal which encompasses this milestone.', type: integer, example: 12 } + title: { description: 'The title of the milestone.', type: string, example: 'Sell 15 Doohickeys' } + currentValue: { description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.', example: '9.9', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + startValue: { description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '7.01', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + endValue: { description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '15', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + completedDateTime: { description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.', type: string, example: '2025-04-10T15:36:38Z' } + lastUpdateDateTime: { description: 'The date and time in which the goal was last updated.', type: string, example: '2025-04-10T15:36:38Z' } + lastUpdateUserId: { description: 'The ID of the user who last updated this milestone.', type: integer, example: 24 } + type: object + - + type: 'null' + actions: + description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' + properties: + canEditGoalProgressBar: + description: 'Can the user edit the progress bar of this goal.' + type: boolean + example: false + canEditGoalMilestoneProgressBar: + description: 'can the user edit the progress of a milestone in this goal.' + type: boolean + example: true + oneOf: + - + type: object + - + type: 'null' + type: object + TransformedApiEmployeeGoalDetails: + properties: + goal: + description: 'An individual goal' + properties: + id: + description: 'The id of the goal.' + type: string + example: '4' + title: + description: 'Title of the goal.' + type: string + example: 'Complete Documentation Epic' + description: + description: 'A description of the goal.' + type: string + example: 'Document every endpoint for the goals API.' + percentComplete: + description: 'A percentage (0-100) that denotes how complete the goal is.' + type: integer + example: 78 + alignsWithOptionId: + oneOf: + - + type: string + - + type: 'null' + sharedWithEmployeeIds: + description: 'Ids of the employees that have access to this goal.' + type: array + items: + type: integer + dueDate: + description: 'The due date of the goal.' + type: string + example: '2025-12-31' + completionDate: + description: 'ISO 8601 UTC timestamp of when the goal was completed.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + lastChangedDateTime: + description: 'ISO 8601 UTC timestamp of when the goal was last modified.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the goal.' + type: string + enum: + - in_progress + - completed + - closed + example: in_progress + milestones: + description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' + oneOf: + - + type: array + items: { properties: { id: { description: 'The id of the milestone.', type: integer, example: 2 }, employeeGoalId: { description: 'The id of the goal which encompasses this milestone.', type: integer, example: 12 }, title: { description: 'The title of the milestone.', type: string, example: 'Sell 15 Doohickeys' }, currentValue: { description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.', example: '9.9', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, startValue: { description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '7.01', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, endValue: { description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '15', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, completedDateTime: { description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.', type: string, example: '2025-04-10T15:36:38Z' }, lastUpdateDateTime: { description: 'The date and time in which the goal was last updated.', type: string, example: '2025-04-10T15:36:38Z' }, lastUpdateUserId: { description: 'The ID of the user who last updated this milestone.', type: integer, example: 24 } }, type: object } + - + type: 'null' + actions: + description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' + properties: + canEditGoalProgressBar: + description: 'Can the user edit the progress bar of this goal.' + type: boolean + example: true + canEditGoalMilestoneProgressBar: + description: 'can the user edit the progress of a milestone in this goal.' + type: boolean + example: false + oneOf: + - + type: object + - + type: 'null' + type: object + type: object + ProjectInfoApiTransformer: + description: 'Project information data representation' + properties: + project: + description: 'Project information' + properties: + id: + description: 'Project ID' + type: integer + name: + description: 'Project name' + type: string + type: object + task: + description: 'Task information' + properties: + id: + description: 'Task ID' + type: integer + name: + description: 'Task name' + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + TotalRewardsOnboardingStep: + properties: + name: + description: 'Name of the onboarding step' + type: string + completed: + description: 'Whether or not the onboarding step is completed' + type: boolean + type: object + CompanyIntegrationsUpdatedWebhookPayload: + title: 'Company Integrations Updated Webhook Payload' + description: 'Webhook payload sent when company integrations are updated.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - company-integrations.updated + example: company-integrations.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object + type: object + CompanyUpdatedWebhookPayload: + title: 'Company Updated Webhook Payload' + description: 'Webhook payload sent when a company is updated.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - company.updated + example: company.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object + type: object + CompanyDeletedWebhookPayload: + title: 'Company Deleted Webhook Payload' + description: 'Webhook payload sent when a company is deleted.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - company.deleted + example: company.deleted + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object + type: object + EmployeeCreatedWebhookPayload: + title: 'Employee Created Webhook Payload' + description: 'Webhook payload sent when a new employee is created.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - employee.created + example: employee.created + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was created' + type: string + example: '100' + type: object + type: object + EmployeeDeletedWebhookPayload: + title: 'Employee Deleted Webhook Payload' + description: 'Webhook payload sent when an employee is deleted.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - employee.deleted + example: employee.deleted + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was deleted' + type: string + example: '100' + type: object + type: object + EmployeeUpdatedWebhookPayload: + title: 'Employee Updated Webhook Payload' + description: 'Webhook payload sent when an employee is updated.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - employee.updated + example: employee.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee and change information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was updated' + type: string + example: '100' + changedFields: + description: 'Array of API aliases for fields that changed and are monitored by this webhook' + type: array + items: + type: string + example: + - firstName + - lastName + - department + type: object + type: object + CompanyAlertDataObject: + properties: + id: + description: 'The unique identifier of the company alert.' + type: integer + bambooAlertId: + description: 'The unique identifier of the Bamboo alert.' + type: integer + schedule: + description: 'The schedule for the company alert.' + type: string + enum: + - daily + - weekly + - monthly + - quarterly + dueWithin: + description: 'The number of days before the alert is due.' + oneOf: + - + type: integer + - + type: 'null' + dueInterval: + description: 'The interval for the alert.' + oneOf: + - + type: string + - + type: 'null' + sendToEmployee: + description: 'Whether the alert should be sent to employees.' + type: boolean + sendToManager: + description: 'Whether the alert should be sent to managers.' + type: boolean + sendToAdmin: + description: 'Whether the alert should be sent to admins.' + type: boolean + editorUserId: + description: 'The user ID of the editor.' + oneOf: + - + type: integer + - + type: 'null' + lastEdited: + description: 'The last edited date of the company alert.' + type: + - 'null' + customMessage: + description: 'The custom message for the company alert.' + oneOf: + - + type: string + - + type: 'null' + customSubject: + description: 'The custom subject for the company alert.' + oneOf: + - + type: string + - + type: 'null' + groupBy: + description: 'The group by for the company alert.' + oneOf: + - + type: string + - + type: 'null' + limitTrainingToRequired: + description: 'Whether the training should be limited to required training.' + type: boolean + runAtTime: + description: 'The time the company alert should run at.' + oneOf: + - + type: string + - + type: 'null' + runAtTimeZone: + description: 'The time zone the company alert should run at.' + oneOf: + - + type: string + - + type: 'null' + includePosition: + description: 'Whether the alert should include position.' + type: boolean + includeLocation: + description: 'Whether the alert should include location.' + type: boolean + additionalRecipientEmails: + description: 'The additional recipient emails for the company alert.' + type: array + items: + type: string + employeeIds: + description: 'The employee IDs for the company alert.' + type: array + items: + type: string + listValueIds: + description: 'The list value IDs for the company alert.' + type: array + items: + type: integer + filterListValueIds: + description: 'The filter list value IDs for the company alert.' + type: array + items: + type: integer + userIds: + description: 'The user IDs for the company alert.' + type: array + items: + type: integer + type: object + TimezoneResource: + description: 'A timezone resource.' + properties: + id: + description: 'The timezone ID.' + type: string + example: '1' + gmtOffset: + description: 'The GMT offset label (e.g. "(GMT-07:00)").' + type: string + example: '(GMT-07:00)' + name: + description: 'The display name of the timezone.' + type: string + example: 'Mountain Time' + utcName: + description: 'The IANA/UTC timezone identifier.' + type: string + example: America/Denver + type: object + CountriesResponseSchema: + description: 'Top-level JSON array of country objects. The response is not wrapped in a parent object.' + type: array + items: + $ref: '#/components/schemas/CountrySchema' + CountrySchema: + description: 'A country in the list returned by the Get Countries endpoint' + properties: + id: + description: 'Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits).' + type: integer + name: + description: 'Full display name of the country' + type: string + isoCode: + description: 'ISO 3166-1 alpha-2 when defined. The `isoCode` key is always present; the value is JSON `null` when the country has no code set in data (not omitted).' + oneOf: + - + type: string + - + type: 'null' + type: object + StateProvinceResponseSchema: + description: 'Response from `GET /api/v1/meta/provinces/{countryId}`. The `options` list is sorted by `label` (subdivision abbreviation).' + properties: + options: + description: 'Subdivisions for the requested `countryId`. Each object matches StateProvinceSchema; `label` is the subdivision abbreviation, `name` the full name, `iso` the ISO 3166-2 code.' + type: array + items: + $ref: '#/components/schemas/StateProvinceSchema' + type: object + StateProvinceSchema: + description: 'One state or province (subdivision) row. The same field meanings as each element of `StateProvinceResponseSchema.options` from `GET /api/v1/meta/provinces/{countryId}`.' + properties: + id: + description: 'State/province ID' + type: integer + label: + description: 'Subdivision abbreviation (e.g. "UT" for Utah). This is the short code used in `options[].label`, not the full name (see `name`).' + type: string + iso: + description: 'ISO 3166-2 subdivision code (e.g. "US-UT" for Utah).' + type: string + name: + description: 'Full subdivision name (e.g. "Utah"), distinct from the abbreviation in `label`.' + type: string + type: object + CompanyIndustryCollection: + title: CompanyIndustryDataObjectCollection + type: array + items: + $ref: '#/components/schemas/CompanyIndustryDataObject' + CompanyIndustryDataObject: + description: "Company's enabled industry." + required: + - industryId + - addedByCustomer + - addedByUserId + - addedYmdt + properties: + industryId: + description: "The company's industry id." + type: integer + addedByCustomer: + description: 'If the industry was added by the customer.' + type: boolean + addedByUserId: + description: 'The user id of the user who added the industry.' + oneOf: + - + type: integer + - + type: 'null' + addedYmdt: + description: 'The date that the industry was added.' + oneOf: + - + type: string + - + type: 'null' + type: object + CompensationBenchmarking-ColumnMap: + description: 'Schema for compensation benchmarking column map' + properties: + expectedColumnKey: + description: 'Expected column key' + oneOf: + - + type: string + - + type: 'null' + columnName: + description: 'Column name' + type: string + type: object + BudgetGuidelinesView: + description: 'Budget guidelines for compensation planning budgets' + properties: + useGuidelines: + description: 'Whether to use budget guidelines' + type: boolean + softMinimum: + description: 'Soft minimum budget guideline' + oneOf: + - + type: number + - + type: 'null' + softMaximum: + description: 'Soft maximum budget guideline' + oneOf: + - + type: number + - + type: 'null' + guidelinesWarningErrors: + oneOf: + - + $ref: '#/components/schemas/BudgetGuidelinesWarnings' + description: 'Budget guidelines warning errors' + - + type: 'null' + description: 'Budget guidelines warning errors' + requireComments: + description: 'Whether a comment is required for recommendations outside of guidelines' + type: boolean + type: object + BudgetGuidelinesWarnings: + description: 'Warning messages for saved budget guidelines' + properties: + softMinimumWarningMessage: + description: 'Soft minimum warning message' + oneOf: + - + type: string + - + type: 'null' + softMaximumWarningMessage: + description: 'Soft maximum warning message' + oneOf: + - + type: string + - + type: 'null' + type: object + CompensationToolsDataObject: + description: 'Schema for the compensation tools list.' + properties: + levelsAndBands: + description: 'Has access to Levels & Bands tool' + type: boolean + compensationBenchmarking: + description: 'Has access to Compensation Benchmarking tool' + type: boolean + compensationPlanning: + description: 'Has access to Compensation Planning tool' + type: boolean + totalRewards: + description: 'Has access to Total Rewards tool' + type: boolean + type: object + CompensationUpsellData: + description: 'Schema for the compensation upsell data.' + properties: + accountOwnerName: + description: 'Account owner name' + type: string + canRequestDemo: + description: 'Whether user can request a demo' + type: boolean + userPermissions: + $ref: '#/components/schemas/UserPermissionData' + description: 'User permissions' + type: object + ConversionRateDataObject: + title: ConversionRateDataObject + description: 'Represents a currency conversion rate from a source to a target currency.' + properties: + currencyName: + description: 'The full name of the target currency.' + type: string + currencyCode: + description: 'The code of the target currency (e.g. USD, EUR, JPY).' + type: string + conversionRate: + description: 'The numeric conversion rate to the target currency.' + type: number + format: float + type: object + DetailsAndCurrencyRequestDataObject: + title: DetailsAndCurrencyRequestDataObject + description: 'Request data for updating compensation planning cycle details and currency settings. Pre-condition: User must have permission to update cycle. Post-condition: Cycle configuration is updated.' + properties: + id: + description: 'ID of the cycle to update' + type: string + cycleName: + description: 'Name of the cycle to update' + type: string + cycleCurrency: + description: 'Currency code for the cycle' + oneOf: + - + type: string + - + type: 'null' + cycleWindowStartYmd: + description: 'Start date of the cycle window' + type: string + format: date + cycleWindowEndYmd: + description: 'End date of the cycle window' + type: string + format: date + recommendationsDueYmd: + description: 'Date when recommendations are due' + type: string + format: date + approvalsDueYmd: + description: 'Date when approvals are due' + type: string + format: date + cycleEffectiveDate: + description: 'Effective date of the cycle' + type: string + format: date + salaryIncluded: + description: 'Whether salary is included in this cycle' + type: boolean + bonusIncluded: + description: 'Whether bonus is included in this cycle' + type: boolean + equityIncluded: + description: 'Whether equity is included in this cycle' + type: boolean + cycleCurrencyConversionRates: + description: 'Currency conversion rates' + type: array + items: + $ref: '#/components/schemas/ConversionRateDataObject' + paycheckDateYmd: + description: 'Date of first paycheck with new compensation updates' + type: string + format: date + type: object + UserPermissionData: + description: 'Schema for the compensation upsell data.' + properties: + isAdmin: + description: 'Whether user is an admin' + type: boolean + isBillingContact: + description: 'Whether user is a billing contact' + type: boolean + isOwner: + description: 'Whether user is the owner' + type: boolean + isSupportAdmin: + description: 'Whether user is a support admin' + type: boolean + type: object + Employee-StringCodeErrorResponse-V1: + description: 'Error response returned by Employee API endpoints where `error.code` is a string identifier.' + required: + - error + properties: + error: + required: + - code + - message + properties: + code: + description: 'String error code identifier (for example `BadRequest` or `BadPage`).' + type: string + example: BadRequest + message: + description: 'Human-readable error message.' + type: string + example: 'Invalid request parameters.' + type: object + type: object + EmployeeCursorPaginationQueryObject: + type: object + allOf: + - + $ref: '#/components/schemas/CursorPaginationQueryObject' + - + properties: + before: + description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' + type: string + after: + description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' + type: string + limit: + description: 'Maximum number of items to return. This can be at most 2500.' + type: integer + default: 250 + maximum: 2500 + minimum: 1 + type: object + GetEmployeeResponse: + description: "Employee data returned by the Get Employee endpoint.\n\tThe `id` field is always present; all other named properties are included only when explicitly requested via the `fields` query parameter.\n\tAdditional custom or company-configured fields may also appear." + required: + - id + properties: + id: + description: 'Unique identifier for the employee' + type: string + firstName: + description: "Employee's first name" + oneOf: + - + type: string + - + type: 'null' + lastName: + description: "Employee's last name" + oneOf: + - + type: string + - + type: 'null' + preferredName: + description: "Employee's preferred name" + oneOf: + - + type: string + - + type: 'null' + middleName: + description: "Employee's middle name" + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: "URL to the employee's profile photo" + oneOf: + - + type: string + - + type: 'null' + jobTitleName: + description: "Employee's current job title" + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: "Employee's job title ID" + oneOf: + - + type: string + - + type: 'null' + status: + description: "Employee's current status" + oneOf: + - + type: string + enum: + - Active + - Inactive + - + type: 'null' + workEmail: + description: "Employee's work email address" + oneOf: + - + type: string + - + type: 'null' + homeEmail: + description: "Employee's home email address" + oneOf: + - + type: string + - + type: 'null' + bestEmail: + description: "Employee's best email address" + oneOf: + - + type: string + - + type: 'null' + workPhone: + description: "Employee's work phone number" + oneOf: + - + type: string + - + type: 'null' + workPhoneExtension: + description: "Employee's work phone extension" + oneOf: + - + type: string + - + type: 'null' + mobilePhone: + description: "Employee's mobile phone number" + oneOf: + - + type: string + - + type: 'null' + homePhone: + description: "Employee's home phone number" + oneOf: + - + type: string + - + type: 'null' + skypeUsername: + description: "Employee's Skype username" + oneOf: + - + type: string + - + type: 'null' + linkedinUrl: + description: "Employee's LinkedIn profile URL" + oneOf: + - + type: string + - + type: 'null' + facebookUrl: + description: "Employee's Facebook profile URL" + oneOf: + - + type: string + - + type: 'null' + instagramUrl: + description: "Employee's Instagram profile URL" + oneOf: + - + type: string + - + type: 'null' + twitterUrl: + description: "Employee's Twitter/X profile URL" + oneOf: + - + type: string + - + type: 'null' + pinterestUrl: + description: "Employee's Pinterest profile URL" + oneOf: + - + type: string + - + type: 'null' + birthDate: + description: "Employee's birth date" + oneOf: + - + type: string + - + type: 'null' + hireDate: + description: "Employee's hire date" + oneOf: + - + type: string + - + type: 'null' + originalHireDate: + description: "Employee's original hire date" + oneOf: + - + type: string + - + type: 'null' + terminationDate: + description: "Employee's termination date" + oneOf: + - + type: string + - + type: 'null' + address1: + description: "Employee's street address" + oneOf: + - + type: string + - + type: 'null' + city: + description: "Employee's city" + oneOf: + - + type: string + - + type: 'null' + state: + description: "Employee's state or province" + oneOf: + - + type: string + - + type: 'null' + country: + description: "Employee's country" + oneOf: + - + type: string + - + type: 'null' + gender: + description: "Employee's gender" + oneOf: + - + type: string + - + type: 'null' + marital: + description: "Employee's marital status" + oneOf: + - + type: string + - + type: 'null' + payRate: + description: "Employee's pay rate" + oneOf: + - + type: string + - + type: 'null' + payType: + description: "Employee's pay type" + oneOf: + - + type: string + - + type: 'null' + payPeriod: + description: "Employee's pay period" + oneOf: + - + type: string + - + type: 'null' + exempt: + description: 'Whether the employee is FLSA exempt' + oneOf: + - + type: string + - + type: 'null' + canUploadPhoto: + description: 'Whether the requesting user can upload a photo for this employee' + oneOf: + - + type: boolean + - + type: 'null' + division: + description: "Employee's division name" + oneOf: + - + type: string + - + type: 'null' + divisionId: + description: "Employee's division ID" + oneOf: + - + type: string + - + type: 'null' + department: + description: "Employee's department name" + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: "Employee's department ID" + oneOf: + - + type: string + - + type: 'null' + location: + description: "Employee's location name" + oneOf: + - + type: string + - + type: 'null' + locationId: + description: "Employee's location ID" + oneOf: + - + type: string + - + type: 'null' + employmentStatus: + description: "Employee's current employment status name" + oneOf: + - + type: string + - + type: 'null' + employmentStatusId: + description: "Employee's current employment status ID" + oneOf: + - + type: string + - + type: 'null' + reportsToName: + description: "Name of the employee's manager" + oneOf: + - + type: string + - + type: 'null' + reportsToId: + description: "Employee ID of the employee's manager" + oneOf: + - + type: string + - + type: 'null' + type: object + additionalProperties: true + GetEmployeesEmployeeBaseResponse: + description: 'Base employee fields that are always included in the response.' + required: + - employeeId + - firstName + - lastName + - preferredName + - photoUrl + - jobTitleName + - status + - _restrictedFields + properties: + employeeId: + description: 'Unique identifier for the employee' + type: string + firstName: + description: "Employee's first name" + oneOf: + - + type: string + - + type: 'null' + lastName: + description: "Employee's last name" + oneOf: + - + type: string + - + type: 'null' + preferredName: + description: "Employee's preferred name" + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: "URL to employee's profile photo" + oneOf: + - + type: string + - + type: 'null' + jobTitleName: + description: "Employee's current job title" + oneOf: + - + type: string + - + type: 'null' + status: + description: "Employee's current status (Active or Inactive)." + oneOf: + - + type: string + - + type: 'null' + _restrictedFields: + description: 'Array of field names that are restricted due to permission checks' + type: array + items: + type: string + type: object + GetEmployeesEmployeeResponse: + description: 'Employee data response object containing basic employee information and optionally requested fields. When the `fields` parameter is provided, additional requested fields will be included. Field values are subject to permission checks — restricted fields are returned as `null` and their names are listed in `_restrictedFields`.' + type: object + allOf: + - + $ref: '#/components/schemas/GetEmployeesEmployeeBaseResponse' + - + properties: + addressLine1: + description: "Employee's address line 1. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + addressLine2: + description: "Employee's address line 2. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + age: + description: "Employee's age. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + allergies: + description: "Employee's allergies. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + bestEmail: + description: "Employee's best email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + birthDate: + description: "Employee's birth date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + birthplace: + description: "Employee's birthplace. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + citizenship: + description: "Employee's citizenship. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + citizenshipId: + description: "Employee's citizenship ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + city: + description: "Employee's city. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationChangeReason: + description: "Employee's compensation change reason. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationChangeReasonId: + description: "Employee's compensation change reason ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationComment: + description: "Employee's compensation comment. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationEffectiveDate: + description: "Employee's compensation effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationEndDate: + description: "Employee's compensation end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + contractEndDate: + description: "Employee's contract end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + country: + description: "Employee's country. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + countryId: + description: "Employee's country ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: "Employee's department ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + departmentName: + description: "Employee's department name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + dietaryRestrictions: + description: "Employee's dietary restrictions. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + displayName: + description: "Employee's name displayed in the company configured format. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + divisionId: + description: "Employee's division ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + divisionName: + description: "Employee's division name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eeoJobCategory: + description: "Employee's EEO job category. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eeoJobCategoryId: + description: "Employee's EEO job category ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ein: + description: "Employee's EIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eligibleForRehire: + description: "Employee's eligible-for-rehire flag. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eligibleForRehireId: + description: "Employee's eligible-for-rehire ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employeeName: + description: "Employee's name (last, first). Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employeeNumber: + description: "Employee's employee number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusComment: + description: "Employee's employment status comment. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusEffectiveDate: + description: "Employee's employment status effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusId: + description: "Employee's employment status id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusName: + description: "Employee's employment status name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentType: + description: "Employee's employment type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentTypeId: + description: "Employee's employment type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ethnicity: + description: "Employee's ethnicity. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ethnicityId: + description: "Employee's ethnicity ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + facebookUrl: + description: "Employee's Facebook profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + finalDoseAdministrationDate: + description: "Employee's final COVID dose administration date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + finalPayDate: + description: "Employee's final pay date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + firstNameLastName: + description: "Employee's first and last name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + firstNameMiddleInitial: + description: "Employee's first name and middle initial. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + flsaCode: + description: "Employee's FLSA code. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + flsaCodeId: + description: "Employee's FLSA code ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + gender: + description: "Employee's gender. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + genderIdentity: + description: "Employee's gender identity. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + genderIdentityId: + description: "Employee's gender identity ID. Only included when requested via the `fields` parameter." + type: array + items: + type: integer + hireDate: + description: "Employee's hire date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + homeEmail: + description: "Employee's home email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + homePhone: + description: "Employee's home phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + hoursPerPayCycle: + description: "Employee's hours per pay cycle. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + instagramUrl: + description: "Employee's Instagram profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + isManager: + description: 'Whether the employee is a manager. Only included when requested via the `fields` parameter.' + oneOf: + - + type: boolean + - + type: 'null' + jacketSize: + description: "Employee's jacket size. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jacketSizeId: + description: "Employee's jacket size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jobInformationEffectiveDate: + description: "Employee's job information effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: "Employee's job title id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + linkedinUrl: + description: "Employee's LinkedIn profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + locationId: + description: "Employee's location ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + locationName: + description: "Employee's location name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + maritalStatus: + description: "Employee's marital status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + middleInitial: + description: "Employee's middle initial. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + middleName: + description: "Employee's middle name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + mobilePhone: + description: "Employee's mobile phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalId: + description: "Employee's national ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalInsuranceCategory: + description: "Employee's national insurance category. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalInsuranceCategoryId: + description: "Employee's national insurance category ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationality: + description: "Employee's nationality. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalityId: + description: "Employee's nationality ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nickName: + description: "Employee's preferred name. If preferred name is not set then employee's first name is returned. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nin: + description: "Employee's NIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + noticePeriod: + description: "Employee's notice period. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + noticePeriodId: + description: "Employee's notice period ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + originalHireDate: + description: "Employee's original hire date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + overtime: + description: "Employee's overtime status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + overtimeRate: + description: "Employee's overtime rate. Only included when requested via the `fields` parameter." + properties: + amount: + type: string + currency: + type: string + type: object + paidPer: + description: 'How the employee is paid (e.g., hour, year). Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + payRate: + description: "Employee's pay rate. Only included when requested via the `fields` parameter." + properties: + amount: + type: string + currency: + type: string + type: object + paySchedule: + description: "Employee's pay schedule. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + payScheduleId: + description: "Employee's pay schedule ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + payType: + description: "Employee's pay type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pinterestUrl: + description: "Employee's Pinterest profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + preferredNameLastName: + description: "Employee's preferred name and last name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + probationEndDate: + description: "Employee's probation end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pronouns: + description: "Employee's pronouns. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pronounsId: + description: "Employee's pronouns ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + proofOfVaccination: + description: 'Whether proof of vaccination has been provided. Only included when requested via the `fields` parameter.' + oneOf: + - + type: boolean + - + type: 'null' + reportsToId: + description: "Employee's manager's employee id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + reportsToName: + description: "Employee's manager's name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + secondaryLanguage: + description: "Employee's secondary language. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + shirtSize: + description: "Employee's shirt size. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + shirtSizeId: + description: "Employee's shirt size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + sin: + description: "Employee's SIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + skypeUsername: + description: "Employee's Skype username. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ssn: + description: "Employee's SSN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + state: + description: "Employee's state. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + stateId: + description: "Employee's state ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + taxTypeId: + description: "Employee's tax type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + teams: + description: "Employee's teams. Only included when requested via the `fields` parameter." + type: array + items: + properties: + id: { type: integer } + label: { type: string } + type: object + tenure: + description: "Employee's tenure. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationDate: + description: "Employee's termination date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationReason: + description: "Employee's termination reason. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationReasonId: + description: "Employee's termination reason ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationRegrettable: + description: 'Whether the termination was regrettable. Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + terminationRegrettableId: + description: 'Termination regrettable ID. Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + terminationType: + description: "Employee's termination type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationTypeId: + description: "Employee's termination type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + tShirtSize: + description: "Employee's t-shirt size. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + tShirtSizeId: + description: "Employee's t-shirt size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + twitterUrl: + description: "Employee's Twitter/X profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + userId: + description: "Employee's user ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccinationStatus: + description: "Employee's COVID vaccination status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccinationStatusId: + description: "Employee's COVID vaccination status ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccineReceived: + description: "Employee's COVID vaccine received. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccineReceivedId: + description: "Employee's COVID vaccine received ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + veteranStatus: + description: "Employee's veteran status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + veteranStatusId: + description: "Employee's veteran status ID. Only included when requested via the `fields` parameter." + type: array + items: + type: integer + workEmail: + description: "Employee's work email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + workPhone: + description: "Employee's work phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + workPhoneExtension: + description: "Employee's work phone extension. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + zipcode: + description: "Employee's zip code. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + type: object + GetEmployeesEmployeeResponseCollection: + description: 'Typed collection of employee response objects' + type: array + items: + $ref: '#/components/schemas/GetEmployeesEmployeeResponse' + GetEmployeesFilterRequestObject: + description: "Filter criteria for the employee list endpoint, supplied as `filter[fieldName]=value` query parameters. All filter fields are optional, and multiple fields are combined with AND logic.\n\nThree matching strategies are used depending on the field:\n\n- **Substring** (case-insensitive `LIKE`) — applied to free-text fields such as names, addresses, social URLs, and free-form labels.\n- **Equality** — applied to IDs (integer), enumerated string values, booleans (`true`/`false`), numeric values, and ISO 8601 dates (`YYYY-MM-DD`).\n- **Special** — `ids` accepts a list of employee IDs (`filter[ids][]=123&filter[ids][]=124` or `filter[ids]=123,124`).\n\nFiltering is **not supported** for the following fields and will return a 422: `bestEmail`, `ein`, `genderIdentity`, `genderIdentityId`, `nationalId`, `nin`, `overtime`, `overtimeRate`, `payRate`, `sin`, `ssn`, `teams`, `userId`, `veteranStatus`, `veteranStatusId`. Any unrecognized filter key will also return a 422." + required: [] + properties: + addressLine1: + description: 'Substring match (case-insensitive).' + type: string + addressLine2: + description: 'Substring match (case-insensitive).' + type: string + allergies: + description: 'Substring match (case-insensitive).' + type: string + birthplace: + description: 'Substring match (case-insensitive).' + type: string + citizenship: + description: 'Substring match (case-insensitive).' + type: string + city: + description: 'Substring match (case-insensitive).' + type: string + compensationChangeReason: + description: 'Substring match (case-insensitive).' + type: string + compensationComment: + description: 'Substring match (case-insensitive).' + type: string + country: + description: 'Substring match (case-insensitive).' + type: string + departmentName: + description: 'Substring match (case-insensitive).' + type: string + dietaryRestrictions: + description: 'Substring match (case-insensitive).' + type: string + displayName: + description: 'Substring match (case-insensitive).' + type: string + divisionName: + description: 'Substring match (case-insensitive).' + type: string + eeoJobCategory: + description: 'Substring match (case-insensitive).' + type: string + eligibleForRehire: + description: 'Substring match (case-insensitive).' + type: string + employeeName: + description: 'Substring match (case-insensitive).' + type: string + employeeNumber: + description: 'Substring match (case-insensitive).' + type: string + employmentStatusName: + description: 'Substring match (case-insensitive).' + type: string + employmentStatusComment: + description: 'Substring match (case-insensitive).' + type: string + employmentType: + description: 'Substring match (case-insensitive).' + type: string + ethnicity: + description: 'Substring match (case-insensitive).' + type: string + facebookUrl: + description: 'Substring match (case-insensitive).' + type: string + firstNameLastName: + description: 'Substring match (case-insensitive).' + type: string + firstNameMiddleInitial: + description: 'Substring match (case-insensitive).' + type: string + flsaCode: + description: 'Substring match (case-insensitive).' + type: string + homeEmail: + description: 'Substring match (case-insensitive).' + type: string + homePhone: + description: 'Substring match (case-insensitive).' + type: string + instagramUrl: + description: 'Substring match (case-insensitive).' + type: string + jacketSize: + description: 'Substring match (case-insensitive).' + type: string + linkedinUrl: + description: 'Substring match (case-insensitive).' + type: string + locationName: + description: 'Substring match (case-insensitive).' + type: string + maritalStatus: + description: 'Substring match (case-insensitive).' + type: string + middleInitial: + description: 'Substring match (case-insensitive).' + type: string + middleName: + description: 'Substring match (case-insensitive).' + type: string + mobilePhone: + description: 'Substring match (case-insensitive).' + type: string + nationalInsuranceCategory: + description: 'Substring match (case-insensitive).' + type: string + nationality: + description: 'Substring match (case-insensitive).' + type: string + nickName: + description: 'Substring match (case-insensitive).' + type: string + noticePeriod: + description: 'Substring match (case-insensitive).' + type: string + paySchedule: + description: 'Substring match (case-insensitive).' + type: string + pinterestUrl: + description: 'Substring match (case-insensitive).' + type: string + preferredNameLastName: + description: 'Substring match (case-insensitive).' + type: string + pronouns: + description: 'Substring match (case-insensitive).' + type: string + reportsToName: + description: 'Substring match (case-insensitive).' + type: string + secondaryLanguage: + description: 'Substring match (case-insensitive).' + type: string + shirtSize: + description: 'Substring match (case-insensitive).' + type: string + skypeUsername: + description: 'Substring match (case-insensitive).' + type: string + state: + description: 'Substring match (case-insensitive).' + type: string + terminationReason: + description: 'Substring match (case-insensitive).' + type: string + terminationRegrettable: + description: 'Substring match (case-insensitive).' + type: string + terminationType: + description: 'Substring match (case-insensitive).' + type: string + tShirtSize: + description: 'Substring match (case-insensitive).' + type: string + twitterUrl: + description: 'Substring match (case-insensitive).' + type: string + vaccinationStatus: + description: 'Substring match (case-insensitive).' + type: string + vaccineReceived: + description: 'Substring match (case-insensitive).' + type: string + workEmail: + description: 'Substring match (case-insensitive).' + type: string + workPhone: + description: 'Substring match (case-insensitive).' + type: string + workPhoneExtension: + description: 'Substring match (case-insensitive).' + type: string + zipcode: + description: 'Substring match (case-insensitive).' + type: string + gender: + description: 'Exact match.' + type: string + enum: + - Male + - Female + - Non-Binary + paidPer: + description: 'Exact match.' + type: string + enum: + - Day + - Week + - Month + - Quarter + - Year + - PayPeriod + - Piece + payType: + description: 'Exact match.' + type: string + enum: + - Hourly + - Salary + - Commission + citizenshipId: + description: 'Exact match against an integer ID.' + type: integer + compensationChangeReasonId: + description: 'Exact match against an integer ID.' + type: integer + countryId: + description: 'Exact match against an integer ID.' + type: integer + departmentId: + description: 'Exact match against an integer ID.' + type: integer + divisionId: + description: 'Exact match against an integer ID.' + type: integer + eeoJobCategoryId: + description: 'Exact match against an integer ID.' + type: integer + eligibleForRehireId: + description: 'Exact match against an integer ID.' + type: integer + employmentStatusId: + description: 'Exact match against an integer ID.' + type: integer + employmentTypeId: + description: 'Exact match against an integer ID.' + type: integer + ethnicityId: + description: 'Exact match against an integer ID.' + type: integer + flsaCodeId: + description: 'Exact match against an integer ID.' + type: integer + jacketSizeId: + description: 'Exact match against an integer ID.' + type: integer + jobTitleId: + description: 'Exact match against an integer ID.' + type: integer + locationId: + description: 'Exact match against an integer ID.' + type: integer + nationalInsuranceCategoryId: + description: 'Exact match against an integer ID.' + type: integer + nationalityId: + description: 'Exact match against an integer ID.' + type: integer + noticePeriodId: + description: 'Exact match against an integer ID.' + type: integer + payScheduleId: + description: 'Exact match against an integer ID.' + type: integer + pronounsId: + description: 'Exact match against an integer ID.' + type: integer + reportsToId: + description: 'Exact match against an integer ID.' + type: integer + shirtSizeId: + description: 'Exact match against an integer ID.' + type: integer + stateId: + description: 'Exact match against an integer ID.' + type: integer + taxTypeId: + description: 'Exact match against an integer ID.' + type: integer + terminationReasonId: + description: 'Exact match against an integer ID.' + type: integer + terminationRegrettableId: + description: 'Exact match against an integer ID.' + type: integer + terminationTypeId: + description: 'Exact match against an integer ID.' + type: integer + tShirtSizeId: + description: 'Exact match against an integer ID.' + type: integer + vaccinationStatusId: + description: 'Exact match against an integer ID.' + type: integer + vaccineReceivedId: + description: 'Exact match against an integer ID.' + type: integer + isManager: + description: 'Exact match (true/false).' + type: boolean + proofOfVaccination: + description: 'Exact match (true/false).' + type: boolean + age: + description: 'Exact numeric match.' + type: number + tenure: + description: 'Exact numeric match.' + type: number + hoursPerPayCycle: + description: 'Exact numeric match.' + type: number + birthDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + compensationEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + compensationEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + contractEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + employmentStatusEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + finalDoseAdministrationDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + finalPayDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + hireDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + jobInformationEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + originalHireDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + probationEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + terminationDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + firstName: + description: 'This will match any employees whose first name contains this string (case insensitive)' + type: string + lastName: + description: 'This will match any employees whose last name contains this string (case insensitive)' + type: string + jobTitleName: + description: 'This will match any employees whose current job title descriptor contains this string (case insensitive)' + type: string + status: + description: 'Employee status' + type: string + enum: + - active + - inactive + ids: + description: 'List of employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`).' + type: array + items: + type: integer + example: + - 123 + - 124 + type: object + GetEmployeesResponseObject: + description: 'Complete response object for employee list API containing employee data, metadata, and navigation links' + required: + - data + - meta + - _links + properties: + data: + $ref: '#/components/schemas/GetEmployeesEmployeeResponseCollection' + description: 'Collection of employee data objects' + meta: + $ref: '#/components/schemas/CursorPagedResponseMetadata' + description: 'Metadata information including total count and pagination details' + _links: + description: 'Navigation links for API pagination' + properties: + self: + description: 'Link to current page' + properties: + href: + description: 'URL of the current page' + type: string + type: object + next: + description: 'Link to next page' + properties: + href: + description: 'URL of the next page' + type: string + type: object + prev: + description: 'Link to previous page' + properties: + href: + description: 'URL of the previous page' + type: string + type: object + type: object + type: object + EmployeeOptionalField: + description: 'Valid field names that can be passed via the `fields` query parameter to request additional employee data beyond the default set.' + type: string + enum: + - addressLine1 + - addressLine2 + - age + - allergies + - bestEmail + - birthDate + - birthplace + - citizenship + - citizenshipId + - city + - compensationChangeReason + - compensationChangeReasonId + - compensationComment + - compensationEffectiveDate + - compensationEndDate + - contractEndDate + - country + - countryId + - departmentId + - departmentName + - dietaryRestrictions + - displayName + - divisionId + - divisionName + - eeoJobCategory + - eeoJobCategoryId + - ein + - eligibleForRehire + - eligibleForRehireId + - employeeName + - employeeNumber + - employmentStatusComment + - employmentStatusEffectiveDate + - employmentStatusId + - employmentStatusName + - employmentType + - employmentTypeId + - ethnicity + - ethnicityId + - facebookUrl + - finalDoseAdministrationDate + - finalPayDate + - firstNameLastName + - firstNameMiddleInitial + - flsaCode + - flsaCodeId + - gender + - genderIdentity + - genderIdentityId + - hireDate + - homeEmail + - homePhone + - hoursPerPayCycle + - instagramUrl + - isManager + - jacketSize + - jacketSizeId + - jobInformationEffectiveDate + - jobTitleId + - linkedinUrl + - locationId + - locationName + - maritalStatus + - middleInitial + - middleName + - mobilePhone + - nationalId + - nationalInsuranceCategory + - nationalInsuranceCategoryId + - nationality + - nationalityId + - nickName + - nin + - noticePeriod + - noticePeriodId + - originalHireDate + - overtime + - overtimeRate + - paidPer + - payRate + - paySchedule + - payScheduleId + - payType + - pinterestUrl + - preferredNameLastName + - probationEndDate + - pronouns + - pronounsId + - proofOfVaccination + - reportsToId + - reportsToName + - secondaryLanguage + - shirtSize + - shirtSizeId + - sin + - skypeUsername + - ssn + - state + - stateId + - taxTypeId + - teams + - tenure + - terminationDate + - terminationReason + - terminationReasonId + - terminationRegrettable + - terminationRegrettableId + - terminationType + - terminationTypeId + - tShirtSize + - tShirtSizeId + - twitterUrl + - userId + - vaccinationStatus + - vaccinationStatusId + - vaccineReceived + - vaccineReceivedId + - veteranStatus + - veteranStatusId + - workEmail + - workPhone + - workPhoneExtension + - zipcode + LevelsAndBands-ColumnMap: + description: 'Schema for levels and bands column map' + properties: + expectedColumnKey: + description: 'Expected column key' + oneOf: + - + type: string + - + type: 'null' + columnName: + description: 'Column name' + type: string + type: object + LevelsAndBands-GroupStatusCounts: + description: 'Schema for levels and bands group status counts' + properties: + draft: + description: 'Number of levels/bands in draft status' + type: integer + historic: + description: 'Number of levels/bands in historic status' + type: integer + published: + description: 'Number of levels/bands in published status' + type: integer + type: object + LevelsAndBands-Employee: + description: 'Job titles employee object' + properties: + id: + description: 'Employee id' + type: integer + name: + description: 'Employee name' + type: string + type: object + LevelsAndBands-JobTitleAssignment: + description: 'Job title assignment to a level' + properties: + jobTitleId: + description: 'Job title id' + type: integer + levelId: + description: 'Compensation level id' + type: integer + type: object + LevelsAndBands-JobTitleAssignmentsRequest: + description: 'Request to bulk assign job titles to levels' + required: + - jobTitles + properties: + jobTitles: + description: 'Array of job title assignments' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitleAssignment' + type: object + LevelsAndBands-JobTitle: + description: 'Job Titles Job Title Data Object' + properties: + id: + description: 'Job title id' + type: integer + jobTitle: + description: 'Job title name' + type: string + type: object + LevelsAndBands-JobTitleWithEmployees: + description: 'Levels and bands job titles with employees object' + properties: + id: + description: 'Job id' + type: integer + title: + description: 'Job title' + type: string + employees: + description: 'Employees with this job title' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-Employee' + levelId: + description: 'Associated level ID, null if not associated with any level' + oneOf: + - + type: integer + - + type: 'null' + type: object + LevelsAndBands-JobTitlesCollection: + description: 'Job Titles Collection' + type: object + LevelsAndBands-Group: + title: 'Group Data Object' + description: 'Represents a compensation level group with its levels' + properties: + id: + description: 'The group ID. Null for new groups.' + oneOf: + - + type: integer + - + type: 'null' + groupName: + description: 'The name of the group. A warning will be shown if blank.' + oneOf: + - + type: string + - + type: 'null' + levels: + description: 'Array of levels in this group' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-Level' + type: object + LevelsAndBands-Level: + title: 'Level Data Object' + description: 'Represents a single compensation level' + properties: + levelId: + description: 'The level ID. Null for new levels.' + oneOf: + - + type: integer + - + type: 'null' + levelName: + description: 'The name of the level' + oneOf: + - + type: string + - + type: 'null' + payBand: + $ref: '#/components/schemas/LevelsAndBands-PayBand' + description: 'Pay band associated with this level' + jobTitles: + description: 'Array of job titles associated with this level' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitle' + errors: + description: 'Array of validation errors for this level' + type: array + items: + type: string + warnings: + description: 'Array of validation warnings for this level' + type: array + items: + type: string + type: object + LevelsAndBands-UploadResponse: + description: 'Schema for levels and bands import upload response' + properties: + uploadData: + description: 'Upload data' + type: array + items: + type: string + columnMap: + description: 'Column map' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ColumnMap' + type: object + LevelsAndBands-ErrorWarningIdentifier: + title: 'Error Warning Identifier' + description: 'Object for compensation level groups and levels' + required: + - groupId + - levelId + properties: + groupId: + description: 'Group ID' + type: integer + levelId: + description: 'Level ID' + type: integer + type: object + LevelsAndBands-JobTitlesStatus: + title: 'Job Titles Status' + description: 'Object for compensation level groups and levels' + required: + - isComplete + - errors + - warnings + properties: + isComplete: + description: 'Is the job titles step complete' + type: boolean + errors: + description: 'Array of errors' + type: array + items: + type: string + warnings: + description: 'Array of warnings' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitlesCollection' + type: object + LevelsAndBands-LevelsAndBands: + title: 'Levels and Bands' + description: 'Object for compensation level groups and levels' + required: + - groups + properties: + groups: + description: 'Array of compensation level groups to upsert' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-Group' + type: object + LevelsAndBands-LevelsAndBandsStatus: + title: 'Levels and Bands Status' + description: 'Object for compensation level groups and levels' + required: + - levels + - payBands + - jobTitles + - review + properties: + levels: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' + payBands: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' + jobTitles: + $ref: '#/components/schemas/LevelsAndBands-JobTitlesStatus' + description: 'Object for compensation level groups and levels' + review: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' + type: object + LevelsAndBands-StepStatus: + title: 'Step Status' + description: 'Object for compensation level groups and levels' + required: + - isComplete + - errors + - warnings + properties: + isComplete: + description: 'Whether the step is complete' + type: boolean + errors: + description: 'Array of errors' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' + warnings: + description: 'Array of warnings' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' + type: object + LevelsAndBands-PayBand: + description: 'Pay band data object' + properties: + levelId: + description: 'The level ID' + oneOf: + - + type: integer + - + type: 'null' + min: + description: 'The minimum value for the level' + type: number + format: float + mid: + description: 'The middle value for the level' + type: number + format: float + max: + description: 'The maximum value for the level' + type: number + format: float + currencyCode: + description: 'The currency code for the level' + oneOf: + - + type: string + - + type: 'null' + percentageRange: + description: 'The percentage range for the level' + type: number + format: float + compensationType: + description: 'The compensation type for the level' + type: string + type: object + CompletedQuestionsAndResponseDataObject: + description: 'Data object for completed questions and responses' + properties: + question: + description: 'The question that was completed' + type: string + isRequired: + description: 'Indicates if the question is required' + type: boolean + archived: + description: 'Indicates if the question is archived' + type: boolean + sortOrder: + description: 'The sort order of the question' + type: integer + employeeId: + description: 'The employee ID associated with the question' + type: integer + employeePersonalQuestionId: + description: 'The employee personal question ID associated with the question' + type: integer + employeeResponse: + description: 'The response to the question' + type: string + hidden: + description: 'Indicates if the question is hidden' + type: boolean + type: object + LocationResponseObject: + description: 'Transformer for location data with nested address structure' + properties: + id: + description: 'Unique identifier for the location' + type: string + label: + description: 'Display name for the location' + type: string + archived: + description: 'Whether the location is archived' + type: boolean + manageable: + description: 'Whether the location is manageable' + type: boolean + address: + description: 'Address information for the location' + properties: + address1: + description: 'Address line 1. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + address2: + description: 'Address line 2' + oneOf: + - + type: string + - + type: 'null' + city: + description: 'City name. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + stateId: + description: 'State identifier. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + state: + description: 'State information. Optional and requested via expand property from the request' + properties: + id: + description: 'State identifier' + type: string + name: + description: 'State name' + type: string + abbreviation: + description: 'State abbreviation' + type: string + type: object + zipcode: + description: 'Postal code. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + countryId: + description: 'Country identifier. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + country: + description: 'Country information. Optional and requested via expand property from the request' + properties: + id: + description: 'Country identifier' + type: string + name: + description: 'Country name' + type: string + isoCode: + description: 'Country ISO code' + type: string + type: object + timezone: + description: 'Timezone name' + oneOf: + - + type: string + - + type: 'null' + remoteLocation: + description: 'Whether this is a remote location' + type: boolean + type: object + createdAt: + description: 'ISO 8601 timestamp of when the location was created' + oneOf: + - + type: string + format: date-time + - + type: 'null' + archivedAt: + description: 'ISO 8601 timestamp of when the location was archived' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + Project-TimeTrackingProjectCollection-V1: + description: 'Collection of time tracking projects.' + type: array + items: + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + Project-TimeTrackingProject-V1: + description: 'A time tracking project. Projects are organizational units used to classify hours worked.' + properties: + id: + description: 'The ID of the project.' + type: integer + readOnly: true + example: 1 + name: + description: 'The name of the project.' + type: string + example: 'Project A' + billable: + description: 'Whether or not the project is billable.' + type: boolean + example: false + includeInPayroll: + description: 'Whether hours logged to this project will show in payroll and payroll reports.' + type: boolean + example: false + allEmployeesAssigned: + description: 'Whether all time & attendance employees are assigned or not.' + type: boolean + example: true + archived: + description: 'Whether or not the project is archived.' + type: boolean + example: false + hasTasks: + description: 'Whether time is logged to tasks under the project (true) or directly to the project (false).' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the project was created.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + updatedAt: + description: 'ISO 8601 timestamp when the project was last updated.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the project was deleted.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + employeeIds: + description: 'Array of employeeIds assigned to the project.' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + type: object + Project-UpdateTimeTrackingProject-V1: + description: 'Data contract for partially updating a time tracking project. All fields are optional; only fields present in the request body will be updated.' + properties: + name: + description: 'The name of the project.' + type: string + example: 'Project A' + billable: + description: 'Whether or not the project is billable.' + type: boolean + example: true + includeInPayroll: + description: 'Whether hours logged to this project will show in payroll and payroll reports.' + type: boolean + example: true + allEmployeesAssigned: + description: 'Whether all time & attendance employees are assigned or not.' + type: boolean + example: true + archived: + description: 'Whether or not the project is archived.' + type: boolean + example: false + employeeIds: + description: 'Array of employee IDs to assign to the project. Replaces the current assignment list when present; an empty array clears all assignments.' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + hasTasks: + description: 'Toggles whether time is logged directly to the project (false) or to specific tasks on the project (true). Setting to true requires the project to already have at least one active task; setting to false leaves existing tasks unchanged.' + type: boolean + example: true + type: object + Project-TimeTrackingTaskCollection-V1: + description: 'Collection of time tracking tasks for a project.' + type: array + items: + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + Project-CreateTimeTrackingProjectTask-V1: + description: 'Payload to create a task on a time tracking project.' + required: + - name + properties: + name: + description: 'Display name of the task.' + type: string + maxLength: 50 + example: 'Client onboarding' + billable: + description: 'Whether hours on this task are billable. Defaults to false when omitted.' + example: true + oneOf: + - + type: boolean + - + type: 'null' + type: object + Project-TimeTrackingTask-V1: + description: 'A task within a time tracking project. Tasks are sub-organizational units used to further classify hours worked.' + properties: + id: + description: 'The ID of the task.' + type: integer + readOnly: true + example: 1 + name: + description: 'The name of the task.' + type: string + example: 'Task A' + projectId: + description: 'The ID of the project this task belongs to.' + type: integer + example: 1 + billable: + description: 'Whether the task is billable.' + type: boolean + example: false + createdAt: + description: 'ISO 8601 timestamp when the task was created.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + updatedAt: + description: 'ISO 8601 timestamp when the task was last updated.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the task was deleted.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + Project-UpdateTimeTrackingProjectTask-V1: + description: 'Payload to partially update a task on a time tracking project. All fields are optional; at least one field must be provided.' + minProperties: 1 + properties: + name: + description: 'Display name of the task.' + type: string + maxLength: 50 + example: 'Client onboarding' + billable: + description: 'Whether hours on this task are billable.' + type: boolean + example: true + type: object + Scheduling-CreateScheduleRequest-V1: + description: 'Request object for creating or updating a schedule' + required: + - name + - locationId + - startOfWeek + properties: + name: + description: 'The name of the schedule' + type: string + example: 'Morning Shift' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 1 + timezone: + description: 'The timezone of the schedule. Required for remote locations. For non-remote locations, the location timezone is used.' + example: America/Denver + oneOf: + - + type: string + - + type: 'null' + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 15 + managerUserIds: + description: 'User IDs of managers for this schedule' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + employeeIds: + description: 'Employee IDs assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + - 30 + type: object + Scheduling-Schedule-V1: + description: 'A shift schedule for a specific location, which organizes shifts for employees' + properties: + id: + description: 'The UUID of the schedule' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the schedule' + type: string + example: 'Main Schedule' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 123 + timezone: + description: 'The timezone of the schedule, provide if location is missing timezone' + type: string + example: America/Denver + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 10 + managerUserIds: + description: 'What users manage this schedule' + type: array + items: + type: integer + example: + - 1 + - 2 + employeeIds: + description: 'What employees are assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + createdAt: + description: 'UTC timestamp when the schedule was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'UTC timestamp when the schedule was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'UTC timestamp when the schedule was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + Scheduling-UpdateScheduleRequest-V1: + description: 'Request object for updating a schedule' + properties: + name: + description: 'The name of the schedule' + type: string + example: 'Morning Shift' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 1 + timezone: + description: 'The timezone of the schedule. Required if location does not have a timezone. Error if location already has a timezone.' + type: string + example: America/Denver + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 15 + managerUserIds: + description: 'User IDs of managers for this schedule' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + employeeIds: + description: 'Employee IDs assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + - 30 + type: object + Scheduling-PublishShiftsFailure-V1: + description: 'A shift that failed to publish due to a conflict' + required: + - shiftId + - reason + properties: + shiftId: + description: 'The ID of the shift that failed to publish.' + type: string + example: 019aa09f-0712-74cb-9186-8ad0eb6038dc + reason: + description: 'The reason the shift failed to publish.' + type: string + example: 'Employee is already assigned to a published shift that overlaps with this shift.' + type: object + Scheduling-PublishShiftsResult-V1: + description: 'Result of a bulk publish operation, containing both successfully published shifts and any failures' + required: + - published + - failed + properties: + published: + description: 'The shifts that were successfully published.' + type: array + items: + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' + failed: + description: 'The shifts that failed to publish due to conflicts.' + type: array + items: + $ref: '#/components/schemas/Scheduling-PublishShiftsFailure-V1' + type: object + Scheduling-SchedulingShift-V1: + description: 'A shift for scheduling' + required: + - id + - scheduleId + - status + - color + - start + - end + - timezone + properties: + id: + description: 'The ID of the shift. This can be the UUIDv7 of the shift instance, or a composite ID (<recurringShiftDefinitionId>_<recurrenceId>) for uninstantiated recurring shifts.' + type: string + readOnly: true + example: 019aa09f-0712-74cb-9186-8ad0eb6038dc_20240101T093000 + scheduleId: + description: 'The ID of the schedule the shift belongs to.' + type: string + format: uuid + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the shift.' + example: 'Morning Shift' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the shift.' + enum: + - planned + - published + - cancelled + - deleted + color: + description: '6 character color hex code.' + type: string + example: 00FFAA + capacity: + description: 'The expected headcount for the shift. Defaults to 1 if unset.' + example: 1 + oneOf: + - + type: integer + - + type: 'null' + start: + description: 'UTC timestamp of the start of the shift.' + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'UTC timestamp of the end of the shift.' + example: '2025-01-01T14:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: 'The timezone for the shift.' + type: string + example: America/Denver + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: FREQ=WEEKLY;INTERVAL=1 + oneOf: + - + type: string + - + type: 'null' + recurrenceId: + description: 'The stable identifier for a recurrence, which is the original start of shift according to recurrence rules. Null for non-recurring shifts.' + example: 20240101T090000 + oneOf: + - + type: string + - + type: 'null' + recurrenceDtstart: + description: 'The UTC start time for a recurring shift and the anchor point for the recurrence rule. Null for non-recurring shifts.' + example: '2024-01-01T09:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift. Null for non-recurring shifts.' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE). Null for non-recurring shifts.' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + employeeIds: + description: 'The list of employee IDs currently assigned.' + type: array + items: + type: integer + example: + - 10 + - 20 + unpublishedChanges: + description: 'The pending changes that have not been published.' + oneOf: + - + type: object + - + type: 'null' + createdAt: + description: 'UTC timestamp when the shift was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'UTC timestamp when the shift was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'UTC timestamp when the shift was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + Scheduling-Timezone-V1: + description: 'A timezone resource with its name and current UTC offset.' + required: + - name + - offset + properties: + name: + description: 'The timezone identifier.' + type: string + example: America/Denver + offset: + description: 'The current UTC offset for this timezone.' + type: string + example: '-7:00' + type: object + EmployeeTimesheetEntryCollectionTransformer: + description: 'Class EmployeeTimesheetEntryCollectionTransformer' + type: array + items: + $ref: '#/components/schemas/EmployeeTimesheetEntryTransformer' + EmployeeTimesheetEntryTransformer: + properties: + id: + description: 'Timesheet entry ID' + type: integer + employeeId: + description: 'Employee ID' + type: integer + type: + description: 'Entry type' + type: string + date: + description: 'Date of the timesheet' + type: string + format: date + start: + description: 'Start time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'End time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: Timezone + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours worked' + oneOf: + - + type: number + format: float + - + type: 'null' + note: + description: Note + oneOf: + - + type: string + - + type: 'null' + projectInfo: + oneOf: + - + $ref: '#/components/schemas/ProjectInfoApiTransformer' + - + type: 'null' + approvedAt: + description: 'Approved time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + approved: + description: 'Whether the timesheet entry is approved' + type: boolean + createdAt: + description: 'Created time' + type: string + format: date-time + updatedAt: + description: 'Updated time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + TimesheetEntryInfoApiTransformer: + properties: + id: + description: 'Timesheet entry ID' + type: integer + employeeId: + description: 'Employee ID' + type: integer + type: + description: 'Entry type' + type: string + date: + description: 'Date of the timesheet' + type: string + format: date + start: + description: 'Start time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'End time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: Timezone + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours worked' + oneOf: + - + type: number + format: float + - + type: 'null' + note: + description: Note + oneOf: + - + type: string + - + type: 'null' + projectInfo: + oneOf: + - + $ref: '#/components/schemas/ProjectInfoApiTransformer' + - + type: 'null' + breakInfo: + description: 'Break information' + properties: + id: + description: 'Break ID' + type: integer + name: + description: 'Break name' + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + TimesheetEntryInfoCollectionApiTransformer: + description: 'Class TimesheetEntryInfoApiTransformer' + type: array + items: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1: + description: 'Collection of time tracking breaks to create or update without a policy' + type: array + items: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1' + TimeTracking-TimeTrackingBreakAssessmentCollection-V1: + description: 'Collection of time tracking break assessments' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessment-V1' + TimeTracking-TimeTrackingBreakAvailabilityCollection-V1: + description: 'Collection of time tracking break availabilities' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailability-V1' + TimeTracking-TimeTrackingBreakCollection-V1: + description: 'Collection of time tracking breaks' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + TimeTracking-TimeTrackingBreakPolicyCollection-V1: + description: 'Collection of time tracking break policies' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1: + description: 'Data contract for creating or updating a break' + properties: + id: + description: 'The unique identifier of the break. If not included, a new break will be created.' + oneOf: + - + type: string + format: uuid + - + type: 'null' + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + paid: + description: 'Whether the break is paid' + type: boolean + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + type: object + TimeTracking-CreateTimeTrackingBreak-V1: + description: 'Data contract for creating a break' + properties: + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + paid: + description: 'Whether the break is paid' + type: boolean + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + type: object + TimeTracking-CreateTimeTrackingBreakPolicy-V1: + description: 'Data contract for creating a break policy' + required: + - name + properties: + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + breaks: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' + employeeIds: + description: 'The employees that should be assigned to this policy' + type: array + items: + type: integer + type: object + TimeTracking-SyncTimeTrackingBreakPolicy-V1: + description: 'Data contract for syncing a break policy' + properties: + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + breaks: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' + employeeIds: + description: 'The employees that should be assigned to this policy' + type: array + items: + type: integer + type: object + TimeTracking-TimeTrackingBreak-V1: + description: 'A break for time tracking belonging to a break policy' + properties: + id: + description: 'The unique identifier for the time tracking break' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + paid: + description: 'Whether the break is paid' + type: boolean + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + example: '08:00' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + example: '17:00' + oneOf: + - + type: string + format: time + - + type: 'null' + createdAt: + description: 'ISO 8601 timestamp when the break was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakAssessment-V1: + description: 'A break assessment' + properties: + id: + description: 'The unique identifier for the time tracking break assessment' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + breakId: + description: 'The unique identifier of the break' + type: string + format: uuid + readOnly: true + example: 4983000f-b8cd-436a-bbf0-574cfd7a8517 + employeeId: + description: 'The id of the employee' + type: integer + example: 40342 + employeeTimesheetId: + description: 'The id of the employee timesheet' + type: integer + example: 123 + date: + description: 'The date of the break assessment' + type: string + format: date + example: '2025-01-01' + timezone: + description: 'The timezone of the break assessment' + type: string + example: America/Los_Angeles + result: + description: 'The result of the break assessment' + enum: + - compliant + - violation + - waived + availableYmdt: + description: 'ISO 8601 timestamp when the break became available' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + unavailableYmdt: + description: 'ISO 8601 timestamp when the break became unavailable' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + createdAt: + description: 'ISO 8601 timestamp when the break was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + violations: + description: 'Violations associated with the assessment ' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentViolation-V1' + clockEntryIds: + description: 'Clock entry ids associated with the time tracking break assessment' + type: array + items: + type: integer + expectedDuration: + description: 'The expected duration of the break in minutes' + example: 15 + oneOf: + - + type: integer + - + type: 'null' + recordedDuration: + description: 'The recorded duration of the break in minutes' + example: 10 + oneOf: + - + type: integer + - + type: 'null' + durationDifference: + description: 'The difference between the expected and recorded duration in minutes' + example: -5 + oneOf: + - + type: integer + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakAssessmentViolation-V1: + description: 'A break assessment violation' + properties: + assessmentId: + description: 'The unique identifier for the time tracking break assessment.' + type: string + format: uuid + readOnly: true + example: 21e369e9-295c-41fd-8973-08ee3b54f1a6 + type: + description: 'The type of the violation' + enum: + - break_started_early + - break_started_late + - break_ended_early + - break_ended_late + - break_missed + readOnly: true + employeeTimesheetClockEntryId: + description: 'The id of the employee timesheet clock entry' + readOnly: true + example: 101 + oneOf: + - + type: number + format: integer + - + type: 'null' + amount: + description: 'The amount of the violation' + readOnly: true + example: 101 + oneOf: + - + type: number + format: integer + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakAvailability-V1: + description: 'Break availability information for time tracking' + properties: + id: + description: 'The unique identifier for the time tracking break' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the break' + type: string + readOnly: true + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + readOnly: true + paid: + description: 'Whether the break is paid' + type: boolean + readOnly: true + duration: + description: 'Duration of the break in minutes' + type: integer + readOnly: true + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + readOnly: true + calculatedAt: + description: 'When the break availability was calculated' + type: string + format: date-time + readOnly: true + effectiveAt: + description: 'Timestamp that all time-based calculations are evaluated relative to.' + type: string + format: date-time + readOnly: true + timezone: + description: 'The timezone the break availability is calculated in' + type: string + readOnly: true + recordedDuration: + description: 'The duration of the break that has been recorded so far' + type: integer + readOnly: true + available: + description: 'Whether the break is currently available to be taken' + type: boolean + readOnly: true + availableAfterMinutesWorked: + description: 'Minutes of work after which the break becomes available' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + availableIn: + description: 'Minutes until the break becomes available' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + unavailableIn: + description: 'Minutes until the break becomes unavailable' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + availableAt: + description: 'When the break is or becomes available' + readOnly: true + oneOf: + - + type: string + format: date-time + - + type: 'null' + unavailableAt: + description: 'When the break is or becomes unavailable' + readOnly: true + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakPolicy-V1: + description: 'A policy governing breaks for time tracking' + properties: + id: + description: 'Unique identifier for the break policy' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the break policy was created' + type: string + format: date-time + readOnly: true + example: '2025-10-15T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break policy was last updated' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break policy was deleted' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakPolicyWithRelations-V1: + description: 'A break policy for time tracking' + properties: + id: + description: 'Unique identifier for the break policy' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the break policy was created' + type: string + format: date-time + readOnly: true + example: '2025-10-15T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break policy was last updated' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break policy was deleted' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + breaks: + description: 'The breaks that are assigned to this policy' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + employeeIds: + description: 'The employees that are assigned to this policy' + type: array + items: + type: integer + type: object + TimeTracking-UpdateTimeTrackingBreak-V1: + description: 'Data contract for partially updating a break. All fields are optional; only fields present in the request body will be updated.' + properties: + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + paid: + description: 'Whether the break is paid' + type: boolean + duration: + description: 'Duration of the break in minutes' + type: integer + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + type: object + TimeTracking-UpdateTimeTrackingBreakPolicy-V1: + description: 'Data contract for updating a break policy' + properties: + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + type: object + ClockEntriesSchema: + description: 'Request body schema for operations involving multiple clock entries' + required: + - entries + properties: + entries: + description: 'Array of clock entries' + type: array + items: + $ref: '#/components/schemas/ClockEntrySchema' + minItems: 1 + type: object + ClockEntryIdsSchema: + description: 'Request body schema for operations involving multiple clock entry IDs' + required: + - clockEntryIds + properties: + clockEntryIds: + description: 'Array of clock entry IDs to process' + type: array + items: + type: integer + minItems: 1 + example: + - 10 + - 11 + - 12 + type: object + ClockEntrySchema: + description: 'Schema for a single clock entry' + required: + - employeeId + - date + - start + - end + properties: + employeeId: + description: 'Unique identifier for the employee.' + type: integer + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + type: string + format: date + example: '2024-01-01' + start: + description: 'Start time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + example: '09:00' + end: + description: 'End time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + example: '17:00' + id: + description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry.' + type: integer + projectId: + description: 'The ID of the project to associate with the timesheet entry.' + type: integer + taskId: + description: 'The ID of the task to associate with the timesheet entry.' + type: integer + note: + description: 'Optional note to associate with the timesheet entry.' + type: string + breakId: + description: 'Optional break id to associate with the timesheet entry.' + oneOf: + - + type: string + format: uuid + - + type: 'null' + type: object + HourEntryIdsSchema: + description: 'Request body schema for operations involving multiple hour entry IDs' + required: + - hourEntryIds + properties: + hourEntryIds: + description: 'Array of hour entry IDs to process' + type: array + items: + type: integer + minItems: 1 + example: + - 100 + - 101 + - 102 + type: object + TotalRewards-BenefitDetailsValues: + description: 'Schema for a total rewards benefit details value' + properties: + name: + description: Name + type: string + companyContributionAmount: + description: 'Company contribution amount' + type: string + companyContributionSubvalue: + description: 'Source contribution when the amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + summary: + description: Summary + oneOf: + - + type: string + - + type: 'null' + url: + description: Url + oneOf: + - + type: string + - + type: 'null' + benefitModalValuesLink: + description: 'Link to the benefits modal' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-BenefitSectionValues: + description: 'Schema for a total rewards benefit section' + properties: + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary' + benefitDetails: + description: 'Benefit details' + type: array + items: + $ref: '#/components/schemas/TotalRewards-BenefitDetailsValues' + type: object + TotalRewards-CalendarSectionValues: + description: 'Schema for total rewards calendar section' + properties: + holidays: + description: 'List of holidays' + type: array + items: + $ref: '#/components/schemas/TotalRewards-HolidayValue' + timeOffPolicies: + description: 'List of time off policies' + type: array + items: + $ref: '#/components/schemas/TotalRewards-TimeOffPolicyValue' + hourlyAccrualDisclaimer: + description: 'Hourly accrual disclaimer text' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-CompSummaryValues: + description: 'Schema for total rewards compensation summary values' + properties: + title: + description: Title + type: string + subtitle: + description: Subtitle + oneOf: + - + type: string + - + type: 'null' + value: + description: Value + oneOf: + - + type: string + - + type: 'null' + subvalue: + description: 'When conversion applies: localized “(from …)” fragment including the original amount' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-CustomDisclaimerInfo: + description: 'Schema for a total rewards custom disclaimer info' + properties: + isViewerAdmin: + description: 'Is admin currently viewing' + type: boolean + customDisclaimer: + description: 'Custom disclaimer text' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EquityDetailsValues: + description: 'Schema for total rewards equity details values' + properties: + cliffMonths: + description: 'Cliff months' + oneOf: + - + type: integer + - + type: 'null' + estimatedExerciseCost: + description: 'Estimated exercise cost' + oneOf: + - + type: string + - + type: 'null' + estimatedExerciseCostSubvalue: + description: 'Source exercise cost when converted' + oneOf: + - + type: string + - + type: 'null' + estimatedSharePrice: + description: 'Estimated share price' + type: string + estimatedSharePriceSubvalue: + description: 'Source share price when converted' + oneOf: + - + type: string + - + type: 'null' + estimatedTotalValue: + description: 'Estimated total value' + type: string + estimatedTotalValueSubvalue: + description: 'Source total when converted' + oneOf: + - + type: string + - + type: 'null' + grantDate: + description: 'Grant date' + type: string + format: date + grantType: + description: 'Grant type' + type: string + grantName: + description: 'Grant name' + oneOf: + - + type: string + - + type: 'null' + equityGrowthChartData: + description: 'Equity growth chart data' + oneOf: + - + type: array + items: + $ref: '#/components/schemas/TotalRewards-EquityGrowthChartItem' + - + type: 'null' + numShares: + description: 'Number of shares' + type: integer + numVestedShares: + description: 'Number of vested shares' + type: integer + percentVested: + description: 'Percent vested' + type: number + format: float + strikePrice: + description: 'Strike price' + oneOf: + - + type: string + - + type: 'null' + strikePriceSubvalue: + description: 'Source strike when converted' + oneOf: + - + type: string + - + type: 'null' + vestingMonths: + description: 'Vesting months' + oneOf: + - + type: integer + - + type: 'null' + vestingSchedule: + description: 'Vesting schedule' + type: string + vestingStartDate: + description: 'Vesting start date' + type: string + format: date + vestedValue: + description: 'Vested value' + type: string + vestedValueSubvalue: + description: 'Source vested when converted' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EquityEstimatedValuationValues: + description: 'Schema for total rewards equity growth valuation' + properties: + equityGrowthEstimationItems: + description: 'Equity estimated growth items' + type: array + items: + $ref: '#/components/schemas/TotalRewards-EquityGrowthEstimation' + numberOfVestedShares: + description: 'Number of vested shares' + type: integer + numberOfTotalShares: + description: 'Number of total shares' + type: integer + equityGrowthSliderMax: + description: 'Equity growth slider max value' + oneOf: + - + type: integer + - + type: 'null' + equityGrowthSliderMin: + description: 'Equity growth slider min value' + oneOf: + - + type: integer + - + type: 'null' + type: object + TotalRewards-EquityGrowthChartItem: + description: 'Schema for total rewards equity growth chart item' + properties: + label: + description: Label + type: string + estimatedNetValue: + description: 'Estimated value' + type: string + subvalue: + description: 'Source amount for estimated value when it was currency-converted' + oneOf: + - + type: string + - + type: 'null' + vested: + description: 'Amount vested' + oneOf: + - + type: number + format: float + - + type: 'null' + current: + description: 'Current value' + oneOf: + - + type: number + format: float + - + type: 'null' + unvested: + description: 'Amount unvested' + oneOf: + - + type: number + format: float + - + type: 'null' + type: object + TotalRewards-EquityGrowthEstimation: + description: 'Schema for total rewards equity growth estimation' + properties: + stop: + description: Stop + type: integer + companyValuation: + description: 'Company valuation' + type: string + companyValuationSubvalue: + description: 'Source company valuation when converted' + oneOf: + - + type: string + - + type: 'null' + totalValue: + description: 'Total value' + type: string + totalValueSubvalue: + description: 'Source total when converted' + oneOf: + - + type: string + - + type: 'null' + vestedValue: + description: 'Vested amount value' + type: string + vestedValueSubvalue: + description: 'Source vested when converted' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EquitySectionValues: + description: 'Schema for total rewards equity section values' + properties: + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary values for equity' + conditions: + description: 'Terms and conditions' + oneOf: + - + type: string + - + type: 'null' + disclaimers: + description: Disclaimers + oneOf: + - + type: string + - + type: 'null' + equityDetails: + description: 'Equity details' + type: array + items: + $ref: '#/components/schemas/TotalRewards-EquityDetailsValues' + equityEstimatedValuation: + $ref: '#/components/schemas/TotalRewards-EquityEstimatedValuationValues' + description: 'Total rewards equity estimated valuation object' + type: object + TotalRewards-ExtraPayDetailsValues: + description: 'Schema for total rewards extra pay details' + properties: + name: + description: Name + type: string + amount: + description: Amount + type: string + amountSubvalue: + description: 'Source amount when amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + frequency: + description: Frequency + type: string + formattedDateString: + description: 'Extra pay formatted date' + type: string + format: date + annualizedAmount: + description: 'Annualized amount' + type: string + annualizedSubvalue: + description: 'Source text when annualized amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-ExtraPaySectionValues: + description: 'Schema for total rewards extra pay section values' + properties: + title: + description: Title + type: string + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary values for extra pay' + extraPayDetails: + description: 'Extra pay details' + type: array + items: + $ref: '#/components/schemas/TotalRewards-ExtraPayDetailsValues' + type: object + TotalRewards-HolidayValue: + description: 'Schema for total rewards holiday value' + properties: + title: + description: Title + type: string + startDate: + description: 'Start date' + type: string + endDate: + description: 'End date' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-OverviewSectionValues: + description: 'Schema for total rewards overview section' + properties: + estimatedTotalCompValue: + description: 'Estimated total compensation' + oneOf: + - + type: string + - + type: 'null' + paidPer: + description: 'Paid per reference' + oneOf: + - + type: string + - + type: 'null' + multiplierValue: + description: 'Multiplier for hours worked for hourly paid type' + oneOf: + - + type: number + format: float + - + type: 'null' + type: object + TotalRewards-TimeOffPolicyValue: + description: 'Schema for total rewards time off policy' + properties: + title: + description: Title + type: string + value: + description: Value + type: string + showDisclaimer: + description: 'Show disclaimer' + oneOf: + - + type: boolean + - + type: 'null' + showEligible: + description: 'Show eligibility' + oneOf: + - + type: boolean + - + type: 'null' + type: object + TotalRewards-TimelineItem: + description: 'Schema for total rewards timeline item' + properties: + value: + description: Value + oneOf: + - + type: string + - + type: 'null' + subvalue: + description: 'When conversion applies: localized “(from …)” fragment including the original amount, e.g. (from $48,000.00 / Year)' + oneOf: + - + type: string + - + type: 'null' + label: + description: Label + oneOf: + - + type: string + - + type: array + items: + type: string + type: object + TotalRewards-TimelineSectionValues: + description: 'Schema for total rewards overview section' + properties: + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary' + timelineData: + description: 'Timeline data' + type: array + items: + $ref: '#/components/schemas/TotalRewards-TimelineItem' + placeholderText: + description: 'Placeholder text' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EmployeeStatement: + description: 'Schema for a total rewards statement' + properties: + employeeId: + description: 'Employee Id' + oneOf: + - + type: string + - + type: 'null' + employeeName: + description: 'Employee Name' + type: string + jobTitle: + description: 'Employee Job Title' + oneOf: + - + type: string + - + type: 'null' + hasMixedCurrencyTypes: + description: 'Employee statement has multiple currencies' + oneOf: + - + type: boolean + format: boolean + - + type: 'null' + overviewSection: + $ref: '#/components/schemas/TotalRewards-OverviewSectionValues' + description: 'Total Rewards overview section object' + paySection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards pay timeline object' + bonusSection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards bonus section timeline object' + commissionSection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards commission section timeline object' + benefitSection: + $ref: '#/components/schemas/TotalRewards-BenefitSectionValues' + description: 'Total Rewards benefit section object' + equitySection: + $ref: '#/components/schemas/TotalRewards-EquitySectionValues' + description: 'Total Rewards equity section object' + calendarSection: + $ref: '#/components/schemas/TotalRewards-CalendarSectionValues' + description: 'Total Rewards equity section object' + extraPaySection: + $ref: '#/components/schemas/TotalRewards-ExtraPaySectionValues' + description: 'Total Rewards extra pay section object' + customDisclaimerInfo: + $ref: '#/components/schemas/TotalRewards-CustomDisclaimerInfo' + description: 'Total Rewards custom disclaimer object' + companyName: + description: 'Company name' + oneOf: + - + type: string + - + type: 'null' + companyLogoUrl: + description: 'Company logo URL' + oneOf: + - + type: string + - + type: 'null' + statementYear: + description: 'Statement year' + oneOf: + - + type: integer + - + type: 'null' + minStatementYear: + description: 'Minimum selectable statement year' + oneOf: + - + type: integer + - + type: 'null' + type: object + WebHookPostFieldDataObject: + title: WebHookPostFieldDataObject + required: + - alias + - name + - type + - id + - pageId + - tableId + properties: + alias: + description: 'Field identifier used in the API' + oneOf: + - + type: string + - + type: 'null' + name: + description: 'Field name' + type: string + type: + description: 'Field type' + oneOf: + - + type: string + - + type: 'null' + id: + description: 'Field ID. This may be a standard/custom field ID or a synthetic negative ID for calculated fields.' + type: integer + pageId: + description: 'ID of the page the field belongs to. Calculated fields may use `-1`. Fields without a usable page ID are not available in webhooks.' + type: integer + tableId: + description: 'ID of the table the field belongs to' + oneOf: + - + type: integer + - + type: 'null' + type: object + WebHookPostFieldDataObjectCollection: + title: WebHookPostFieldDataObjectCollection + type: array + items: + $ref: '#/components/schemas/WebHookPostFieldDataObject' + WebHookPostFieldPageDataObject: + title: WebHookPostFieldPageDataObject + required: + - id + - name + properties: + id: + description: 'Page ID' + type: integer + name: + description: 'Page Name' + type: string + type: object + WebHookPostFieldPageDataObjectCollection: + title: WebHookPostFieldPageDataObjectCollection + type: array + items: + $ref: '#/components/schemas/WebHookPostFieldPageDataObject' + WebHookPostFieldResponseObject: + title: WebHookPostFieldResponseObject + required: + - fields + - tables + - pages + properties: + fields: + $ref: '#/components/schemas/WebHookPostFieldDataObjectCollection' + description: 'List of fields that can be included in the webhook payload. Includes standard, custom, table, and calculated fields; some calculated fields use synthetic negative IDs.' + pages: + $ref: '#/components/schemas/WebHookPostFieldPageDataObjectCollection' + description: 'Pages referenced by the postable fields in the webhook payload.' + tables: + $ref: '#/components/schemas/WebHookPostFieldTableDataObjectCollection' + description: 'Tables referenced by the postable fields in the webhook payload.' + type: object + WebHookPostFieldTableDataObject: + title: WebHookPostFieldTableDataObject + required: + - id + - name + properties: + id: + description: 'Table ID' + type: integer + name: + description: 'Table Name' + type: string + type: object + WebHookPostFieldTableDataObjectCollection: + title: WebHookPostFieldTableDataObjectCollection + type: array + items: + $ref: '#/components/schemas/WebHookPostFieldTableDataObject' + ProblemDetailsResponse: + description: 'problem fields shared by problem responses and record-level errors.' + properties: + type: + description: 'Problem type URI identifying the error category' + type: string + title: + description: 'Short, human-readable summary of the problem type' + type: string + status: + description: 'HTTP status code for the error' + type: integer + detail: + description: 'Detailed, human-readable explanation specific to this occurrence of the problem' + type: string + instance: + description: 'URI reference that identifies the specific occurrence of the problem' + type: string + code: + description: 'Application-specific error code' + type: string + fields: + type: object + example: + amount: 'must by > 0' + additionalProperties: + type: string + type: object + ListFieldOption: + description: 'A single option on a list field.' + properties: + id: + description: 'The option ID.' + type: integer + xml: + attribute: true + name: + description: 'The display value of the option. In XML format, this is the text content of the <option> element.' + type: string + archived: + description: 'Whether this option is archived. Archived options are preserved for historical data integrity and continue to appear in responses. Filter by archived: no to show only active options.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + createdDate: + description: 'The date the option was created, in ISO 8601 format. Server-set on creation; not client-supplied.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' + archivedDate: + description: 'The date the option was archived, in ISO 8601 format. Server-set when archived is first set to yes; persists even if the option is later un-archived.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' + manageable: + description: 'Whether this individual option can be modified via the API.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + frequency: + description: 'The pay frequency for the option. Only present on pay-group list fields.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' + type: object + xml: + name: option + ListFieldDetail: + description: 'A single list field and its available options.' + properties: + id: + description: 'The list ID.' + type: integer + xml: + attribute: true + fieldId: + description: 'The field ID.' + type: integer + xml: + attribute: true + name: + description: 'The display name of the list field.' + type: string + alias: + description: 'The API alias for the list field.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' + manageable: + description: 'Whether the list field options can be modified via the API.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + multiple: + description: 'Whether this field supports multiple values.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + options: + description: 'The available options for this list field.' + type: array + items: + $ref: '#/components/schemas/ListFieldOption' + xml: + name: options + wrapped: true + type: object + xml: + name: list + AvailableAction: + description: 'Represents an action that can be performed on a resource based on permissions and resource state' + properties: + href: + description: 'The URL for this action' + type: string + example: /api/v1/hris/job-openings/uuid-123 + fields: + description: 'Fields that can be modified with this action' + oneOf: + - + type: array + items: + type: object + - + type: 'null' + type: object + PagedResponse: + description: 'A response object that contains a paginated list of results.' + properties: + data: + description: 'The data for the current page.' + type: array + items: + type: object + meta: + $ref: '#/components/schemas/PaginationMetaData' + description: 'The pagination metadata for the response.' + _links: + description: 'Hypermedia links for collection navigation (next, prev) and available collection actions (e.g., create). Actions are permission-based and may vary.' + example: + next: + href: '/api/v1/reference-resources?page=2&pageSize=100' + prev: + href: '/api/v1/reference-resources?page=0&pageSize=100' + oneOf: + - + type: object + additionalProperties: + $ref: '#/components/schemas/AvailableAction' + - + type: 'null' + type: object + PaginationMetaData: + description: 'A response object that contains pagination metadata.' + properties: + page: + description: 'The page number of the results.' + type: integer + example: 0 + pageSize: + description: 'The number of items per page.' + type: integer + example: 100 + totalPages: + description: 'The total number of pages available.' + type: integer + example: 1 + totalItems: + description: 'The total number of items available.' + type: integer + example: 10 + type: object + responses: + '400': + description: Unauthorized + headers: + X-BambooHR-Message: + description: 'Human readable error to help when debugging, suitable for logging' + schema: + type: string + content: + application/json: { } + '401': + description: Unauthorized + headers: + X-BambooHR-Message: + description: 'Human readable error to help when debugging, suitable for logging' + schema: + type: string + content: + application/json: { } + '403': + description: Forbidden + headers: + X-BambooHR-Message: + description: 'Human readable error to help when debugging, suitable for logging' + schema: + type: string + content: + application/json: { } + '404': + description: 'Not Found' + headers: + X-BambooHR-Message: + description: 'Human readable error to help when debugging, suitable for logging' + schema: + type: string + content: + application/json: { } + '409': + description: Conflict + headers: + X-BambooHR-Message: + description: 'Human readable error to help when debugging, suitable for logging' + schema: + type: string + content: + application/json: { } + '413': + description: 'Payload too large' + headers: + X-BambooHR-Message: + description: 'The attempted file upload was too large' + schema: + type: string + content: + application/json: { } + '500': + description: 'Unknown Error' + headers: + X-BambooHR-Message: + description: 'There was an unknown server error' + schema: + type: string + content: + application/json: { } + BenefitIntegrationSuccessSyncResponse: + description: 'Human-readable sync results' + content: + text/plain: + schema: + description: 'The result of the sync operation' + type: string + BenefitIntegrationSyncablePlanResponse: + description: 'List of syncable plans' + content: + application/json: + schema: + type: array + items: + properties: + id: + description: 'Plan ID' + type: string + type: + description: 'Plan category' + type: string + name: + description: 'Plan name' + type: string + carrierName: + description: 'Carrier name' + type: string + syncingCapabilities: + description: 'Which integration the plan is capable of being synced with' + type: array + items: { type: string, enum: [ideon, noyo] } + type: object + DependentValidationFailedResponse: + description: 'Validation failed — returns a bare array of field identifier strings' + content: + application/json: + schema: + type: array + items: + type: string + example: + - firstName + - dateOfBirth + WebhookSuccessResponse: + description: 'Webhook received successfully (200-299 status code).' + WebhookClientErrorResponse: + description: 'Client error (400-499 status code) - the webhook endpoint intentionally rejected the request. BambooHR will not retry webhooks that return 4xx status codes.' + WebhookServerErrorResponse: + description: 'Server error (500+ status code). BambooHR will automatically retry this webhook up to 5 times using exponential backoff (5min, 10min, 20min, 40min, 80min intervals).' + parameters: + companyDomain: + name: companyDomain + in: path + description: 'The subdomain used to access BambooHR. If you access BambooHR at https://mycompany.bamboohr.com, then the companyDomain is "mycompany"' + required: true + schema: + type: string + EmployeeIdPathParameter: + name: EmployeeIdPathParameter + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + AcceptHeaderParameter: + name: AcceptHeaderParameter + in: header + description: 'This endpoint can produce either JSON or XML.' + schema: + type: string + enum: + - application/xml + - application/json + AcceptXmlHeaderParameter: + name: AcceptXmlHeaderParameter + in: header + description: 'This endpoint will produce XML.' + schema: + type: string + enum: + - application/xml + AcceptJsonHeaderParameter: + name: AcceptJsonHeaderParameter + in: header + description: 'This endpoint will produce JSON.' + schema: + type: string + enum: + - application/json + ClientId: + name: clientId + in: path + required: true + schema: + type: string + requestBodies: + RequestBodyParameter: + required: true + content: + application/json: + schema: + type: string + DependentUpdateRequest: + required: true + content: + application/json: + schema: + properties: + fields: + type: array + items: + properties: { id: { type: string }, value: { type: string } } + type: object + type: object + securitySchemes: + oauth: + type: oauth2 + description: 'OAuth 2.0 authentication' + flows: + authorizationCode: + authorizationUrl: /authorize.php + tokenUrl: /token.php + scopes: + access_level: 'Get User Access Levels' + 'benchmarking:compensation': 'Compensation Benchmarking' + compensation_benchmarks: 'Read and write access to compensation benchmarking data including job-location pairs, benchmark values, and benchmark sources.' + compensation_benchmarks.write: 'Read and write access to compensation benchmarking data including job-location pairs, benchmark values, and benchmark sources.' + pay_grades_and_bands: 'Read access to levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' + pay_grades_and_bands.write: 'Read access to levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' + planning_cycles: 'Read access to compensation planning cycle data including cycle lists, details, summaries, employees, budgets, approvals, admins, and change communication settings.' + planning_cycles.write: 'Read access to compensation planning cycle data including cycle lists, details, summaries, employees, budgets, approvals, admins, and change communication settings.' + background_checks: 'Access background check information' + background_checks.write: 'Access background check information' + benefit: 'Get Benefit Details' + benefit.write: 'Get Benefit Details' + company_file: 'Company Files' + company_file.write: 'Company Files' + 'company:info': 'Company Info' + 'company:details': 'Access to comprehensive company information including profile fields, metadata, and configuration settings' + 'company:details.write': 'Access to comprehensive company information including profile fields, metadata, and configuration settings' + customer_onboarding: 'Customer Onboarding workflows and setup' + customer_onboarding.write: 'Customer Onboarding workflows and setup' + 'company:administration': 'Company Administration' + 'company:administration.write': 'Company Administration' + data_cleaner: 'Allows viewing data cleaning job data.' + data_cleaner.write: 'Allows viewing data cleaning job data.' + deductions: 'Access to employee deductions information' + deductions.write: 'Access to employee deductions information' + payroll: 'Allows access to payroll related fields' + payroll.write: 'Allows access to payroll related fields' + 'payroll:beneficial_owners': 'Access to beneficial ownership certification information for payroll compliance, including business structure, exemption status, and individual beneficial owner details with personal information and ownership percentages' + 'payroll:beneficial_owners.write': 'Access to beneficial ownership certification information for payroll compliance, including business structure, exemption status, and individual beneficial owner details with personal information and ownership percentages' + 'payroll:legal_entities': 'Access to payroll legal entities information, including FEIN and legal entity details' + 'payroll:retirements': 'Access to employee payroll retirements information' + 'payroll:pay_schedules': 'Access to payroll pay schedule information' + 'payroll:pay_periods': 'Access to payroll pay period information' + 'payroll:earnings': 'Access to earnings records within a pay cycle' + 'payroll:pay_cycles': 'Access to pay cycle records' + 'payroll:pay_stubs': 'Access to employee pay stub information including gross pay, net pay, deductions, taxes, and YTD totals' + 'payroll:payrolls': 'Access to payroll information including pay dates and processing details' + 'payroll:ach_returns': 'Access to ACH return information including return details and resolution' + 'payroll:ach_returns.write': 'Access to ACH return information including return details and resolution' + 'esignature:instance': 'Access eSignature instance data and signing workflows, including viewing instances, completing signing steps, and managing user signatures.' + 'esignature:instance.write': 'Access eSignature instance data and signing workflows, including viewing instances, completing signing steps, and managing user signatures.' + 'employee:assets': 'Assets Assigned to Employee' + 'employee:assets.write': 'Assets Assigned to Employee' + 'employee:emergency_contacts': 'Employee Contacts and Emergency Contacts' + 'employee:emergency_contacts.write': 'Employee Contacts and Emergency Contacts' + 'employee:vaccination': 'Employee COVID-19 Data' + 'employee:vaccination.write': 'Employee COVID-19 Data' + 'employee:custom_fields': 'Employee Custom Fields' + 'employee:custom_fields.write': 'Employee Custom Fields' + 'employee:custom_fields_encrypted': 'Employee Encrypted Custom Fields' + 'employee:custom_fields_encrypted.write': 'Employee Encrypted Custom Fields' + 'employee:demographic': 'Includes Employee Ethnicity and Nationality' + 'employee:demographic.write': 'Includes Employee Ethnicity and Nationality' + 'employee:dependent': 'Employee Dependent Information' + 'employee:dependent.write': 'Employee Dependent Information' + 'employee:dependent:ssn': 'Employee Dependent SSN/SIN' + 'employee:dependent:ssn.write': 'Employee Dependent SSN/SIN' + 'employee:education': 'Employee Education Information' + 'employee:education.write': 'Employee Education Information' + 'employee:contact': 'Employee Contact' + 'employee:contact.write': 'Employee Contact' + 'employee:identification': 'Employee Identification' + 'employee:identification.write': 'Employee Identification' + 'employee:job': 'Employee Job Information' + 'employee:job.write': 'Employee Job Information' + 'employee:management': 'Manage Employees' + 'employee:management.write': 'Manage Employees' + 'employee:photo': 'Employee Photo' + 'employee:photo.write': 'Employee Photo' + employee: 'All non-sensitive employee-related information' + employee.write: 'All non-sensitive employee-related information' + 'employee:name': 'Includes Any Employee Name Details' + 'employee:name.write': 'Includes Any Employee Name Details' + employee_directory: 'Employee Directory' + 'employee:file': 'Employee Files' + 'employee:file.write': 'Employee Files' + 'employee:compensation': 'Employee Payroll Information' + 'employee:compensation.write': 'Employee Payroll Information' + 'employee:providers': 'Allows access to employee provider information' + 'employee:providers.write': 'Allows access to employee provider information' + 'employee:providers:payroll': 'Allows access to employee payroll provider information' + 'employee:providers:payroll.write': 'Allows access to employee payroll provider information' + 'employee:tabs': 'View and manage custom employee tabs.' + 'employee:tabs.write': 'View and manage custom employee tabs.' + 'sensitive_employee:protected_info': 'Employee SSN, SIN, Birthday' + 'sensitive_employee:protected_info.write': 'Employee SSN, SIN, Birthday' + 'sensitive_employee:address': 'Includes Any Employee Address Details' + 'sensitive_employee:address.write': 'Includes Any Employee Address Details' + 'sensitive_employee:creditcards': 'Credit Cards Assigned to Employee' + 'sensitive_employee:creditcards.write': 'Credit Cards Assigned to Employee' + 'employee:payroll.write': 'Employee Payroll Information' + 'ask_bamboohr:chat_messages': 'Read and write chat messages in Ask BambooHR on behalf of the authenticated user' + 'ask_bamboohr:chat_messages.write': 'Read and write chat messages in Ask BambooHR on behalf of the authenticated user' + 'ask_bamboohr:settings': 'View and manage Ask BambooHR feature settings' + 'ask_bamboohr:settings.write': 'View and manage Ask BambooHR feature settings' + 'ask_bamboohr:policy_documents': 'View and manage policy documents used as sources in Ask BambooHR' + 'ask_bamboohr:policy_documents.write': 'View and manage policy documents used as sources in Ask BambooHR' + equity: 'Read access to company-level equity settings such as calculation type, valuation, share counts, pricing, and vesting-related configuration.' + equity.write: 'Read access to company-level equity settings such as calculation type, valuation, share counts, pricing, and vesting-related configuration.' + field: 'Query Lists of Fields, Tables and Lists.' + field.write: 'Query Lists of Fields, Tables and Lists.' + goal: 'Access performance goals data for employees.' + goal.write: 'Access performance goals data for employees.' + 'performance:assessments': 'Access performance assessment data for employees' + 'performance:assessments.write': 'Access performance assessment data for employees' + 'performance:feedback': 'Access performance feedback data for employees' + 'performance:feedback.write': 'Access performance feedback data for employees' + 'performance:settings': 'Access and manage performance management configurations' + 'performance:settings.write': 'Access and manage performance management configurations' + 'performance:one_on_ones': 'Access one on one meeting data for employees' + 'performance:one_on_ones.write': 'Access one on one meeting data for employees' + 'enps:settings': 'View and manage eNPS feature settings' + 'enps:settings.write': 'View and manage eNPS feature settings' + 'employee_wellbeing:settings': 'View and manage Employee Wellbeing feature settings' + 'employee_wellbeing:settings.write': 'View and manage Employee Wellbeing feature settings' + job_organization: 'Manage job organization, including job profiles' + job_organization.write: 'Manage job organization, including job profiles' + 'hiring:job_openings': 'Access and manage job openings, pipelines, rules, questions, collaborators, and job board postings' + 'hiring:job_openings.write': 'Access and manage job openings, pipelines, rules, questions, collaborators, and job board postings' + 'hiring:applications': 'Access and manage applications, candidates, interviews, and candidate emails' + 'hiring:applications.write': 'Access and manage applications, candidates, interviews, and candidate emails' + 'hiring:offers': 'Access and manage offers, offer terms, and offer letters' + 'hiring:offers.write': 'Access and manage offers, offer terms, and offer letters' + 'hiring:checkr': 'Access and manage Checkr background checks for candidates' + 'hiring:checkr.write': 'Access and manage Checkr background checks for candidates' + 'hiring:talent_pools': 'Access and manage talent pools, pool candidates, and pool collaborators' + 'hiring:talent_pools.write': 'Access and manage talent pools, pool candidates, and pool collaborators' + 'hiring:settings': 'Access and manage hiring configuration including statuses, candidate sources, and email and offer letter templates' + 'hiring:settings.write': 'Access and manage hiring configuration including statuses, candidate sources, and email and offer letter templates' + offline_access: 'Allows the application to reauthenticate to BambooHR with a refresh token' + openid: 'Allows the application to authenticate with BambooHR' + 'recognitions:manage': 'Access and manage Rewards and Recognition settings, exclusion rules, and point allocations for the company' + 'recognitions:manage.write': 'Access and manage Rewards and Recognition settings, exclusion rules, and point allocations for the company' + 'recognitions:suggestions': 'Read and write recognition suggestions for employees, including viewer suggestion pools and one-off or broadcast suggestion writes' + 'recognitions:suggestions.write': 'Read and write recognition suggestions for employees, including viewer suggestion pools and one-off or broadcast suggestion writes' + report: 'Allows access to query custom reports and creation of bulk data requests' + tasks: 'Manage Employee Tasks' + tasks.write: 'Manage Employee Tasks' + time_off: 'Employee Time Off Information' + time_off.write: 'Employee Time Off Information' + time_tracking: 'Add and Manage Hours Worked.' + time_tracking.write: 'Add and Manage Hours Worked.' + 'time_tracking:breaks': 'View and manage meal and rest break tracking information.' + 'time_tracking:breaks.write': 'View and manage meal and rest break tracking information.' + 'time_tracking:shift_differentials': 'View and manage time tracking shift differentials.' + 'time_tracking:shift_differentials.write': 'View and manage time tracking shift differentials.' + 'time_tracking:project': 'View and manage time tracking projects and tasks.' + 'time_tracking:project.write': 'View and manage time tracking projects and tasks.' + 'scheduling:schedules': 'View and manage schedules.' + 'scheduling:schedules.write': 'View and manage schedules.' + 'scheduling:shifts': 'View and manage shifts within schedules.' + 'scheduling:shifts.write': 'View and manage shifts within schedules.' + training: 'Get Training Details' + training.write: 'Get Training Details' + total_rewards: 'Read and write access to Total Rewards data including employee statements, onboarding steps, and custom disclaimers.' + total_rewards.write: 'Read and write access to Total Rewards data including employee statements, onboarding steps, and custom disclaimers.' + user: 'Get Users List' + user.write: 'Get Users List' + 'user:management': 'Manage state of company users' + 'user:management.write': 'Manage state of company users' + webhooks: 'Create and Manage Application Specific Webhooks' + webhooks.write: 'Create and Manage Application Specific Webhooks' + 'workflows:bounties': 'View and manage workflow bounties.' + 'workflows:bounties.write': 'View and manage workflow bounties.' + 'workflows:instances': 'View and manage workflow instances.' + 'workflows:instances.write': 'View and manage workflow instances.' + error_management: 'Manage errors and notifications' + error_management.write: 'Manage errors and notifications' + public.integration: 'Allows access to all authorized scopes for all employees. Must be installed by an admin.' + public.user: 'Authorizes the application to perform scoped actions on behalf of the user who authorized the application.' + alerts: 'Provides read and write access to alert configurations.' + alerts.write: 'Provides read and write access to alert configurations.' + approval_workflows: 'Provides read and write access to approval workflow configurations.' + approval_workflows.write: 'Provides read and write access to approval workflow configurations.' + compensation_tools: 'Read access to the list of available compensation tools and upsell information for the company.' + employee_verifications: 'Provides read and write access to employee verification records, including I-9 and E-Verify verification data and partner role assignments.' + employee_verifications.write: 'Provides read and write access to employee verification records, including I-9 and E-Verify verification data and partner role assignments.' + esignature: 'Provides read access to electronic signature records and requests.' + onboarding: 'Provides read access to employee new hire paperwork and onboarding records.' + onboarding.write: 'Provides read access to employee new hire paperwork and onboarding records.' + gridlets: Gridlets + meta: 'Read-only access to public BambooHR meta reference endpoints such as countries, subdivisions, timezones, currencies, and related lookup data used to configure integrations.' + mcp: 'Grants access to Model Context Protocol (MCP) endpoints' + insights: 'Insight data' + insights.write: 'Insight data' + basic: + type: http + scheme: basic + RegistrationAccessToken: + type: http + description: 'Registration access token returned on POST /register and rotated on successful PUT /{clientId}; previous token remains valid for up to one hour for retry recovery.' + bearerFormat: opaque-token + scheme: bearer + Api7RegistrationKey: + type: apiKey + description: 'Static key passed in X-API7-REGISTRATION-KEY header.' + name: X-API7-REGISTRATION-KEY + in: header +tags: + - + name: 'Alert Configurations' + description: 'Alert Configurations' + - + name: 'Public API' + description: 'Public API' + - + name: Alert + description: Alert + - + name: Compensation + description: Compensation + - + name: 'Compensation Planning' + description: 'Compensation Planning' + - + name: EmployeeVerification + description: EmployeeVerification + - + name: Onboarding + description: Onboarding + - + name: 'Time Tracking' + description: 'Time Tracking' + - + name: Scheduling + description: Scheduling + - + name: 'Time Off' + description: 'Time Off' + - + name: Webhooks + description: Webhooks + - + name: Datasets + description: Datasets + - + name: 'Custom Reports' + description: 'Custom Reports' + - + name: 'Applicant Tracking' + description: 'Applicant Tracking' + - + name: Benefits + description: Benefits + - + name: Company + description: Company + - + name: Employees + description: Employees + - + name: 'Company Profile' + description: 'Company Profile' + - + name: 'Compensation Benchmarking' + description: 'Compensation Benchmarking' + - + name: Reports + description: Reports + - + name: 'Tabular Data' + description: 'Tabular Data' + - + name: 'Company Files' + description: 'Company Files' + - + name: 'Employee Files' + description: 'Employee Files' + - + name: Goals + description: Goals + - + name: Photos + description: Photos + - + name: Locations + description: Locations + - + name: Hours + description: Hours + - + name: 'Total Rewards' + description: 'Total Rewards' + - + name: 'Account Information' + description: 'Account Information' + - + name: Training + description: Training + - + name: 'Last Change Information' + description: 'Last Change Information' + - + name: Login + description: Login +webhooks: + company-integrations.updated: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Company Integrations Updated' + description: "\nTriggered when company integrations are updated.\n\n### Behavior & Constraints\n- **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions.\n- **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations.\n" + operationId: company-integrations-updated-webhook + requestBody: + description: 'Webhook payload containing company integration update information' + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyIntegrationsUpdatedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: plat-api + company.updated: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Company Updated' + description: "\nTriggered when company information or company status changes.\n\n### Behavior & Constraints\n- This event is emitted for general company updates.\n- When the underlying change is a company status change, the emitted event depends on the new status:\n - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead.\n - Otherwise the system emits `company.updated`.\n" + operationId: company-updated-webhook + requestBody: + description: 'Webhook payload containing information about the company update' + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyUpdatedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: grease-monkeys + company.deleted: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Company Deleted' + description: "\nTriggered when a company status change results in the company being considered deleted/closed.\n\n### Behavior & Constraints\n- This event is emitted when the new company status is `DELETED` or `CANCELLED`.\n- For other company updates and status changes, the system emits `company.updated`.\n" + operationId: company-deleted-webhook + requestBody: + description: 'Webhook payload containing information about the company deletion' + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyDeletedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: grease-monkeys + employee.created: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Employee Created' + description: "\nTriggered when a new employee is created.\n\n### Behavior & Constraints\n- **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern.\n- **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee.\n- **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions.\n\n### Deprecation Notice\n**Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development.\n\n**Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically.\n" + operationId: employee-created-webhook + requestBody: + description: 'Webhook payload containing information about the employee creation' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeCreatedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: plat-api + employee.deleted: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Employee Deleted' + description: "\nTriggered when an employee is deleted.\n\n### Behavior & Constraints\n- **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions.\n\n### Deprecation Notice\n**Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development.\n\n**Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically.\n" + operationId: employee-deleted-webhook + requestBody: + description: 'Webhook payload containing information about the employee deletion' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDeletedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: plat-api + employee.updated: + post: + tags: + - 'Webhook Events' + - 'Public API' + summary: 'Employee Updated' + description: "\nTriggered when an employee record is updated and at least one of the monitored fields has changed.\n\n### Behavior & Constraints\n- **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`.\n- **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed.\n\n### Detailed Description\n- **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern.\n- **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events.\n- **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created.\n- **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`.\n\n### Deprecation Notice\n**Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development.\n\n**Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically.\n" + operationId: employee-updated-webhook + requestBody: + description: 'Webhook payload containing information about the employee update' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeUpdatedWebhookPayload' + responses: + '200': + $ref: '#/components/responses/WebhookSuccessResponse' + '400': + $ref: '#/components/responses/WebhookClientErrorResponse' + '500': + $ref: '#/components/responses/WebhookServerErrorResponse' + x-team-name: plat-api diff --git a/.sdk-update/since-last-review.txt b/.sdk-update/since-last-review.txt new file mode 100644 index 00000000..55342b2a --- /dev/null +++ b/.sdk-update/since-last-review.txt @@ -0,0 +1,32 @@ + .openapi-generator/FILES | 32 +- + .sdk-update/analysis/breaking-output.txt | 2 +- + .sdk-update/analysis/changelog.json | 2 +- + .sdk-update/analysis/changelog.md | 6 +- + .sdk-update/metadata.json | 5 - + .sdk-update/pr-body.md | 643 --------------------- + .sdk-update/since-last-review.txt | 8 - + Makefile | 3 +- + README.md | 16 +- + docs/Api/CompensationPlanningApi.md | 16 +- + docs/Api/OnboardingApi.md | 4 +- + ...=> _1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md} | 4 +- + ...3a0206b8e2fb2d2dRequestBudgetBreakdownInner.md} | 2 +- + ...d64402ee192568adbd5e3179a91e6e2RequestInner.md} | 4 +- + ...d5e3179a91e6e2RequestInnerBudgetAllocations.md} | 2 +- + ...=> _288aa996aba16d7a495c62321ea999a9Request.md} | 4 +- + ...aba16d7a495c62321ea999a9RequestSentDateTime.md} | 2 +- + ...=> _3958585c861325ea7a2cd30a8c74f042Request.md} | 2 +- + ...=> _89a5068111ec499135c7d6e9a53d5a30Request.md} | 2 +- + lib/Api/CompensationPlanningApi.php | 30 +- + lib/Api/OnboardingApi.php | 10 +- + ...> _1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php} | 6 +- + ...a0206b8e2fb2d2dRequestBudgetBreakdownInner.php} | 6 +- + ...64402ee192568adbd5e3179a91e6e2RequestInner.php} | 6 +- + ...5e3179a91e6e2RequestInnerBudgetAllocations.php} | 6 +- + ...> _288aa996aba16d7a495c62321ea999a9Request.php} | 6 +- + ...ba16d7a495c62321ea999a9RequestSentDateTime.php} | 6 +- + ...> _3958585c861325ea7a2cd30a8c74f042Request.php} | 6 +- + ...> _89a5068111ec499135c7d6e9a53d5a30Request.php} | 6 +- + scripts/fix_invalid_class_names.php | 269 +++++++++ + specs/spec-source.json | 4 +- + 31 files changed, 367 insertions(+), 753 deletions(-) diff --git a/README.md b/README.md index ac787fee..86ac4330 100644 --- a/README.md +++ b/README.md @@ -265,208 +265,531 @@ All URIs are relative to *https://companySubDomain.bamboohr.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountInformationApi* | [**baa7162824294d030115568d1d8e6ca7**](docs/Api/AccountInformationApi.md#baa7162824294d030115568d1d8e6ca7) | **GET** /api/v1/meta/timezones/{id} | Get timezone by ID +*AccountInformationApi* | [**call10d66d8561dd7dac50ff9c21ef63d83b**](docs/Api/AccountInformationApi.md#call10d66d8561dd7dac50ff9c21ef63d83b) | **GET** /api/v1/meta/timezones/by-zip/{zip} | Get timezone by ZIP code +*AccountInformationApi* | [**call5c5fb0f1211ae1c9451753f92f1053b6**](docs/Api/AccountInformationApi.md#call5c5fb0f1211ae1c9451753f92f1053b6) | **GET** /api/v1/meta/timezones | List timezones +*AccountInformationApi* | [**getAllCurrencyTypes**](docs/Api/AccountInformationApi.md#getallcurrencytypes) | **GET** /api/v1/meta/currency/types | Get all currency types +*AccountInformationApi* | [**getAllProvinces**](docs/Api/AccountInformationApi.md#getallprovinces) | **GET** /api/v1/meta/provinces | Get All Provinces *AccountInformationApi* | [**getCountriesOptions**](docs/Api/AccountInformationApi.md#getcountriesoptions) | **GET** /api/v1/meta/countries/options | Get Countries -*AccountInformationApi* | [**getListOfUsers**](docs/Api/AccountInformationApi.md#getlistofusers) | **GET** /api/v1/meta/users | Get Users -*AccountInformationApi* | [**getStatesByCountryId**](docs/Api/AccountInformationApi.md#getstatesbycountryid) | **GET** /api/v1/meta/provinces/{countryId} | Get States by Country ID -*AccountInformationApi* | [**metadataAddOrUpdateValuesForListFields**](docs/Api/AccountInformationApi.md#metadataaddorupdatevaluesforlistfields) | **PUT** /api/v1/meta/lists/{listFieldId} | Create or Update List Field Values -*AccountInformationApi* | [**metadataGetAListOfFields**](docs/Api/AccountInformationApi.md#metadatagetalistoffields) | **GET** /api/v1/meta/fields | Get Fields -*AccountInformationApi* | [**metadataGetAListOfTabularFields**](docs/Api/AccountInformationApi.md#metadatagetalistoftabularfields) | **GET** /api/v1/meta/tables | Get Tabular Fields -*AccountInformationApi* | [**metadataGetDetailsForListFields**](docs/Api/AccountInformationApi.md#metadatagetdetailsforlistfields) | **GET** /api/v1/meta/lists | Get List Field Details -*ApplicantTrackingApi* | [**addNewCandidate**](docs/Api/ApplicantTrackingApi.md#addnewcandidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate -*ApplicantTrackingApi* | [**addNewJobOpening**](docs/Api/ApplicantTrackingApi.md#addnewjobopening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening +*AccountInformationApi* | [**getMetaCompany**](docs/Api/AccountInformationApi.md#getmetacompany) | **GET** /api/v1/meta/company | Get company properties +*AccountInformationApi* | [**getStatesByCountryId**](docs/Api/AccountInformationApi.md#getstatesbycountryid) | **GET** /api/v1/meta/provinces/{countryId} | List states and provinces for a country by Country ID +*AccountInformationApi* | [**listFields**](docs/Api/AccountInformationApi.md#listfields) | **GET** /api/v1/meta/fields | List Fields +*AccountInformationApi* | [**listListFields**](docs/Api/AccountInformationApi.md#listlistfields) | **GET** /api/v1/meta/lists | List List Fields +*AccountInformationApi* | [**listTabularFields**](docs/Api/AccountInformationApi.md#listtabularfields) | **GET** /api/v1/meta/tables | List Tabular Fields +*AccountInformationApi* | [**listUsers**](docs/Api/AccountInformationApi.md#listusers) | **GET** /api/v1/meta/users | List Users +*AccountInformationApi* | [**updateListFieldValues**](docs/Api/AccountInformationApi.md#updatelistfieldvalues) | **PUT** /api/v1/meta/lists/{listFieldId} | Update List Field Values +*AlertApi* | [**call0f0dcb585e5883175b6557c16cf6755a**](docs/Api/AlertApi.md#call0f0dcb585e5883175b6557c16cf6755a) | **GET** /api/v1/alerts | List alert templates +*AlertConfigurationsApi* | [**a05e93bc2eb9c39a40fbd71e6e07f3c6**](docs/Api/AlertConfigurationsApi.md#a05e93bc2eb9c39a40fbd71e6e07f3c6) | **POST** /api/v1/alert-configurations | Create an alert configuration +*AlertConfigurationsApi* | [**call14e66bfb5f075043221ce1e843c97493**](docs/Api/AlertConfigurationsApi.md#call14e66bfb5f075043221ce1e843c97493) | **GET** /api/v1/alert-configurations/{id} | Get an alert configuration +*AlertConfigurationsApi* | [**call6d0a073cbf3e97fe0409de42c68fe779**](docs/Api/AlertConfigurationsApi.md#call6d0a073cbf3e97fe0409de42c68fe779) | **GET** /api/v1/alert-configurations | List alert configurations +*AlertConfigurationsApi* | [**eb42aa2fa339ba5c08b147fc13c6a79e**](docs/Api/AlertConfigurationsApi.md#eb42aa2fa339ba5c08b147fc13c6a79e) | **PUT** /api/v1/alert-configurations/{id} | Update an alert configuration +*ApplicantTrackingApi* | [**createApplicationComment**](docs/Api/ApplicantTrackingApi.md#createapplicationcomment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment +*ApplicantTrackingApi* | [**createCandidate**](docs/Api/ApplicantTrackingApi.md#createcandidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate +*ApplicantTrackingApi* | [**createJobOpening**](docs/Api/ApplicantTrackingApi.md#createjobopening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening *ApplicantTrackingApi* | [**getApplicationDetails**](docs/Api/ApplicantTrackingApi.md#getapplicationdetails) | **GET** /api/v1/applicant_tracking/applications/{applicationId} | Get Job Application Details *ApplicantTrackingApi* | [**getApplications**](docs/Api/ApplicantTrackingApi.md#getapplications) | **GET** /api/v1/applicant_tracking/applications | Get Job Applications *ApplicantTrackingApi* | [**getCompanyLocations**](docs/Api/ApplicantTrackingApi.md#getcompanylocations) | **GET** /api/v1/applicant_tracking/locations | Get Company Locations *ApplicantTrackingApi* | [**getHiringLeads**](docs/Api/ApplicantTrackingApi.md#gethiringleads) | **GET** /api/v1/applicant_tracking/hiring_leads | Get Hiring Leads *ApplicantTrackingApi* | [**getJobSummaries**](docs/Api/ApplicantTrackingApi.md#getjobsummaries) | **GET** /api/v1/applicant_tracking/jobs | Get Job Summaries *ApplicantTrackingApi* | [**getStatuses**](docs/Api/ApplicantTrackingApi.md#getstatuses) | **GET** /api/v1/applicant_tracking/statuses | Get Applicant Statuses -*ApplicantTrackingApi* | [**postApplicantStatus**](docs/Api/ApplicantTrackingApi.md#postapplicantstatus) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status -*ApplicantTrackingApi* | [**postApplicationComment**](docs/Api/ApplicantTrackingApi.md#postapplicationcomment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment -*BenefitsApi* | [**addEmployeeDependent**](docs/Api/BenefitsApi.md#addemployeedependent) | **POST** /api/v1/employeedependents | Create Employee Dependent -*BenefitsApi* | [**getBenefitCoverages**](docs/Api/BenefitsApi.md#getbenefitcoverages) | **GET** /api/v1/benefitcoverages | Get Benefit Coverages -*BenefitsApi* | [**getBenefitDeductionTypes**](docs/Api/BenefitsApi.md#getbenefitdeductiontypes) | **GET** /api/v1/benefits/settings/deduction_types/all | Get Benefit Deduction Types +*ApplicantTrackingApi* | [**updateApplicantStatus**](docs/Api/ApplicantTrackingApi.md#updateapplicantstatus) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status +*BenefitsApi* | [**createEmployeeDependent**](docs/Api/BenefitsApi.md#createemployeedependent) | **POST** /api/v1/employeedependents | Create Employee Dependent *BenefitsApi* | [**getEmployeeDependent**](docs/Api/BenefitsApi.md#getemployeedependent) | **GET** /api/v1/employeedependents/{id} | Get Employee Dependent -*BenefitsApi* | [**getEmployeeDependents**](docs/Api/BenefitsApi.md#getemployeedependents) | **GET** /api/v1/employeedependents | Get Employee Dependents -*BenefitsApi* | [**getMemberBenefit**](docs/Api/BenefitsApi.md#getmemberbenefit) | **GET** /api/v1/benefit/member_benefit | Get Member Benefit Events +*BenefitsApi* | [**listBenefitCoverages**](docs/Api/BenefitsApi.md#listbenefitcoverages) | **GET** /api/v1/benefitcoverages | List Benefit Coverages +*BenefitsApi* | [**listBenefitDeductionTypes**](docs/Api/BenefitsApi.md#listbenefitdeductiontypes) | **GET** /api/v1/benefits/settings/deduction_types/all | List Benefit Deduction Types +*BenefitsApi* | [**listCompanyBenefits**](docs/Api/BenefitsApi.md#listcompanybenefits) | **GET** /api/v1/benefit/company_benefit | List Company Benefits +*BenefitsApi* | [**listEmployeeBenefits**](docs/Api/BenefitsApi.md#listemployeebenefits) | **GET** /api/v1/benefit/employee_benefit | List Employee Benefits +*BenefitsApi* | [**listEmployeeDependents**](docs/Api/BenefitsApi.md#listemployeedependents) | **GET** /api/v1/employeedependents | List Employee Dependents +*BenefitsApi* | [**listMemberBenefitEvents**](docs/Api/BenefitsApi.md#listmemberbenefitevents) | **GET** /api/v1/benefit/member_benefit | List Member Benefit Events +*BenefitsApi* | [**listMemberBenefits**](docs/Api/BenefitsApi.md#listmemberbenefits) | **GET** /api/v1/benefits/member-benefits | List Member Benefits *BenefitsApi* | [**updateEmployeeDependent**](docs/Api/BenefitsApi.md#updateemployeedependent) | **PUT** /api/v1/employeedependents/{id} | Update Employee Dependent -*CompanyFilesApi* | [**addCompanyFileCategory**](docs/Api/CompanyFilesApi.md#addcompanyfilecategory) | **POST** /api/v1/files/categories | Create Company File Category +*CompanyApi* | [**putCompanyIndustryCodes**](docs/Api/CompanyApi.md#putcompanyindustrycodes) | **PUT** /api/v1/company-profile-data/industry-codes | Update Company Industry Codes +*CompanyFilesApi* | [**createCompanyFileCategory**](docs/Api/CompanyFilesApi.md#createcompanyfilecategory) | **POST** /api/v1/files/categories | Create Company File Category *CompanyFilesApi* | [**deleteCompanyFile**](docs/Api/CompanyFilesApi.md#deletecompanyfile) | **DELETE** /api/v1/files/{fileId} | Delete Company File *CompanyFilesApi* | [**getCompanyFile**](docs/Api/CompanyFilesApi.md#getcompanyfile) | **GET** /api/v1/files/{fileId} | Get Company File *CompanyFilesApi* | [**listCompanyFiles**](docs/Api/CompanyFilesApi.md#listcompanyfiles) | **GET** /api/v1/files/view | Get Company Files and Categories *CompanyFilesApi* | [**updateCompanyFile**](docs/Api/CompanyFilesApi.md#updatecompanyfile) | **POST** /api/v1/files/{fileId} | Update Company File *CompanyFilesApi* | [**uploadCompanyFile**](docs/Api/CompanyFilesApi.md#uploadcompanyfile) | **POST** /api/v1/files | Upload Company File -*CustomReportsApi* | [**getByReportId**](docs/Api/CustomReportsApi.md#getbyreportid) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID -*CustomReportsApi* | [**listReports**](docs/Api/CustomReportsApi.md#listreports) | **GET** /api/v1/custom-reports | Get Reports -*DatasetsApi* | [**getDataFromDataset**](docs/Api/DatasetsApi.md#getdatafromdataset) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset -*DatasetsApi* | [**getDatasets**](docs/Api/DatasetsApi.md#getdatasets) | **GET** /api/v1/datasets | Get Datasets -*DatasetsApi* | [**getFieldOptions**](docs/Api/DatasetsApi.md#getfieldoptions) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options -*DatasetsApi* | [**getFieldsFromDataset**](docs/Api/DatasetsApi.md#getfieldsfromdataset) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset -*EmployeeFilesApi* | [**addEmployeeFileCategory**](docs/Api/EmployeeFilesApi.md#addemployeefilecategory) | **POST** /api/v1/employees/files/categories | Create Employee File Category +*CompanyProfileApi* | [**getCompanyProfileIntegrations**](docs/Api/CompanyProfileApi.md#getcompanyprofileintegrations) | **GET** /api/v1/company-profile-integrations | Get Company Profile Integrations +*CompanyProfileApi* | [**patchCompanyProfileCompanyInformation**](docs/Api/CompanyProfileApi.md#patchcompanyprofilecompanyinformation) | **PATCH** /api/v1/company-profile-data/company-information | Update company information (phone, address, legal name) +*CompanyProfileApi* | [**putCompanyProfileDisplayName**](docs/Api/CompanyProfileApi.md#putcompanyprofiledisplayname) | **PUT** /api/v1/company-profile-data/display-name | Update company display name +*CompensationApi* | [**c5880b509783cd9d7fce9ddf5d6af1be**](docs/Api/CompensationApi.md#c5880b509783cd9d7fce9ddf5d6af1be) | **PUT** /api/v1/compensation/equity/settings | Update company equity settings +*CompensationApi* | [**call9f398e2652ea47a6dc5121ce5184222a**](docs/Api/CompensationApi.md#call9f398e2652ea47a6dc5121ce5184222a) | **GET** /api/v1/compensation/tools | List available compensation tools +*CompensationApi* | [**db49fb29f9f04d59afad7c01ce860418**](docs/Api/CompensationApi.md#db49fb29f9f04d59afad7c01ce860418) | **GET** /api/v1/compensation/equity/settings | Get company equity settings +*CompensationBenchmarkingApi* | [**createCompensationBenchmark**](docs/Api/CompensationBenchmarkingApi.md#createcompensationbenchmark) | **POST** /api/v1/compensation/benchmarks | Create Compensation Benchmark +*CompensationBenchmarkingApi* | [**createCompensationBenchmarkSource**](docs/Api/CompensationBenchmarkingApi.md#createcompensationbenchmarksource) | **POST** /api/v1/compensation/benchmarks/sources | Create Compensation Benchmark Source +*CompensationBenchmarkingApi* | [**deleteCompensationBenchmark**](docs/Api/CompensationBenchmarkingApi.md#deletecompensationbenchmark) | **DELETE** /api/v1/compensation/benchmarks/{id} | Delete Compensation Benchmark +*CompensationBenchmarkingApi* | [**deleteCompensationBenchmarkSource**](docs/Api/CompensationBenchmarkingApi.md#deletecompensationbenchmarksource) | **DELETE** /api/v1/compensation/benchmarks/sources | Delete Compensation Benchmark Source +*CompensationBenchmarkingApi* | [**exportCompensationBenchmarkDetails**](docs/Api/CompensationBenchmarkingApi.md#exportcompensationbenchmarkdetails) | **GET** /api/v1/compensation/benchmarks/details/export | Export Compensation Benchmark Details +*CompensationBenchmarkingApi* | [**getCompensationBenchmarkDetails**](docs/Api/CompensationBenchmarkingApi.md#getcompensationbenchmarkdetails) | **GET** /api/v1/compensation/benchmarks/details | Get Compensation Benchmark Details +*CompensationBenchmarkingApi* | [**importCompensationBenchmarks**](docs/Api/CompensationBenchmarkingApi.md#importcompensationbenchmarks) | **POST** /api/v1/compensation/benchmarks/import | Import Compensation Benchmarks From CSV +*CompensationBenchmarkingApi* | [**listCompensationBenchmarkSources**](docs/Api/CompensationBenchmarkingApi.md#listcompensationbenchmarksources) | **GET** /api/v1/compensation/benchmarks/sources | List Compensation Benchmark Sources +*CompensationBenchmarkingApi* | [**listCompensationBenchmarks**](docs/Api/CompensationBenchmarkingApi.md#listcompensationbenchmarks) | **GET** /api/v1/compensation/benchmarks | List Compensation Benchmarks +*CompensationBenchmarkingApi* | [**updateCompensationBenchmark**](docs/Api/CompensationBenchmarkingApi.md#updatecompensationbenchmark) | **PUT** /api/v1/compensation/benchmarks | Update Compensation Benchmark +*CompensationBenchmarkingApi* | [**updateCompensationBenchmarkSources**](docs/Api/CompensationBenchmarkingApi.md#updatecompensationbenchmarksources) | **PUT** /api/v1/compensation/benchmarks/sources | Update Compensation Benchmark Sources +*CompensationPlanningApi* | [**a05b6d5f564f805d688ff2c1e37c3990**](docs/Api/CompensationPlanningApi.md#a05b6d5f564f805d688ff2c1e37c3990) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations/send | Send recommendations to next stage +*CompensationPlanningApi* | [**a6b8da1348a3151fe95adc03aaf64447**](docs/Api/CompensationPlanningApi.md#a6b8da1348a3151fe95adc03aaf64447) | **GET** /api/v1/compensation/planning_cycles/{id}/employees | List employees in compensation planning cycle +*CompensationPlanningApi* | [**b1e467e0eef72350eec61fcfeaf4e19d**](docs/Api/CompensationPlanningApi.md#b1e467e0eef72350eec61fcfeaf4e19d) | **DELETE** /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} | Remove from approval flow +*CompensationPlanningApi* | [**b3c51254de6918637a971fe4af382a53**](docs/Api/CompensationPlanningApi.md#b3c51254de6918637a971fe4af382a53) | **GET** /api/v1/compensation/planning_cycles/{id}/admins | List compensation planning cycle admins +*CompensationPlanningApi* | [**b65f246186b41a9783a9397c11c703b4**](docs/Api/CompensationPlanningApi.md#b65f246186b41a9783a9397c11c703b4) | **GET** /api/v1/compensation/planning_cycles | List compensation planning cycles +*CompensationPlanningApi* | [**c79f9c5950f983e59d2626faa30c00a1**](docs/Api/CompensationPlanningApi.md#c79f9c5950f983e59d2626faa30c00a1) | **PUT** /api/v1/compensation/planning_cycles/{id}/change_comm/template | Save change comm template +*CompensationPlanningApi* | [**c7c32ed5278ac67e2e518bf7484a75dc**](docs/Api/CompensationPlanningApi.md#c7c32ed5278ac67e2e518bf7484a75dc) | **POST** /api/v1/compensation/planning_cycles/{id}/admins | Add cycle admins +*CompensationPlanningApi* | [**call100b0cf8c5207b35697ff10370fd5fe1**](docs/Api/CompensationPlanningApi.md#call100b0cf8c5207b35697ff10370fd5fe1) | **PUT** /api/v1/compensation/planning_cycles/{id} | Update compensation planning cycle +*CompensationPlanningApi* | [**call1d1fc0f164cb51973a0206b8e2fb2d2d**](docs/Api/CompensationPlanningApi.md#call1d1fc0f164cb51973a0206b8e2fb2d2d) | **POST** /api/v1/compensation/planning_cycles/{id}/budgets/import | Import budget breakdown +*CompensationPlanningApi* | [**call1d64402ee192568adbd5e3179a91e6e2**](docs/Api/CompensationPlanningApi.md#call1d64402ee192568adbd5e3179a91e6e2) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/breakdown | Save budget breakdown +*CompensationPlanningApi* | [**call22ad75be25455279e2987c80851af5fc**](docs/Api/CompensationPlanningApi.md#call22ad75be25455279e2987c80851af5fc) | **DELETE** /api/v1/compensation/planning_cycles/{id} | Delete compensation planning cycle +*CompensationPlanningApi* | [**call329acecaa6df729733d0752aa9f6b204**](docs/Api/CompensationPlanningApi.md#call329acecaa6df729733d0752aa9f6b204) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet | Get compensation planning cycle worksheet +*CompensationPlanningApi* | [**call3958585c861325ea7a2cd30a8c74f042**](docs/Api/CompensationPlanningApi.md#call3958585c861325ea7a2cd30a8c74f042) | **POST** /api/v1/compensation/planning_cycles/{id}/employees | Add employees to cycle +*CompensationPlanningApi* | [**call3a19f07aa737dc826ba43b9a1c1cd257**](docs/Api/CompensationPlanningApi.md#call3a19f07aa737dc826ba43b9a1c1cd257) | **PUT** /api/v1/compensation/planning_cycles/{id}/launch | Launch compensation planning cycle +*CompensationPlanningApi* | [**call4e886b18264480611f380805301c49c4**](docs/Api/CompensationPlanningApi.md#call4e886b18264480611f380805301c49c4) | **GET** /api/v1/compensation/planning_cycles/{id}/approvals | Get compensation planning approval flows +*CompensationPlanningApi* | [**call593d5bff120edf2a218a92022a682728**](docs/Api/CompensationPlanningApi.md#call593d5bff120edf2a218a92022a682728) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet/export | Export compensation planning cycle worksheet to CSV +*CompensationPlanningApi* | [**call5c2b55158b0950b1e9211655666645b6**](docs/Api/CompensationPlanningApi.md#call5c2b55158b0950b1e9211655666645b6) | **GET** /api/v1/compensation/planning_cycles/{id} | Get compensation planning cycle details +*CompensationPlanningApi* | [**call5c4aab35a34f5760ec044104b5232bf5**](docs/Api/CompensationPlanningApi.md#call5c4aab35a34f5760ec044104b5232bf5) | **POST** /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} | Set final approver +*CompensationPlanningApi* | [**call7efceaee2c010f88244dd01ee81e6e7b**](docs/Api/CompensationPlanningApi.md#call7efceaee2c010f88244dd01ee81e6e7b) | **GET** /api/v1/compensation/planning_cycles/{id}/budgets | Get compensation planning cycle budgets +*CompensationPlanningApi* | [**call89a5068111ec499135c7d6e9a53d5a30**](docs/Api/CompensationPlanningApi.md#call89a5068111ec499135c7d6e9a53d5a30) | **DELETE** /api/v1/compensation/planning_cycles/{id}/employees | Remove employees from cycle +*CompensationPlanningApi* | [**call9bc279d788f6e86b4cd8b2e0d3de91b1**](docs/Api/CompensationPlanningApi.md#call9bc279d788f6e86b4cd8b2e0d3de91b1) | **GET** /api/v1/compensation/planning_cycles/{id}/summary | Get compensation planning cycle summary +*CompensationPlanningApi* | [**cf87b8e09a001b6fb81dfce6c20ab9e3**](docs/Api/CompensationPlanningApi.md#cf87b8e09a001b6fb81dfce6c20ab9e3) | **PUT** /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} | Update approval flow +*CompensationPlanningApi* | [**d6987e300672a00c7cfe59afebb64156**](docs/Api/CompensationPlanningApi.md#d6987e300672a00c7cfe59afebb64156) | **GET** /api/v1/compensation/planning_cycles/{id}/change_comm | Get change communication letter details +*CompensationPlanningApi* | [**dacd313af2106213fc4696175941ce65**](docs/Api/CompensationPlanningApi.md#dacd313af2106213fc4696175941ce65) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/guidelines | Save budget guidelines +*CompensationPlanningApi* | [**e2ac4e1535f296cb8901f209e04caa83**](docs/Api/CompensationPlanningApi.md#e2ac4e1535f296cb8901f209e04caa83) | **POST** /api/v1/compensation/planning_cycles | Create compensation planning cycle +*CompensationPlanningApi* | [**ef7619b0ee4c8dc079aaea870cfbe81b**](docs/Api/CompensationPlanningApi.md#ef7619b0ee4c8dc079aaea870cfbe81b) | **DELETE** /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} | Remove cycle admin +*CompensationPlanningApi* | [**f3883a522dadbe9e11b34f8b656e3adb**](docs/Api/CompensationPlanningApi.md#f3883a522dadbe9e11b34f8b656e3adb) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations | Save recommendations +*CompensationPlanningApi* | [**f4b431363af6573af46750f32632e88b**](docs/Api/CompensationPlanningApi.md#f4b431363af6573af46750f32632e88b) | **PUT** /api/v1/compensation/planning_cycles/{id}/complete | Complete compensation planning cycle +*CustomReportsApi* | [**getReportById**](docs/Api/CustomReportsApi.md#getreportbyid) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID +*CustomReportsApi* | [**listReports**](docs/Api/CustomReportsApi.md#listreports) | **GET** /api/v1/custom-reports | List Reports +*DatasetsApi* | [**getDataFromDatasetV1**](docs/Api/DatasetsApi.md#getdatafromdatasetv1) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset (v1) +*DatasetsApi* | [**getDataFromDatasetV2**](docs/Api/DatasetsApi.md#getdatafromdatasetv2) | **POST** /api/v2/datasets/{datasetName}/data | Get Data from Dataset (v2) +*DatasetsApi* | [**getFieldOptionsV1**](docs/Api/DatasetsApi.md#getfieldoptionsv1) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options (v1) +*DatasetsApi* | [**getFieldOptionsV12**](docs/Api/DatasetsApi.md#getfieldoptionsv12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options (v1.2) +*DatasetsApi* | [**getFieldsFromDatasetV1**](docs/Api/DatasetsApi.md#getfieldsfromdatasetv1) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset (v1) +*DatasetsApi* | [**getFieldsFromDatasetV12**](docs/Api/DatasetsApi.md#getfieldsfromdatasetv12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset (v1.2) +*DatasetsApi* | [**listDatasetsV1**](docs/Api/DatasetsApi.md#listdatasetsv1) | **GET** /api/v1/datasets | List Datasets (v1) +*DatasetsApi* | [**listDatasetsV12**](docs/Api/DatasetsApi.md#listdatasetsv12) | **GET** /api/v1_2/datasets | List Datasets (v1.2) +*EmployeeFilesApi* | [**createEmployeeFileCategory**](docs/Api/EmployeeFilesApi.md#createemployeefilecategory) | **POST** /api/v1/employees/files/categories | Create Employee File Category *EmployeeFilesApi* | [**deleteEmployeeFile**](docs/Api/EmployeeFilesApi.md#deleteemployeefile) | **DELETE** /api/v1/employees/{id}/files/{fileId} | Delete Employee File *EmployeeFilesApi* | [**getEmployeeFile**](docs/Api/EmployeeFilesApi.md#getemployeefile) | **GET** /api/v1/employees/{id}/files/{fileId} | Get Employee File -*EmployeeFilesApi* | [**listEmployeeFiles**](docs/Api/EmployeeFilesApi.md#listemployeefiles) | **GET** /api/v1/employees/{id}/files/view | Get Employee Files and Categories +*EmployeeFilesApi* | [**listEmployeeFiles**](docs/Api/EmployeeFilesApi.md#listemployeefiles) | **GET** /api/v1/employees/{id}/files/view | List Employee Files *EmployeeFilesApi* | [**updateEmployeeFile**](docs/Api/EmployeeFilesApi.md#updateemployeefile) | **POST** /api/v1/employees/{id}/files/{fileId} | Update Employee File *EmployeeFilesApi* | [**uploadEmployeeFile**](docs/Api/EmployeeFilesApi.md#uploademployeefile) | **POST** /api/v1/employees/{id}/files | Upload Employee File -*EmployeesApi* | [**addEmployee**](docs/Api/EmployeesApi.md#addemployee) | **POST** /api/v1/employees | Create Employee +*EmployeeVerificationApi* | [**getEmployeeVerificationIntegration**](docs/Api/EmployeeVerificationApi.md#getemployeeverificationintegration) | **GET** /api/v1/employee-verifications/integration | Get employee verification integration status +*EmployeeVerificationApi* | [**listEmployeeVerificationsByEmployee**](docs/Api/EmployeeVerificationApi.md#listemployeeverificationsbyemployee) | **GET** /api/v1/employee-verifications/employees/{employeeId} | List employee verification records for an employee +*EmployeeVerificationApi* | [**sendEmployeeVerificationLifecycleEmailByUser**](docs/Api/EmployeeVerificationApi.md#sendemployeeverificationlifecycleemailbyuser) | **POST** /api/v1/employee-verifications/users/{userId}/send-email | Send employee verification lifecycle email by user and email type +*EmployeeVerificationApi* | [**updateEmployeeVerification**](docs/Api/EmployeeVerificationApi.md#updateemployeeverification) | **PUT** /api/v1/employee-verifications/employees/{employeeId}/{verificationId} | Update an employee verification record +*EmployeeVerificationApi* | [**updateEmployeeVerificationIntegration**](docs/Api/EmployeeVerificationApi.md#updateemployeeverificationintegration) | **PUT** /api/v1/employee-verifications/integration | Enable or disable the employee verification integration +*EmployeesApi* | [**createEmployee**](docs/Api/EmployeesApi.md#createemployee) | **POST** /api/v1/employees | Create Employee +*EmployeesApi* | [**deleteEmployee**](docs/Api/EmployeesApi.md#deleteemployee) | **DELETE** /api/v1/employees/{id} | Delete employee *EmployeesApi* | [**getCompanyInformation**](docs/Api/EmployeesApi.md#getcompanyinformation) | **GET** /api/v1/company_information | Get Company Information *EmployeesApi* | [**getEmployee**](docs/Api/EmployeesApi.md#getemployee) | **GET** /api/v1/employees/{id} | Get Employee -*EmployeesApi* | [**getEmployeesDirectory**](docs/Api/EmployeesApi.md#getemployeesdirectory) | **GET** /api/v1/employees/directory | Get Employee Directory -*EmployeesApi* | [**getEmployeesList**](docs/Api/EmployeesApi.md#getemployeeslist) | **GET** /api/v1/employees | Get Employees +*EmployeesApi* | [**getEmployeesDirectory**](docs/Api/EmployeesApi.md#getemployeesdirectory) | **GET** /api/v1/employees/directory | Get Employees Directory +*EmployeesApi* | [**listEmployees**](docs/Api/EmployeesApi.md#listemployees) | **GET** /api/v1/employees | List Employees *EmployeesApi* | [**updateEmployee**](docs/Api/EmployeesApi.md#updateemployee) | **POST** /api/v1/employees/{id} | Update Employee +*GoalsApi* | [**closeGoal**](docs/Api/GoalsApi.md#closegoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal +*GoalsApi* | [**createGoal**](docs/Api/GoalsApi.md#creategoal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal +*GoalsApi* | [**createGoalComment**](docs/Api/GoalsApi.md#creategoalcomment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment *GoalsApi* | [**deleteGoal**](docs/Api/GoalsApi.md#deletegoal) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Delete Goal *GoalsApi* | [**deleteGoalComment**](docs/Api/GoalsApi.md#deletegoalcomment) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Delete Goal Comment -*GoalsApi* | [**getCanCreateGoal**](docs/Api/GoalsApi.md#getcancreategoal) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Check Goal Creation Permission +*GoalsApi* | [**getAlignableGoalOptions**](docs/Api/GoalsApi.md#getalignablegoaloptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options *GoalsApi* | [**getGoalAggregate**](docs/Api/GoalsApi.md#getgoalaggregate) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate | Get Goal Aggregate -*GoalsApi* | [**getGoalComments**](docs/Api/GoalsApi.md#getgoalcomments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Get Goal Comments -*GoalsApi* | [**getGoals**](docs/Api/GoalsApi.md#getgoals) | **GET** /api/v1/performance/employees/{employeeId}/goals | Get Goals -*GoalsApi* | [**getGoalsAggregateV1**](docs/Api/GoalsApi.md#getgoalsaggregatev1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate -*GoalsApi* | [**getGoalsAggregateV11**](docs/Api/GoalsApi.md#getgoalsaggregatev11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.1 -*GoalsApi* | [**getGoalsAggregateV12**](docs/Api/GoalsApi.md#getgoalsaggregatev12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.2 -*GoalsApi* | [**getGoalsAlignmentOptions**](docs/Api/GoalsApi.md#getgoalsalignmentoptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options -*GoalsApi* | [**getGoalsFiltersV1**](docs/Api/GoalsApi.md#getgoalsfiltersv1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters -*GoalsApi* | [**getGoalsFiltersV11**](docs/Api/GoalsApi.md#getgoalsfiltersv11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters v1.1 -*GoalsApi* | [**getGoalsFiltersV12**](docs/Api/GoalsApi.md#getgoalsfiltersv12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Status Counts v1.2 -*GoalsApi* | [**getGoalsShareOptions**](docs/Api/GoalsApi.md#getgoalsshareoptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | Get Available Goal Sharing Options -*GoalsApi* | [**postCloseGoal**](docs/Api/GoalsApi.md#postclosegoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal -*GoalsApi* | [**postGoal**](docs/Api/GoalsApi.md#postgoal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal -*GoalsApi* | [**postGoalComment**](docs/Api/GoalsApi.md#postgoalcomment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment -*GoalsApi* | [**postReopenGoal**](docs/Api/GoalsApi.md#postreopengoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal -*GoalsApi* | [**putGoalComment**](docs/Api/GoalsApi.md#putgoalcomment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment -*GoalsApi* | [**putGoalMilestoneProgress**](docs/Api/GoalsApi.md#putgoalmilestoneprogress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress -*GoalsApi* | [**putGoalProgress**](docs/Api/GoalsApi.md#putgoalprogress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress -*GoalsApi* | [**putGoalSharedWith**](docs/Api/GoalsApi.md#putgoalsharedwith) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing -*GoalsApi* | [**putGoalV1**](docs/Api/GoalsApi.md#putgoalv1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal -*GoalsApi* | [**putGoalV11**](docs/Api/GoalsApi.md#putgoalv11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal v1.1 -*HoursApi* | [**addTimeTrackingBulk**](docs/Api/HoursApi.md#addtimetrackingbulk) | **POST** /api/v1/timetracking/record | Create or Update Hour Records -*HoursApi* | [**addTimeTrackingHourRecord**](docs/Api/HoursApi.md#addtimetrackinghourrecord) | **POST** /api/v1/timetracking/add | Create Hour Record -*HoursApi* | [**deleteTimeTrackingById**](docs/Api/HoursApi.md#deletetimetrackingbyid) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record -*HoursApi* | [**editTimeTrackingRecord**](docs/Api/HoursApi.md#edittimetrackingrecord) | **PUT** /api/v1/timetracking/adjust | Update Hour Record -*HoursApi* | [**getTimeTrackingRecord**](docs/Api/HoursApi.md#gettimetrackingrecord) | **GET** /api/v1/timetracking/record/{id} | Get Hour Record -*LastChangeInformationApi* | [**getChangedEmployeeIds**](docs/Api/LastChangeInformationApi.md#getchangedemployeeids) | **GET** /api/v1/employees/changed | Get Updated Employee IDs -*LoginApi* | [**login**](docs/Api/LoginApi.md#login) | **POST** /api/v1/login | User Login +*GoalsApi* | [**getGoalCreationPermission**](docs/Api/GoalsApi.md#getgoalcreationpermission) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Get Goal Creation Permission +*GoalsApi* | [**getGoalsAggregateV1**](docs/Api/GoalsApi.md#getgoalsaggregatev1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1) +*GoalsApi* | [**getGoalsAggregateV11**](docs/Api/GoalsApi.md#getgoalsaggregatev11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.1) +*GoalsApi* | [**getGoalsAggregateV12**](docs/Api/GoalsApi.md#getgoalsaggregatev12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.2) +*GoalsApi* | [**getGoalsFiltersV1**](docs/Api/GoalsApi.md#getgoalsfiltersv1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1) +*GoalsApi* | [**getGoalsFiltersV11**](docs/Api/GoalsApi.md#getgoalsfiltersv11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.1) +*GoalsApi* | [**getGoalsFiltersV12**](docs/Api/GoalsApi.md#getgoalsfiltersv12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.2) +*GoalsApi* | [**listGoalComments**](docs/Api/GoalsApi.md#listgoalcomments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | List Goal Comments +*GoalsApi* | [**listGoalShareOptions**](docs/Api/GoalsApi.md#listgoalshareoptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | List Goal Sharing Options +*GoalsApi* | [**listGoals**](docs/Api/GoalsApi.md#listgoals) | **GET** /api/v1/performance/employees/{employeeId}/goals | List Goals +*GoalsApi* | [**reopenGoal**](docs/Api/GoalsApi.md#reopengoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal +*GoalsApi* | [**updateGoalComment**](docs/Api/GoalsApi.md#updategoalcomment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment +*GoalsApi* | [**updateGoalMilestoneProgress**](docs/Api/GoalsApi.md#updategoalmilestoneprogress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress +*GoalsApi* | [**updateGoalProgress**](docs/Api/GoalsApi.md#updategoalprogress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress +*GoalsApi* | [**updateGoalSharing**](docs/Api/GoalsApi.md#updategoalsharing) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing +*GoalsApi* | [**updateGoalV1**](docs/Api/GoalsApi.md#updategoalv1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1) +*GoalsApi* | [**updateGoalV11**](docs/Api/GoalsApi.md#updategoalv11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) +*HoursApi* | [**createOrUpdateTimeTrackingHourRecords**](docs/Api/HoursApi.md#createorupdatetimetrackinghourrecords) | **POST** /api/v1/timetracking/record | Create or Update Hour Records +*HoursApi* | [**createTimeTrackingHourRecord**](docs/Api/HoursApi.md#createtimetrackinghourrecord) | **POST** /api/v1/timetracking/add | Create Hour Record +*HoursApi* | [**deleteTimeTrackingHourRecord**](docs/Api/HoursApi.md#deletetimetrackinghourrecord) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record +*HoursApi* | [**getTimeTrackingRecord**](docs/Api/HoursApi.md#gettimetrackingrecord) | **GET** /api/v1/timetracking/record/{id} | Get Time Tracking Record +*HoursApi* | [**updateTimeTrackingRecord**](docs/Api/HoursApi.md#updatetimetrackingrecord) | **PUT** /api/v1/timetracking/adjust | Update Hour Record +*LastChangeInformationApi* | [**getChangedEmployeeIds**](docs/Api/LastChangeInformationApi.md#getchangedemployeeids) | **GET** /api/v1/employees/changed | Get Changed Employee IDs +*LocationsApi* | [**createLocation**](docs/Api/LocationsApi.md#createlocation) | **POST** /api/v1/hris/org/locations | Create a job location +*LocationsApi* | [**deleteLocation**](docs/Api/LocationsApi.md#deletelocation) | **DELETE** /api/v1/hris/org/locations/{id} | Delete a job location +*LocationsApi* | [**getLocation**](docs/Api/LocationsApi.md#getlocation) | **GET** /api/v1/hris/org/locations/{id} | Get a job location +*LocationsApi* | [**getLocations**](docs/Api/LocationsApi.md#getlocations) | **GET** /api/v1/hris/org/locations | List job locations +*LocationsApi* | [**updateLocation**](docs/Api/LocationsApi.md#updatelocation) | **PUT** /api/v1/hris/org/locations/{id} | Update a job location +*LoginApi* | [**login**](docs/Api/LoginApi.md#login) | **POST** /api/v1/login | Login +*OnboardingApi* | [**caa7fc488bcfaef14125398f2ebb987d**](docs/Api/OnboardingApi.md#caa7fc488bcfaef14125398f2ebb987d) | **DELETE** /api/v1/new-hire-packets/{id} | Delete new hire packet +*OnboardingApi* | [**call0158de7cde2a4c4cf577f0b25070d809**](docs/Api/OnboardingApi.md#call0158de7cde2a4c4cf577f0b25070d809) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences | List employee onboarding experiences +*OnboardingApi* | [**call044949386f2d655c6a627ef53f9434b7**](docs/Api/OnboardingApi.md#call044949386f2d655c6a627ef53f9434b7) | **GET** /api/v1/onboarding/new-hire-widget | Get welcome new hires widget +*OnboardingApi* | [**call19c7e26a1347ae7eb22919e9b0595c19**](docs/Api/OnboardingApi.md#call19c7e26a1347ae7eb22919e9b0595c19) | **POST** /api/v1/new-hire-packets/{id}/cancel | Cancel new hire packet +*OnboardingApi* | [**call1ab0279d46023eb951a434f24df885f1**](docs/Api/OnboardingApi.md#call1ab0279d46023eb951a434f24df885f1) | **PUT** /api/v1/new-hire-packets/{id} | Update new hire packet +*OnboardingApi* | [**call288aa996aba16d7a495c62321ea999a9**](docs/Api/OnboardingApi.md#call288aa996aba16d7a495c62321ea999a9) | **POST** /api/v1/employees/{employeeId}/onboarding-experiences | Create employee onboarding experience +*OnboardingApi* | [**call696f0a229cdde60b733568e3c4d043d9**](docs/Api/OnboardingApi.md#call696f0a229cdde60b733568e3c4d043d9) | **GET** /api/v1/new-hire-packets/{id} | Get new hire packet by id +*OnboardingApi* | [**call847dd061d1d1859e7ce8cb3adfc9faf2**](docs/Api/OnboardingApi.md#call847dd061d1d1859e7ce8cb3adfc9faf2) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId} | Get employee onboarding experience by id +*OnboardingApi* | [**ec1ba8e76f33960b018d0d7518fe97b5**](docs/Api/OnboardingApi.md#ec1ba8e76f33960b018d0d7518fe97b5) | **POST** /api/v1/new-hire-packets | Create new hire packet +*OnboardingApi* | [**f44b802c30cdea2b9076b3f82f99c74d**](docs/Api/OnboardingApi.md#f44b802c30cdea2b9076b3f82f99c74d) | **GET** /api/v1/new-hire-packets | List new hire packets +*OnboardingApi* | [**f49b0f1f2fb1ef2c408ba12916ee9baa**](docs/Api/OnboardingApi.md#f49b0f1f2fb1ef2c408ba12916ee9baa) | **POST** /api/v1/new-hire-packets/{id}/send | Send new hire packet +*OnboardingApi* | [**updateNewHirePacketGtkyAnswerVisibility**](docs/Api/OnboardingApi.md#updatenewhirepacketgtkyanswervisibility) | **PUT** /api/v1/new-hire-packets/{id}/question-visibility | Update GTKY answer visibility for a new hire packet *PhotosApi* | [**getEmployeePhoto**](docs/Api/PhotosApi.md#getemployeephoto) | **GET** /api/v1/employees/{employeeId}/photo/{size} | Get Employee Photo *PhotosApi* | [**uploadEmployeePhoto**](docs/Api/PhotosApi.md#uploademployeephoto) | **POST** /api/v1/employees/{employeeId}/photo | Upload Employee Photo *ReportsApi* | [**getCompanyReport**](docs/Api/ReportsApi.md#getcompanyreport) | **GET** /api/v1/reports/{id} | Get Company Report *ReportsApi* | [**requestCustomReport**](docs/Api/ReportsApi.md#requestcustomreport) | **POST** /api/v1/reports/custom | Request Custom Report -*TabularDataApi* | [**addEmployeeTableRow**](docs/Api/TabularDataApi.md#addemployeetablerow) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row -*TabularDataApi* | [**addEmployeeTableRowV1**](docs/Api/TabularDataApi.md#addemployeetablerowv1) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 -*TabularDataApi* | [**deleteEmployeeTableRowV1**](docs/Api/TabularDataApi.md#deleteemployeetablerowv1) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Table Row +*SchedulingApi* | [**schedulingCreateSchedule**](docs/Api/SchedulingApi.md#schedulingcreateschedule) | **POST** /api/v1/scheduling/schedules | Create Schedule +*SchedulingApi* | [**schedulingCreateShift**](docs/Api/SchedulingApi.md#schedulingcreateshift) | **POST** /api/v1/scheduling/shifts | Create Shift +*SchedulingApi* | [**schedulingDeleteSchedule**](docs/Api/SchedulingApi.md#schedulingdeleteschedule) | **DELETE** /api/v1/scheduling/schedules/{id} | Delete Schedule +*SchedulingApi* | [**schedulingDeleteShift**](docs/Api/SchedulingApi.md#schedulingdeleteshift) | **DELETE** /api/v1/scheduling/shifts/{id} | Delete Shift +*SchedulingApi* | [**schedulingGetSchedule**](docs/Api/SchedulingApi.md#schedulinggetschedule) | **GET** /api/v1/scheduling/schedules/{id} | Get Schedule +*SchedulingApi* | [**schedulingGetSchedulePdf**](docs/Api/SchedulingApi.md#schedulinggetschedulepdf) | **GET** /api/v1/scheduling/schedules/{id}/pdf | Get Schedule PDF +*SchedulingApi* | [**schedulingGetShift**](docs/Api/SchedulingApi.md#schedulinggetshift) | **GET** /api/v1/scheduling/shifts/{id} | Get Shift +*SchedulingApi* | [**schedulingListSchedules**](docs/Api/SchedulingApi.md#schedulinglistschedules) | **GET** /api/v1/scheduling/schedules | List Schedules +*SchedulingApi* | [**schedulingListShifts**](docs/Api/SchedulingApi.md#schedulinglistshifts) | **GET** /api/v1/scheduling/shifts | List Shifts +*SchedulingApi* | [**schedulingListTimezones**](docs/Api/SchedulingApi.md#schedulinglisttimezones) | **GET** /api/v1/scheduling/timezones | List Timezones +*SchedulingApi* | [**schedulingPublishShifts**](docs/Api/SchedulingApi.md#schedulingpublishshifts) | **POST** /api/v1/scheduling/shifts/publish | Publish Shifts +*SchedulingApi* | [**schedulingUpdateSchedule**](docs/Api/SchedulingApi.md#schedulingupdateschedule) | **PATCH** /api/v1/scheduling/schedules/{id} | Update Schedule +*SchedulingApi* | [**schedulingUpdateShift**](docs/Api/SchedulingApi.md#schedulingupdateshift) | **PATCH** /api/v1/scheduling/shifts/{id} | Update Shift +*TabularDataApi* | [**createTableRow**](docs/Api/TabularDataApi.md#createtablerow) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row +*TabularDataApi* | [**createTableRowV11**](docs/Api/TabularDataApi.md#createtablerowv11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 +*TabularDataApi* | [**deleteEmployeeTableRow**](docs/Api/TabularDataApi.md#deleteemployeetablerow) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Employee Table Row *TabularDataApi* | [**getChangedEmployeeTableData**](docs/Api/TabularDataApi.md#getchangedemployeetabledata) | **GET** /api/v1/employees/changed/tables/{table} | Get Changed Employee Table Data -*TabularDataApi* | [**getEmployeeTableRow**](docs/Api/TabularDataApi.md#getemployeetablerow) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Rows -*TabularDataApi* | [**updateEmployeeTableRow**](docs/Api/TabularDataApi.md#updateemployeetablerow) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row -*TabularDataApi* | [**updateEmployeeTableRowV**](docs/Api/TabularDataApi.md#updateemployeetablerowv) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 -*TimeOffApi* | [**getAListOfWhoIsOut**](docs/Api/TimeOffApi.md#getalistofwhoisout) | **GET** /api/v1/time_off/whos_out | Get Who’s Out -*TimeOffApi* | [**getTimeOffPolicies**](docs/Api/TimeOffApi.md#gettimeoffpolicies) | **GET** /api/v1/meta/time_off/policies | Get Time Off Policies -*TimeOffApi* | [**getTimeOffTypes**](docs/Api/TimeOffApi.md#gettimeofftypes) | **GET** /api/v1/meta/time_off/types | Get Time Off Types -*TimeOffApi* | [**timeOffAddATimeOffHistoryItemForTimeOffRequest**](docs/Api/TimeOffApi.md#timeoffaddatimeoffhistoryitemfortimeoffrequest) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off Request History Item -*TimeOffApi* | [**timeOffAddATimeOffRequest**](docs/Api/TimeOffApi.md#timeoffaddatimeoffrequest) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request -*TimeOffApi* | [**timeOffAdjustTimeOffBalance**](docs/Api/TimeOffApi.md#timeoffadjusttimeoffbalance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Update Time Off Balance -*TimeOffApi* | [**timeOffAssignTimeOffPoliciesForAnEmployee**](docs/Api/TimeOffApi.md#timeoffassigntimeoffpoliciesforanemployee) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies -*TimeOffApi* | [**timeOffAssignTimeOffPoliciesForAnEmployeeV11**](docs/Api/TimeOffApi.md#timeoffassigntimeoffpoliciesforanemployeev11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 -*TimeOffApi* | [**timeOffChangeARequestStatus**](docs/Api/TimeOffApi.md#timeoffchangearequeststatus) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status -*TimeOffApi* | [**timeOffEstimateFutureTimeOffBalances**](docs/Api/TimeOffApi.md#timeoffestimatefuturetimeoffbalances) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Estimate Future Time Off Balances -*TimeOffApi* | [**timeOffGetTimeOffRequests**](docs/Api/TimeOffApi.md#timeoffgettimeoffrequests) | **GET** /api/v1/time_off/requests | Get Time Off Requests -*TimeOffApi* | [**timeOffListTimeOffPoliciesForEmployee**](docs/Api/TimeOffApi.md#timeofflisttimeoffpoliciesforemployee) | **GET** /api/v1/employees/{employeeId}/time_off/policies | Get Time Off Policies for Employee -*TimeOffApi* | [**timeOffListTimeOffPoliciesForEmployeeV11**](docs/Api/TimeOffApi.md#timeofflisttimeoffpoliciesforemployeev11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | Get Time Off Policies for Employee v1.1 -*TimeTrackingApi* | [**addEditTimesheetClockEntries**](docs/Api/TimeTrackingApi.md#addedittimesheetclockentries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries -*TimeTrackingApi* | [**addEditTimesheetHourEntries**](docs/Api/TimeTrackingApi.md#addedittimesheethourentries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries -*TimeTrackingApi* | [**addTimesheetClockInEntry**](docs/Api/TimeTrackingApi.md#addtimesheetclockinentry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry -*TimeTrackingApi* | [**addTimesheetClockOutEntry**](docs/Api/TimeTrackingApi.md#addtimesheetclockoutentry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry +*TabularDataApi* | [**getEmployeeTableData**](docs/Api/TabularDataApi.md#getemployeetabledata) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Data +*TabularDataApi* | [**updateTableRow**](docs/Api/TabularDataApi.md#updatetablerow) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row +*TabularDataApi* | [**updateTableRowV11**](docs/Api/TabularDataApi.md#updatetablerowv11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 +*TimeOffApi* | [**adjustTimeOffBalance**](docs/Api/TimeOffApi.md#adjusttimeoffbalance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Adjust Time Off Balance +*TimeOffApi* | [**assignTimeOffPolicies**](docs/Api/TimeOffApi.md#assigntimeoffpolicies) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies +*TimeOffApi* | [**assignTimeOffPoliciesV11**](docs/Api/TimeOffApi.md#assigntimeoffpoliciesv11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 +*TimeOffApi* | [**createTimeOffHistory**](docs/Api/TimeOffApi.md#createtimeoffhistory) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off History Item +*TimeOffApi* | [**createTimeOffRequest**](docs/Api/TimeOffApi.md#createtimeoffrequest) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request +*TimeOffApi* | [**getTimeOffBalance**](docs/Api/TimeOffApi.md#gettimeoffbalance) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Get Time Off Balance +*TimeOffApi* | [**listEmployeeTimeOffPolicies**](docs/Api/TimeOffApi.md#listemployeetimeoffpolicies) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies +*TimeOffApi* | [**listEmployeeTimeOffPoliciesV11**](docs/Api/TimeOffApi.md#listemployeetimeoffpoliciesv11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies v1.1 +*TimeOffApi* | [**listTimeOffPolicies**](docs/Api/TimeOffApi.md#listtimeoffpolicies) | **GET** /api/v1/meta/time_off/policies | List Time Off Policies +*TimeOffApi* | [**listTimeOffRequests**](docs/Api/TimeOffApi.md#listtimeoffrequests) | **GET** /api/v1/time_off/requests | List Time Off Requests +*TimeOffApi* | [**listTimeOffTypes**](docs/Api/TimeOffApi.md#listtimeofftypes) | **GET** /api/v1/meta/time_off/types | List Time Off Types +*TimeOffApi* | [**listWhosOut**](docs/Api/TimeOffApi.md#listwhosout) | **GET** /api/v1/time_off/whos_out | List Who’s Out +*TimeOffApi* | [**updateTimeOffRequestStatus**](docs/Api/TimeOffApi.md#updatetimeoffrequeststatus) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status +*TimeTrackingApi* | [**assignEmployeesToBreakPolicy**](docs/Api/TimeTrackingApi.md#assignemployeestobreakpolicy) | **POST** /api/v1/time-tracking/break-policies/{id}/assign | Assign Employees to Break Policy +*TimeTrackingApi* | [**createBreak**](docs/Api/TimeTrackingApi.md#createbreak) | **POST** /api/v1/time-tracking/break-policies/{id}/breaks | Create Break +*TimeTrackingApi* | [**createBreakPolicy**](docs/Api/TimeTrackingApi.md#createbreakpolicy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy +*TimeTrackingApi* | [**createOrUpdateTimesheetClockEntries**](docs/Api/TimeTrackingApi.md#createorupdatetimesheetclockentries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries +*TimeTrackingApi* | [**createOrUpdateTimesheetHourEntries**](docs/Api/TimeTrackingApi.md#createorupdatetimesheethourentries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries +*TimeTrackingApi* | [**createProject**](docs/Api/TimeTrackingApi.md#createproject) | **POST** /api/v1/time-tracking/projects | Create Time Tracking Project +*TimeTrackingApi* | [**createProjectTask**](docs/Api/TimeTrackingApi.md#createprojecttask) | **POST** /api/v1/time-tracking/projects/{projectId}/tasks | Create Time Tracking Project Task *TimeTrackingApi* | [**createTimeTrackingProject**](docs/Api/TimeTrackingApi.md#createtimetrackingproject) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project +*TimeTrackingApi* | [**createTimesheetClockInEntry**](docs/Api/TimeTrackingApi.md#createtimesheetclockinentry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry +*TimeTrackingApi* | [**createTimesheetClockOutEntry**](docs/Api/TimeTrackingApi.md#createtimesheetclockoutentry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry +*TimeTrackingApi* | [**deleteBreak**](docs/Api/TimeTrackingApi.md#deletebreak) | **DELETE** /api/v1/time-tracking/breaks/{id} | Delete Break +*TimeTrackingApi* | [**deleteBreakPolicy**](docs/Api/TimeTrackingApi.md#deletebreakpolicy) | **DELETE** /api/v1/time-tracking/break-policies/{id} | Delete Break Policy +*TimeTrackingApi* | [**deleteProject**](docs/Api/TimeTrackingApi.md#deleteproject) | **DELETE** /api/v1/time-tracking/projects/{id} | Delete Time Tracking Project +*TimeTrackingApi* | [**deleteTask**](docs/Api/TimeTrackingApi.md#deletetask) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task *TimeTrackingApi* | [**deleteTimesheetClockEntriesViaPost**](docs/Api/TimeTrackingApi.md#deletetimesheetclockentriesviapost) | **POST** /api/v1/time_tracking/clock_entries/delete | Delete Timesheet Clock Entries *TimeTrackingApi* | [**deleteTimesheetHourEntriesViaPost**](docs/Api/TimeTrackingApi.md#deletetimesheethourentriesviapost) | **POST** /api/v1/time_tracking/hour_entries/delete | Delete Timesheet Hour Entries -*TimeTrackingApi* | [**getTimesheetEntries**](docs/Api/TimeTrackingApi.md#gettimesheetentries) | **GET** /api/v1/time_tracking/timesheet_entries | Get Timesheet Entries -*TrainingApi* | [**addNewEmployeeTrainingRecord**](docs/Api/TrainingApi.md#addnewemployeetrainingrecord) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record -*TrainingApi* | [**addTrainingCategory**](docs/Api/TrainingApi.md#addtrainingcategory) | **POST** /api/v1/training/category | Create Training Category -*TrainingApi* | [**addTrainingType**](docs/Api/TrainingApi.md#addtrainingtype) | **POST** /api/v1/training/type | Create Training Type +*TimeTrackingApi* | [**getBreak**](docs/Api/TimeTrackingApi.md#getbreak) | **GET** /api/v1/time-tracking/breaks/{id} | Get Break +*TimeTrackingApi* | [**getBreakPolicy**](docs/Api/TimeTrackingApi.md#getbreakpolicy) | **GET** /api/v1/time-tracking/break-policies/{id} | Get Break Policy +*TimeTrackingApi* | [**getBreakPolicySuggestions**](docs/Api/TimeTrackingApi.md#getbreakpolicysuggestions) | **POST** /api/v1/time-tracking/break-policies/suggestions | Get Break Policy Suggestions +*TimeTrackingApi* | [**getProject**](docs/Api/TimeTrackingApi.md#getproject) | **GET** /api/v1/time-tracking/projects/{projectId} | Get Time Tracking Project +*TimeTrackingApi* | [**getTask**](docs/Api/TimeTrackingApi.md#gettask) | **GET** /api/v1/time-tracking/tasks/{id} | Get Time Tracking Task +*TimeTrackingApi* | [**listBreakAssessments**](docs/Api/TimeTrackingApi.md#listbreakassessments) | **GET** /api/v1/time-tracking/break-assessments | List Break Assessments +*TimeTrackingApi* | [**listBreakPolicies**](docs/Api/TimeTrackingApi.md#listbreakpolicies) | **GET** /api/v1/time-tracking/break-policies | List Break Policies +*TimeTrackingApi* | [**listBreakPolicyBreaks**](docs/Api/TimeTrackingApi.md#listbreakpolicybreaks) | **GET** /api/v1/time-tracking/break-policies/{id}/breaks | List Breaks for Break Policy +*TimeTrackingApi* | [**listBreakPolicyEmployees**](docs/Api/TimeTrackingApi.md#listbreakpolicyemployees) | **GET** /api/v1/time-tracking/break-policies/{id}/employees | List Break Policy Employees +*TimeTrackingApi* | [**listEmployeeBreakAvailabilities**](docs/Api/TimeTrackingApi.md#listemployeebreakavailabilities) | **GET** /api/v1/time-tracking/employees/{id}/break-availabilities | List Employee Break Availabilities +*TimeTrackingApi* | [**listEmployeeBreakPolicies**](docs/Api/TimeTrackingApi.md#listemployeebreakpolicies) | **GET** /api/v1/time-tracking/employees/{id}/break-policies | List Employee Break Policies +*TimeTrackingApi* | [**listProjectTasks**](docs/Api/TimeTrackingApi.md#listprojecttasks) | **GET** /api/v1/time-tracking/projects/{projectId}/tasks | List Time Tracking Project Tasks +*TimeTrackingApi* | [**listProjects**](docs/Api/TimeTrackingApi.md#listprojects) | **GET** /api/v1/time-tracking/projects | List Time Tracking Projects +*TimeTrackingApi* | [**listTimesheetEntries**](docs/Api/TimeTrackingApi.md#listtimesheetentries) | **GET** /api/v1/time_tracking/timesheet_entries | List Timesheet Entries +*TimeTrackingApi* | [**replaceBreaksForBreakPolicy**](docs/Api/TimeTrackingApi.md#replacebreaksforbreakpolicy) | **PUT** /api/v1/time-tracking/break-policies/{id}/breaks | Replace Breaks for Break Policy +*TimeTrackingApi* | [**setBreakPolicyEmployees**](docs/Api/TimeTrackingApi.md#setbreakpolicyemployees) | **PUT** /api/v1/time-tracking/break-policies/{id}/assign | Set Employees for Break Policy +*TimeTrackingApi* | [**syncBreakPolicy**](docs/Api/TimeTrackingApi.md#syncbreakpolicy) | **PUT** /api/v1/time-tracking/break-policies/{id}/sync | Sync Break Policy +*TimeTrackingApi* | [**unassignEmployeesFromBreakPolicy**](docs/Api/TimeTrackingApi.md#unassignemployeesfrombreakpolicy) | **POST** /api/v1/time-tracking/break-policies/{id}/unassign | Unassign Employees from Break Policy +*TimeTrackingApi* | [**updateBreak**](docs/Api/TimeTrackingApi.md#updatebreak) | **PATCH** /api/v1/time-tracking/breaks/{id} | Update Break +*TimeTrackingApi* | [**updateBreakPolicy**](docs/Api/TimeTrackingApi.md#updatebreakpolicy) | **PATCH** /api/v1/time-tracking/break-policies/{id} | Update Break Policy +*TimeTrackingApi* | [**updateProject**](docs/Api/TimeTrackingApi.md#updateproject) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project +*TimeTrackingApi* | [**updateTask**](docs/Api/TimeTrackingApi.md#updatetask) | **PATCH** /api/v1/time-tracking/tasks/{id} | Update Time Tracking Task +*TotalRewardsApi* | [**addTotalRewardsEmployees**](docs/Api/TotalRewardsApi.md#addtotalrewardsemployees) | **POST** /api/v1/compensation/total_rewards/employees | Add Employees to Total Rewards +*TotalRewardsApi* | [**checkTotalRewardsProfile**](docs/Api/TotalRewardsApi.md#checktotalrewardsprofile) | **GET** /api/v1/compensation/total_rewards/{employeeId} | Check Total Rewards Profile Availability +*TotalRewardsApi* | [**getTotalRewardsPrintableStatement**](docs/Api/TotalRewardsApi.md#gettotalrewardsprintablestatement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/printable | Get Printable Total Rewards Statement +*TotalRewardsApi* | [**getTotalRewardsStatement**](docs/Api/TotalRewardsApi.md#gettotalrewardsstatement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/statement | Get Total Rewards Statement +*TotalRewardsApi* | [**removeTotalRewardsCustomDisclaimer**](docs/Api/TotalRewardsApi.md#removetotalrewardscustomdisclaimer) | **DELETE** /api/v1/compensation/total_rewards/custom_disclaimer | Remove Total Rewards Custom Disclaimer +*TotalRewardsApi* | [**removeTotalRewardsEmployees**](docs/Api/TotalRewardsApi.md#removetotalrewardsemployees) | **DELETE** /api/v1/compensation/total_rewards/employees | Remove Employees from Total Rewards +*TotalRewardsApi* | [**setTotalRewardsCustomDisclaimer**](docs/Api/TotalRewardsApi.md#settotalrewardscustomdisclaimer) | **PUT** /api/v1/compensation/total_rewards/custom_disclaimer | Set Total Rewards Custom Disclaimer +*TotalRewardsApi* | [**setTotalRewardsOnboardingStep**](docs/Api/TotalRewardsApi.md#settotalrewardsonboardingstep) | **PUT** /api/v1/compensation/total_rewards/onboarding/{stepName} | Set Total Rewards Onboarding Step Status +*TrainingApi* | [**createEmployeeTrainingRecord**](docs/Api/TrainingApi.md#createemployeetrainingrecord) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record +*TrainingApi* | [**createTrainingCategory**](docs/Api/TrainingApi.md#createtrainingcategory) | **POST** /api/v1/training/category | Create Training Category +*TrainingApi* | [**createTrainingType**](docs/Api/TrainingApi.md#createtrainingtype) | **POST** /api/v1/training/type | Create Training Type *TrainingApi* | [**deleteEmployeeTrainingRecord**](docs/Api/TrainingApi.md#deleteemployeetrainingrecord) | **DELETE** /api/v1/training/record/{employeeTrainingRecordId} | Delete Employee Training Record *TrainingApi* | [**deleteTrainingCategory**](docs/Api/TrainingApi.md#deletetrainingcategory) | **DELETE** /api/v1/training/category/{trainingCategoryId} | Delete Training Category *TrainingApi* | [**deleteTrainingType**](docs/Api/TrainingApi.md#deletetrainingtype) | **DELETE** /api/v1/training/type/{trainingTypeId} | Delete Training Type -*TrainingApi* | [**listEmployeeTrainings**](docs/Api/TrainingApi.md#listemployeetrainings) | **GET** /api/v1/training/record/employee/{employeeId} | Get Employee Trainings -*TrainingApi* | [**listTrainingCategories**](docs/Api/TrainingApi.md#listtrainingcategories) | **GET** /api/v1/training/category | Get Training Categories -*TrainingApi* | [**listTrainingTypes**](docs/Api/TrainingApi.md#listtrainingtypes) | **GET** /api/v1/training/type | Get Training Types +*TrainingApi* | [**listEmployeeTrainings**](docs/Api/TrainingApi.md#listemployeetrainings) | **GET** /api/v1/training/record/employee/{employeeId} | List Employee Training Records +*TrainingApi* | [**listTrainingCategories**](docs/Api/TrainingApi.md#listtrainingcategories) | **GET** /api/v1/training/category | List Training Categories +*TrainingApi* | [**listTrainingTypes**](docs/Api/TrainingApi.md#listtrainingtypes) | **GET** /api/v1/training/type | List Training Types *TrainingApi* | [**updateEmployeeTrainingRecord**](docs/Api/TrainingApi.md#updateemployeetrainingrecord) | **PUT** /api/v1/training/record/{employeeTrainingRecordId} | Update Employee Training Record *TrainingApi* | [**updateTrainingCategory**](docs/Api/TrainingApi.md#updatetrainingcategory) | **PUT** /api/v1/training/category/{trainingCategoryId} | Update Training Category *TrainingApi* | [**updateTrainingType**](docs/Api/TrainingApi.md#updatetrainingtype) | **PUT** /api/v1/training/type/{trainingTypeId} | Update Training Type +*WebhooksApi* | [**createWebhook**](docs/Api/WebhooksApi.md#createwebhook) | **POST** /api/v1/webhooks | Create Webhook *WebhooksApi* | [**deleteWebhook**](docs/Api/WebhooksApi.md#deletewebhook) | **DELETE** /api/v1/webhooks/{id} | Delete Webhook -*WebhooksApi* | [**getMonitorFields**](docs/Api/WebhooksApi.md#getmonitorfields) | **GET** /api/v1/webhooks/monitor_fields | Get Monitor Fields +*WebhooksApi* | [**getPostFields**](docs/Api/WebhooksApi.md#getpostfields) | **GET** /api/v1/webhooks/post-fields | Get Webhook Post Fields *WebhooksApi* | [**getWebhook**](docs/Api/WebhooksApi.md#getwebhook) | **GET** /api/v1/webhooks/{id} | Get Webhook -*WebhooksApi* | [**getWebhookList**](docs/Api/WebhooksApi.md#getwebhooklist) | **GET** /api/v1/webhooks | Get Webhooks -*WebhooksApi* | [**getWebhookLogs**](docs/Api/WebhooksApi.md#getwebhooklogs) | **GET** /api/v1/webhooks/{id}/log | Get Webhook Logs -*WebhooksApi* | [**postWebhook**](docs/Api/WebhooksApi.md#postwebhook) | **POST** /api/v1/webhooks | Create Webhook -*WebhooksApi* | [**putWebhook**](docs/Api/WebhooksApi.md#putwebhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook +*WebhooksApi* | [**listMonitorFields**](docs/Api/WebhooksApi.md#listmonitorfields) | **GET** /api/v1/webhooks/monitor_fields | List Monitor Fields +*WebhooksApi* | [**listWebhookLogs**](docs/Api/WebhooksApi.md#listwebhooklogs) | **GET** /api/v1/webhooks/{id}/log | List Webhook Logs +*WebhooksApi* | [**listWebhooks**](docs/Api/WebhooksApi.md#listwebhooks) | **GET** /api/v1/webhooks | List Webhooks +*WebhooksApi* | [**updateWebhook**](docs/Api/WebhooksApi.md#updatewebhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook ## Models -- [AddNewEmployeeTrainingRecordRequest](docs/Model/AddNewEmployeeTrainingRecordRequest.md) -- [AddNewEmployeeTrainingRecordRequestCost](docs/Model/AddNewEmployeeTrainingRecordRequestCost.md) -- [AddTrainingCategoryRequest](docs/Model/AddTrainingCategoryRequest.md) -- [AddTrainingTypeRequest](docs/Model/AddTrainingTypeRequest.md) -- [AddTrainingTypeRequestCategory](docs/Model/AddTrainingTypeRequestCategory.md) +- [_1d1fc0f164cb51973a0206b8e2fb2d2dRequest](docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md) +- [_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner](docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md) +- [_1d64402ee192568adbd5e3179a91e6e2RequestInner](docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md) +- [_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations](docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md) +- [_288aa996aba16d7a495c62321ea999a9Request](docs/Model/_288aa996aba16d7a495c62321ea999a9Request.md) +- [_288aa996aba16d7a495c62321ea999a9RequestSentDateTime](docs/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md) +- [_3958585c861325ea7a2cd30a8c74f042Request](docs/Model/_3958585c861325ea7a2cd30a8c74f042Request.md) +- [_89a5068111ec499135c7d6e9a53d5a30Request](docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md) +- [A05b6d5f564f805d688ff2c1e37c3990Request](docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md) +- [Ad7871529b2a9c6612f8dd3c62192c08Request](docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md) +- [AddCycleAdminsResponse](docs/Model/AddCycleAdminsResponse.md) +- [AddCycleAdminsResponseAddedInner](docs/Model/AddCycleAdminsResponseAddedInner.md) +- [AddCycleAdminsResponseSkippedInner](docs/Model/AddCycleAdminsResponseSkippedInner.md) +- [AddTotalRewardsEmployeesRequest](docs/Model/AddTotalRewardsEmployeesRequest.md) - [AdjustTimeOffBalance](docs/Model/AdjustTimeOffBalance.md) - [AdjustTimeTrackingRequestSchema](docs/Model/AdjustTimeTrackingRequestSchema.md) +- [AlertTemplateListResponse](docs/Model/AlertTemplateListResponse.md) +- [AlertTemplateListResponseAlertsInner](docs/Model/AlertTemplateListResponseAlertsInner.md) +- [AlignmentOptionsResponse](docs/Model/AlignmentOptionsResponse.md) +- [AlignmentOptionsResponseAlignsWithOptionsInner](docs/Model/AlignmentOptionsResponseAlignsWithOptionsInner.md) +- [ApplicantStatus](docs/Model/ApplicantStatus.md) - [ApplicationDetails](docs/Model/ApplicationDetails.md) - [ApplicationDetailsApplicant](docs/Model/ApplicationDetailsApplicant.md) +- [ApplicationDetailsAttachmentsInner](docs/Model/ApplicationDetailsAttachmentsInner.md) - [ApplicationDetailsJob](docs/Model/ApplicationDetailsJob.md) +- [ApplicationDetailsJobTitle](docs/Model/ApplicationDetailsJobTitle.md) - [ApplicationDetailsQuestionsAndAnswersInner](docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md) - [ApplicationDetailsQuestionsAndAnswersInnerAnswer](docs/Model/ApplicationDetailsQuestionsAndAnswersInnerAnswer.md) - [ApplicationDetailsQuestionsAndAnswersInnerQuestion](docs/Model/ApplicationDetailsQuestionsAndAnswersInnerQuestion.md) - [ApplicationDetailsStatus](docs/Model/ApplicationDetailsStatus.md) - [ApplicationsList](docs/Model/ApplicationsList.md) -- [ApplicationsListApplications](docs/Model/ApplicationsListApplications.md) -- [ApplicationsListApplicationsItemsInner](docs/Model/ApplicationsListApplicationsItemsInner.md) -- [ApplicationsListApplicationsItemsInnerApplicant](docs/Model/ApplicationsListApplicationsItemsInnerApplicant.md) -- [ApplicationsListApplicationsItemsInnerJob](docs/Model/ApplicationsListApplicationsItemsInnerJob.md) -- [ApplicationsListApplicationsItemsInnerStatus](docs/Model/ApplicationsListApplicationsItemsInnerStatus.md) +- [ApplicationsListApplicationsInner](docs/Model/ApplicationsListApplicationsInner.md) +- [ApplicationsListApplicationsInnerApplicant](docs/Model/ApplicationsListApplicationsInnerApplicant.md) +- [ApplicationsListApplicationsInnerJob](docs/Model/ApplicationsListApplicationsInnerJob.md) +- [ApplicationsListApplicationsInnerJobTitle](docs/Model/ApplicationsListApplicationsInnerJobTitle.md) +- [ApplicationsListApplicationsInnerStatus](docs/Model/ApplicationsListApplicationsInnerStatus.md) +- [AssignEmployeesToBreakPolicyRequest](docs/Model/AssignEmployeesToBreakPolicyRequest.md) +- [AssignTimeOffPoliciesRequestInner](docs/Model/AssignTimeOffPoliciesRequestInner.md) +- [AssignedTimeOffPolicy](docs/Model/AssignedTimeOffPolicy.md) +- [AssignedTimeOffPolicyV11](docs/Model/AssignedTimeOffPolicyV11.md) +- [AvailableAction](docs/Model/AvailableAction.md) +- [BadRequestV1](docs/Model/BadRequestV1.md) +- [BadRequestV1Error](docs/Model/BadRequestV1Error.md) +- [BankHoliday](docs/Model/BankHoliday.md) +- [BenefitCoveragesResponse](docs/Model/BenefitCoveragesResponse.md) +- [BenefitCoveragesResponseBenefitCoveragesInner](docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md) +- [BenefitDeductionSubType](docs/Model/BenefitDeductionSubType.md) +- [BenefitDeductionType](docs/Model/BenefitDeductionType.md) +- [BenefitDeductionTypeId](docs/Model/BenefitDeductionTypeId.md) +- [BudgetBreakdownImportResponse](docs/Model/BudgetBreakdownImportResponse.md) +- [BudgetGuidelinesView](docs/Model/BudgetGuidelinesView.md) +- [BudgetGuidelinesWarnings](docs/Model/BudgetGuidelinesWarnings.md) +- [C79f9c5950f983e59d2626faa30c00a1Request](docs/Model/C79f9c5950f983e59d2626faa30c00a1Request.md) +- [C7c32ed5278ac67e2e518bf7484a75dcRequest](docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md) +- [CanCreateGoalsResponse](docs/Model/CanCreateGoalsResponse.md) +- [Cf87b8e09a001b6fb81dfce6c20ab9e3Request](docs/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md) +- [ChangedEmployeeIdsResponse](docs/Model/ChangedEmployeeIdsResponse.md) +- [ChangedEmployeeIdsResponseEmployeesValue](docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md) +- [ChangedEmployeeTableDataResponse](docs/Model/ChangedEmployeeTableDataResponse.md) +- [ChangedEmployeeTableDataResponseEmployeesValue](docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md) +- [ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue](docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md) +- [ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner](docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md) - [ClockEntriesSchema](docs/Model/ClockEntriesSchema.md) - [ClockEntryIdsSchema](docs/Model/ClockEntryIdsSchema.md) - [ClockEntrySchema](docs/Model/ClockEntrySchema.md) - [ClockInRequestSchema](docs/Model/ClockInRequestSchema.md) - [ClockOutRequestSchema](docs/Model/ClockOutRequestSchema.md) +- [CloseGoalRequest](docs/Model/CloseGoalRequest.md) +- [CompanyAlertDataObject](docs/Model/CompanyAlertDataObject.md) +- [CompanyBenefitSummary](docs/Model/CompanyBenefitSummary.md) +- [CompanyBenefitsListResponse](docs/Model/CompanyBenefitsListResponse.md) +- [CompanyDeletedWebhookPayload](docs/Model/CompanyDeletedWebhookPayload.md) - [CompanyFileUpdate](docs/Model/CompanyFileUpdate.md) +- [CompanyFilesResponse](docs/Model/CompanyFilesResponse.md) +- [CompanyFilesResponseCategoriesInner](docs/Model/CompanyFilesResponseCategoriesInner.md) +- [CompanyFilesResponseCategoriesInnerFilesInner](docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md) +- [CompanyIndustryDataObject](docs/Model/CompanyIndustryDataObject.md) - [CompanyInformation](docs/Model/CompanyInformation.md) - [CompanyInformationAddress](docs/Model/CompanyInformationAddress.md) +- [CompanyIntegrationsUpdatedWebhookPayload](docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md) +- [CompanyIntegrationsUpdatedWebhookPayloadData](docs/Model/CompanyIntegrationsUpdatedWebhookPayloadData.md) +- [CompanyProfileData](docs/Model/CompanyProfileData.md) +- [CompanyProfileDataAddress](docs/Model/CompanyProfileDataAddress.md) +- [CompanyProfileIntegrations](docs/Model/CompanyProfileIntegrations.md) +- [CompanyUpdatedWebhookPayload](docs/Model/CompanyUpdatedWebhookPayload.md) +- [CompensationBenchmarkDetailEmployee](docs/Model/CompensationBenchmarkDetailEmployee.md) +- [CompensationBenchmarkDetailEmployeeJobTitle](docs/Model/CompensationBenchmarkDetailEmployeeJobTitle.md) +- [CompensationBenchmarkDetailEmployeeSalary](docs/Model/CompensationBenchmarkDetailEmployeeSalary.md) +- [CompensationBenchmarkDetails](docs/Model/CompensationBenchmarkDetails.md) +- [CompensationBenchmarkDetailsBenchmarkValuesInner](docs/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.md) +- [CompensationBenchmarkJobLocationEmployee](docs/Model/CompensationBenchmarkJobLocationEmployee.md) +- [CompensationBenchmarkJobLocationEmployeeSalary](docs/Model/CompensationBenchmarkJobLocationEmployeeSalary.md) +- [CompensationBenchmarkJobLocationPair](docs/Model/CompensationBenchmarkJobLocationPair.md) +- [CompensationBenchmarkJobLocationPairJobDetails](docs/Model/CompensationBenchmarkJobLocationPairJobDetails.md) +- [CompensationBenchmarkOverview](docs/Model/CompensationBenchmarkOverview.md) +- [CompensationBenchmarkOverviewValues](docs/Model/CompensationBenchmarkOverviewValues.md) +- [CompensationBenchmarkSource](docs/Model/CompensationBenchmarkSource.md) +- [CompensationBenchmarkingColumnMap](docs/Model/CompensationBenchmarkingColumnMap.md) +- [CompensationBenchmarksList](docs/Model/CompensationBenchmarksList.md) +- [CompensationEquitySettingsResponse](docs/Model/CompensationEquitySettingsResponse.md) +- [CompensationEquitySettingsResponseCompanyValuation](docs/Model/CompensationEquitySettingsResponseCompanyValuation.md) +- [CompensationEquitySettingsResponseDisclaimers](docs/Model/CompensationEquitySettingsResponseDisclaimers.md) +- [CompensationEquitySettingsResponseOutstandingShares](docs/Model/CompensationEquitySettingsResponseOutstandingShares.md) +- [CompensationEquitySettingsResponsePricePerShare](docs/Model/CompensationEquitySettingsResponsePricePerShare.md) +- [CompensationEquitySettingsResponseSliderMin](docs/Model/CompensationEquitySettingsResponseSliderMin.md) +- [CompensationEquitySettingsResponseVestingConditions](docs/Model/CompensationEquitySettingsResponseVestingConditions.md) +- [CompensationEquitySettingsUpdateRequest](docs/Model/CompensationEquitySettingsUpdateRequest.md) +- [CompensationPlanningCycleAdminsResponse](docs/Model/CompensationPlanningCycleAdminsResponse.md) +- [CompensationPlanningCycleAdminsResponseAdminsInner](docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md) +- [CompensationPlanningCycleCompleteResponse](docs/Model/CompensationPlanningCycleCompleteResponse.md) +- [CompensationPlanningCycleCompleteResponseErrorsInner](docs/Model/CompensationPlanningCycleCompleteResponseErrorsInner.md) +- [CompensationToolsDataObject](docs/Model/CompensationToolsDataObject.md) +- [CompensationToolsResponse](docs/Model/CompensationToolsResponse.md) +- [CompensationUpsellData](docs/Model/CompensationUpsellData.md) +- [CompletedQuestionsAndResponseDataObject](docs/Model/CompletedQuestionsAndResponseDataObject.md) +- [ConversionRateDataObject](docs/Model/ConversionRateDataObject.md) +- [CountriesOptionsResponse](docs/Model/CountriesOptionsResponse.md) - [Country](docs/Model/Country.md) - [CountrySchema](docs/Model/CountrySchema.md) +- [CreateApplicationCommentRequest](docs/Model/CreateApplicationCommentRequest.md) +- [CreateCandidateResponse](docs/Model/CreateCandidateResponse.md) +- [CreateCommentResponse](docs/Model/CreateCommentResponse.md) +- [CreateCompensationBenchmarkRequest](docs/Model/CreateCompensationBenchmarkRequest.md) +- [CreateCompensationBenchmarkSourceRequest](docs/Model/CreateCompensationBenchmarkSourceRequest.md) +- [CreateEmployeeTrainingRecordRequest](docs/Model/CreateEmployeeTrainingRecordRequest.md) +- [CreateEmployeeTrainingRecordRequestCost](docs/Model/CreateEmployeeTrainingRecordRequestCost.md) +- [CreateGoalCommentRequest](docs/Model/CreateGoalCommentRequest.md) +- [CreateGoalRequest](docs/Model/CreateGoalRequest.md) +- [CreateGoalRequestMilestonesInner](docs/Model/CreateGoalRequestMilestonesInner.md) +- [CreateJobOpeningResponse](docs/Model/CreateJobOpeningResponse.md) +- [CreateLocationRequest](docs/Model/CreateLocationRequest.md) +- [CreateLocationRequestAddress](docs/Model/CreateLocationRequestAddress.md) +- [CreateTrainingCategoryRequest](docs/Model/CreateTrainingCategoryRequest.md) +- [CreateTrainingTypeRequest](docs/Model/CreateTrainingTypeRequest.md) +- [CreateTrainingTypeRequestCategory](docs/Model/CreateTrainingTypeRequestCategory.md) +- [CreateWebhookBadRequestResponse](docs/Model/CreateWebhookBadRequestResponse.md) +- [CreatedCompensationBenchmark](docs/Model/CreatedCompensationBenchmark.md) +- [CreatedCompensationBenchmarkSavedBenchmark](docs/Model/CreatedCompensationBenchmarkSavedBenchmark.md) +- [CreatedCompensationBenchmarkSource](docs/Model/CreatedCompensationBenchmarkSource.md) +- [CreatedTimeOffRequest](docs/Model/CreatedTimeOffRequest.md) +- [CreatedTimeOffRequestAmount](docs/Model/CreatedTimeOffRequestAmount.md) +- [CreatedTimeOffRequestNotes](docs/Model/CreatedTimeOffRequestNotes.md) +- [CreatedTimeOffRequestStatus](docs/Model/CreatedTimeOffRequestStatus.md) +- [CreatedTimeOffRequestType](docs/Model/CreatedTimeOffRequestType.md) +- [CurrencyConversionsResponse](docs/Model/CurrencyConversionsResponse.md) - [CursorPagedResponseMetadata](docs/Model/CursorPagedResponseMetadata.md) - [CursorPagesResponse](docs/Model/CursorPagesResponse.md) - [CursorPaginationQueryObject](docs/Model/CursorPaginationQueryObject.md) +- [Dacd313af2106213fc4696175941ce65Request](docs/Model/Dacd313af2106213fc4696175941ce65Request.md) - [DataRequest](docs/Model/DataRequest.md) -- [DataRequestAggregationsInner](docs/Model/DataRequestAggregationsInner.md) +- [DataRequestAggregations](docs/Model/DataRequestAggregations.md) - [DataRequestFilters](docs/Model/DataRequestFilters.md) - [DataRequestFiltersFiltersInner](docs/Model/DataRequestFiltersFiltersInner.md) - [DataRequestSortByInner](docs/Model/DataRequestSortByInner.md) -- [Dataset](docs/Model/Dataset.md) +- [DatasetDataResponseV2](docs/Model/DatasetDataResponseV2.md) +- [DatasetDataResponseV2DataInner](docs/Model/DatasetDataResponseV2DataInner.md) +- [DatasetDataResponseV2DataInnerFieldsValue](docs/Model/DatasetDataResponseV2DataInnerFieldsValue.md) +- [DatasetDataResponseV2Links](docs/Model/DatasetDataResponseV2Links.md) +- [DatasetDataResponseV2Meta](docs/Model/DatasetDataResponseV2Meta.md) - [DatasetFieldsResponse](docs/Model/DatasetFieldsResponse.md) -- [DatasetResponse](docs/Model/DatasetResponse.md) +- [DatasetResponseV1](docs/Model/DatasetResponseV1.md) +- [DatasetV1](docs/Model/DatasetV1.md) +- [DatasetsResponseV12](docs/Model/DatasetsResponseV12.md) +- [DatasetsResponseV12DatasetsInner](docs/Model/DatasetsResponseV12DatasetsInner.md) +- [DeleteCompensationBenchmarkSourceRequest](docs/Model/DeleteCompensationBenchmarkSourceRequest.md) +- [DeleteCompensationBenchmarkSourceResponse](docs/Model/DeleteCompensationBenchmarkSourceResponse.md) +- [DetailsAndCurrencyRequestDataObject](docs/Model/DetailsAndCurrencyRequestDataObject.md) +- [Ec1ba8e76f33960b018d0d7518fe97b5Request](docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md) - [Employee](docs/Model/Employee.md) +- [EmployeeBenefitFilters](docs/Model/EmployeeBenefitFilters.md) +- [EmployeeBenefitFiltersFilters](docs/Model/EmployeeBenefitFiltersFilters.md) +- [EmployeeBenefitsListResponse](docs/Model/EmployeeBenefitsListResponse.md) +- [EmployeeBenefitsListResponseEmployeeBenefitsInner](docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md) +- [EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner](docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md) +- [EmployeeCreatedWebhookPayload](docs/Model/EmployeeCreatedWebhookPayload.md) +- [EmployeeCreatedWebhookPayloadData](docs/Model/EmployeeCreatedWebhookPayloadData.md) +- [EmployeeCursorPaginationQueryObject](docs/Model/EmployeeCursorPaginationQueryObject.md) +- [EmployeeDeletedWebhookPayload](docs/Model/EmployeeDeletedWebhookPayload.md) +- [EmployeeDeletedWebhookPayloadData](docs/Model/EmployeeDeletedWebhookPayloadData.md) - [EmployeeDependent](docs/Model/EmployeeDependent.md) +- [EmployeeDependentsResponse](docs/Model/EmployeeDependentsResponse.md) +- [EmployeeDependentsResponseEmployeeDependentsInner](docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md) - [EmployeeFileUpdate](docs/Model/EmployeeFileUpdate.md) +- [EmployeeOptionalField](docs/Model/EmployeeOptionalField.md) +- [EmployeePhotoJsonResponse](docs/Model/EmployeePhotoJsonResponse.md) - [EmployeeResponse](docs/Model/EmployeeResponse.md) - [EmployeeResponseAggregationsInner](docs/Model/EmployeeResponseAggregationsInner.md) +- [EmployeeStringCodeErrorResponseV1](docs/Model/EmployeeStringCodeErrorResponseV1.md) +- [EmployeeStringCodeErrorResponseV1Error](docs/Model/EmployeeStringCodeErrorResponseV1Error.md) +- [EmployeeTableRow](docs/Model/EmployeeTableRow.md) +- [EmployeeTimeOffPolicyAssignment](docs/Model/EmployeeTimeOffPolicyAssignment.md) +- [EmployeeTimeOffPolicyAssignmentV11](docs/Model/EmployeeTimeOffPolicyAssignmentV11.md) +- [EmployeeTimeOffRequestApproverResponseInner](docs/Model/EmployeeTimeOffRequestApproverResponseInner.md) - [EmployeeTimesheetEntryTransformer](docs/Model/EmployeeTimesheetEntryTransformer.md) +- [EmployeeUpdatedWebhookPayload](docs/Model/EmployeeUpdatedWebhookPayload.md) +- [EmployeeUpdatedWebhookPayloadData](docs/Model/EmployeeUpdatedWebhookPayloadData.md) +- [EmployeeValue](docs/Model/EmployeeValue.md) +- [EmployeeValueAnyOfInner](docs/Model/EmployeeValueAnyOfInner.md) +- [EmployeeVerificationIntegration](docs/Model/EmployeeVerificationIntegration.md) +- [EmployeeVerificationIntegrationResponse](docs/Model/EmployeeVerificationIntegrationResponse.md) +- [EmployeeVerificationLifecycleEmailAcceptedResponse](docs/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md) +- [EmployeeVerificationPublicApiRecord](docs/Model/EmployeeVerificationPublicApiRecord.md) +- [EmployeeVerificationUpdateResponse](docs/Model/EmployeeVerificationUpdateResponse.md) +- [EmployeeVerificationsListResponse](docs/Model/EmployeeVerificationsListResponse.md) +- [EmployeesDirectoryJsonResponse](docs/Model/EmployeesDirectoryJsonResponse.md) +- [EmployeesDirectoryJsonResponseFieldsInner](docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md) +- [EmployeesDirectoryXmlResponse](docs/Model/EmployeesDirectoryXmlResponse.md) +- [EmployeesDirectoryXmlResponseEmployees](docs/Model/EmployeesDirectoryXmlResponseEmployees.md) +- [EmployeesDirectoryXmlResponseEmployeesEmployeeInner](docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md) +- [EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner](docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md) +- [EmployeesDirectoryXmlResponseFieldset](docs/Model/EmployeesDirectoryXmlResponseFieldset.md) +- [EmployeesDirectoryXmlResponseFieldsetFieldInner](docs/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.md) +- [ErrorResponse](docs/Model/ErrorResponse.md) +- [ErrorResponseError](docs/Model/ErrorResponseError.md) +- [F3883a522dadbe9e11b34f8b656e3adbRequest](docs/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md) - [Field](docs/Model/Field.md) -- [FieldList](docs/Model/FieldList.md) -- [FieldListFieldsInner](docs/Model/FieldListFieldsInner.md) +- [Field1](docs/Model/Field1.md) +- [Field1Id](docs/Model/Field1Id.md) - [FieldOptionsRequestSchema](docs/Model/FieldOptionsRequestSchema.md) - [FieldOptionsRequestSchemaDependentFieldsValueInner](docs/Model/FieldOptionsRequestSchemaDependentFieldsValueInner.md) - [FieldOptionsTransformer](docs/Model/FieldOptionsTransformer.md) -- [Forbidden](docs/Model/Forbidden.md) +- [FieldOptionsTransformerId](docs/Model/FieldOptionsTransformerId.md) +- [ForbiddenV1](docs/Model/ForbiddenV1.md) +- [ForbiddenV1Error](docs/Model/ForbiddenV1Error.md) +- [GetBreakPolicySuggestionsRequest](docs/Model/GetBreakPolicySuggestionsRequest.md) +- [GetCompanyReportResponse](docs/Model/GetCompanyReportResponse.md) +- [GetCompanyReportResponseEmployeesInner](docs/Model/GetCompanyReportResponseEmployeesInner.md) +- [GetDataFromDatasetV2Request](docs/Model/GetDataFromDatasetV2Request.md) +- [GetEmployeeResponse](docs/Model/GetEmployeeResponse.md) +- [GetEmployeesEmployeeBaseResponse](docs/Model/GetEmployeesEmployeeBaseResponse.md) - [GetEmployeesEmployeeResponse](docs/Model/GetEmployeesEmployeeResponse.md) +- [GetEmployeesEmployeeResponseAllOfOvertimeRate](docs/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.md) +- [GetEmployeesEmployeeResponseAllOfPayRate](docs/Model/GetEmployeesEmployeeResponseAllOfPayRate.md) +- [GetEmployeesEmployeeResponseAllOfTeams](docs/Model/GetEmployeesEmployeeResponseAllOfTeams.md) - [GetEmployeesFilterRequestObject](docs/Model/GetEmployeesFilterRequestObject.md) - [GetEmployeesResponseObject](docs/Model/GetEmployeesResponseObject.md) - [GetEmployeesResponseObjectLinks](docs/Model/GetEmployeesResponseObjectLinks.md) -- [GetGoalsAlignmentOptionsRequest](docs/Model/GetGoalsAlignmentOptionsRequest.md) -- [Goal](docs/Model/Goal.md) +- [GetEmployeesResponseObjectLinksNext](docs/Model/GetEmployeesResponseObjectLinksNext.md) +- [GetEmployeesResponseObjectLinksPrev](docs/Model/GetEmployeesResponseObjectLinksPrev.md) +- [GetEmployeesResponseObjectLinksSelf](docs/Model/GetEmployeesResponseObjectLinksSelf.md) - [GoalAggregate](docs/Model/GoalAggregate.md) - [GoalAggregateAlignsWithOptionsInner](docs/Model/GoalAggregateAlignsWithOptionsInner.md) - [GoalAggregateCommentsInner](docs/Model/GoalAggregateCommentsInner.md) - [GoalAggregatePersonsInner](docs/Model/GoalAggregatePersonsInner.md) +- [GoalCommentResponse](docs/Model/GoalCommentResponse.md) +- [GoalCommentsResponse](docs/Model/GoalCommentsResponse.md) +- [GoalCommentsResponseCommentsInner](docs/Model/GoalCommentsResponseCommentsInner.md) - [GoalFiltersV1](docs/Model/GoalFiltersV1.md) - [GoalFiltersV11](docs/Model/GoalFiltersV11.md) - [GoalFiltersV11FiltersInner](docs/Model/GoalFiltersV11FiltersInner.md) - [GoalFiltersV11FiltersInnerActions](docs/Model/GoalFiltersV11FiltersInnerActions.md) - [GoalFiltersV1FiltersInner](docs/Model/GoalFiltersV1FiltersInner.md) +- [GoalResponse](docs/Model/GoalResponse.md) - [GoalsAggregateV1](docs/Model/GoalsAggregateV1.md) - [GoalsAggregateV11](docs/Model/GoalsAggregateV11.md) - [GoalsAggregateV11CommentsInner](docs/Model/GoalsAggregateV11CommentsInner.md) @@ -476,104 +799,305 @@ Class | Method | HTTP request | Description - [GoalsAggregateV1PersonsInner](docs/Model/GoalsAggregateV1PersonsInner.md) - [GoalsList](docs/Model/GoalsList.md) - [HiringLead](docs/Model/HiringLead.md) -- [HiringLeadsList](docs/Model/HiringLeadsList.md) - [HourEntriesRequestSchema](docs/Model/HourEntriesRequestSchema.md) - [HourEntryIdsSchema](docs/Model/HourEntryIdsSchema.md) - [HourEntrySchema](docs/Model/HourEntrySchema.md) -- [InternalServerError](docs/Model/InternalServerError.md) -- [InvalidRequest](docs/Model/InvalidRequest.md) -- [InvalidRequestError](docs/Model/InvalidRequestError.md) -- [JsonDirectoryEmployee](docs/Model/JsonDirectoryEmployee.md) -- [JsonDirectoryEmployeeFieldsInner](docs/Model/JsonDirectoryEmployeeFieldsInner.md) +- [ImportCompensationBenchmarksResponse](docs/Model/ImportCompensationBenchmarksResponse.md) +- [Industry](docs/Model/Industry.md) +- [InlineObjectInner](docs/Model/InlineObjectInner.md) +- [JobSummary](docs/Model/JobSummary.md) +- [JobSummaryStatus](docs/Model/JobSummaryStatus.md) +- [JsonEmployeeFiles](docs/Model/JsonEmployeeFiles.md) +- [JsonEmployeeFilesCategoriesInner](docs/Model/JsonEmployeeFilesCategoriesInner.md) +- [JsonEmployeeFilesCategoriesInnerFilesInner](docs/Model/JsonEmployeeFilesCategoriesInnerFilesInner.md) +- [JsonEmployeeFilesEmployee](docs/Model/JsonEmployeeFilesEmployee.md) +- [LevelsAndBandsColumnMap](docs/Model/LevelsAndBandsColumnMap.md) +- [LevelsAndBandsEmployee](docs/Model/LevelsAndBandsEmployee.md) +- [LevelsAndBandsErrorWarningIdentifier](docs/Model/LevelsAndBandsErrorWarningIdentifier.md) +- [LevelsAndBandsGroup](docs/Model/LevelsAndBandsGroup.md) +- [LevelsAndBandsGroupStatusCounts](docs/Model/LevelsAndBandsGroupStatusCounts.md) +- [LevelsAndBandsJobTitle](docs/Model/LevelsAndBandsJobTitle.md) +- [LevelsAndBandsJobTitleAssignment](docs/Model/LevelsAndBandsJobTitleAssignment.md) +- [LevelsAndBandsJobTitleAssignmentsRequest](docs/Model/LevelsAndBandsJobTitleAssignmentsRequest.md) +- [LevelsAndBandsJobTitleWithEmployees](docs/Model/LevelsAndBandsJobTitleWithEmployees.md) +- [LevelsAndBandsJobTitlesStatus](docs/Model/LevelsAndBandsJobTitlesStatus.md) +- [LevelsAndBandsLevel](docs/Model/LevelsAndBandsLevel.md) +- [LevelsAndBandsLevelsAndBands](docs/Model/LevelsAndBandsLevelsAndBands.md) +- [LevelsAndBandsLevelsAndBandsStatus](docs/Model/LevelsAndBandsLevelsAndBandsStatus.md) +- [LevelsAndBandsPayBand](docs/Model/LevelsAndBandsPayBand.md) +- [LevelsAndBandsStepStatus](docs/Model/LevelsAndBandsStepStatus.md) +- [LevelsAndBandsUploadResponse](docs/Model/LevelsAndBandsUploadResponse.md) +- [ListFieldDetail](docs/Model/ListFieldDetail.md) +- [ListFieldOption](docs/Model/ListFieldOption.md) - [ListFieldValues](docs/Model/ListFieldValues.md) - [ListFieldValuesOptionsInner](docs/Model/ListFieldValuesOptionsInner.md) +- [ListFieldValuesXml](docs/Model/ListFieldValuesXml.md) +- [ListFieldValuesXmlOptionInner](docs/Model/ListFieldValuesXmlOptionInner.md) +- [ListUsersResponseValue](docs/Model/ListUsersResponseValue.md) +- [ListUsersXmlResponse](docs/Model/ListUsersXmlResponse.md) +- [ListUsersXmlResponseUserInner](docs/Model/ListUsersXmlResponseUserInner.md) - [Location](docs/Model/Location.md) -- [LocationsList](docs/Model/LocationsList.md) +- [LocationResponseObject](docs/Model/LocationResponseObject.md) +- [LocationResponseObjectAddress](docs/Model/LocationResponseObjectAddress.md) +- [LocationResponseObjectAddressCountry](docs/Model/LocationResponseObjectAddressCountry.md) +- [LocationResponseObjectAddressState](docs/Model/LocationResponseObjectAddressState.md) +- [LoginFailureResponse](docs/Model/LoginFailureResponse.md) +- [LoginFailureXmlResponse](docs/Model/LoginFailureXmlResponse.md) +- [LoginResponse](docs/Model/LoginResponse.md) +- [LoginXmlResponse](docs/Model/LoginXmlResponse.md) - [MemberBenefitEvent](docs/Model/MemberBenefitEvent.md) -- [MemberBenefitEventMembersInner](docs/Model/MemberBenefitEventMembersInner.md) -- [MemberBenefitEventMembersInnerCoveragesInner](docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md) -- [MemberBenefitEventMembersInnerCoveragesInnerEventsInner](docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md) +- [MemberBenefitEventCoveragesInner](docs/Model/MemberBenefitEventCoveragesInner.md) +- [MemberBenefitEventCoveragesInnerEventsInner](docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md) +- [MemberBenefitEventsResponse](docs/Model/MemberBenefitEventsResponse.md) +- [MemberBenefitsGetPermissionDeniedResponse](docs/Model/MemberBenefitsGetPermissionDeniedResponse.md) +- [MemberBenefitsGetSuccessResponse](docs/Model/MemberBenefitsGetSuccessResponse.md) +- [MemberBenefitsGetSuccessResponseDataInner](docs/Model/MemberBenefitsGetSuccessResponseDataInner.md) +- [MemberBenefitsGetSuccessResponseDataInnerPlansInner](docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md) +- [MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner](docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md) +- [MemberBenefitsGetSuccessResponseLinks](docs/Model/MemberBenefitsGetSuccessResponseLinks.md) +- [MemberBenefitsGetSuccessResponseLinksNext](docs/Model/MemberBenefitsGetSuccessResponseLinksNext.md) +- [MemberBenefitsGetSuccessResponseLinksPrev](docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md) +- [MemberBenefitsGetSuccessResponseMeta](docs/Model/MemberBenefitsGetSuccessResponseMeta.md) +- [MemberBenefitsGetValidationErrorResponse](docs/Model/MemberBenefitsGetValidationErrorResponse.md) +- [MetaCompanyPropertiesResponse](docs/Model/MetaCompanyPropertiesResponse.md) +- [MetaCurrencyTypeItem](docs/Model/MetaCurrencyTypeItem.md) +- [MonitorFieldList](docs/Model/MonitorFieldList.md) +- [MonitorFieldListFieldsInner](docs/Model/MonitorFieldListFieldsInner.md) +- [NewHirePacketGtkyAnswerVisibilityItem](docs/Model/NewHirePacketGtkyAnswerVisibilityItem.md) +- [NewHirePacketGtkyAnswerVisibilityRequest](docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md) +- [NewHirePacketGtkyAnswerVisibilityResponse](docs/Model/NewHirePacketGtkyAnswerVisibilityResponse.md) +- [NewHirePacketPublicApi](docs/Model/NewHirePacketPublicApi.md) +- [NewHirePacketPublicApiWritableBody](docs/Model/NewHirePacketPublicApiWritableBody.md) +- [NewHirePacketsListResponse](docs/Model/NewHirePacketsListResponse.md) +- [NewHireWidgetItem](docs/Model/NewHireWidgetItem.md) +- [NewHireWidgetResponse](docs/Model/NewHireWidgetResponse.md) - [NewWebHook](docs/Model/NewWebHook.md) +- [OnboardingExperiencePublicApi](docs/Model/OnboardingExperiencePublicApi.md) +- [OnboardingExperiencesListResponse](docs/Model/OnboardingExperiencesListResponse.md) +- [PagedLocationResponse](docs/Model/PagedLocationResponse.md) +- [PagedResponse](docs/Model/PagedResponse.md) - [Pagination](docs/Model/Pagination.md) -- [PostApplicantStatusRequest](docs/Model/PostApplicantStatusRequest.md) -- [PostApplicationCommentRequest](docs/Model/PostApplicationCommentRequest.md) -- [PostGoalRequest](docs/Model/PostGoalRequest.md) -- [PostGoalRequestMilestonesInner](docs/Model/PostGoalRequestMilestonesInner.md) +- [PaginationMetaData](docs/Model/PaginationMetaData.md) +- [PatchCompanyProfileCompanyInformationRequest](docs/Model/PatchCompanyProfileCompanyInformationRequest.md) +- [PatchCompanyProfileCompanyInformationRequestAddress](docs/Model/PatchCompanyProfileCompanyInformationRequestAddress.md) +- [PayGradesAndBandsPublishResponse](docs/Model/PayGradesAndBandsPublishResponse.md) +- [PayGradesAndBandsSaveLevelsResponse](docs/Model/PayGradesAndBandsSaveLevelsResponse.md) +- [PayGradesAndBandsUpdateJobTitlesResponse](docs/Model/PayGradesAndBandsUpdateJobTitlesResponse.md) +- [PayGradesAndBandsUpdatePayBandsResponse](docs/Model/PayGradesAndBandsUpdatePayBandsResponse.md) +- [PersonInfoApiTransformer](docs/Model/PersonInfoApiTransformer.md) - [PostNewEmployee](docs/Model/PostNewEmployee.md) +- [ProblemDetailsResponse](docs/Model/ProblemDetailsResponse.md) - [ProjectCreateRequestSchema](docs/Model/ProjectCreateRequestSchema.md) +- [ProjectCreateTimeTrackingProjectTaskV1](docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md) +- [ProjectCreateTimeTrackingProjectV1](docs/Model/ProjectCreateTimeTrackingProjectV1.md) +- [ProjectCreateTimeTrackingProjectV1TasksInner](docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md) - [ProjectInfoApiTransformer](docs/Model/ProjectInfoApiTransformer.md) - [ProjectInfoApiTransformerProject](docs/Model/ProjectInfoApiTransformerProject.md) -- [ProjectInfoApiTransformerTask](docs/Model/ProjectInfoApiTransformerTask.md) -- [PutGoalMilestoneProgressRequest](docs/Model/PutGoalMilestoneProgressRequest.md) -- [PutGoalProgressRequest](docs/Model/PutGoalProgressRequest.md) -- [PutGoalSharedWithRequest](docs/Model/PutGoalSharedWithRequest.md) -- [PutGoalV11Request](docs/Model/PutGoalV11Request.md) -- [PutGoalV11RequestMilestonesInner](docs/Model/PutGoalV11RequestMilestonesInner.md) +- [ProjectPaginatedResponseDataV1](docs/Model/ProjectPaginatedResponseDataV1.md) +- [ProjectPaginatedResponseDataV1Links](docs/Model/ProjectPaginatedResponseDataV1Links.md) +- [ProjectPaginatedResponseDataV1LinksNext](docs/Model/ProjectPaginatedResponseDataV1LinksNext.md) +- [ProjectPaginatedResponseDataV1LinksPrev](docs/Model/ProjectPaginatedResponseDataV1LinksPrev.md) +- [ProjectPaginatedResponseDataV1Meta](docs/Model/ProjectPaginatedResponseDataV1Meta.md) +- [ProjectPaginatedTasksResponseV1](docs/Model/ProjectPaginatedTasksResponseV1.md) +- [ProjectPaginatedTasksResponseV1Links](docs/Model/ProjectPaginatedTasksResponseV1Links.md) +- [ProjectPaginatedTasksResponseV1Meta](docs/Model/ProjectPaginatedTasksResponseV1Meta.md) +- [ProjectPaginatedTimeTrackingProjectsResponseV1](docs/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md) +- [ProjectTimeTrackingProjectV1](docs/Model/ProjectTimeTrackingProjectV1.md) +- [ProjectTimeTrackingTaskV1](docs/Model/ProjectTimeTrackingTaskV1.md) +- [ProjectUpdateTimeTrackingProjectTaskV1](docs/Model/ProjectUpdateTimeTrackingProjectTaskV1.md) +- [ProjectUpdateTimeTrackingProjectV1](docs/Model/ProjectUpdateTimeTrackingProjectV1.md) +- [ProvinceItem](docs/Model/ProvinceItem.md) +- [PutCompanyIndustryCodesRequest](docs/Model/PutCompanyIndustryCodesRequest.md) +- [PutCompanyProfileDisplayNameRequest](docs/Model/PutCompanyProfileDisplayNameRequest.md) +- [RemoveCycleAdminSelfResponse](docs/Model/RemoveCycleAdminSelfResponse.md) +- [RemoveTotalRewardsEmployeesRequest](docs/Model/RemoveTotalRewardsEmployeesRequest.md) - [Report](docs/Model/Report.md) - [ReportsResponse](docs/Model/ReportsResponse.md) - [Request](docs/Model/Request.md) - [RequestCustomReport](docs/Model/RequestCustomReport.md) - [RequestCustomReportFilters](docs/Model/RequestCustomReportFilters.md) - [RequestCustomReportFiltersLastChanged](docs/Model/RequestCustomReportFiltersLastChanged.md) +- [RequestCustomReportResponse](docs/Model/RequestCustomReportResponse.md) +- [RequestCustomReportResponseEmployeesInner](docs/Model/RequestCustomReportResponseEmployeesInner.md) +- [RequestCustomReportResponseFieldsInner](docs/Model/RequestCustomReportResponseFieldsInner.md) +- [SaveChangeCommTemplateResponse](docs/Model/SaveChangeCommTemplateResponse.md) +- [SchedulingCreateScheduleRequestV1](docs/Model/SchedulingCreateScheduleRequestV1.md) +- [SchedulingCreateSchedulingShiftRequestV1](docs/Model/SchedulingCreateSchedulingShiftRequestV1.md) +- [SchedulingPublishShiftsFailureV1](docs/Model/SchedulingPublishShiftsFailureV1.md) +- [SchedulingPublishShiftsRequest](docs/Model/SchedulingPublishShiftsRequest.md) +- [SchedulingPublishShiftsResultV1](docs/Model/SchedulingPublishShiftsResultV1.md) +- [SchedulingScheduleListResponseV1](docs/Model/SchedulingScheduleListResponseV1.md) +- [SchedulingScheduleListResponseV1Links](docs/Model/SchedulingScheduleListResponseV1Links.md) +- [SchedulingScheduleListResponseV1Meta](docs/Model/SchedulingScheduleListResponseV1Meta.md) +- [SchedulingScheduleV1](docs/Model/SchedulingScheduleV1.md) +- [SchedulingSchedulingShiftV1](docs/Model/SchedulingSchedulingShiftV1.md) +- [SchedulingShiftListResponseV1](docs/Model/SchedulingShiftListResponseV1.md) +- [SchedulingShiftListResponseV1Links](docs/Model/SchedulingShiftListResponseV1Links.md) +- [SchedulingShiftListResponseV1LinksNext](docs/Model/SchedulingShiftListResponseV1LinksNext.md) +- [SchedulingShiftListResponseV1LinksPrev](docs/Model/SchedulingShiftListResponseV1LinksPrev.md) +- [SchedulingShiftListResponseV1Meta](docs/Model/SchedulingShiftListResponseV1Meta.md) +- [SchedulingTimezoneListResponseV1](docs/Model/SchedulingTimezoneListResponseV1.md) +- [SchedulingTimezoneListResponseV1Meta](docs/Model/SchedulingTimezoneListResponseV1Meta.md) +- [SchedulingTimezoneV1](docs/Model/SchedulingTimezoneV1.md) +- [SchedulingUpdateScheduleRequestV1](docs/Model/SchedulingUpdateScheduleRequestV1.md) +- [SchedulingUpdateSchedulingShiftRequestV1](docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md) +- [SendEmployeeVerificationLifecycleEmailByUserRequest](docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md) +- [SendRecommendationsResponse](docs/Model/SendRecommendationsResponse.md) +- [SetBreakPolicyEmployeesRequest](docs/Model/SetBreakPolicyEmployeesRequest.md) +- [SetTotalRewardsCustomDisclaimerRequest](docs/Model/SetTotalRewardsCustomDisclaimerRequest.md) +- [SetTotalRewardsOnboardingStepRequest](docs/Model/SetTotalRewardsOnboardingStepRequest.md) +- [ShareOptionsResponse](docs/Model/ShareOptionsResponse.md) - [State](docs/Model/State.md) - [StateProvinceResponseSchema](docs/Model/StateProvinceResponseSchema.md) - [StateProvinceSchema](docs/Model/StateProvinceSchema.md) - [TableRowDeleteResponse](docs/Model/TableRowDeleteResponse.md) - [TableRowUpdate](docs/Model/TableRowUpdate.md) +- [TabularField](docs/Model/TabularField.md) +- [TabularFieldFieldsInner](docs/Model/TabularFieldFieldsInner.md) - [TaskCreateSchema](docs/Model/TaskCreateSchema.md) -- [TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner](docs/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md) +- [TimeOffBalanceEntry](docs/Model/TimeOffBalanceEntry.md) - [TimeOffHistory](docs/Model/TimeOffHistory.md) +- [TimeOffPolicy](docs/Model/TimeOffPolicy.md) - [TimeOffRequest](docs/Model/TimeOffRequest.md) +- [TimeOffRequest1](docs/Model/TimeOffRequest1.md) +- [TimeOffRequest1Actions](docs/Model/TimeOffRequest1Actions.md) +- [TimeOffRequest1Amount](docs/Model/TimeOffRequest1Amount.md) +- [TimeOffRequest1Notes](docs/Model/TimeOffRequest1Notes.md) +- [TimeOffRequest1Status](docs/Model/TimeOffRequest1Status.md) +- [TimeOffRequest1Type](docs/Model/TimeOffRequest1Type.md) - [TimeOffRequestDatesInner](docs/Model/TimeOffRequestDatesInner.md) - [TimeOffRequestNotesInner](docs/Model/TimeOffRequestNotesInner.md) +- [TimeOffTypesAndDefaultHours](docs/Model/TimeOffTypesAndDefaultHours.md) +- [TimeOffTypesAndDefaultHoursDefaultHoursInner](docs/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.md) +- [TimeOffTypesAndDefaultHoursTimeOffTypesInner](docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md) +- [TimeTrackingBreakPolicyEmployeeCollectionV1Inner](docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1](docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner](docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner](docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md) - [TimeTrackingBulkResponseSchema](docs/Model/TimeTrackingBulkResponseSchema.md) - [TimeTrackingBulkResponseSchemaResponse](docs/Model/TimeTrackingBulkResponseSchemaResponse.md) +- [TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1](docs/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md) +- [TimeTrackingCreateTimeTrackingBreakPolicyV1](docs/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md) +- [TimeTrackingCreateTimeTrackingBreakV1](docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md) - [TimeTrackingDeleteResponseSchema](docs/Model/TimeTrackingDeleteResponseSchema.md) - [TimeTrackingIdResponseSchema](docs/Model/TimeTrackingIdResponseSchema.md) +- [TimeTrackingOffsetPaginatedResponseDataV1](docs/Model/TimeTrackingOffsetPaginatedResponseDataV1.md) +- [TimeTrackingOffsetPaginatedResponseDataV1Links](docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.md) +- [TimeTrackingOffsetPaginatedResponseDataV1Meta](docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md) +- [TimeTrackingPaginatedBreakAssessmentsResponseV1](docs/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md) +- [TimeTrackingPaginatedBreakPoliciesResponseV1](docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md) +- [TimeTrackingPaginatedBreakPolicyEmployeesResponseV1](docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md) +- [TimeTrackingPaginatedBreaksResponseV1](docs/Model/TimeTrackingPaginatedBreaksResponseV1.md) - [TimeTrackingProjectWithTasksAndEmployeeIds](docs/Model/TimeTrackingProjectWithTasksAndEmployeeIds.md) - [TimeTrackingRecord](docs/Model/TimeTrackingRecord.md) - [TimeTrackingRecordSchema](docs/Model/TimeTrackingRecordSchema.md) -- [TimeTrackingRecordSchemaProject](docs/Model/TimeTrackingRecordSchemaProject.md) -- [TimeTrackingRecordSchemaProjectTask](docs/Model/TimeTrackingRecordSchemaProjectTask.md) -- [TimeTrackingRecordSchemaShiftDifferential](docs/Model/TimeTrackingRecordSchemaShiftDifferential.md) +- [TimeTrackingSyncTimeTrackingBreakPolicyV1](docs/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md) - [TimeTrackingTask](docs/Model/TimeTrackingTask.md) +- [TimeTrackingTimeTrackingBreakAssessmentV1](docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md) +- [TimeTrackingTimeTrackingBreakAssessmentViolationV1](docs/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md) +- [TimeTrackingTimeTrackingBreakAvailabilityV1](docs/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md) +- [TimeTrackingTimeTrackingBreakPolicyV1](docs/Model/TimeTrackingTimeTrackingBreakPolicyV1.md) +- [TimeTrackingTimeTrackingBreakPolicyWithRelationsV1](docs/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md) +- [TimeTrackingTimeTrackingBreakV1](docs/Model/TimeTrackingTimeTrackingBreakV1.md) +- [TimeTrackingUpdateTimeTrackingBreakPolicyV1](docs/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md) +- [TimeTrackingUpdateTimeTrackingBreakV1](docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md) - [TimesheetEntryInfoApiTransformer](docs/Model/TimesheetEntryInfoApiTransformer.md) +- [TimezoneListResponse](docs/Model/TimezoneListResponse.md) +- [TimezoneResource](docs/Model/TimezoneResource.md) +- [TotalRewardsBenefitDetailsValues](docs/Model/TotalRewardsBenefitDetailsValues.md) +- [TotalRewardsBenefitSectionValues](docs/Model/TotalRewardsBenefitSectionValues.md) +- [TotalRewardsCalendarSectionValues](docs/Model/TotalRewardsCalendarSectionValues.md) +- [TotalRewardsCompSummaryValues](docs/Model/TotalRewardsCompSummaryValues.md) +- [TotalRewardsCustomDisclaimerInfo](docs/Model/TotalRewardsCustomDisclaimerInfo.md) +- [TotalRewardsEmployeeStatement](docs/Model/TotalRewardsEmployeeStatement.md) +- [TotalRewardsEquityDetailsValues](docs/Model/TotalRewardsEquityDetailsValues.md) +- [TotalRewardsEquityEstimatedValuationValues](docs/Model/TotalRewardsEquityEstimatedValuationValues.md) +- [TotalRewardsEquityGrowthChartItem](docs/Model/TotalRewardsEquityGrowthChartItem.md) +- [TotalRewardsEquityGrowthEstimation](docs/Model/TotalRewardsEquityGrowthEstimation.md) +- [TotalRewardsEquitySectionValues](docs/Model/TotalRewardsEquitySectionValues.md) +- [TotalRewardsExtraPayDetailsValues](docs/Model/TotalRewardsExtraPayDetailsValues.md) +- [TotalRewardsExtraPaySectionValues](docs/Model/TotalRewardsExtraPaySectionValues.md) +- [TotalRewardsHolidayValue](docs/Model/TotalRewardsHolidayValue.md) +- [TotalRewardsOnboardingStep](docs/Model/TotalRewardsOnboardingStep.md) +- [TotalRewardsOverviewSectionValues](docs/Model/TotalRewardsOverviewSectionValues.md) +- [TotalRewardsTimeOffPolicyValue](docs/Model/TotalRewardsTimeOffPolicyValue.md) +- [TotalRewardsTimelineItem](docs/Model/TotalRewardsTimelineItem.md) +- [TotalRewardsTimelineItemLabel](docs/Model/TotalRewardsTimelineItemLabel.md) +- [TotalRewardsTimelineSectionValues](docs/Model/TotalRewardsTimelineSectionValues.md) - [TrainingCategory](docs/Model/TrainingCategory.md) -- [TrainingCategoryList](docs/Model/TrainingCategoryList.md) - [TrainingRecord](docs/Model/TrainingRecord.md) -- [TrainingRecordList](docs/Model/TrainingRecordList.md) +- [TrainingRecordMap](docs/Model/TrainingRecordMap.md) +- [TrainingRecordType](docs/Model/TrainingRecordType.md) - [TrainingType](docs/Model/TrainingType.md) -- [TrainingTypeList](docs/Model/TrainingTypeList.md) +- [TrainingTypeCategory](docs/Model/TrainingTypeCategory.md) - [TransformedApiEmployeeGoalDetails](docs/Model/TransformedApiEmployeeGoalDetails.md) - [TransformedApiEmployeeGoalDetailsGoal](docs/Model/TransformedApiEmployeeGoalDetailsGoal.md) - [TransformedApiGoal](docs/Model/TransformedApiGoal.md) -- [TransformedApiGoalGoal](docs/Model/TransformedApiGoalGoal.md) -- [TransformedApiGoalGoalActions](docs/Model/TransformedApiGoalGoalActions.md) -- [TransformedApiGoalGoalMilestonesInner](docs/Model/TransformedApiGoalGoalMilestonesInner.md) -- [Unauthorized](docs/Model/Unauthorized.md) -- [Unauthorized1](docs/Model/Unauthorized1.md) -- [UnauthorizedErrorsInner](docs/Model/UnauthorizedErrorsInner.md) +- [TransformedApiGoalMilestonesInner](docs/Model/TransformedApiGoalMilestonesInner.md) +- [UnassignEmployeesFromBreakPolicyRequest](docs/Model/UnassignEmployeesFromBreakPolicyRequest.md) +- [UpdateApplicantStatusRequest](docs/Model/UpdateApplicantStatusRequest.md) +- [UpdateApplicantStatusResponse](docs/Model/UpdateApplicantStatusResponse.md) +- [UpdateCompanyIndustryCodes400Response](docs/Model/UpdateCompanyIndustryCodes400Response.md) +- [UpdateCompanyIndustryCodes403Response](docs/Model/UpdateCompanyIndustryCodes403Response.md) +- [UpdateCompanyIndustryCodes404Response](docs/Model/UpdateCompanyIndustryCodes404Response.md) +- [UpdateCompanyIndustryCodes500Response](docs/Model/UpdateCompanyIndustryCodes500Response.md) +- [UpdateCompanyIndustryCodesResponse](docs/Model/UpdateCompanyIndustryCodesResponse.md) +- [UpdateCompanyNameBadRequestResponse](docs/Model/UpdateCompanyNameBadRequestResponse.md) +- [UpdateCompanyNameBadRequestResponseError](docs/Model/UpdateCompanyNameBadRequestResponseError.md) +- [UpdateCompanyNameForbiddenResponse](docs/Model/UpdateCompanyNameForbiddenResponse.md) +- [UpdateCompanyNameForbiddenResponseError](docs/Model/UpdateCompanyNameForbiddenResponseError.md) +- [UpdateCompanyNameInternalErrorResponse](docs/Model/UpdateCompanyNameInternalErrorResponse.md) +- [UpdateCompanyNameSuccessResponse](docs/Model/UpdateCompanyNameSuccessResponse.md) +- [UpdateCompensationBenchmarkRequest](docs/Model/UpdateCompensationBenchmarkRequest.md) +- [UpdateCompensationBenchmarkSourceItem](docs/Model/UpdateCompensationBenchmarkSourceItem.md) +- [UpdateCompensationBenchmarkSourcesRequest](docs/Model/UpdateCompensationBenchmarkSourcesRequest.md) +- [UpdateCompensationBenchmarkSourcesResponse](docs/Model/UpdateCompensationBenchmarkSourcesResponse.md) - [UpdateEmployeeTrainingRecordRequest](docs/Model/UpdateEmployeeTrainingRecordRequest.md) +- [UpdateEmployeeVerificationIntegrationRequest](docs/Model/UpdateEmployeeVerificationIntegrationRequest.md) +- [UpdateEmployeeVerificationRequest](docs/Model/UpdateEmployeeVerificationRequest.md) +- [UpdateGoalCommentRequest](docs/Model/UpdateGoalCommentRequest.md) +- [UpdateGoalMilestoneProgressRequest](docs/Model/UpdateGoalMilestoneProgressRequest.md) +- [UpdateGoalProgressRequest](docs/Model/UpdateGoalProgressRequest.md) +- [UpdateGoalSharingRequest](docs/Model/UpdateGoalSharingRequest.md) +- [UpdateGoalV1](docs/Model/UpdateGoalV1.md) +- [UpdateGoalV11Request](docs/Model/UpdateGoalV11Request.md) +- [UpdateGoalV11RequestMilestonesInner](docs/Model/UpdateGoalV11RequestMilestonesInner.md) +- [UpdateLocationRequest](docs/Model/UpdateLocationRequest.md) +- [UpdateLocationRequestAddress](docs/Model/UpdateLocationRequestAddress.md) - [UpdateTrainingCategoryRequest](docs/Model/UpdateTrainingCategoryRequest.md) - [UpdateTrainingTypeRequest](docs/Model/UpdateTrainingTypeRequest.md) - [UpdateTrainingTypeRequestCategory](docs/Model/UpdateTrainingTypeRequestCategory.md) -- [WebHookLogResponse](docs/Model/WebHookLogResponse.md) +- [UpdateWebhookBadRequestResponse](docs/Model/UpdateWebhookBadRequestResponse.md) +- [UpdatedCompensationBenchmark](docs/Model/UpdatedCompensationBenchmark.md) +- [UpdatedCompensationBenchmarkSavedBenchmark](docs/Model/UpdatedCompensationBenchmarkSavedBenchmark.md) +- [UploadEmployeePhotoRequest1](docs/Model/UploadEmployeePhotoRequest1.md) +- [UserPermissionData](docs/Model/UserPermissionData.md) +- [WebHookPostFieldDataObject](docs/Model/WebHookPostFieldDataObject.md) +- [WebHookPostFieldPageDataObject](docs/Model/WebHookPostFieldPageDataObject.md) +- [WebHookPostFieldResponseObject](docs/Model/WebHookPostFieldResponseObject.md) +- [WebHookPostFieldTableDataObject](docs/Model/WebHookPostFieldTableDataObject.md) - [WebHookResponse](docs/Model/WebHookResponse.md) - [Webhook](docs/Model/Webhook.md) - [WebhookBadRequest](docs/Model/WebhookBadRequest.md) +- [WebhookBadRequestErrorsInner](docs/Model/WebhookBadRequestErrorsInner.md) - [WebhookError](docs/Model/WebhookError.md) - [WebhookErrorErrors](docs/Model/WebhookErrorErrors.md) +- [WebhookEventType](docs/Model/WebhookEventType.md) +- [WebhookLogEntry](docs/Model/WebhookLogEntry.md) +- [WebhookLogListResponse](docs/Model/WebhookLogListResponse.md) +- [WebhookLogRateLimitResponse](docs/Model/WebhookLogRateLimitResponse.md) +- [WebhookLogRateLimitResponseError](docs/Model/WebhookLogRateLimitResponseError.md) - [WebhookSubErrorProperty](docs/Model/WebhookSubErrorProperty.md) -- [WebhookSubErrorPropertyPostFieldsInner](docs/Model/WebhookSubErrorPropertyPostFieldsInner.md) +- [WebhookSubErrorPropertyMonitorFieldsInner](docs/Model/WebhookSubErrorPropertyMonitorFieldsInner.md) +- [WebhookSubErrorPropertyMonitorFieldsInnerId](docs/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.md) - [WebhookSubErrorPropertyUnknownFieldsInner](docs/Model/WebhookSubErrorPropertyUnknownFieldsInner.md) +- [WebhookSubErrorPropertyUnknownFieldsInnerId](docs/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.md) - [WebhooksList](docs/Model/WebhooksList.md) - [WebhooksListWebhooksInner](docs/Model/WebhooksListWebhooksInner.md) -- [XmlDirectoryEmployee](docs/Model/XmlDirectoryEmployee.md) -- [XmlDirectoryEmployeeEmployees](docs/Model/XmlDirectoryEmployeeEmployees.md) -- [XmlDirectoryEmployeeEmployeesEmployeeInner](docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.md) -- [XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner](docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md) -- [XmlDirectoryEmployeeFieldset](docs/Model/XmlDirectoryEmployeeFieldset.md) -- [XmlDirectoryEmployeeFieldsetFieldInner](docs/Model/XmlDirectoryEmployeeFieldsetFieldInner.md) +- [WhosOutEntry](docs/Model/WhosOutEntry.md) +- [XmlEmployeeFiles](docs/Model/XmlEmployeeFiles.md) +- [XmlEmployeeFilesCategoryInner](docs/Model/XmlEmployeeFilesCategoryInner.md) +- [XmlEmployeeFilesCategoryInnerFileInner](docs/Model/XmlEmployeeFilesCategoryInnerFileInner.md) ## Exceptions diff --git a/docs/Api/AccountInformationApi.md b/docs/Api/AccountInformationApi.md index b77fbfc3..78f4822f 100644 --- a/docs/Api/AccountInformationApi.md +++ b/docs/Api/AccountInformationApi.md @@ -4,24 +4,335 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**baa7162824294d030115568d1d8e6ca7()**](AccountInformationApi.md#baa7162824294d030115568d1d8e6ca7) | **GET** /api/v1/meta/timezones/{id} | Get timezone by ID | +| [**call10d66d8561dd7dac50ff9c21ef63d83b()**](AccountInformationApi.md#call10d66d8561dd7dac50ff9c21ef63d83b) | **GET** /api/v1/meta/timezones/by-zip/{zip} | Get timezone by ZIP code | +| [**call5c5fb0f1211ae1c9451753f92f1053b6()**](AccountInformationApi.md#call5c5fb0f1211ae1c9451753f92f1053b6) | **GET** /api/v1/meta/timezones | List timezones | +| [**getAllCurrencyTypes()**](AccountInformationApi.md#getAllCurrencyTypes) | **GET** /api/v1/meta/currency/types | Get all currency types | +| [**getAllProvinces()**](AccountInformationApi.md#getAllProvinces) | **GET** /api/v1/meta/provinces | Get All Provinces | | [**getCountriesOptions()**](AccountInformationApi.md#getCountriesOptions) | **GET** /api/v1/meta/countries/options | Get Countries | -| [**getListOfUsers()**](AccountInformationApi.md#getListOfUsers) | **GET** /api/v1/meta/users | Get Users | -| [**getStatesByCountryId()**](AccountInformationApi.md#getStatesByCountryId) | **GET** /api/v1/meta/provinces/{countryId} | Get States by Country ID | -| [**metadataAddOrUpdateValuesForListFields()**](AccountInformationApi.md#metadataAddOrUpdateValuesForListFields) | **PUT** /api/v1/meta/lists/{listFieldId} | Create or Update List Field Values | -| [**metadataGetAListOfFields()**](AccountInformationApi.md#metadataGetAListOfFields) | **GET** /api/v1/meta/fields | Get Fields | -| [**metadataGetAListOfTabularFields()**](AccountInformationApi.md#metadataGetAListOfTabularFields) | **GET** /api/v1/meta/tables | Get Tabular Fields | -| [**metadataGetDetailsForListFields()**](AccountInformationApi.md#metadataGetDetailsForListFields) | **GET** /api/v1/meta/lists | Get List Field Details | +| [**getMetaCompany()**](AccountInformationApi.md#getMetaCompany) | **GET** /api/v1/meta/company | Get company properties | +| [**getStatesByCountryId()**](AccountInformationApi.md#getStatesByCountryId) | **GET** /api/v1/meta/provinces/{countryId} | List states and provinces for a country by Country ID | +| [**listFields()**](AccountInformationApi.md#listFields) | **GET** /api/v1/meta/fields | List Fields | +| [**listListFields()**](AccountInformationApi.md#listListFields) | **GET** /api/v1/meta/lists | List List Fields | +| [**listTabularFields()**](AccountInformationApi.md#listTabularFields) | **GET** /api/v1/meta/tables | List Tabular Fields | +| [**listUsers()**](AccountInformationApi.md#listUsers) | **GET** /api/v1/meta/users | List Users | +| [**updateListFieldValues()**](AccountInformationApi.md#updateListFieldValues) | **PUT** /api/v1/meta/lists/{listFieldId} | Update List Field Values | +## `baa7162824294d030115568d1d8e6ca7()` + +```php +baa7162824294d030115568d1d8e6ca7($id): \BhrSdk\Model\TimezoneResource +``` + +Get timezone by ID + +Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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 = 56; // int | The numeric ID of the timezone to retrieve. + +try { + $result = $apiInstance->baa7162824294d030115568d1d8e6ca7($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->baa7162824294d030115568d1d8e6ca7: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The numeric ID of the timezone to retrieve. | | + +### Return type + +[**\BhrSdk\Model\TimezoneResource**](../Model/TimezoneResource.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `call10d66d8561dd7dac50ff9c21ef63d83b()` + +```php +call10d66d8561dd7dac50ff9c21ef63d83b($zip): \BhrSdk\Model\TimezoneResource +``` + +Get timezone by ZIP code + +Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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 +); +$zip = 84604; // string | A 5-digit US ZIP code. + +try { + $result = $apiInstance->call10d66d8561dd7dac50ff9c21ef63d83b($zip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->call10d66d8561dd7dac50ff9c21ef63d83b: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **zip** | **string**| A 5-digit US ZIP code. | | + +### Return type + +[**\BhrSdk\Model\TimezoneResource**](../Model/TimezoneResource.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `call5c5fb0f1211ae1c9451753f92f1053b6()` + +```php +call5c5fb0f1211ae1c9451753f92f1053b6($page_size, $page, $sort, $select, $filter): \BhrSdk\Model\TimezoneListResponse +``` + +List timezones + +Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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() +); +$page_size = 500; // int | The number of items to return per page. +$page = 1; // int | The page number to retrieve. +$sort = ''; // string | Ordering by OData (Open Data Protocol) v4 specification +$select = ''; // string | Projection (field selection) by OData specification +$filter = ''; // string | Filter by an OData (Open Data Protocol) v4 specification + +try { + $result = $apiInstance->call5c5fb0f1211ae1c9451753f92f1053b6($page_size, $page, $sort, $select, $filter); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->call5c5fb0f1211ae1c9451753f92f1053b6: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **page_size** | **int**| The number of items to return per page. | [optional] [default to 500] | +| **page** | **int**| The page number to retrieve. | [optional] [default to 1] | +| **sort** | **string**| Ordering by OData (Open Data Protocol) v4 specification | [optional] [default to ''] | +| **select** | **string**| Projection (field selection) by OData specification | [optional] [default to ''] | +| **filter** | **string**| Filter by an OData (Open Data Protocol) v4 specification | [optional] [default to ''] | + +### Return type + +[**\BhrSdk\Model\TimezoneListResponse**](../Model/TimezoneListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getAllCurrencyTypes()` + +```php +getAllCurrencyTypes(): \BhrSdk\Model\MetaCurrencyTypeItem[] +``` + +Get all currency types + +Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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 +); + +try { + $result = $apiInstance->getAllCurrencyTypes(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->getAllCurrencyTypes: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\MetaCurrencyTypeItem[]**](../Model/MetaCurrencyTypeItem.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getAllProvinces()` + +```php +getAllProvinces(): \BhrSdk\Model\ProvinceItem[] +``` + +Get All Provinces + +Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Use the countryId field to filter client-side. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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 +); + +try { + $result = $apiInstance->getAllProvinces(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->getAllProvinces: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\ProvinceItem[]**](../Model/ProvinceItem.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + ## `getCountriesOptions()` ```php -getCountriesOptions(): \BhrSdk\Model\CountrySchema[] +getCountriesOptions($iso_code): \BhrSdk\Model\CountriesOptionsResponse ``` Get Countries -Get all available countries as options. Returns a list of countries with ID and name for use in forms and dropdowns. +Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset). ### Example @@ -42,9 +353,10 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( new GuzzleHttp\Client(), $config ); +$iso_code = 'iso_code_example'; // string | ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. try { - $result = $apiInstance->getCountriesOptions(); + $result = $apiInstance->getCountriesOptions($iso_code); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountInformationApi->getCountriesOptions: ', $e->getMessage(), PHP_EOL; @@ -53,11 +365,13 @@ try { ### Parameters -This endpoint does not need any parameter. +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **iso_code** | **string**| ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. | [optional] | ### Return type -[**\BhrSdk\Model\CountrySchema[]**](../Model/CountrySchema.md) +[**\BhrSdk\Model\CountriesOptionsResponse**](../Model/CountriesOptionsResponse.md) ### Authorization @@ -72,15 +386,15 @@ This endpoint does not need any parameter. [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getListOfUsers()` +## `getMetaCompany()` ```php -getListOfUsers() +getMetaCompany(): \BhrSdk\Model\MetaCompanyPropertiesResponse ``` -Get Users +Get company properties -Retrieves a list of all active users in the system with their basic information. This includes user IDs, names, and email addresses. The list can be used to map user IDs to user information throughout the API. +Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. ### Example @@ -103,9 +417,10 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( ); try { - $apiInstance->getListOfUsers(); + $result = $apiInstance->getMetaCompany(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling AccountInformationApi->getListOfUsers: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountInformationApi->getMetaCompany: ', $e->getMessage(), PHP_EOL; } ``` @@ -115,7 +430,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**\BhrSdk\Model\MetaCompanyPropertiesResponse**](../Model/MetaCompanyPropertiesResponse.md) ### Authorization @@ -136,9 +451,9 @@ void (empty response body) getStatesByCountryId($country_id): \BhrSdk\Model\StateProvinceResponseSchema ``` -Get States by Country ID +List states and provinces for a country by Country ID -Get states/provinces for a specific country. Returns a list of state/province options with ID, label, ISO code, and name. +Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. \"UT\"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. \"US-UT\"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list. ### Example @@ -159,7 +474,7 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( new GuzzleHttp\Client(), $config ); -$country_id = 56; // int | ID of the country to get states/provinces for +$country_id = 56; // int | Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. try { $result = $apiInstance->getStatesByCountryId($country_id); @@ -173,7 +488,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **country_id** | **int**| ID of the country to get states/provinces for | | +| **country_id** | **int**| Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. | | ### Return type @@ -192,15 +507,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `metadataAddOrUpdateValuesForListFields()` +## `listFields()` ```php -metadataAddOrUpdateValuesForListFields($list_field_id, $list_field_values) +listFields($accept_header_parameter): \BhrSdk\Model\Field1[] ``` -Create or Update List Field Values +List Fields -This resource accepts one or more options. To update an option, specify an ID. You may also remove an option from the list of current values by archiving the value. To create a new option, do not specify an \"id\" attribute. +Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. ### Example @@ -221,13 +536,13 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( new GuzzleHttp\Client(), $config ); -$list_field_id = 'list_field_id_example'; // string -$list_field_values = new \BhrSdk\Model\ListFieldValues(); // \BhrSdk\Model\ListFieldValues +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->metadataAddOrUpdateValuesForListFields($list_field_id, $list_field_values); + $result = $apiInstance->listFields($accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling AccountInformationApi->metadataAddOrUpdateValuesForListFields: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountInformationApi->listFields: ', $e->getMessage(), PHP_EOL; } ``` @@ -235,12 +550,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **list_field_id** | **string**| | | -| **list_field_values** | [**\BhrSdk\Model\ListFieldValues**](../Model/ListFieldValues.md)| | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\Field1[]**](../Model/Field1.md) ### Authorization @@ -249,21 +563,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `metadataGetAListOfFields()` +## `listListFields()` ```php -metadataGetAListOfFields($accept_header_parameter) +listListFields($format, $accept_header_parameter): \BhrSdk\Model\ListFieldDetail[] ``` -Get Fields +List List Fields -This endpoint can help with discovery of fields that are available in an account. +Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users. ### Example @@ -284,12 +598,14 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( new GuzzleHttp\Client(), $config ); +$format = 'format_example'; // string | Set to \"json\" to receive JSON output as an alternative to using the Accept header. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->metadataGetAListOfFields($accept_header_parameter); + $result = $apiInstance->listListFields($format, $accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling AccountInformationApi->metadataGetAListOfFields: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountInformationApi->listListFields: ', $e->getMessage(), PHP_EOL; } ``` @@ -297,11 +613,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **format** | **string**| Set to \"json\" to receive JSON output as an alternative to using the Accept header. | [optional] | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\ListFieldDetail[]**](../Model/ListFieldDetail.md) ### Authorization @@ -316,15 +633,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `metadataGetAListOfTabularFields()` +## `listTabularFields()` ```php -metadataGetAListOfTabularFields($accept_header_parameter) +listTabularFields($accept_header_parameter): \BhrSdk\Model\TabularField[] ``` -Get Tabular Fields +List Tabular Fields -This endpoint can help discover table fields available in your BambooHR account. +Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. ### Example @@ -348,9 +665,10 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->metadataGetAListOfTabularFields($accept_header_parameter); + $result = $apiInstance->listTabularFields($accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling AccountInformationApi->metadataGetAListOfTabularFields: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountInformationApi->listTabularFields: ', $e->getMessage(), PHP_EOL; } ``` @@ -362,7 +680,7 @@ try { ### Return type -void (empty response body) +[**\BhrSdk\Model\TabularField[]**](../Model/TabularField.md) ### Authorization @@ -377,15 +695,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `metadataGetDetailsForListFields()` +## `listUsers()` ```php -metadataGetDetailsForListFields($accept_header_parameter) +listUsers($accept_header_parameter, $status): array<string,\BhrSdk\Model\ListUsersResponseValue> ``` -Get List Field Details +List Users -This endpoint will return details for all list fields. Lists that can be edited will have the \"manageable\" attribute set to yes. Lists with the \"multiple\" attribute set to yes are fields that can have multiple values. Options with the \"archived\" attribute set to yes should not appear as current options, but are included so that historical data can reference the value. +Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. ### Example @@ -407,11 +725,13 @@ $apiInstance = new BhrSdk\Api\AccountInformationApi( $config ); $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$status = enabled; // string | Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. try { - $apiInstance->metadataGetDetailsForListFields($accept_header_parameter); + $result = $apiInstance->listUsers($accept_header_parameter, $status); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling AccountInformationApi->metadataGetDetailsForListFields: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountInformationApi->listUsers: ', $e->getMessage(), PHP_EOL; } ``` @@ -420,10 +740,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **status** | **string**| Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. | [optional] | ### Return type -void (empty response body) +[**array<string,\BhrSdk\Model\ListUsersResponseValue>**](../Model/ListUsersResponseValue.md) ### Authorization @@ -437,3 +758,69 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) + +## `updateListFieldValues()` + +```php +updateListFieldValues($list_field_id, $list_field_values, $format): \BhrSdk\Model\ListFieldDetail +``` + +Update List Field Values + +Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AccountInformationApi( + // 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 +); +$list_field_id = 'list_field_id_example'; // string | The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. +$list_field_values = new \BhrSdk\Model\ListFieldValues(); // \BhrSdk\Model\ListFieldValues +$format = 'format_example'; // string | Set to \"json\" to receive JSON output as an alternative to using the Accept header. + +try { + $result = $apiInstance->updateListFieldValues($list_field_id, $list_field_values, $format); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AccountInformationApi->updateListFieldValues: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **list_field_id** | **string**| The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. | | +| **list_field_values** | [**\BhrSdk\Model\ListFieldValues**](../Model/ListFieldValues.md)| | | +| **format** | **string**| Set to \"json\" to receive JSON output as an alternative to using the Accept header. | [optional] | + +### Return type + +[**\BhrSdk\Model\ListFieldDetail**](../Model/ListFieldDetail.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json`, `text/xml` +- **Accept**: `application/json`, `text/xml` + +[[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/AlertApi.md b/docs/Api/AlertApi.md new file mode 100644 index 00000000..c19bb9e0 --- /dev/null +++ b/docs/Api/AlertApi.md @@ -0,0 +1,67 @@ +# BhrSdk\AlertApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**call0f0dcb585e5883175b6557c16cf6755a()**](AlertApi.md#call0f0dcb585e5883175b6557c16cf6755a) | **GET** /api/v1/alerts | List alert templates | + + +## `call0f0dcb585e5883175b6557c16cf6755a()` + +```php +call0f0dcb585e5883175b6557c16cf6755a(): \BhrSdk\Model\AlertTemplateListResponse +``` + +List alert templates + +Returns all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AlertApi( + // 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 +); + +try { + $result = $apiInstance->call0f0dcb585e5883175b6557c16cf6755a(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AlertApi->call0f0dcb585e5883175b6557c16cf6755a: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\AlertTemplateListResponse**](../Model/AlertTemplateListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/AlertConfigurationsApi.md b/docs/Api/AlertConfigurationsApi.md new file mode 100644 index 00000000..7584b4cd --- /dev/null +++ b/docs/Api/AlertConfigurationsApi.md @@ -0,0 +1,258 @@ +# BhrSdk\AlertConfigurationsApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**a05e93bc2eb9c39a40fbd71e6e07f3c6()**](AlertConfigurationsApi.md#a05e93bc2eb9c39a40fbd71e6e07f3c6) | **POST** /api/v1/alert-configurations | Create an alert configuration | +| [**call14e66bfb5f075043221ce1e843c97493()**](AlertConfigurationsApi.md#call14e66bfb5f075043221ce1e843c97493) | **GET** /api/v1/alert-configurations/{id} | Get an alert configuration | +| [**call6d0a073cbf3e97fe0409de42c68fe779()**](AlertConfigurationsApi.md#call6d0a073cbf3e97fe0409de42c68fe779) | **GET** /api/v1/alert-configurations | List alert configurations | +| [**eb42aa2fa339ba5c08b147fc13c6a79e()**](AlertConfigurationsApi.md#eb42aa2fa339ba5c08b147fc13c6a79e) | **PUT** /api/v1/alert-configurations/{id} | Update an alert configuration | + + +## `a05e93bc2eb9c39a40fbd71e6e07f3c6()` + +```php +a05e93bc2eb9c39a40fbd71e6e07f3c6($company_alert_data_object): \BhrSdk\Model\CompanyAlertDataObject +``` + +Create an alert configuration + +Creates a new company alert configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AlertConfigurationsApi( + // 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 +); +$company_alert_data_object = new \BhrSdk\Model\CompanyAlertDataObject(); // \BhrSdk\Model\CompanyAlertDataObject + +try { + $result = $apiInstance->a05e93bc2eb9c39a40fbd71e6e07f3c6($company_alert_data_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AlertConfigurationsApi->a05e93bc2eb9c39a40fbd71e6e07f3c6: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **company_alert_data_object** | [**\BhrSdk\Model\CompanyAlertDataObject**](../Model/CompanyAlertDataObject.md)| | | + +### Return type + +[**\BhrSdk\Model\CompanyAlertDataObject**](../Model/CompanyAlertDataObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call14e66bfb5f075043221ce1e843c97493()` + +```php +call14e66bfb5f075043221ce1e843c97493($id): \BhrSdk\Model\CompanyAlertDataObject +``` + +Get an alert configuration + +Returns a single company alert configuration by ID. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AlertConfigurationsApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call14e66bfb5f075043221ce1e843c97493($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AlertConfigurationsApi->call14e66bfb5f075043221ce1e843c97493: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\CompanyAlertDataObject**](../Model/CompanyAlertDataObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call6d0a073cbf3e97fe0409de42c68fe779()` + +```php +call6d0a073cbf3e97fe0409de42c68fe779(): \BhrSdk\Model\CompanyAlertDataObject[] +``` + +List alert configurations + +Returns all company alert configurations for the authenticated company. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AlertConfigurationsApi( + // 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 +); + +try { + $result = $apiInstance->call6d0a073cbf3e97fe0409de42c68fe779(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AlertConfigurationsApi->call6d0a073cbf3e97fe0409de42c68fe779: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompanyAlertDataObject[]**](../Model/CompanyAlertDataObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `eb42aa2fa339ba5c08b147fc13c6a79e()` + +```php +eb42aa2fa339ba5c08b147fc13c6a79e($id, $company_alert_data_object): \BhrSdk\Model\CompanyAlertDataObject +``` + +Update an alert configuration + +Updates an existing company alert configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\AlertConfigurationsApi( + // 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 = 56; // int +$company_alert_data_object = new \BhrSdk\Model\CompanyAlertDataObject(); // \BhrSdk\Model\CompanyAlertDataObject + +try { + $result = $apiInstance->eb42aa2fa339ba5c08b147fc13c6a79e($id, $company_alert_data_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AlertConfigurationsApi->eb42aa2fa339ba5c08b147fc13c6a79e: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **company_alert_data_object** | [**\BhrSdk\Model\CompanyAlertDataObject**](../Model/CompanyAlertDataObject.md)| | | + +### Return type + +[**\BhrSdk\Model\CompanyAlertDataObject**](../Model/CompanyAlertDataObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/ApplicantTrackingApi.md b/docs/Api/ApplicantTrackingApi.md index 9203bc2d..6ad7005e 100644 --- a/docs/Api/ApplicantTrackingApi.md +++ b/docs/Api/ApplicantTrackingApi.md @@ -4,27 +4,91 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addNewCandidate()**](ApplicantTrackingApi.md#addNewCandidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate | -| [**addNewJobOpening()**](ApplicantTrackingApi.md#addNewJobOpening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening | +| [**createApplicationComment()**](ApplicantTrackingApi.md#createApplicationComment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment | +| [**createCandidate()**](ApplicantTrackingApi.md#createCandidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate | +| [**createJobOpening()**](ApplicantTrackingApi.md#createJobOpening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening | | [**getApplicationDetails()**](ApplicantTrackingApi.md#getApplicationDetails) | **GET** /api/v1/applicant_tracking/applications/{applicationId} | Get Job Application Details | | [**getApplications()**](ApplicantTrackingApi.md#getApplications) | **GET** /api/v1/applicant_tracking/applications | Get Job Applications | | [**getCompanyLocations()**](ApplicantTrackingApi.md#getCompanyLocations) | **GET** /api/v1/applicant_tracking/locations | Get Company Locations | | [**getHiringLeads()**](ApplicantTrackingApi.md#getHiringLeads) | **GET** /api/v1/applicant_tracking/hiring_leads | Get Hiring Leads | | [**getJobSummaries()**](ApplicantTrackingApi.md#getJobSummaries) | **GET** /api/v1/applicant_tracking/jobs | Get Job Summaries | | [**getStatuses()**](ApplicantTrackingApi.md#getStatuses) | **GET** /api/v1/applicant_tracking/statuses | Get Applicant Statuses | -| [**postApplicantStatus()**](ApplicantTrackingApi.md#postApplicantStatus) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status | -| [**postApplicationComment()**](ApplicantTrackingApi.md#postApplicationComment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment | +| [**updateApplicantStatus()**](ApplicantTrackingApi.md#updateApplicantStatus) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status | -## `addNewCandidate()` +## `createApplicationComment()` ```php -addNewCandidate($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter) +createApplicationComment($application_id, $create_application_comment_request): \BhrSdk\Model\CreateCommentResponse +``` + +Create Job Application Comment + +Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\ApplicantTrackingApi( + // 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 +); +$application_id = 56; // int | The ID of the application to add a comment to. +$create_application_comment_request = new \BhrSdk\Model\CreateApplicationCommentRequest(); // \BhrSdk\Model\CreateApplicationCommentRequest | Comment object to post + +try { + $result = $apiInstance->createApplicationComment($application_id, $create_application_comment_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ApplicantTrackingApi->createApplicationComment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **application_id** | **int**| The ID of the application to add a comment to. | | +| **create_application_comment_request** | [**\BhrSdk\Model\CreateApplicationCommentRequest**](../Model/CreateApplicationCommentRequest.md)| Comment object to post | | + +### Return type + +[**\BhrSdk\Model\CreateCommentResponse**](../Model/CreateCommentResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `createCandidate()` + +```php +createCandidate($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter): \BhrSdk\Model\CreateCandidateResponse ``` Create Candidate -Add a new candidate application to a job opening. The owner of the API key used must have access to ATS settings. +Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. ### Example @@ -48,7 +112,7 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( $first_name = 'first_name_example'; // string | The first name of the candidate. $last_name = 'last_name_example'; // string | The last name of the candidate. $job_id = 56; // int | The id of the job opening for the candidate application. -$email = 'email_example'; // string | The email address of the candidate. +$email = 'email_example'; // string | The email address of the candidate. Must be a valid email address. $phone_number = 'phone_number_example'; // string | The phone number of the candidate. $source = 'source_example'; // string | The source of the candidate application, e.g. LinkedIn, Indeed, etc. $address = 'address_example'; // string | The street address of the candidate. @@ -56,21 +120,22 @@ $city = 'city_example'; // string | The city of the candidate. $state = 'state_example'; // string | The state or province of the candidate. Accepts state name, abbreviation, or ISO code. $zip = 'zip_example'; // string | The zip code or postal code of the candidate. $country = 'country_example'; // string | The country of the candidate. Accepts country name or ISO code. -$linkedin_url = 'linkedin_url_example'; // string | The LinkedIn profile url of the candidate. -$date_available = 'date_available_example'; // string | The available start date of the candidate with the format YYYY-MM-DD. +$linkedin_url = 'linkedin_url_example'; // string | The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. +$date_available = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). $desired_salary = 'desired_salary_example'; // string | The desired salary of the candidate. $referred_by = 'referred_by_example'; // string | The person or entity that referred the candidate. -$website_url = 'website_url_example'; // string | The personal website, blog, or online portfolio of the candidate. +$website_url = 'website_url_example'; // string | The personal website, blog, or online portfolio of the candidate. Must be a valid URL. $highest_education = 'highest_education_example'; // string | The highest completed education level of the candidate. $college_name = 'college_name_example'; // string | The college or university of the candidate. $references = 'references_example'; // string | A list of references supplied by the candidate. -$resume = 'resume_example'; // string | Resume of the candidate. -$cover_letter = 'cover_letter_example'; // string | Cover letter of the candidate. +$resume = '/path/to/file.txt'; // \SplFileObject | Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. +$cover_letter = '/path/to/file.txt'; // \SplFileObject | Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. try { - $apiInstance->addNewCandidate($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter); + $result = $apiInstance->createCandidate($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ApplicantTrackingApi->addNewCandidate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ApplicantTrackingApi->createCandidate: ', $e->getMessage(), PHP_EOL; } ``` @@ -81,7 +146,7 @@ try { | **first_name** | **string**| The first name of the candidate. | | | **last_name** | **string**| The last name of the candidate. | | | **job_id** | **int**| The id of the job opening for the candidate application. | | -| **email** | **string**| The email address of the candidate. | [optional] | +| **email** | **string**| The email address of the candidate. Must be a valid email address. | [optional] | | **phone_number** | **string**| The phone number of the candidate. | [optional] | | **source** | **string**| The source of the candidate application, e.g. LinkedIn, Indeed, etc. | [optional] | | **address** | **string**| The street address of the candidate. | [optional] | @@ -89,20 +154,20 @@ try { | **state** | **string**| The state or province of the candidate. Accepts state name, abbreviation, or ISO code. | [optional] | | **zip** | **string**| The zip code or postal code of the candidate. | [optional] | | **country** | **string**| The country of the candidate. Accepts country name or ISO code. | [optional] | -| **linkedin_url** | **string**| The LinkedIn profile url of the candidate. | [optional] | -| **date_available** | **string**| The available start date of the candidate with the format YYYY-MM-DD. | [optional] | +| **linkedin_url** | **string**| The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. | [optional] | +| **date_available** | **\DateTime**| The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). | [optional] | | **desired_salary** | **string**| The desired salary of the candidate. | [optional] | | **referred_by** | **string**| The person or entity that referred the candidate. | [optional] | -| **website_url** | **string**| The personal website, blog, or online portfolio of the candidate. | [optional] | +| **website_url** | **string**| The personal website, blog, or online portfolio of the candidate. Must be a valid URL. | [optional] | | **highest_education** | **string**| The highest completed education level of the candidate. | [optional] | | **college_name** | **string**| The college or university of the candidate. | [optional] | | **references** | **string**| A list of references supplied by the candidate. | [optional] | -| **resume** | **string**| Resume of the candidate. | [optional] | -| **cover_letter** | **string**| Cover letter of the candidate. | [optional] | +| **resume** | **\SplFileObject****\SplFileObject**| Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. | [optional] | +| **cover_letter** | **\SplFileObject****\SplFileObject**| Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\CreateCandidateResponse**](../Model/CreateCandidateResponse.md) ### Authorization @@ -117,15 +182,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `addNewJobOpening()` +## `createJobOpening()` ```php -addNewJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code) +createJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type): \BhrSdk\Model\CreateJobOpeningResponse ``` Create Job Opening -Add a new job opening. The owner of the API key used must have access to ATS settings. +Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. ### Example @@ -167,11 +232,13 @@ $application_question_highest_education = 'application_question_highest_educatio $application_question_college = 'application_question_college_example'; // string | Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). $application_question_references = 'application_question_references_example'; // string | Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). $internal_job_code = 'internal_job_code_example'; // string | The internal job code for the job opening. +$location_type = 56; // int | The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. try { - $apiInstance->addNewJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code); + $result = $apiInstance->createJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ApplicantTrackingApi->addNewJobOpening: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ApplicantTrackingApi->createJobOpening: ', $e->getMessage(), PHP_EOL; } ``` @@ -200,10 +267,11 @@ try { | **application_question_college** | **string**| Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). | [optional] | | **application_question_references** | **string**| Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). | [optional] | | **internal_job_code** | **string**| The internal job code for the job opening. | [optional] | +| **location_type** | **int**| The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\CreateJobOpeningResponse**](../Model/CreateJobOpeningResponse.md) ### Authorization @@ -226,7 +294,7 @@ getApplicationDetails($application_id): \BhrSdk\Model\ApplicationDetails Get Job Application Details -Get the details of an application. The owner of the API key used must have access to ATS settings. +Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings. ### Example @@ -247,7 +315,7 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( new GuzzleHttp\Client(), $config ); -$application_id = 56; // int | The ID of the application to look up details. +$application_id = 56; // int | The ID of the application to retrieve details for. try { $result = $apiInstance->getApplicationDetails($application_id); @@ -261,7 +329,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **application_id** | **int**| The ID of the application to look up details. | | +| **application_id** | **int**| The ID of the application to retrieve details for. | | ### Return type @@ -311,13 +379,13 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( ); $page = 56; // int | The page number $job_id = 56; // int | A Job Id to limit results to -$application_status_id = 56; // int | Application status id to filter by. -$application_status = 'application_status_example'; // string | A list of application status groups to filter by. -$job_status_groups = 'job_status_groups_example'; // string | A list of position status groups to filter by. +$application_status_id = 'application_status_id_example'; // string | One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). +$application_status = 'application_status_example'; // string | One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. +$job_status_groups = 'job_status_groups_example'; // string | One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. $search_string = 'search_string_example'; // string | A general search criteria by which to find applications. $sort_by = 'sort_by_example'; // string | A specific field to sort the results by. $sort_order = 'sort_order_example'; // string | Order by which to sort results. -$new_since = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 +$new_since = 2024-01-01 13:00:00; // string | Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). try { $result = $apiInstance->getApplications($page, $job_id, $application_status_id, $application_status, $job_status_groups, $search_string, $sort_by, $sort_order, $new_since); @@ -333,13 +401,13 @@ try { | ------------- | ------------- | ------------- | ------------- | | **page** | **int**| The page number | [optional] | | **job_id** | **int**| A Job Id to limit results to | [optional] | -| **application_status_id** | **int**| Application status id to filter by. | [optional] | -| **application_status** | **string**| A list of application status groups to filter by. | [optional] | -| **job_status_groups** | **string**| A list of position status groups to filter by. | [optional] | +| **application_status_id** | **string**| One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). | [optional] | +| **application_status** | **string**| One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. | [optional] | +| **job_status_groups** | **string**| One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. | [optional] | | **search_string** | **string**| A general search criteria by which to find applications. | [optional] | | **sort_by** | **string**| A specific field to sort the results by. | [optional] | | **sort_order** | **string**| Order by which to sort results. | [optional] | -| **new_since** | **\DateTime**| Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 | [optional] | +| **new_since** | **string**| Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). | [optional] | ### Return type @@ -361,12 +429,12 @@ try { ## `getCompanyLocations()` ```php -getCompanyLocations(): \BhrSdk\Model\LocationsList[] +getCompanyLocations(): \BhrSdk\Model\Location[] ``` Get Company Locations -Get company locations for use in creating a new job opening. The owner of the API key used must have access to ATS settings. +Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. ### Example @@ -402,7 +470,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\LocationsList[]**](../Model/LocationsList.md) +[**\BhrSdk\Model\Location[]**](../Model/Location.md) ### Authorization @@ -420,12 +488,12 @@ This endpoint does not need any parameter. ## `getHiringLeads()` ```php -getHiringLeads(): \BhrSdk\Model\HiringLeadsList[] +getHiringLeads(): \BhrSdk\Model\HiringLead[] ``` Get Hiring Leads -Get potential hiring leads for use in creating a new job opening. The owner of the API key used must have access to ATS settings. +Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. ### Example @@ -461,7 +529,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\HiringLeadsList[]**](../Model/HiringLeadsList.md) +[**\BhrSdk\Model\HiringLead[]**](../Model/HiringLead.md) ### Authorization @@ -479,12 +547,12 @@ This endpoint does not need any parameter. ## `getJobSummaries()` ```php -getJobSummaries($status_groups, $sort_by, $sort_order) +getJobSummaries($status_groups, $status_ids, $sort_by, $sort_order): \BhrSdk\Model\JobSummary[] ``` Get Job Summaries -Get a list of job summaries. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like. +Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. ### Example @@ -505,12 +573,14 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( new GuzzleHttp\Client(), $config ); -$status_groups = 'status_groups_example'; // string | A list of status groups to filter positions by. +$status_groups = 'status_groups_example'; // string | One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. +$status_ids = 'status_ids_example'; // string | One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. $sort_by = 'sort_by_example'; // string | A specific field to sort the results by. $sort_order = 'sort_order_example'; // string | Order by which to sort results. try { - $apiInstance->getJobSummaries($status_groups, $sort_by, $sort_order); + $result = $apiInstance->getJobSummaries($status_groups, $status_ids, $sort_by, $sort_order); + print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicantTrackingApi->getJobSummaries: ', $e->getMessage(), PHP_EOL; } @@ -520,13 +590,14 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **status_groups** | **string**| A list of status groups to filter positions by. | [optional] | +| **status_groups** | **string**| One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. | [optional] | +| **status_ids** | **string**| One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. | [optional] | | **sort_by** | **string**| A specific field to sort the results by. | [optional] | | **sort_order** | **string**| Order by which to sort results. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\JobSummary[]**](../Model/JobSummary.md) ### Authorization @@ -544,12 +615,12 @@ void (empty response body) ## `getStatuses()` ```php -getStatuses() +getStatuses(): \BhrSdk\Model\ApplicantStatus[] ``` Get Applicant Statuses -Get a list of statuses for a company. The owner of the API key used must have access to ATS settings. +Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses. ### Example @@ -572,7 +643,8 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( ); try { - $apiInstance->getStatuses(); + $result = $apiInstance->getStatuses(); + print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicantTrackingApi->getStatuses: ', $e->getMessage(), PHP_EOL; } @@ -584,7 +656,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**\BhrSdk\Model\ApplicantStatus[]**](../Model/ApplicantStatus.md) ### Authorization @@ -599,78 +671,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postApplicantStatus()` +## `updateApplicantStatus()` ```php -postApplicantStatus($application_id, $post_applicant_status_request) +updateApplicantStatus($application_id, $update_applicant_status_request): \BhrSdk\Model\UpdateApplicantStatusResponse ``` Update Applicant Status -Change applicant\\'s status. The owner of the API key used must have access to ATS settings. - -### Example - -```php -<?php -require_once(__DIR__ . '/vendor/autoload.php'); - -// Configure API key authorization -$config = BhrSdk\Configuration::getDefaultConfiguration() - ->setApiKey('x-api-key', 'YOUR_API_KEY'); - -// Or configure OAuth2 access token for authorization -// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - -$apiInstance = new BhrSdk\Api\ApplicantTrackingApi( - // 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 -); -$application_id = 0; // int | The ID of the application to add a comment to. -$post_applicant_status_request = new \BhrSdk\Model\PostApplicantStatusRequest(); // \BhrSdk\Model\PostApplicantStatusRequest | Sample Post Data. - -try { - $apiInstance->postApplicantStatus($application_id, $post_applicant_status_request); -} catch (Exception $e) { - echo 'Exception when calling ApplicantTrackingApi->postApplicantStatus: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **application_id** | **int**| The ID of the application to add a comment to. | [default to 0] | -| **post_applicant_status_request** | [**\BhrSdk\Model\PostApplicantStatusRequest**](../Model/PostApplicantStatusRequest.md)| Sample Post Data. | | - -### Return type - -void (empty response body) - -### Authorization - -[basic](../../README.md#basic), [oauth](../../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: `application/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) - -## `postApplicationComment()` - -```php -postApplicationComment($application_id, $post_application_comment_request) -``` - -Create Job Application Comment - -Add a comment to an application. The owner of the API key used must have access to ATS settings. +Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. ### Example @@ -691,13 +700,14 @@ $apiInstance = new BhrSdk\Api\ApplicantTrackingApi( new GuzzleHttp\Client(), $config ); -$application_id = 0; // int | The ID of the application to add a comment to. -$post_application_comment_request = new \BhrSdk\Model\PostApplicationCommentRequest(); // \BhrSdk\Model\PostApplicationCommentRequest | Comment object to post +$application_id = 56; // int | The ID of the application whose status should be updated. +$update_applicant_status_request = new \BhrSdk\Model\UpdateApplicantStatusRequest(); // \BhrSdk\Model\UpdateApplicantStatusRequest | The new status to assign to the application. try { - $apiInstance->postApplicationComment($application_id, $post_application_comment_request); + $result = $apiInstance->updateApplicantStatus($application_id, $update_applicant_status_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ApplicantTrackingApi->postApplicationComment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ApplicantTrackingApi->updateApplicantStatus: ', $e->getMessage(), PHP_EOL; } ``` @@ -705,12 +715,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **application_id** | **int**| The ID of the application to add a comment to. | [default to 0] | -| **post_application_comment_request** | [**\BhrSdk\Model\PostApplicationCommentRequest**](../Model/PostApplicationCommentRequest.md)| Comment object to post | | +| **application_id** | **int**| The ID of the application whose status should be updated. | | +| **update_applicant_status_request** | [**\BhrSdk\Model\UpdateApplicantStatusRequest**](../Model/UpdateApplicantStatusRequest.md)| The new status to assign to the application. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\UpdateApplicantStatusResponse**](../Model/UpdateApplicantStatusResponse.md) ### Authorization @@ -719,7 +729,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/BenefitsApi.md b/docs/Api/BenefitsApi.md index 113f25a6..121fee68 100644 --- a/docs/Api/BenefitsApi.md +++ b/docs/Api/BenefitsApi.md @@ -4,24 +4,27 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addEmployeeDependent()**](BenefitsApi.md#addEmployeeDependent) | **POST** /api/v1/employeedependents | Create Employee Dependent | -| [**getBenefitCoverages()**](BenefitsApi.md#getBenefitCoverages) | **GET** /api/v1/benefitcoverages | Get Benefit Coverages | -| [**getBenefitDeductionTypes()**](BenefitsApi.md#getBenefitDeductionTypes) | **GET** /api/v1/benefits/settings/deduction_types/all | Get Benefit Deduction Types | +| [**createEmployeeDependent()**](BenefitsApi.md#createEmployeeDependent) | **POST** /api/v1/employeedependents | Create Employee Dependent | | [**getEmployeeDependent()**](BenefitsApi.md#getEmployeeDependent) | **GET** /api/v1/employeedependents/{id} | Get Employee Dependent | -| [**getEmployeeDependents()**](BenefitsApi.md#getEmployeeDependents) | **GET** /api/v1/employeedependents | Get Employee Dependents | -| [**getMemberBenefit()**](BenefitsApi.md#getMemberBenefit) | **GET** /api/v1/benefit/member_benefit | Get Member Benefit Events | +| [**listBenefitCoverages()**](BenefitsApi.md#listBenefitCoverages) | **GET** /api/v1/benefitcoverages | List Benefit Coverages | +| [**listBenefitDeductionTypes()**](BenefitsApi.md#listBenefitDeductionTypes) | **GET** /api/v1/benefits/settings/deduction_types/all | List Benefit Deduction Types | +| [**listCompanyBenefits()**](BenefitsApi.md#listCompanyBenefits) | **GET** /api/v1/benefit/company_benefit | List Company Benefits | +| [**listEmployeeBenefits()**](BenefitsApi.md#listEmployeeBenefits) | **GET** /api/v1/benefit/employee_benefit | List Employee Benefits | +| [**listEmployeeDependents()**](BenefitsApi.md#listEmployeeDependents) | **GET** /api/v1/employeedependents | List Employee Dependents | +| [**listMemberBenefitEvents()**](BenefitsApi.md#listMemberBenefitEvents) | **GET** /api/v1/benefit/member_benefit | List Member Benefit Events | +| [**listMemberBenefits()**](BenefitsApi.md#listMemberBenefits) | **GET** /api/v1/benefits/member-benefits | List Member Benefits | | [**updateEmployeeDependent()**](BenefitsApi.md#updateEmployeeDependent) | **PUT** /api/v1/employeedependents/{id} | Update Employee Dependent | -## `addEmployeeDependent()` +## `createEmployeeDependent()` ```php -addEmployeeDependent($employee_dependent) +createEmployeeDependent($employee_dependent): \BhrSdk\Model\EmployeeDependentsResponse ``` Create Employee Dependent -Adds an employee dependent +Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing. ### Example @@ -45,9 +48,10 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( $employee_dependent = new \BhrSdk\Model\EmployeeDependent(); // \BhrSdk\Model\EmployeeDependent try { - $apiInstance->addEmployeeDependent($employee_dependent); + $result = $apiInstance->createEmployeeDependent($employee_dependent); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->addEmployeeDependent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->createEmployeeDependent: ', $e->getMessage(), PHP_EOL; } ``` @@ -59,7 +63,71 @@ try { ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeDependentsResponse**](../Model/EmployeeDependentsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: `application/json`, `application/xml` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getEmployeeDependent()` + +```php +getEmployeeDependent($id, $accept_header_parameter): \BhrSdk\Model\EmployeeDependentsResponse +``` + +Get Employee Dependent + +Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\BenefitsApi( + // 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 = 56; // int | The numeric ID of the employee dependent to retrieve. +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. + +try { + $result = $apiInstance->getEmployeeDependent($id, $accept_header_parameter); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BenefitsApi->getEmployeeDependent: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The numeric ID of the employee dependent to retrieve. | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | + +### Return type + +[**\BhrSdk\Model\EmployeeDependentsResponse**](../Model/EmployeeDependentsResponse.md) ### Authorization @@ -68,21 +136,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getBenefitCoverages()` +## `listBenefitCoverages()` ```php -getBenefitCoverages($accept_header_parameter) +listBenefitCoverages($accept_header_parameter): \BhrSdk\Model\BenefitCoveragesResponse ``` -Get Benefit Coverages +List Benefit Coverages -Get benefit coverages +Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a \"Benefit Coverages\" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access. ### Example @@ -106,9 +174,10 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->getBenefitCoverages($accept_header_parameter); + $result = $apiInstance->listBenefitCoverages($accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->getBenefitCoverages: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->listBenefitCoverages: ', $e->getMessage(), PHP_EOL; } ``` @@ -120,7 +189,7 @@ try { ### Return type -void (empty response body) +[**\BhrSdk\Model\BenefitCoveragesResponse**](../Model/BenefitCoveragesResponse.md) ### Authorization @@ -135,15 +204,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getBenefitDeductionTypes()` +## `listBenefitDeductionTypes()` ```php -getBenefitDeductionTypes() +listBenefitDeductionTypes(): \BhrSdk\Model\BenefitDeductionType[] ``` -Get Benefit Deduction Types +List Benefit Deduction Types -Get benefit deduction types +Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. ### Example @@ -166,9 +235,10 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( ); try { - $apiInstance->getBenefitDeductionTypes(); + $result = $apiInstance->listBenefitDeductionTypes(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->getBenefitDeductionTypes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->listBenefitDeductionTypes: ', $e->getMessage(), PHP_EOL; } ``` @@ -178,7 +248,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**\BhrSdk\Model\BenefitDeductionType[]**](../Model/BenefitDeductionType.md) ### Authorization @@ -193,15 +263,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getEmployeeDependent()` +## `listCompanyBenefits()` ```php -getEmployeeDependent($id, $accept_header_parameter) +listCompanyBenefits(): \BhrSdk\Model\CompanyBenefitsListResponse ``` -Get Employee Dependent +List Company Benefits -Get employee dependent +Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use \"Get a company benefit\". ### Example @@ -222,13 +292,72 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee dependent ID. -$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->getEmployeeDependent($id, $accept_header_parameter); + $result = $apiInstance->listCompanyBenefits(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->getEmployeeDependent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->listCompanyBenefits: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompanyBenefitsListResponse**](../Model/CompanyBenefitsListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listEmployeeBenefits()` + +```php +listEmployeeBenefits($employee_benefit_filters): \BhrSdk\Model\EmployeeBenefitsListResponse +``` + +List Employee Benefits + +Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields. A JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values. Future-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them. Note: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\BenefitsApi( + // 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 +); +$employee_benefit_filters = new \BhrSdk\Model\EmployeeBenefitFilters(); // \BhrSdk\Model\EmployeeBenefitFilters | Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. + +try { + $result = $apiInstance->listEmployeeBenefits($employee_benefit_filters); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BenefitsApi->listEmployeeBenefits: ', $e->getMessage(), PHP_EOL; } ``` @@ -236,12 +365,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee dependent ID. | | -| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **employee_benefit_filters** | [**\BhrSdk\Model\EmployeeBenefitFilters**](../Model/EmployeeBenefitFilters.md)| Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeBenefitsListResponse**](../Model/EmployeeBenefitsListResponse.md) ### Authorization @@ -250,21 +378,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **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) -## `getEmployeeDependents()` +## `listEmployeeDependents()` ```php -getEmployeeDependents($employeeid, $accept_header_parameter) +listEmployeeDependents($accept_header_parameter, $employeeid): \BhrSdk\Model\EmployeeDependentsResponse ``` -Get Employee Dependents +List Employee Dependents -Get all employee dependents +Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. ### Example @@ -285,13 +413,14 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( new GuzzleHttp\Client(), $config ); -$employeeid = 'employeeid_example'; // string | {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$employeeid = 56; // int | The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. try { - $apiInstance->getEmployeeDependents($employeeid, $accept_header_parameter); + $result = $apiInstance->listEmployeeDependents($accept_header_parameter, $employeeid); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->getEmployeeDependents: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->listEmployeeDependents: ', $e->getMessage(), PHP_EOL; } ``` @@ -299,12 +428,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employeeid** | **string**| {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. | | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **employeeid** | **int**| The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeDependentsResponse**](../Model/EmployeeDependentsResponse.md) ### Authorization @@ -319,15 +448,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getMemberBenefit()` +## `listMemberBenefitEvents()` ```php -getMemberBenefit(): \BhrSdk\Model\MemberBenefitEvent[] +listMemberBenefitEvents(): \BhrSdk\Model\MemberBenefitEventsResponse ``` -Get Member Benefit Events +List Member Benefit Events -Get a list of member benefit events +Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. ### Example @@ -350,10 +479,10 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( ); try { - $result = $apiInstance->getMemberBenefit(); + $result = $apiInstance->listMemberBenefitEvents(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling BenefitsApi->getMemberBenefit: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling BenefitsApi->listMemberBenefitEvents: ', $e->getMessage(), PHP_EOL; } ``` @@ -363,7 +492,73 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\MemberBenefitEvent[]**](../Model/MemberBenefitEvent.md) +[**\BhrSdk\Model\MemberBenefitEventsResponse**](../Model/MemberBenefitEventsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listMemberBenefits()` + +```php +listMemberBenefits($calendar_year, $page, $page_size): \BhrSdk\Model\MemberBenefitsGetSuccessResponse +``` + +List Member Benefits + +Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use \"List Company Benefits\" to get valid planId values. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\BenefitsApi( + // 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 +); +$calendar_year = 2024; // string | The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. +$page = 1; // string | The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. +$page_size = 25; // string | The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. + +try { + $result = $apiInstance->listMemberBenefits($calendar_year, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BenefitsApi->listMemberBenefits: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **calendar_year** | **string**| The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. | | +| **page** | **string**| The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. | [optional] [default to '1'] | +| **page_size** | **string**| The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. | [optional] [default to '25'] | + +### Return type + +[**\BhrSdk\Model\MemberBenefitsGetSuccessResponse**](../Model/MemberBenefitsGetSuccessResponse.md) ### Authorization @@ -381,12 +576,12 @@ This endpoint does not need any parameter. ## `updateEmployeeDependent()` ```php -updateEmployeeDependent($id, $employee_dependent) +updateEmployeeDependent($id, $employee_dependent): \BhrSdk\Model\EmployeeDependentsResponse ``` Update Employee Dependent -This API allows you to change the information for a given dependent ID. +Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing. ### Example @@ -407,11 +602,12 @@ $apiInstance = new BhrSdk\Api\BenefitsApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee dependent ID. +$id = 56; // int | The numeric ID of the employee dependent to update. $employee_dependent = new \BhrSdk\Model\EmployeeDependent(); // \BhrSdk\Model\EmployeeDependent try { - $apiInstance->updateEmployeeDependent($id, $employee_dependent); + $result = $apiInstance->updateEmployeeDependent($id, $employee_dependent); + print_r($result); } catch (Exception $e) { echo 'Exception when calling BenefitsApi->updateEmployeeDependent: ', $e->getMessage(), PHP_EOL; } @@ -421,12 +617,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee dependent ID. | | +| **id** | **int**| The numeric ID of the employee dependent to update. | | | **employee_dependent** | [**\BhrSdk\Model\EmployeeDependent**](../Model/EmployeeDependent.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeDependentsResponse**](../Model/EmployeeDependentsResponse.md) ### Authorization @@ -434,8 +630,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/CompanyApi.md b/docs/Api/CompanyApi.md new file mode 100644 index 00000000..323732b1 --- /dev/null +++ b/docs/Api/CompanyApi.md @@ -0,0 +1,70 @@ +# BhrSdk\CompanyApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**putCompanyIndustryCodes()**](CompanyApi.md#putCompanyIndustryCodes) | **PUT** /api/v1/company-profile-data/industry-codes | Update Company Industry Codes | + + +## `putCompanyIndustryCodes()` + +```php +putCompanyIndustryCodes($put_company_industry_codes_request): \BhrSdk\Model\UpdateCompanyIndustryCodesResponse +``` + +Update Company Industry Codes + +Updates the industry codes associated with a company. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompanyApi( + // 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 +); +$put_company_industry_codes_request = {"industryIds":[1]}; // \BhrSdk\Model\PutCompanyIndustryCodesRequest + +try { + $result = $apiInstance->putCompanyIndustryCodes($put_company_industry_codes_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompanyApi->putCompanyIndustryCodes: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **put_company_industry_codes_request** | [**\BhrSdk\Model\PutCompanyIndustryCodesRequest**](../Model/PutCompanyIndustryCodesRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\UpdateCompanyIndustryCodesResponse**](../Model/UpdateCompanyIndustryCodesResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/CompanyFilesApi.md b/docs/Api/CompanyFilesApi.md index 36da5b2d..b1824145 100644 --- a/docs/Api/CompanyFilesApi.md +++ b/docs/Api/CompanyFilesApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addCompanyFileCategory()**](CompanyFilesApi.md#addCompanyFileCategory) | **POST** /api/v1/files/categories | Create Company File Category | +| [**createCompanyFileCategory()**](CompanyFilesApi.md#createCompanyFileCategory) | **POST** /api/v1/files/categories | Create Company File Category | | [**deleteCompanyFile()**](CompanyFilesApi.md#deleteCompanyFile) | **DELETE** /api/v1/files/{fileId} | Delete Company File | | [**getCompanyFile()**](CompanyFilesApi.md#getCompanyFile) | **GET** /api/v1/files/{fileId} | Get Company File | | [**listCompanyFiles()**](CompanyFilesApi.md#listCompanyFiles) | **GET** /api/v1/files/view | Get Company Files and Categories | @@ -12,15 +12,15 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | [**uploadCompanyFile()**](CompanyFilesApi.md#uploadCompanyFile) | **POST** /api/v1/files | Upload Company File | -## `addCompanyFileCategory()` +## `createCompanyFileCategory()` ```php -addCompanyFileCategory($request_body) +createCompanyFileCategory($request_body) ``` Create Company File Category -Add a company file category. +Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. ### Example @@ -44,9 +44,9 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( $request_body = array('request_body_example'); // string[] try { - $apiInstance->addCompanyFileCategory($request_body); + $apiInstance->createCompanyFileCategory($request_body); } catch (Exception $e) { - echo 'Exception when calling CompanyFilesApi->addCompanyFileCategory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling CompanyFilesApi->createCompanyFileCategory: ', $e->getMessage(), PHP_EOL; } ``` @@ -66,8 +66,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -81,7 +81,7 @@ deleteCompanyFile($file_id) Delete Company File -Delete a company file +Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use \"Company Files > List Company Files\" to obtain file IDs. ### Example @@ -102,7 +102,7 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( new GuzzleHttp\Client(), $config ); -$file_id = 'file_id_example'; // string | {fileId} is the ID of the company file being deleted. +$file_id = 56; // int | The ID of the company file to delete. try { $apiInstance->deleteCompanyFile($file_id); @@ -115,7 +115,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **file_id** | **string**| {fileId} is the ID of the company file being deleted. | | +| **file_id** | **int**| The ID of the company file to delete. | | ### Return type @@ -128,7 +128,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -142,7 +142,7 @@ getCompanyFile($file_id) Get Company File -Gets an company file +Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. ### Example @@ -163,7 +163,7 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( new GuzzleHttp\Client(), $config ); -$file_id = 'file_id_example'; // string | {fileId} is the ID of the company file being retrieved. +$file_id = 56; // int | The ID of the company file to download. try { $apiInstance->getCompanyFile($file_id); @@ -176,7 +176,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **file_id** | **string**| {fileId} is the ID of the company file being retrieved. | | +| **file_id** | **int**| The ID of the company file to download. | | ### Return type @@ -189,7 +189,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/octet-stream` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -198,12 +198,12 @@ void (empty response body) ## `listCompanyFiles()` ```php -listCompanyFiles() +listCompanyFiles(): \BhrSdk\Model\CompanyFilesResponse ``` Get Company Files and Categories -Lists company files and categories +Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. ### Example @@ -226,7 +226,8 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( ); try { - $apiInstance->listCompanyFiles(); + $result = $apiInstance->listCompanyFiles(); + print_r($result); } catch (Exception $e) { echo 'Exception when calling CompanyFilesApi->listCompanyFiles: ', $e->getMessage(), PHP_EOL; } @@ -238,7 +239,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**\BhrSdk\Model\CompanyFilesResponse**](../Model/CompanyFilesResponse.md) ### Authorization @@ -247,7 +248,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -261,7 +262,7 @@ updateCompanyFile($file_id, $company_file_update) Update Company File -Update a company file +Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. ### Example @@ -282,7 +283,7 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( new GuzzleHttp\Client(), $config ); -$file_id = 'file_id_example'; // string | {fileId} is the ID of the employee file being updated. +$file_id = 56; // int | The ID of the company file to update. $company_file_update = new \BhrSdk\Model\CompanyFileUpdate(); // \BhrSdk\Model\CompanyFileUpdate try { @@ -296,7 +297,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **file_id** | **string**| {fileId} is the ID of the employee file being updated. | | +| **file_id** | **int**| The ID of the company file to update. | | | **company_file_update** | [**\BhrSdk\Model\CompanyFileUpdate**](../Model/CompanyFileUpdate.md)| | | ### Return type @@ -310,7 +311,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -319,12 +320,12 @@ void (empty response body) ## `uploadCompanyFile()` ```php -uploadCompanyFile() +uploadCompanyFile($file_name, $category, $file, $share) ``` Upload Company File -Upload a company file +Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. ### Example @@ -345,9 +346,13 @@ $apiInstance = new BhrSdk\Api\CompanyFilesApi( new GuzzleHttp\Client(), $config ); +$file_name = 'file_name_example'; // string | The display name for the uploaded file. +$category = 56; // int | The ID of the file category (section) to upload the file into. +$file = '/path/to/file.txt'; // \SplFileObject | The file to upload. +$share = 'share_example'; // string | Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. try { - $apiInstance->uploadCompanyFile(); + $apiInstance->uploadCompanyFile($file_name, $category, $file, $share); } catch (Exception $e) { echo 'Exception when calling CompanyFilesApi->uploadCompanyFile: ', $e->getMessage(), PHP_EOL; } @@ -355,7 +360,12 @@ try { ### Parameters -This endpoint does not need any parameter. +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **file_name** | **string**| The display name for the uploaded file. | | +| **category** | **int**| The ID of the file category (section) to upload the file into. | | +| **file** | **\SplFileObject****\SplFileObject**| The file to upload. | | +| **share** | **string**| Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. | [optional] | ### Return type @@ -367,8 +377,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `multipart/form-data` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/CompanyProfileApi.md b/docs/Api/CompanyProfileApi.md new file mode 100644 index 00000000..3780d52d --- /dev/null +++ b/docs/Api/CompanyProfileApi.md @@ -0,0 +1,193 @@ +# BhrSdk\CompanyProfileApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getCompanyProfileIntegrations()**](CompanyProfileApi.md#getCompanyProfileIntegrations) | **GET** /api/v1/company-profile-integrations | Get Company Profile Integrations | +| [**patchCompanyProfileCompanyInformation()**](CompanyProfileApi.md#patchCompanyProfileCompanyInformation) | **PATCH** /api/v1/company-profile-data/company-information | Update company information (phone, address, legal name) | +| [**putCompanyProfileDisplayName()**](CompanyProfileApi.md#putCompanyProfileDisplayName) | **PUT** /api/v1/company-profile-data/display-name | Update company display name | + + +## `getCompanyProfileIntegrations()` + +```php +getCompanyProfileIntegrations(): \BhrSdk\Model\CompanyProfileIntegrations +``` + +Get Company Profile Integrations + +Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompanyProfileApi( + // 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 +); + +try { + $result = $apiInstance->getCompanyProfileIntegrations(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompanyProfileApi->getCompanyProfileIntegrations: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompanyProfileIntegrations**](../Model/CompanyProfileIntegrations.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `patchCompanyProfileCompanyInformation()` + +```php +patchCompanyProfileCompanyInformation($patch_company_profile_company_information_request): \BhrSdk\Model\CompanyProfileData +``` + +Update company information (phone, address, legal name) + +Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompanyProfileApi( + // 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 +); +$patch_company_profile_company_information_request = new \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest(); // \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest + +try { + $result = $apiInstance->patchCompanyProfileCompanyInformation($patch_company_profile_company_information_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompanyProfileApi->patchCompanyProfileCompanyInformation: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **patch_company_profile_company_information_request** | [**\BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest**](../Model/PatchCompanyProfileCompanyInformationRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\CompanyProfileData**](../Model/CompanyProfileData.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/merge-patch+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) + +## `putCompanyProfileDisplayName()` + +```php +putCompanyProfileDisplayName($put_company_profile_display_name_request): \BhrSdk\Model\UpdateCompanyNameSuccessResponse +``` + +Update company display name + +Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompanyProfileApi( + // 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 +); +$put_company_profile_display_name_request = new \BhrSdk\Model\PutCompanyProfileDisplayNameRequest(); // \BhrSdk\Model\PutCompanyProfileDisplayNameRequest + +try { + $result = $apiInstance->putCompanyProfileDisplayName($put_company_profile_display_name_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompanyProfileApi->putCompanyProfileDisplayName: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **put_company_profile_display_name_request** | [**\BhrSdk\Model\PutCompanyProfileDisplayNameRequest**](../Model/PutCompanyProfileDisplayNameRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\UpdateCompanyNameSuccessResponse**](../Model/UpdateCompanyNameSuccessResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/CompensationApi.md b/docs/Api/CompensationApi.md new file mode 100644 index 00000000..644249c4 --- /dev/null +++ b/docs/Api/CompensationApi.md @@ -0,0 +1,190 @@ +# BhrSdk\CompensationApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**c5880b509783cd9d7fce9ddf5d6af1be()**](CompensationApi.md#c5880b509783cd9d7fce9ddf5d6af1be) | **PUT** /api/v1/compensation/equity/settings | Update company equity settings | +| [**call9f398e2652ea47a6dc5121ce5184222a()**](CompensationApi.md#call9f398e2652ea47a6dc5121ce5184222a) | **GET** /api/v1/compensation/tools | List available compensation tools | +| [**db49fb29f9f04d59afad7c01ce860418()**](CompensationApi.md#db49fb29f9f04d59afad7c01ce860418) | **GET** /api/v1/compensation/equity/settings | Get company equity settings | + + +## `c5880b509783cd9d7fce9ddf5d6af1be()` + +```php +c5880b509783cd9d7fce9ddf5d6af1be($compensation_equity_settings_update_request): \BhrSdk\Model\CompensationEquitySettingsResponse +``` + +Update company equity settings + +Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationApi( + // 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 +); +$compensation_equity_settings_update_request = new \BhrSdk\Model\CompensationEquitySettingsUpdateRequest(); // \BhrSdk\Model\CompensationEquitySettingsUpdateRequest + +try { + $result = $apiInstance->c5880b509783cd9d7fce9ddf5d6af1be($compensation_equity_settings_update_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationApi->c5880b509783cd9d7fce9ddf5d6af1be: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **compensation_equity_settings_update_request** | [**\BhrSdk\Model\CompensationEquitySettingsUpdateRequest**](../Model/CompensationEquitySettingsUpdateRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\CompensationEquitySettingsResponse**](../Model/CompensationEquitySettingsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call9f398e2652ea47a6dc5121ce5184222a()` + +```php +call9f398e2652ea47a6dc5121ce5184222a(): \BhrSdk\Model\CompensationToolsResponse +``` + +List available compensation tools + +Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationApi( + // 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 +); + +try { + $result = $apiInstance->call9f398e2652ea47a6dc5121ce5184222a(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationApi->call9f398e2652ea47a6dc5121ce5184222a: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompensationToolsResponse**](../Model/CompensationToolsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `db49fb29f9f04d59afad7c01ce860418()` + +```php +db49fb29f9f04d59afad7c01ce860418(): \BhrSdk\Model\CompensationEquitySettingsResponse +``` + +Get company equity settings + +Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationApi( + // 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 +); + +try { + $result = $apiInstance->db49fb29f9f04d59afad7c01ce860418(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationApi->db49fb29f9f04d59afad7c01ce860418: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompensationEquitySettingsResponse**](../Model/CompensationEquitySettingsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/CompensationBenchmarkingApi.md b/docs/Api/CompensationBenchmarkingApi.md new file mode 100644 index 00000000..bd4d0d7d --- /dev/null +++ b/docs/Api/CompensationBenchmarkingApi.md @@ -0,0 +1,698 @@ +# BhrSdk\CompensationBenchmarkingApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createCompensationBenchmark()**](CompensationBenchmarkingApi.md#createCompensationBenchmark) | **POST** /api/v1/compensation/benchmarks | Create Compensation Benchmark | +| [**createCompensationBenchmarkSource()**](CompensationBenchmarkingApi.md#createCompensationBenchmarkSource) | **POST** /api/v1/compensation/benchmarks/sources | Create Compensation Benchmark Source | +| [**deleteCompensationBenchmark()**](CompensationBenchmarkingApi.md#deleteCompensationBenchmark) | **DELETE** /api/v1/compensation/benchmarks/{id} | Delete Compensation Benchmark | +| [**deleteCompensationBenchmarkSource()**](CompensationBenchmarkingApi.md#deleteCompensationBenchmarkSource) | **DELETE** /api/v1/compensation/benchmarks/sources | Delete Compensation Benchmark Source | +| [**exportCompensationBenchmarkDetails()**](CompensationBenchmarkingApi.md#exportCompensationBenchmarkDetails) | **GET** /api/v1/compensation/benchmarks/details/export | Export Compensation Benchmark Details | +| [**getCompensationBenchmarkDetails()**](CompensationBenchmarkingApi.md#getCompensationBenchmarkDetails) | **GET** /api/v1/compensation/benchmarks/details | Get Compensation Benchmark Details | +| [**importCompensationBenchmarks()**](CompensationBenchmarkingApi.md#importCompensationBenchmarks) | **POST** /api/v1/compensation/benchmarks/import | Import Compensation Benchmarks From CSV | +| [**listCompensationBenchmarkSources()**](CompensationBenchmarkingApi.md#listCompensationBenchmarkSources) | **GET** /api/v1/compensation/benchmarks/sources | List Compensation Benchmark Sources | +| [**listCompensationBenchmarks()**](CompensationBenchmarkingApi.md#listCompensationBenchmarks) | **GET** /api/v1/compensation/benchmarks | List Compensation Benchmarks | +| [**updateCompensationBenchmark()**](CompensationBenchmarkingApi.md#updateCompensationBenchmark) | **PUT** /api/v1/compensation/benchmarks | Update Compensation Benchmark | +| [**updateCompensationBenchmarkSources()**](CompensationBenchmarkingApi.md#updateCompensationBenchmarkSources) | **PUT** /api/v1/compensation/benchmarks/sources | Update Compensation Benchmark Sources | + + +## `createCompensationBenchmark()` + +```php +createCompensationBenchmark($create_compensation_benchmark_request): \BhrSdk\Model\CreatedCompensationBenchmark +``` + +Create Compensation Benchmark + +Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$create_compensation_benchmark_request = new \BhrSdk\Model\CreateCompensationBenchmarkRequest(); // \BhrSdk\Model\CreateCompensationBenchmarkRequest + +try { + $result = $apiInstance->createCompensationBenchmark($create_compensation_benchmark_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->createCompensationBenchmark: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **create_compensation_benchmark_request** | [**\BhrSdk\Model\CreateCompensationBenchmarkRequest**](../Model/CreateCompensationBenchmarkRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\CreatedCompensationBenchmark**](../Model/CreatedCompensationBenchmark.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createCompensationBenchmarkSource()` + +```php +createCompensationBenchmarkSource($create_compensation_benchmark_source_request): \BhrSdk\Model\CreatedCompensationBenchmarkSource +``` + +Create Compensation Benchmark Source + +Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$create_compensation_benchmark_source_request = new \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest(); // \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest + +try { + $result = $apiInstance->createCompensationBenchmarkSource($create_compensation_benchmark_source_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->createCompensationBenchmarkSource: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **create_compensation_benchmark_source_request** | [**\BhrSdk\Model\CreateCompensationBenchmarkSourceRequest**](../Model/CreateCompensationBenchmarkSourceRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\CreatedCompensationBenchmarkSource**](../Model/CreatedCompensationBenchmarkSource.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteCompensationBenchmark()` + +```php +deleteCompensationBenchmark($id): string +``` + +Delete Compensation Benchmark + +Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 = 56; // int | Integer ID of the compensation benchmark to delete. + +try { + $result = $apiInstance->deleteCompensationBenchmark($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->deleteCompensationBenchmark: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| Integer ID of the compensation benchmark to delete. | | + +### Return type + +**string** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteCompensationBenchmarkSource()` + +```php +deleteCompensationBenchmarkSource($delete_compensation_benchmark_source_request): \BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse +``` + +Delete Compensation Benchmark Source + +Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ \"result\": \"success\" }` when the source is removed. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$delete_compensation_benchmark_source_request = new \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest(); // \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest + +try { + $result = $apiInstance->deleteCompensationBenchmarkSource($delete_compensation_benchmark_source_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->deleteCompensationBenchmarkSource: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **delete_compensation_benchmark_source_request** | [**\BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest**](../Model/DeleteCompensationBenchmarkSourceRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse**](../Model/DeleteCompensationBenchmarkSourceResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `exportCompensationBenchmarkDetails()` + +```php +exportCompensationBenchmarkDetails($job_id, $location_id): string +``` + +Export Compensation Benchmark Details + +Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$job_id = 'job_id_example'; // string | ID of the company job title to export benchmark details for. +$location_id = 'location_id_example'; // string | Optional job location ID to restrict the export to one location. + +try { + $result = $apiInstance->exportCompensationBenchmarkDetails($job_id, $location_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->exportCompensationBenchmarkDetails: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **job_id** | **string**| ID of the company job title to export benchmark details for. | | +| **location_id** | **string**| Optional job location ID to restrict the export to one location. | [optional] | + +### Return type + +**string** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `text/csv`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getCompensationBenchmarkDetails()` + +```php +getCompensationBenchmarkDetails($job_id, $location_id): \BhrSdk\Model\CompensationBenchmarkDetails +``` + +Get Compensation Benchmark Details + +Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$job_id = 'job_id_example'; // string | ID of the company job title to fetch benchmark details for. +$location_id = 'location_id_example'; // string | Optional job location ID. When omitted, results aggregate across all locations for the job. + +try { + $result = $apiInstance->getCompensationBenchmarkDetails($job_id, $location_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->getCompensationBenchmarkDetails: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **job_id** | **string**| ID of the company job title to fetch benchmark details for. | | +| **location_id** | **string**| Optional job location ID. When omitted, results aggregate across all locations for the job. | [optional] | + +### Return type + +[**\BhrSdk\Model\CompensationBenchmarkDetails**](../Model/CompensationBenchmarkDetails.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `importCompensationBenchmarks()` + +```php +importCompensationBenchmarks($file): \BhrSdk\Model\ImportCompensationBenchmarksResponse +``` + +Import Compensation Benchmarks From CSV + +Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$file = '/path/to/file.txt'; // \SplFileObject | CSV file to import. + +try { + $result = $apiInstance->importCompensationBenchmarks($file); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->importCompensationBenchmarks: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **file** | **\SplFileObject****\SplFileObject**| CSV file to import. | | + +### Return type + +[**\BhrSdk\Model\ImportCompensationBenchmarksResponse**](../Model/ImportCompensationBenchmarksResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listCompensationBenchmarkSources()` + +```php +listCompensationBenchmarkSources(): \BhrSdk\Model\CompensationBenchmarkSource[] +``` + +List Compensation Benchmark Sources + +Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); + +try { + $result = $apiInstance->listCompensationBenchmarkSources(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->listCompensationBenchmarkSources: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompensationBenchmarkSource[]**](../Model/CompensationBenchmarkSource.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listCompensationBenchmarks()` + +```php +listCompensationBenchmarks(): \BhrSdk\Model\CompensationBenchmarksList +``` + +List Compensation Benchmarks + +Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); + +try { + $result = $apiInstance->listCompensationBenchmarks(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->listCompensationBenchmarks: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\CompensationBenchmarksList**](../Model/CompensationBenchmarksList.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateCompensationBenchmark()` + +```php +updateCompensationBenchmark($update_compensation_benchmark_request): \BhrSdk\Model\UpdatedCompensationBenchmark +``` + +Update Compensation Benchmark + +Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$update_compensation_benchmark_request = new \BhrSdk\Model\UpdateCompensationBenchmarkRequest(); // \BhrSdk\Model\UpdateCompensationBenchmarkRequest + +try { + $result = $apiInstance->updateCompensationBenchmark($update_compensation_benchmark_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->updateCompensationBenchmark: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **update_compensation_benchmark_request** | [**\BhrSdk\Model\UpdateCompensationBenchmarkRequest**](../Model/UpdateCompensationBenchmarkRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\UpdatedCompensationBenchmark**](../Model/UpdatedCompensationBenchmark.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateCompensationBenchmarkSources()` + +```php +updateCompensationBenchmarkSources($update_compensation_benchmark_sources_request): \BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse +``` + +Update Compensation Benchmark Sources + +Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ \"result\": \"success\" }` when all updates are applied. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationBenchmarkingApi( + // 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 +); +$update_compensation_benchmark_sources_request = new \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest(); // \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest + +try { + $result = $apiInstance->updateCompensationBenchmarkSources($update_compensation_benchmark_sources_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationBenchmarkingApi->updateCompensationBenchmarkSources: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **update_compensation_benchmark_sources_request** | [**\BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest**](../Model/UpdateCompensationBenchmarkSourcesRequest.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse**](../Model/UpdateCompensationBenchmarkSourcesResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[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/CompensationPlanningApi.md b/docs/Api/CompensationPlanningApi.md new file mode 100644 index 00000000..5471f661 --- /dev/null +++ b/docs/Api/CompensationPlanningApi.md @@ -0,0 +1,1802 @@ +# BhrSdk\CompensationPlanningApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**a05b6d5f564f805d688ff2c1e37c3990()**](CompensationPlanningApi.md#a05b6d5f564f805d688ff2c1e37c3990) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations/send | Send recommendations to next stage | +| [**a6b8da1348a3151fe95adc03aaf64447()**](CompensationPlanningApi.md#a6b8da1348a3151fe95adc03aaf64447) | **GET** /api/v1/compensation/planning_cycles/{id}/employees | List employees in compensation planning cycle | +| [**b1e467e0eef72350eec61fcfeaf4e19d()**](CompensationPlanningApi.md#b1e467e0eef72350eec61fcfeaf4e19d) | **DELETE** /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} | Remove from approval flow | +| [**b3c51254de6918637a971fe4af382a53()**](CompensationPlanningApi.md#b3c51254de6918637a971fe4af382a53) | **GET** /api/v1/compensation/planning_cycles/{id}/admins | List compensation planning cycle admins | +| [**b65f246186b41a9783a9397c11c703b4()**](CompensationPlanningApi.md#b65f246186b41a9783a9397c11c703b4) | **GET** /api/v1/compensation/planning_cycles | List compensation planning cycles | +| [**c79f9c5950f983e59d2626faa30c00a1()**](CompensationPlanningApi.md#c79f9c5950f983e59d2626faa30c00a1) | **PUT** /api/v1/compensation/planning_cycles/{id}/change_comm/template | Save change comm template | +| [**c7c32ed5278ac67e2e518bf7484a75dc()**](CompensationPlanningApi.md#c7c32ed5278ac67e2e518bf7484a75dc) | **POST** /api/v1/compensation/planning_cycles/{id}/admins | Add cycle admins | +| [**call100b0cf8c5207b35697ff10370fd5fe1()**](CompensationPlanningApi.md#call100b0cf8c5207b35697ff10370fd5fe1) | **PUT** /api/v1/compensation/planning_cycles/{id} | Update compensation planning cycle | +| [**call1d1fc0f164cb51973a0206b8e2fb2d2d()**](CompensationPlanningApi.md#call1d1fc0f164cb51973a0206b8e2fb2d2d) | **POST** /api/v1/compensation/planning_cycles/{id}/budgets/import | Import budget breakdown | +| [**call1d64402ee192568adbd5e3179a91e6e2()**](CompensationPlanningApi.md#call1d64402ee192568adbd5e3179a91e6e2) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/breakdown | Save budget breakdown | +| [**call22ad75be25455279e2987c80851af5fc()**](CompensationPlanningApi.md#call22ad75be25455279e2987c80851af5fc) | **DELETE** /api/v1/compensation/planning_cycles/{id} | Delete compensation planning cycle | +| [**call329acecaa6df729733d0752aa9f6b204()**](CompensationPlanningApi.md#call329acecaa6df729733d0752aa9f6b204) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet | Get compensation planning cycle worksheet | +| [**call3958585c861325ea7a2cd30a8c74f042()**](CompensationPlanningApi.md#call3958585c861325ea7a2cd30a8c74f042) | **POST** /api/v1/compensation/planning_cycles/{id}/employees | Add employees to cycle | +| [**call3a19f07aa737dc826ba43b9a1c1cd257()**](CompensationPlanningApi.md#call3a19f07aa737dc826ba43b9a1c1cd257) | **PUT** /api/v1/compensation/planning_cycles/{id}/launch | Launch compensation planning cycle | +| [**call4e886b18264480611f380805301c49c4()**](CompensationPlanningApi.md#call4e886b18264480611f380805301c49c4) | **GET** /api/v1/compensation/planning_cycles/{id}/approvals | Get compensation planning approval flows | +| [**call593d5bff120edf2a218a92022a682728()**](CompensationPlanningApi.md#call593d5bff120edf2a218a92022a682728) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet/export | Export compensation planning cycle worksheet to CSV | +| [**call5c2b55158b0950b1e9211655666645b6()**](CompensationPlanningApi.md#call5c2b55158b0950b1e9211655666645b6) | **GET** /api/v1/compensation/planning_cycles/{id} | Get compensation planning cycle details | +| [**call5c4aab35a34f5760ec044104b5232bf5()**](CompensationPlanningApi.md#call5c4aab35a34f5760ec044104b5232bf5) | **POST** /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} | Set final approver | +| [**call7efceaee2c010f88244dd01ee81e6e7b()**](CompensationPlanningApi.md#call7efceaee2c010f88244dd01ee81e6e7b) | **GET** /api/v1/compensation/planning_cycles/{id}/budgets | Get compensation planning cycle budgets | +| [**call89a5068111ec499135c7d6e9a53d5a30()**](CompensationPlanningApi.md#call89a5068111ec499135c7d6e9a53d5a30) | **DELETE** /api/v1/compensation/planning_cycles/{id}/employees | Remove employees from cycle | +| [**call9bc279d788f6e86b4cd8b2e0d3de91b1()**](CompensationPlanningApi.md#call9bc279d788f6e86b4cd8b2e0d3de91b1) | **GET** /api/v1/compensation/planning_cycles/{id}/summary | Get compensation planning cycle summary | +| [**cf87b8e09a001b6fb81dfce6c20ab9e3()**](CompensationPlanningApi.md#cf87b8e09a001b6fb81dfce6c20ab9e3) | **PUT** /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} | Update approval flow | +| [**d6987e300672a00c7cfe59afebb64156()**](CompensationPlanningApi.md#d6987e300672a00c7cfe59afebb64156) | **GET** /api/v1/compensation/planning_cycles/{id}/change_comm | Get change communication letter details | +| [**dacd313af2106213fc4696175941ce65()**](CompensationPlanningApi.md#dacd313af2106213fc4696175941ce65) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/guidelines | Save budget guidelines | +| [**e2ac4e1535f296cb8901f209e04caa83()**](CompensationPlanningApi.md#e2ac4e1535f296cb8901f209e04caa83) | **POST** /api/v1/compensation/planning_cycles | Create compensation planning cycle | +| [**ef7619b0ee4c8dc079aaea870cfbe81b()**](CompensationPlanningApi.md#ef7619b0ee4c8dc079aaea870cfbe81b) | **DELETE** /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} | Remove cycle admin | +| [**f3883a522dadbe9e11b34f8b656e3adb()**](CompensationPlanningApi.md#f3883a522dadbe9e11b34f8b656e3adb) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations | Save recommendations | +| [**f4b431363af6573af46750f32632e88b()**](CompensationPlanningApi.md#f4b431363af6573af46750f32632e88b) | **PUT** /api/v1/compensation/planning_cycles/{id}/complete | Complete compensation planning cycle | + + +## `a05b6d5f564f805d688ff2c1e37c3990()` + +```php +a05b6d5f564f805d688ff2c1e37c3990($id, $a05b6d5f564f805d688ff2c1e37c3990_request): \BhrSdk\Model\SendRecommendationsResponse +``` + +Send recommendations to next stage + +Send recommendations to the next approval stage for a specific approval flow template. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$a05b6d5f564f805d688ff2c1e37c3990_request = new \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request(); // \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request + +try { + $result = $apiInstance->a05b6d5f564f805d688ff2c1e37c3990($id, $a05b6d5f564f805d688ff2c1e37c3990_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->a05b6d5f564f805d688ff2c1e37c3990: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **a05b6d5f564f805d688ff2c1e37c3990_request** | [**\BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request**](../Model/A05b6d5f564f805d688ff2c1e37c3990Request.md)| | | + +### Return type + +[**\BhrSdk\Model\SendRecommendationsResponse**](../Model/SendRecommendationsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `a6b8da1348a3151fe95adc03aaf64447()` + +```php +a6b8da1348a3151fe95adc03aaf64447($id): array<string,mixed> +``` + +List employees in compensation planning cycle + +List employees in the compensation planning cycle (picker data: company roster and membership). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->a6b8da1348a3151fe95adc03aaf64447($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->a6b8da1348a3151fe95adc03aaf64447: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `b1e467e0eef72350eec61fcfeaf4e19d()` + +```php +b1e467e0eef72350eec61fcfeaf4e19d($id, $employee_id, $group_by): array<string,mixed> +``` + +Remove from approval flow + +Remove an employee from all approval chains for a specific cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$employee_id = 'employee_id_example'; // string +$group_by = 'group_by_example'; // string | Optional grouping for returned flows (e.g. department) + +try { + $result = $apiInstance->b1e467e0eef72350eec61fcfeaf4e19d($id, $employee_id, $group_by); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->b1e467e0eef72350eec61fcfeaf4e19d: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **employee_id** | **string**| | | +| **group_by** | **string**| Optional grouping for returned flows (e.g. department) | [optional] | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `b3c51254de6918637a971fe4af382a53()` + +```php +b3c51254de6918637a971fe4af382a53($id): \BhrSdk\Model\CompensationPlanningCycleAdminsResponse +``` + +List compensation planning cycle admins + +List compensation planning cycle admins. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->b3c51254de6918637a971fe4af382a53($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->b3c51254de6918637a971fe4af382a53: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\CompensationPlanningCycleAdminsResponse**](../Model/CompensationPlanningCycleAdminsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `b65f246186b41a9783a9397c11c703b4()` + +```php +b65f246186b41a9783a9397c11c703b4(): array<string,mixed> +``` + +List compensation planning cycles + +List all compensation planning cycles for the company, including status and employee counts. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 +); + +try { + $result = $apiInstance->b65f246186b41a9783a9397c11c703b4(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->b65f246186b41a9783a9397c11c703b4: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `c79f9c5950f983e59d2626faa30c00a1()` + +```php +c79f9c5950f983e59d2626faa30c00a1($id, $c79f9c5950f983e59d2626faa30c00a1_request): \BhrSdk\Model\SaveChangeCommTemplateResponse +``` + +Save change comm template + +Save the change communication email template for a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$c79f9c5950f983e59d2626faa30c00a1_request = new \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request(); // \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request + +try { + $result = $apiInstance->c79f9c5950f983e59d2626faa30c00a1($id, $c79f9c5950f983e59d2626faa30c00a1_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->c79f9c5950f983e59d2626faa30c00a1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **c79f9c5950f983e59d2626faa30c00a1_request** | [**\BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request**](../Model/C79f9c5950f983e59d2626faa30c00a1Request.md)| | | + +### Return type + +[**\BhrSdk\Model\SaveChangeCommTemplateResponse**](../Model/SaveChangeCommTemplateResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `c7c32ed5278ac67e2e518bf7484a75dc()` + +```php +c7c32ed5278ac67e2e518bf7484a75dc($id, $c7c32ed5278ac67e2e518bf7484a75dc_request): \BhrSdk\Model\AddCycleAdminsResponse +``` + +Add cycle admins + +Add one or more cycle admins by employee IDs. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$c7c32ed5278ac67e2e518bf7484a75dc_request = new \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest(); // \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest + +try { + $result = $apiInstance->c7c32ed5278ac67e2e518bf7484a75dc($id, $c7c32ed5278ac67e2e518bf7484a75dc_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->c7c32ed5278ac67e2e518bf7484a75dc: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **c7c32ed5278ac67e2e518bf7484a75dc_request** | [**\BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest**](../Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\AddCycleAdminsResponse**](../Model/AddCycleAdminsResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call100b0cf8c5207b35697ff10370fd5fe1()` + +```php +call100b0cf8c5207b35697ff10370fd5fe1($id, $details_and_currency_request_data_object): array<string,mixed> +``` + +Update compensation planning cycle + +Update compensation planning cycle details and currency settings. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$details_and_currency_request_data_object = new \BhrSdk\Model\DetailsAndCurrencyRequestDataObject(); // \BhrSdk\Model\DetailsAndCurrencyRequestDataObject | Cycle details and currency settings to update + +try { + $result = $apiInstance->call100b0cf8c5207b35697ff10370fd5fe1($id, $details_and_currency_request_data_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call100b0cf8c5207b35697ff10370fd5fe1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **details_and_currency_request_data_object** | [**\BhrSdk\Model\DetailsAndCurrencyRequestDataObject**](../Model/DetailsAndCurrencyRequestDataObject.md)| Cycle details and currency settings to update | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call1d1fc0f164cb51973a0206b8e2fb2d2d()` + +```php +call1d1fc0f164cb51973a0206b8e2fb2d2d($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request): \BhrSdk\Model\BudgetBreakdownImportResponse +``` + +Import budget breakdown + +Import budget breakdown from structured data and apply to allocations. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$_1d1fc0f164cb51973a0206b8e2fb2d2d_request = new \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest(); // \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest | Budget breakdown import data + +try { + $result = $apiInstance->call1d1fc0f164cb51973a0206b8e2fb2d2d($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call1d1fc0f164cb51973a0206b8e2fb2d2d: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **_1d1fc0f164cb51973a0206b8e2fb2d2d_request** | [**\BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest**](../Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md)| Budget breakdown import data | | + +### Return type + +[**\BhrSdk\Model\BudgetBreakdownImportResponse**](../Model/BudgetBreakdownImportResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call1d64402ee192568adbd5e3179a91e6e2()` + +```php +call1d64402ee192568adbd5e3179a91e6e2($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner) +``` + +Save budget breakdown + +Save budget breakdown for a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$_1d64402ee192568adbd5e3179a91e6e2_request_inner = array(new \BhrSdk\Model\_1d64402ee192568adbd5e3179a91e6e2RequestInner()); // \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] | Budget breakdown data + +try { + $apiInstance->call1d64402ee192568adbd5e3179a91e6e2($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call1d64402ee192568adbd5e3179a91e6e2: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **_1d64402ee192568adbd5e3179a91e6e2_request_inner** | [**\BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[]**](../Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md)| Budget breakdown data | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call22ad75be25455279e2987c80851af5fc()` + +```php +call22ad75be25455279e2987c80851af5fc($id) +``` + +Delete compensation planning cycle + +Delete a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $apiInstance->call22ad75be25455279e2987c80851af5fc($id); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call22ad75be25455279e2987c80851af5fc: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call329acecaa6df729733d0752aa9f6b204()` + +```php +call329acecaa6df729733d0752aa9f6b204($id, $type): array<string,mixed> +``` + +Get compensation planning cycle worksheet + +Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$type = 'type_example'; // string | Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + +try { + $result = $apiInstance->call329acecaa6df729733d0752aa9f6b204($id, $type); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call329acecaa6df729733d0752aa9f6b204: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **type** | **string**| Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). | [optional] | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call3958585c861325ea7a2cd30a8c74f042()` + +```php +call3958585c861325ea7a2cd30a8c74f042($id, $_3958585c861325ea7a2cd30a8c74f042_request) +``` + +Add employees to cycle + +Add employees to a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$_3958585c861325ea7a2cd30a8c74f042_request = new \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request(); // \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request | Employee IDs to add + +try { + $apiInstance->call3958585c861325ea7a2cd30a8c74f042($id, $_3958585c861325ea7a2cd30a8c74f042_request); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call3958585c861325ea7a2cd30a8c74f042: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **_3958585c861325ea7a2cd30a8c74f042_request** | [**\BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request**](../Model/_3958585c861325ea7a2cd30a8c74f042Request.md)| Employee IDs to add | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call3a19f07aa737dc826ba43b9a1c1cd257()` + +```php +call3a19f07aa737dc826ba43b9a1c1cd257($id) +``` + +Launch compensation planning cycle + +Launch a compensation planning cycle. Validates all cycle data and sets status to Live. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $apiInstance->call3a19f07aa737dc826ba43b9a1c1cd257($id); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call3a19f07aa737dc826ba43b9a1c1cd257: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call4e886b18264480611f380805301c49c4()` + +```php +call4e886b18264480611f380805301c49c4($id, $group_by): array<string,mixed> +``` + +Get compensation planning approval flows + +Get approval flows for the compensation planning cycle (grouped by department by default). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$group_by = 'group_by_example'; // string | Optional grouping for flows (e.g. department) + +try { + $result = $apiInstance->call4e886b18264480611f380805301c49c4($id, $group_by); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call4e886b18264480611f380805301c49c4: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **group_by** | **string**| Optional grouping for flows (e.g. department) | [optional] | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call593d5bff120edf2a218a92022a682728()` + +```php +call593d5bff120edf2a218a92022a682728($id, $type): \SplFileObject +``` + +Export compensation planning cycle worksheet to CSV + +Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$type = 'type_example'; // string | Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + +try { + $result = $apiInstance->call593d5bff120edf2a218a92022a682728($id, $type); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call593d5bff120edf2a218a92022a682728: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **type** | **string**| Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). | [optional] | + +### Return type + +**\SplFileObject** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `text/csv` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `call5c2b55158b0950b1e9211655666645b6()` + +```php +call5c2b55158b0950b1e9211655666645b6($id): array<string,mixed> +``` + +Get compensation planning cycle details + +Get compensation planning cycle details and currency settings for a cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call5c2b55158b0950b1e9211655666645b6($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call5c2b55158b0950b1e9211655666645b6: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call5c4aab35a34f5760ec044104b5232bf5()` + +```php +call5c4aab35a34f5760ec044104b5232bf5($id, $employee_id, $group_by): array<string,mixed> +``` + +Set final approver + +Set or update the final approver for all approval flows in a cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$employee_id = 'employee_id_example'; // string +$group_by = 'group_by_example'; // string | Optional grouping for returned flows (e.g. department) + +try { + $result = $apiInstance->call5c4aab35a34f5760ec044104b5232bf5($id, $employee_id, $group_by); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call5c4aab35a34f5760ec044104b5232bf5: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **employee_id** | **string**| | | +| **group_by** | **string**| Optional grouping for returned flows (e.g. department) | [optional] | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call7efceaee2c010f88244dd01ee81e6e7b()` + +```php +call7efceaee2c010f88244dd01ee81e6e7b($id): array<string,mixed> +``` + +Get compensation planning cycle budgets + +Get budget guidelines and breakdown for the compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call7efceaee2c010f88244dd01ee81e6e7b($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call7efceaee2c010f88244dd01ee81e6e7b: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call89a5068111ec499135c7d6e9a53d5a30()` + +```php +call89a5068111ec499135c7d6e9a53d5a30($id, $_89a5068111ec499135c7d6e9a53d5a30_request) +``` + +Remove employees from cycle + +Remove employees from a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$_89a5068111ec499135c7d6e9a53d5a30_request = new \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request(); // \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request | Employee IDs to remove + +try { + $apiInstance->call89a5068111ec499135c7d6e9a53d5a30($id, $_89a5068111ec499135c7d6e9a53d5a30_request); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call89a5068111ec499135c7d6e9a53d5a30: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **_89a5068111ec499135c7d6e9a53d5a30_request** | [**\BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request**](../Model/_89a5068111ec499135c7d6e9a53d5a30Request.md)| Employee IDs to remove | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call9bc279d788f6e86b4cd8b2e0d3de91b1()` + +```php +call9bc279d788f6e86b4cd8b2e0d3de91b1($id): array<string,mixed> +``` + +Get compensation planning cycle summary + +Get compensation planning cycle summary (progress, stats). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call9bc279d788f6e86b4cd8b2e0d3de91b1($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->call9bc279d788f6e86b4cd8b2e0d3de91b1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `cf87b8e09a001b6fb81dfce6c20ab9e3()` + +```php +cf87b8e09a001b6fb81dfce6c20ab9e3($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by): array<string,mixed> +``` + +Update approval flow + +Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$template_id = 'template_id_example'; // string +$cf87b8e09a001b6fb81dfce6c20ab9e3_request = new \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request(); // \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request +$group_by = 'group_by_example'; // string | Optional grouping for returned flows (e.g. department) + +try { + $result = $apiInstance->cf87b8e09a001b6fb81dfce6c20ab9e3($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->cf87b8e09a001b6fb81dfce6c20ab9e3: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **template_id** | **string**| | | +| **cf87b8e09a001b6fb81dfce6c20ab9e3_request** | [**\BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request**](../Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md)| | | +| **group_by** | **string**| Optional grouping for returned flows (e.g. department) | [optional] | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `d6987e300672a00c7cfe59afebb64156()` + +```php +d6987e300672a00c7cfe59afebb64156($id): array<string,mixed> +``` + +Get change communication letter details + +Get change communication letter details for the compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->d6987e300672a00c7cfe59afebb64156($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->d6987e300672a00c7cfe59afebb64156: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `dacd313af2106213fc4696175941ce65()` + +```php +dacd313af2106213fc4696175941ce65($id, $dacd313af2106213fc4696175941ce65_request): \BhrSdk\Model\BudgetGuidelinesView +``` + +Save budget guidelines + +Save budget guidelines for a compensation planning cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$dacd313af2106213fc4696175941ce65_request = new \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request(); // \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request | Budget guideline settings + +try { + $result = $apiInstance->dacd313af2106213fc4696175941ce65($id, $dacd313af2106213fc4696175941ce65_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->dacd313af2106213fc4696175941ce65: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **dacd313af2106213fc4696175941ce65_request** | [**\BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request**](../Model/Dacd313af2106213fc4696175941ce65Request.md)| Budget guideline settings | | + +### Return type + +[**\BhrSdk\Model\BudgetGuidelinesView**](../Model/BudgetGuidelinesView.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `e2ac4e1535f296cb8901f209e04caa83()` + +```php +e2ac4e1535f296cb8901f209e04caa83(): array<string,mixed> +``` + +Create compensation planning cycle + +Create a new compensation planning cycle with default settings. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 +); + +try { + $result = $apiInstance->e2ac4e1535f296cb8901f209e04caa83(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->e2ac4e1535f296cb8901f209e04caa83: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `ef7619b0ee4c8dc079aaea870cfbe81b()` + +```php +ef7619b0ee4c8dc079aaea870cfbe81b($id, $employee_id): \BhrSdk\Model\RemoveCycleAdminSelfResponse +``` + +Remove cycle admin + +Remove a cycle admin by employee ID. Full account admins cannot be removed. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$employee_id = 'employee_id_example'; // string + +try { + $result = $apiInstance->ef7619b0ee4c8dc079aaea870cfbe81b($id, $employee_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->ef7619b0ee4c8dc079aaea870cfbe81b: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **employee_id** | **string**| | | + +### Return type + +[**\BhrSdk\Model\RemoveCycleAdminSelfResponse**](../Model/RemoveCycleAdminSelfResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `f3883a522dadbe9e11b34f8b656e3adb()` + +```php +f3883a522dadbe9e11b34f8b656e3adb($id, $f3883a522dadbe9e11b34f8b656e3adb_request): array<string,mixed> +``` + +Save recommendations + +Save compensation recommendations for an employee in a cycle. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int +$f3883a522dadbe9e11b34f8b656e3adb_request = new \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest(); // \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest + +try { + $result = $apiInstance->f3883a522dadbe9e11b34f8b656e3adb($id, $f3883a522dadbe9e11b34f8b656e3adb_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->f3883a522dadbe9e11b34f8b656e3adb: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **f3883a522dadbe9e11b34f8b656e3adb_request** | [**\BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest**](../Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md)| | | + +### Return type + +**array<string,mixed>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `f4b431363af6573af46750f32632e88b()` + +```php +f4b431363af6573af46750f32632e88b($id): \BhrSdk\Model\CompensationPlanningCycleCompleteResponse +``` + +Complete compensation planning cycle + +Complete a compensation planning cycle and finalize employee compensation records. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\CompensationPlanningApi( + // 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 = 56; // int + +try { + $result = $apiInstance->f4b431363af6573af46750f32632e88b($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CompensationPlanningApi->f4b431363af6573af46750f32632e88b: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\CompensationPlanningCycleCompleteResponse**](../Model/CompensationPlanningCycleCompleteResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/CustomReportsApi.md b/docs/Api/CustomReportsApi.md index 66d8beb6..ea55994d 100644 --- a/docs/Api/CustomReportsApi.md +++ b/docs/Api/CustomReportsApi.md @@ -4,19 +4,19 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getByReportId()**](CustomReportsApi.md#getByReportId) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID | -| [**listReports()**](CustomReportsApi.md#listReports) | **GET** /api/v1/custom-reports | Get Reports | +| [**getReportById()**](CustomReportsApi.md#getReportById) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID | +| [**listReports()**](CustomReportsApi.md#listReports) | **GET** /api/v1/custom-reports | List Reports | -## `getByReportId()` +## `getReportById()` ```php -getByReportId($report_id): \BhrSdk\Model\EmployeeResponse +getReportById($report_id, $page, $page_size): \BhrSdk\Model\EmployeeResponse ``` Get Report by ID -Use this resource to retrieve data for a specific report. +Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs. Response shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`). There is no schema-only response from this endpoint. The `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults. ### Example @@ -37,13 +37,15 @@ $apiInstance = new BhrSdk\Api\CustomReportsApi( new GuzzleHttp\Client(), $config ); -$report_id = 56; // int +$report_id = 56; // int | The numeric ID of the saved custom report to execute. +$page = 1; // int | The page number to retrieve. Defaults to 1. +$page_size = 500; // int | The number of records per page. Defaults to 500. Maximum is 1000. try { - $result = $apiInstance->getByReportId($report_id); + $result = $apiInstance->getReportById($report_id, $page, $page_size); print_r($result); } catch (Exception $e) { - echo 'Exception when calling CustomReportsApi->getByReportId: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling CustomReportsApi->getReportById: ', $e->getMessage(), PHP_EOL; } ``` @@ -51,7 +53,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **report_id** | **int**| | | +| **report_id** | **int**| The numeric ID of the saved custom report to execute. | | +| **page** | **int**| The page number to retrieve. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of records per page. Defaults to 500. Maximum is 1000. | [optional] [default to 500] | ### Return type @@ -76,9 +80,9 @@ try { listReports($page, $page_size): \BhrSdk\Model\ReportsResponse ``` -Get Reports +List Reports -Use this resource to retrieve a list of available reports. +Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults. The `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`. ### Example @@ -99,8 +103,8 @@ $apiInstance = new BhrSdk\Api\CustomReportsApi( new GuzzleHttp\Client(), $config ); -$page = 56; // int | The page number to retrieve -$page_size = 56; // int | The number of records to retrieve per page. Default is 500 and the Max is 1000 +$page = 1; // int | The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. +$page_size = 500; // int | The number of records to retrieve per page. Defaults to 500. Maximum is 1000. try { $result = $apiInstance->listReports($page, $page_size); @@ -114,8 +118,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **int**| The page number to retrieve | [optional] | -| **page_size** | **int**| The number of records to retrieve per page. Default is 500 and the Max is 1000 | [optional] | +| **page** | **int**| The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of records to retrieve per page. Defaults to 500. Maximum is 1000. | [optional] [default to 500] | ### Return type diff --git a/docs/Api/DatasetsApi.md b/docs/Api/DatasetsApi.md index 6e5f0f93..34d03608 100644 --- a/docs/Api/DatasetsApi.md +++ b/docs/Api/DatasetsApi.md @@ -4,21 +4,25 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getDataFromDataset()**](DatasetsApi.md#getDataFromDataset) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset | -| [**getDatasets()**](DatasetsApi.md#getDatasets) | **GET** /api/v1/datasets | Get Datasets | -| [**getFieldOptions()**](DatasetsApi.md#getFieldOptions) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options | -| [**getFieldsFromDataset()**](DatasetsApi.md#getFieldsFromDataset) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset | +| [**getDataFromDatasetV1()**](DatasetsApi.md#getDataFromDatasetV1) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset (v1) | +| [**getDataFromDatasetV2()**](DatasetsApi.md#getDataFromDatasetV2) | **POST** /api/v2/datasets/{datasetName}/data | Get Data from Dataset (v2) | +| [**getFieldOptionsV1()**](DatasetsApi.md#getFieldOptionsV1) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options (v1) | +| [**getFieldOptionsV12()**](DatasetsApi.md#getFieldOptionsV12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options (v1.2) | +| [**getFieldsFromDatasetV1()**](DatasetsApi.md#getFieldsFromDatasetV1) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset (v1) | +| [**getFieldsFromDatasetV12()**](DatasetsApi.md#getFieldsFromDatasetV12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset (v1.2) | +| [**listDatasetsV1()**](DatasetsApi.md#listDatasetsV1) | **GET** /api/v1/datasets | List Datasets (v1) | +| [**listDatasetsV12()**](DatasetsApi.md#listDatasetsV12) | **GET** /api/v1_2/datasets | List Datasets (v1.2) | -## `getDataFromDataset()` +## `getDataFromDatasetV1()` ```php -getDataFromDataset($dataset_name, $data_request): \BhrSdk\Model\EmployeeResponse +getDataFromDatasetV1($dataset_name, $data_request, $page, $page_size): \BhrSdk\Model\EmployeeResponse ``` -Get Data from Dataset +Get Data from Dataset (v1) -Use this resource to request data from the specified dataset. You must specify a list of fields to show on the report. The list of fields is available here at /api/v1/datasets/{datasetName}/fields. ***Field Settings:*** **Show History** When any of the fields included in your request are historical table fields, you may include the \"showHistory\" setting. Example: \"showHistory\":[\"entityName\"]. Entity Name can be found in the get /api/v1/datasets/{datasetName}/fields endpoint. **Sort By:** You can pass multiple fields to sort by as an array of objects {field: \"fieldName\", sort: \"asc,desc\"}. The order of the fields in the array will determine the order of the sort. **Group By:** Group By is passed as an array of strings but currently grouping by more than one field is not supported. **Aggregations:** When using aggregations the following aggregates are available based on field type: - **text** - count - **date** - count - min - max - **int** - count - min - max - sum - avg - **bool** - count - **options** - count - **ssnText** - count **Filters:** When using filters, the filtered field does not have to be in the list of fields you want to show on the report. **Important Filter Notes:** - **List filter values** (for \"options\" field type using \"includes\" or \"does_not_include\" operators) must be enclosed in square brackets [ ]. Example: [\"value1\", \"value2\"] - **Future hires**: Future hires have a status of \"Inactive\" in the datasets API. To include future hires in your results, you must include \"Inactive\" in your status filter. Use the `/api/v1/datasets/{datasetName}/field-options` endpoint to retrieve possible filter values for fields. Use the \"id\" returned from the field-options endpoint. **Filter Operators by Field Type:** - **text** - contains - does_not_contain - equal - not_equal - empty - not_empty - **date** - lt (less than) - lte (less than or equal) - gt (greater than) - gte (greater than or equal) - last - Uses an object for the value: {\"duration\": \"5\", \"unit\": \"years\"}. Unit can be \"days\", \"weeks\", \"months\", or \"years\". Duration is a number as a string. - next - Uses an object for the value: {\"duration\": \"5\", \"unit\": \"years\"}. Unit can be \"days\", \"weeks\", \"months\", or \"years\". Duration is a number as a string. - range - Uses an object for the value: {\"start\": \"2023-01-01\", \"end\": \"2023-12-31\"}. Dates must be in YYYY-MM-DD format. - equal - not_equal - empty - not_empty - **int** - equal - not_equal - gte - gt - lte - lt - empty - not_empty - **bool** - checked - not_checked - **options** - includes - does_not_include - empty - not_empty - **ssnText**: - empty - not_empty +Deprecated. Use \"Get Data from Dataset (v2)\" instead. Retrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000). Use \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`. When any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`. **Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count. **Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last, next, range; int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty. ### Example @@ -39,14 +43,16 @@ $apiInstance = new BhrSdk\Api\DatasetsApi( new GuzzleHttp\Client(), $config ); -$dataset_name = 'dataset_name_example'; // string | The name of the dataset you want data from +$dataset_name = 'dataset_name_example'; // string | The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. $data_request = new \BhrSdk\Model\DataRequest(); // \BhrSdk\Model\DataRequest +$page = 1; // int | The page number to retrieve. Defaults to 1. +$page_size = 500; // int | The number of records to retrieve per page. Defaults to 500. Maximum is 1000. try { - $result = $apiInstance->getDataFromDataset($dataset_name, $data_request); + $result = $apiInstance->getDataFromDatasetV1($dataset_name, $data_request, $page, $page_size); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DatasetsApi->getDataFromDataset: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DatasetsApi->getDataFromDatasetV1: ', $e->getMessage(), PHP_EOL; } ``` @@ -54,8 +60,10 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **dataset_name** | **string**| The name of the dataset you want data from | | +| **dataset_name** | **string**| The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. | | | **data_request** | [**\BhrSdk\Model\DataRequest**](../Model/DataRequest.md)| | | +| **page** | **int**| The page number to retrieve. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of records to retrieve per page. Defaults to 500. Maximum is 1000. | [optional] [default to 500] | ### Return type @@ -74,15 +82,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getDatasets()` +## `getDataFromDatasetV2()` ```php -getDatasets(): \BhrSdk\Model\DatasetResponse +getDataFromDatasetV2($dataset_name, $get_data_from_dataset_v2_request): \BhrSdk\Model\DatasetDataResponseV2 ``` -Get Datasets +Get Data from Dataset (v2) -Use this resource to retrieve the available datasets to query data from. +Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`). Use this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead. Discover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1-2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`); the field set is dataset-specific. Field-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here. Filter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`. `orderBy` is a comma-separated list of `<field> <asc|desc>` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified. Field-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). Pagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`). Note: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header. ### Example @@ -103,22 +111,91 @@ $apiInstance = new BhrSdk\Api\DatasetsApi( new GuzzleHttp\Client(), $config ); +$dataset_name = employee; // string | Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. +$get_data_from_dataset_v2_request = new \BhrSdk\Model\GetDataFromDatasetV2Request(); // \BhrSdk\Model\GetDataFromDatasetV2Request | Request parameters for dataset data retrieval try { - $result = $apiInstance->getDatasets(); + $result = $apiInstance->getDataFromDatasetV2($dataset_name, $get_data_from_dataset_v2_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DatasetsApi->getDatasets: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DatasetsApi->getDataFromDatasetV2: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters -This endpoint does not need any parameter. +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **dataset_name** | **string**| Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. | | +| **get_data_from_dataset_v2_request** | [**\BhrSdk\Model\GetDataFromDatasetV2Request**](../Model/GetDataFromDatasetV2Request.md)| Request parameters for dataset data retrieval | | + +### Return type + +[**\BhrSdk\Model\DatasetDataResponseV2**](../Model/DatasetDataResponseV2.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getFieldOptionsV1()` + +```php +getFieldOptionsV1($dataset_name, $field_options_request_schema): array<string,\BhrSdk\Model\FieldOptionsTransformer[]> +``` + +Get Field Options (v1) + +Deprecated. Use \"Get Field Options (v1.2)\" instead. Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\DatasetsApi( + // 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 +); +$dataset_name = 'dataset_name_example'; // string | The name of the dataset to retrieve field options for. +$field_options_request_schema = new \BhrSdk\Model\FieldOptionsRequestSchema(); // \BhrSdk\Model\FieldOptionsRequestSchema + +try { + $result = $apiInstance->getFieldOptionsV1($dataset_name, $field_options_request_schema); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DatasetsApi->getFieldOptionsV1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **dataset_name** | **string**| The name of the dataset to retrieve field options for. | | +| **field_options_request_schema** | [**\BhrSdk\Model\FieldOptionsRequestSchema**](../Model/FieldOptionsRequestSchema.md)| | | ### Return type -[**\BhrSdk\Model\DatasetResponse**](../Model/DatasetResponse.md) +**array<string,\BhrSdk\Model\FieldOptionsTransformer[]>** ### Authorization @@ -133,15 +210,15 @@ This endpoint does not need any parameter. [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getFieldOptions()` +## `getFieldOptionsV12()` ```php -getFieldOptions($dataset_name, $field_options_request_schema): \BhrSdk\Model\FieldOptionsTransformer[] +getFieldOptionsV12($dataset_name, $field_options_request_schema): array<string,\BhrSdk\Model\FieldOptionsTransformer[]> ``` -Get Field Options +Get Field Options (v1.2) -Use this resource to retrieve a list of possible values for a field. +Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset. Use this endpoint when you already have dataset field names from `get-fields-from-dataset-v1-2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. Note: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. ### Example @@ -162,14 +239,14 @@ $apiInstance = new BhrSdk\Api\DatasetsApi( new GuzzleHttp\Client(), $config ); -$dataset_name = 'dataset_name_example'; // string | The name of the dataset you want to see field options for +$dataset_name = 'dataset_name_example'; // string | The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. $field_options_request_schema = new \BhrSdk\Model\FieldOptionsRequestSchema(); // \BhrSdk\Model\FieldOptionsRequestSchema try { - $result = $apiInstance->getFieldOptions($dataset_name, $field_options_request_schema); + $result = $apiInstance->getFieldOptionsV12($dataset_name, $field_options_request_schema); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DatasetsApi->getFieldOptions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DatasetsApi->getFieldOptionsV12: ', $e->getMessage(), PHP_EOL; } ``` @@ -177,12 +254,78 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **dataset_name** | **string**| The name of the dataset you want to see field options for | | +| **dataset_name** | **string**| The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. | | | **field_options_request_schema** | [**\BhrSdk\Model\FieldOptionsRequestSchema**](../Model/FieldOptionsRequestSchema.md)| | | ### Return type -[**\BhrSdk\Model\FieldOptionsTransformer[]**](../Model/FieldOptionsTransformer.md) +**array<string,\BhrSdk\Model\FieldOptionsTransformer[]>** + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getFieldsFromDatasetV1()` + +```php +getFieldsFromDatasetV1($dataset_name, $page, $page_size): \BhrSdk\Model\DatasetFieldsResponse +``` + +Get Fields from Dataset (v1) + +Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead. Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs. Error responses (400, 403, 500) return plain-text bodies, not JSON. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\DatasetsApi( + // 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 +); +$dataset_name = 'dataset_name_example'; // string | The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. +$page = 1; // int | The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. +$page_size = 500; // int | The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. + +try { + $result = $apiInstance->getFieldsFromDatasetV1($dataset_name, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DatasetsApi->getFieldsFromDatasetV1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **dataset_name** | **string**| The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. | | +| **page** | **int**| The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. | [optional] [default to 500] | + +### Return type + +[**\BhrSdk\Model\DatasetFieldsResponse**](../Model/DatasetFieldsResponse.md) ### Authorization @@ -197,15 +340,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getFieldsFromDataset()` +## `getFieldsFromDatasetV12()` ```php -getFieldsFromDataset($dataset_name, $page, $page_size): \BhrSdk\Model\DatasetFieldsResponse +getFieldsFromDatasetV12($dataset_name, $page, $page_size): \BhrSdk\Model\DatasetFieldsResponse ``` -Get Fields from Dataset +Get Fields from Dataset (v1.2) -Use this resource to request the available fields on a dataset. +Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side. The `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other. For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. Note: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. ### Example @@ -226,15 +369,15 @@ $apiInstance = new BhrSdk\Api\DatasetsApi( new GuzzleHttp\Client(), $config ); -$dataset_name = 'dataset_name_example'; // string | The name of the dataset you want to see fields for -$page = 56; // int | The page number to retrieve -$page_size = 56; // int | The number of records to retrieve per page. Default is 500 and the Max is 1000 +$dataset_name = 'dataset_name_example'; // string | The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. +$page = 1; // int | The page number to retrieve. Defaults to 1. +$page_size = 500; // int | The number of records to retrieve per page. Defaults to 500. Maximum is 1000. try { - $result = $apiInstance->getFieldsFromDataset($dataset_name, $page, $page_size); + $result = $apiInstance->getFieldsFromDatasetV12($dataset_name, $page, $page_size); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DatasetsApi->getFieldsFromDataset: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DatasetsApi->getFieldsFromDatasetV12: ', $e->getMessage(), PHP_EOL; } ``` @@ -242,9 +385,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **dataset_name** | **string**| The name of the dataset you want to see fields for | | -| **page** | **int**| The page number to retrieve | [optional] | -| **page_size** | **int**| The number of records to retrieve per page. Default is 500 and the Max is 1000 | [optional] | +| **dataset_name** | **string**| The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. | | +| **page** | **int**| The page number to retrieve. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of records to retrieve per page. Defaults to 500. Maximum is 1000. | [optional] [default to 500] | ### Return type @@ -256,9 +399,127 @@ try { ### HTTP request headers +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listDatasetsV1()` + +```php +listDatasetsV1(): \BhrSdk\Model\DatasetResponseV1 +``` + +List Datasets (v1) + +Deprecated. Use \"List Datasets (v1.2)\" instead. Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. The response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\DatasetsApi( + // 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 +); + +try { + $result = $apiInstance->listDatasetsV1(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DatasetsApi->listDatasetsV1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\DatasetResponseV1**](../Model/DatasetResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + - **Content-Type**: `application/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) + +## `listDatasetsV12()` + +```php +listDatasetsV12(): \BhrSdk\Model\DatasetsResponseV12 +``` + +List Datasets (v1.2) + +Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. Datasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`). Note: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\DatasetsApi( + // 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 +); + +try { + $result = $apiInstance->listDatasetsV12(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DatasetsApi->listDatasetsV12: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\DatasetsResponseV12**](../Model/DatasetsResponseV12.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[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/EmployeeFilesApi.md b/docs/Api/EmployeeFilesApi.md index 3abf927b..036c1ef5 100644 --- a/docs/Api/EmployeeFilesApi.md +++ b/docs/Api/EmployeeFilesApi.md @@ -4,23 +4,23 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addEmployeeFileCategory()**](EmployeeFilesApi.md#addEmployeeFileCategory) | **POST** /api/v1/employees/files/categories | Create Employee File Category | +| [**createEmployeeFileCategory()**](EmployeeFilesApi.md#createEmployeeFileCategory) | **POST** /api/v1/employees/files/categories | Create Employee File Category | | [**deleteEmployeeFile()**](EmployeeFilesApi.md#deleteEmployeeFile) | **DELETE** /api/v1/employees/{id}/files/{fileId} | Delete Employee File | | [**getEmployeeFile()**](EmployeeFilesApi.md#getEmployeeFile) | **GET** /api/v1/employees/{id}/files/{fileId} | Get Employee File | -| [**listEmployeeFiles()**](EmployeeFilesApi.md#listEmployeeFiles) | **GET** /api/v1/employees/{id}/files/view | Get Employee Files and Categories | +| [**listEmployeeFiles()**](EmployeeFilesApi.md#listEmployeeFiles) | **GET** /api/v1/employees/{id}/files/view | List Employee Files | | [**updateEmployeeFile()**](EmployeeFilesApi.md#updateEmployeeFile) | **POST** /api/v1/employees/{id}/files/{fileId} | Update Employee File | | [**uploadEmployeeFile()**](EmployeeFilesApi.md#uploadEmployeeFile) | **POST** /api/v1/employees/{id}/files | Upload Employee File | -## `addEmployeeFileCategory()` +## `createEmployeeFileCategory()` ```php -addEmployeeFileCategory($request_body) +createEmployeeFileCategory($request_body) ``` Create Employee File Category -Add an employee file category. +Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `<category>` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category. ### Example @@ -44,9 +44,9 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( $request_body = array('request_body_example'); // string[] try { - $apiInstance->addEmployeeFileCategory($request_body); + $apiInstance->createEmployeeFileCategory($request_body); } catch (Exception $e) { - echo 'Exception when calling EmployeeFilesApi->addEmployeeFileCategory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling EmployeeFilesApi->createEmployeeFileCategory: ', $e->getMessage(), PHP_EOL; } ``` @@ -66,8 +66,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -81,7 +81,7 @@ deleteEmployeeFile($id, $file_id) Delete Employee File -Delete an employee file +Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the API key. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs. ### Example @@ -102,8 +102,8 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( new GuzzleHttp\Client(), $config ); -$id = '0'; // string | {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). -$file_id = 'file_id_example'; // string | {fileId} is the ID of the employee file being deleted. +$id = 56; // int | The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. +$file_id = 56; // int | The ID of the employee file to delete. try { $apiInstance->deleteEmployeeFile($id, $file_id); @@ -116,8 +116,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). | [default to '0'] | -| **file_id** | **string**| {fileId} is the ID of the employee file being deleted. | | +| **id** | **int**| The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. | | +| **file_id** | **int**| The ID of the employee file to delete. | | ### Return type @@ -130,7 +130,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -139,12 +139,12 @@ void (empty response body) ## `getEmployeeFile()` ```php -getEmployeeFile($id, $file_id) +getEmployeeFile($id, $file_id): \SplFileObject ``` Get Employee File -Gets an employee file +Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the API key. Use \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404. ### Example @@ -165,11 +165,12 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( new GuzzleHttp\Client(), $config ); -$id = '0'; // string | {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). -$file_id = 'file_id_example'; // string | {fileId} is the ID of the employee file being retrieved. +$id = 56; // int | The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. +$file_id = 56; // int | The ID of the employee file to download. try { - $apiInstance->getEmployeeFile($id, $file_id); + $result = $apiInstance->getEmployeeFile($id, $file_id); + print_r($result); } catch (Exception $e) { echo 'Exception when calling EmployeeFilesApi->getEmployeeFile: ', $e->getMessage(), PHP_EOL; } @@ -179,12 +180,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). | [default to '0'] | -| **file_id** | **string**| {fileId} is the ID of the employee file being retrieved. | | +| **id** | **int**| The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. | | +| **file_id** | **int**| The ID of the employee file to download. | | ### Return type -void (empty response body) +**\SplFileObject** ### Authorization @@ -193,7 +194,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/octet-stream` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -202,12 +203,12 @@ void (empty response body) ## `listEmployeeFiles()` ```php -listEmployeeFiles($id) +listEmployeeFiles($id, $accept): \BhrSdk\Model\JsonEmployeeFiles ``` -Get Employee Files and Categories +List Employee Files -Lists employee files and categories +Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories. ### Example @@ -228,10 +229,12 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( new GuzzleHttp\Client(), $config ); -$id = 1501; // string | Employee ID is required and needs to be a valid employee ID. +$id = 56; // int | The ID of the employee whose files are being listed. +$accept = 'application/xml'; // string | Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. try { - $apiInstance->listEmployeeFiles($id); + $result = $apiInstance->listEmployeeFiles($id, $accept); + print_r($result); } catch (Exception $e) { echo 'Exception when calling EmployeeFilesApi->listEmployeeFiles: ', $e->getMessage(), PHP_EOL; } @@ -241,11 +244,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| Employee ID is required and needs to be a valid employee ID. | | +| **id** | **int**| The ID of the employee whose files are being listed. | | +| **accept** | **string**| Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. | [optional] [default to 'application/xml'] | ### Return type -void (empty response body) +[**\BhrSdk\Model\JsonEmployeeFiles**](../Model/JsonEmployeeFiles.md) ### Authorization @@ -254,7 +258,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -268,7 +272,7 @@ updateEmployeeFile($id, $file_id, $employee_file_update) Update Employee File -Update an employee file +Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs. ### Example @@ -289,8 +293,8 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( new GuzzleHttp\Client(), $config ); -$id = '0'; // string | {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). -$file_id = 'file_id_example'; // string | {fileId} is the ID of the employee file being updated. +$id = 56; // int | The ID of the employee whose file is being updated. +$file_id = 56; // int | The ID of the employee file to update. $employee_file_update = new \BhrSdk\Model\EmployeeFileUpdate(); // \BhrSdk\Model\EmployeeFileUpdate try { @@ -304,8 +308,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). | [default to '0'] | -| **file_id** | **string**| {fileId} is the ID of the employee file being updated. | | +| **id** | **int**| The ID of the employee whose file is being updated. | | +| **file_id** | **int**| The ID of the employee file to update. | | | **employee_file_update** | [**\BhrSdk\Model\EmployeeFileUpdate**](../Model/EmployeeFileUpdate.md)| | | ### Return type @@ -318,8 +322,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -328,12 +332,12 @@ void (empty response body) ## `uploadEmployeeFile()` ```php -uploadEmployeeFile($id) +uploadEmployeeFile($id, $file_name, $category, $file, $share) ``` Upload Employee File -Upload an employee file +Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled. ### Example @@ -355,9 +359,13 @@ $apiInstance = new BhrSdk\Api\EmployeeFilesApi( $config ); $id = '0'; // string | {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). +$file_name = 'file_name_example'; // string | The display name for the uploaded file. +$category = 56; // int | The ID of the employee file section to upload the file into. +$file = '/path/to/file.txt'; // \SplFileObject | The file to upload. +$share = 'share_example'; // string | Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. try { - $apiInstance->uploadEmployeeFile($id); + $apiInstance->uploadEmployeeFile($id, $file_name, $category, $file, $share); } catch (Exception $e) { echo 'Exception when calling EmployeeFilesApi->uploadEmployeeFile: ', $e->getMessage(), PHP_EOL; } @@ -368,6 +376,10 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). | [default to '0'] | +| **file_name** | **string**| The display name for the uploaded file. | | +| **category** | **int**| The ID of the employee file section to upload the file into. | | +| **file** | **\SplFileObject****\SplFileObject**| The file to upload. | | +| **share** | **string**| Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. | [optional] | ### Return type @@ -379,8 +391,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `multipart/form-data` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/EmployeeVerificationApi.md b/docs/Api/EmployeeVerificationApi.md new file mode 100644 index 00000000..6c898db8 --- /dev/null +++ b/docs/Api/EmployeeVerificationApi.md @@ -0,0 +1,325 @@ +# BhrSdk\EmployeeVerificationApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getEmployeeVerificationIntegration()**](EmployeeVerificationApi.md#getEmployeeVerificationIntegration) | **GET** /api/v1/employee-verifications/integration | Get employee verification integration status | +| [**listEmployeeVerificationsByEmployee()**](EmployeeVerificationApi.md#listEmployeeVerificationsByEmployee) | **GET** /api/v1/employee-verifications/employees/{employeeId} | List employee verification records for an employee | +| [**sendEmployeeVerificationLifecycleEmailByUser()**](EmployeeVerificationApi.md#sendEmployeeVerificationLifecycleEmailByUser) | **POST** /api/v1/employee-verifications/users/{userId}/send-email | Send employee verification lifecycle email by user and email type | +| [**updateEmployeeVerification()**](EmployeeVerificationApi.md#updateEmployeeVerification) | **PUT** /api/v1/employee-verifications/employees/{employeeId}/{verificationId} | Update an employee verification record | +| [**updateEmployeeVerificationIntegration()**](EmployeeVerificationApi.md#updateEmployeeVerificationIntegration) | **PUT** /api/v1/employee-verifications/integration | Enable or disable the employee verification integration | + + +## `getEmployeeVerificationIntegration()` + +```php +getEmployeeVerificationIntegration(): \BhrSdk\Model\EmployeeVerificationIntegrationResponse +``` + +Get employee verification integration status + +Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeeVerificationApi( + // 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 +); + +try { + $result = $apiInstance->getEmployeeVerificationIntegration(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeVerificationApi->getEmployeeVerificationIntegration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\EmployeeVerificationIntegrationResponse**](../Model/EmployeeVerificationIntegrationResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listEmployeeVerificationsByEmployee()` + +```php +listEmployeeVerificationsByEmployee($employee_id): \BhrSdk\Model\EmployeeVerificationsListResponse +``` + +List employee verification records for an employee + +Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeeVerificationApi( + // 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 +); +$employee_id = 56; // int | Company employee id whose verification history is returned. + +try { + $result = $apiInstance->listEmployeeVerificationsByEmployee($employee_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeVerificationApi->listEmployeeVerificationsByEmployee: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| Company employee id whose verification history is returned. | | + +### Return type + +[**\BhrSdk\Model\EmployeeVerificationsListResponse**](../Model/EmployeeVerificationsListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `sendEmployeeVerificationLifecycleEmailByUser()` + +```php +sendEmployeeVerificationLifecycleEmailByUser($user_id, $send_employee_verification_lifecycle_email_by_user_request): \BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse +``` + +Send employee verification lifecycle email by user and email type + +Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeeVerificationApi( + // 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 +); +$user_id = 56; // int | Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. +$send_employee_verification_lifecycle_email_by_user_request = new \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest(); // \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest + +try { + $result = $apiInstance->sendEmployeeVerificationLifecycleEmailByUser($user_id, $send_employee_verification_lifecycle_email_by_user_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeVerificationApi->sendEmployeeVerificationLifecycleEmailByUser: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **user_id** | **int**| Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. | | +| **send_employee_verification_lifecycle_email_by_user_request** | [**\BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest**](../Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse**](../Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateEmployeeVerification()` + +```php +updateEmployeeVerification($employee_id, $verification_id, $update_employee_verification_request): \BhrSdk\Model\EmployeeVerificationUpdateResponse +``` + +Update an employee verification record + +Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeeVerificationApi( + // 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 +); +$employee_id = 56; // int | Company employee id that owns the verification row. +$verification_id = 56; // int | Identifier of the verification record to update. +$update_employee_verification_request = new \BhrSdk\Model\UpdateEmployeeVerificationRequest(); // \BhrSdk\Model\UpdateEmployeeVerificationRequest | Fields to update on the verification record. At least one field must be supplied. + +try { + $result = $apiInstance->updateEmployeeVerification($employee_id, $verification_id, $update_employee_verification_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeVerificationApi->updateEmployeeVerification: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| Company employee id that owns the verification row. | | +| **verification_id** | **int**| Identifier of the verification record to update. | | +| **update_employee_verification_request** | [**\BhrSdk\Model\UpdateEmployeeVerificationRequest**](../Model/UpdateEmployeeVerificationRequest.md)| Fields to update on the verification record. At least one field must be supplied. | | + +### Return type + +[**\BhrSdk\Model\EmployeeVerificationUpdateResponse**](../Model/EmployeeVerificationUpdateResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateEmployeeVerificationIntegration()` + +```php +updateEmployeeVerificationIntegration($update_employee_verification_integration_request): \BhrSdk\Model\EmployeeVerificationIntegrationResponse +``` + +Enable or disable the employee verification integration + +Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeeVerificationApi( + // 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 +); +$update_employee_verification_integration_request = new \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest(); // \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest + +try { + $result = $apiInstance->updateEmployeeVerificationIntegration($update_employee_verification_integration_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeVerificationApi->updateEmployeeVerificationIntegration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **update_employee_verification_integration_request** | [**\BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest**](../Model/UpdateEmployeeVerificationIntegrationRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\EmployeeVerificationIntegrationResponse**](../Model/EmployeeVerificationIntegrationResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/EmployeesApi.md b/docs/Api/EmployeesApi.md index 7cc9747a..a7004ae3 100644 --- a/docs/Api/EmployeesApi.md +++ b/docs/Api/EmployeesApi.md @@ -4,23 +4,24 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addEmployee()**](EmployeesApi.md#addEmployee) | **POST** /api/v1/employees | Create Employee | +| [**createEmployee()**](EmployeesApi.md#createEmployee) | **POST** /api/v1/employees | Create Employee | +| [**deleteEmployee()**](EmployeesApi.md#deleteEmployee) | **DELETE** /api/v1/employees/{id} | Delete employee | | [**getCompanyInformation()**](EmployeesApi.md#getCompanyInformation) | **GET** /api/v1/company_information | Get Company Information | | [**getEmployee()**](EmployeesApi.md#getEmployee) | **GET** /api/v1/employees/{id} | Get Employee | -| [**getEmployeesDirectory()**](EmployeesApi.md#getEmployeesDirectory) | **GET** /api/v1/employees/directory | Get Employee Directory | -| [**getEmployeesList()**](EmployeesApi.md#getEmployeesList) | **GET** /api/v1/employees | Get Employees | +| [**getEmployeesDirectory()**](EmployeesApi.md#getEmployeesDirectory) | **GET** /api/v1/employees/directory | Get Employees Directory | +| [**listEmployees()**](EmployeesApi.md#listEmployees) | **GET** /api/v1/employees | List Employees | | [**updateEmployee()**](EmployeesApi.md#updateEmployee) | **POST** /api/v1/employees/{id} | Update Employee | -## `addEmployee()` +## `createEmployee()` ```php -addEmployee($post_new_employee) +createEmployee($post_new_employee): \BhrSdk\Model\GetEmployeeResponse ``` Create Employee -Add a new employee. New employees must have at least a first name and a last name. The ID of the newly created employee is included in the Location header of the response. Other fields can be included. Please see the [fields](ref:metadata-get-a-list-of-fields) endpoint. New Employees added to a pay schedule synced with Trax Payroll must have the following required fields (listed by API field name): employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. +Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). This endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo. Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. ### Example @@ -44,9 +45,10 @@ $apiInstance = new BhrSdk\Api\EmployeesApi( $post_new_employee = new \BhrSdk\Model\PostNewEmployee(); // \BhrSdk\Model\PostNewEmployee try { - $apiInstance->addEmployee($post_new_employee); + $result = $apiInstance->createEmployee($post_new_employee); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling EmployeesApi->addEmployee: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling EmployeesApi->createEmployee: ', $e->getMessage(), PHP_EOL; } ``` @@ -58,6 +60,67 @@ try { ### Return type +[**\BhrSdk\Model\GetEmployeeResponse**](../Model/GetEmployeeResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **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) + +## `deleteEmployee()` + +```php +deleteEmployee($id) +``` + +Delete employee + +Permanently deletes an employee record and all associated data. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\EmployeesApi( + // 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 = 56; // int | ID of the employee to delete. + +try { + $apiInstance->deleteEmployee($id); +} catch (Exception $e) { + echo 'Exception when calling EmployeesApi->deleteEmployee: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| ID of the employee to delete. | | + +### Return type + void (empty response body) ### Authorization @@ -67,7 +130,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -81,7 +144,7 @@ getCompanyInformation(): \BhrSdk\Model\CompanyInformation Get Company Information -Gets Company Information +Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. ### Example @@ -135,12 +198,12 @@ This endpoint does not need any parameter. ## `getEmployee()` ```php -getEmployee($fields, $id, $only_current, $accept_header_parameter): \BhrSdk\Model\Employee +getEmployee($id, $fields, $only_current, $accept_header_parameter): \BhrSdk\Model\GetEmployeeResponse ``` Get Employee -Get employee data by specifying a set of fields. This is suitable for getting basic employee information, including current values for fields that are part of a historical table, like job title, or compensation information. See the [fields](ref:metadata-get-a-list-of-fields) endpoint for a list of possible fields. +Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. ### Example @@ -161,13 +224,13 @@ $apiInstance = new BhrSdk\Api\EmployeesApi( new GuzzleHttp\Client(), $config ); -$fields = 'firstName,lastName'; // string | {fields} is a comma separated list of values taken from the official list of field names. -$id = '0'; // string | {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). -$only_current = false; // bool | Setting to false will return future dated values from history table fields. +$id = 'id_example'; // string | The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. +$fields = 'fields_example'; // string | Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. +$only_current = true; // bool | When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $result = $apiInstance->getEmployee($fields, $id, $only_current, $accept_header_parameter); + $result = $apiInstance->getEmployee($id, $fields, $only_current, $accept_header_parameter); print_r($result); } catch (Exception $e) { echo 'Exception when calling EmployeesApi->getEmployee: ', $e->getMessage(), PHP_EOL; @@ -178,14 +241,14 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **fields** | **string**| {fields} is a comma separated list of values taken from the official list of field names. | [default to 'firstName,lastName'] | -| **id** | **string**| {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). | [default to '0'] | -| **only_current** | **bool**| Setting to false will return future dated values from history table fields. | [optional] [default to false] | +| **id** | **string**| The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. | | +| **fields** | **string**| Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. | [optional] | +| **only_current** | **bool**| When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. | [optional] [default to true] | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | ### Return type -[**\BhrSdk\Model\Employee**](../Model/Employee.md) +[**\BhrSdk\Model\GetEmployeeResponse**](../Model/GetEmployeeResponse.md) ### Authorization @@ -203,12 +266,12 @@ try { ## `getEmployeesDirectory()` ```php -getEmployeesDirectory($accept_header_parameter): \BhrSdk\Model\JsonDirectoryEmployee +getEmployeesDirectory($accept_header_parameter, $only_current): \BhrSdk\Model\EmployeesDirectoryJsonResponse ``` -Get Employee Directory +Get Employees Directory -Gets employee directory. +Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. Response format follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `<directory>` document with `<fieldset>` and `<employees>` children. Employee `id` values are returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list. ### Example @@ -230,9 +293,10 @@ $apiInstance = new BhrSdk\Api\EmployeesApi( $config ); $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$only_current = true; // bool | When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. try { - $result = $apiInstance->getEmployeesDirectory($accept_header_parameter); + $result = $apiInstance->getEmployeesDirectory($accept_header_parameter, $only_current); print_r($result); } catch (Exception $e) { echo 'Exception when calling EmployeesApi->getEmployeesDirectory: ', $e->getMessage(), PHP_EOL; @@ -244,10 +308,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **only_current** | **bool**| When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. | [optional] [default to true] | ### Return type -[**\BhrSdk\Model\JsonDirectoryEmployee**](../Model/JsonDirectoryEmployee.md) +[**\BhrSdk\Model\EmployeesDirectoryJsonResponse**](../Model/EmployeesDirectoryJsonResponse.md) ### Authorization @@ -262,15 +327,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getEmployeesList()` +## `listEmployees()` ```php -getEmployeesList($filter, $sort, $page): \BhrSdk\Model\GetEmployeesResponseObject +listEmployees($filter, $sort, $fields, $page): \BhrSdk\Model\GetEmployeesResponseObject ``` -Get Employees +List Employees -Retrieve a paginated list of employees with optional filtering and sorting. Returns a fixed set of simple employee fields that support efficient filter and sort operations. For more complex employee data, use the single-employee endpoint or the Datasets API for bulk queries. +Returns a cursor-paginated collection of employees for the authenticated caller's company. The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. ### Example @@ -291,15 +356,16 @@ $apiInstance = new BhrSdk\Api\EmployeesApi( new GuzzleHttp\Client(), $config ); -$filter = new \BhrSdk\Model\\BhrSdk\Model\GetEmployeesFilterRequestObject(); // \BhrSdk\Model\GetEmployeesFilterRequestObject | Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. -$sort = 'sort_example'; // string | Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. -$page = new \BhrSdk\Model\\BhrSdk\Model\CursorPaginationQueryObject(); // \BhrSdk\Model\CursorPaginationQueryObject | Cursor-based pagination parameters (`limit`, `after`, `before`). +$filter = new \BhrSdk\Model\\BhrSdk\Model\GetEmployeesFilterRequestObject(); // \BhrSdk\Model\GetEmployeesFilterRequestObject | Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. +$sort = -lastName,firstName; // string | Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. +$fields = workEmail,mobilePhone; // \BhrSdk\Model\EmployeeOptionalField[] | Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. +$page = array('key' => new \BhrSdk\Model\\BhrSdk\Model\EmployeeCursorPaginationQueryObject()); // \BhrSdk\Model\EmployeeCursorPaginationQueryObject | Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. try { - $result = $apiInstance->getEmployeesList($filter, $sort, $page); + $result = $apiInstance->listEmployees($filter, $sort, $fields, $page); print_r($result); } catch (Exception $e) { - echo 'Exception when calling EmployeesApi->getEmployeesList: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling EmployeesApi->listEmployees: ', $e->getMessage(), PHP_EOL; } ``` @@ -307,9 +373,10 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **filter** | [**\BhrSdk\Model\GetEmployeesFilterRequestObject**](../Model/.md)| Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. | [optional] | -| **sort** | **string**| Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. | [optional] | -| **page** | [**\BhrSdk\Model\CursorPaginationQueryObject**](../Model/.md)| Cursor-based pagination parameters (`limit`, `after`, `before`). | [optional] | +| **filter** | [**\BhrSdk\Model\GetEmployeesFilterRequestObject**](../Model/.md)| Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. | [optional] | +| **sort** | **string**| Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. | [optional] | +| **fields** | [**\BhrSdk\Model\EmployeeOptionalField[]**](../Model/\BhrSdk\Model\EmployeeOptionalField.md)| Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. | [optional] | +| **page** | [**\BhrSdk\Model\EmployeeCursorPaginationQueryObject**](../Model/.md)| Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. | [optional] | ### Return type @@ -331,12 +398,12 @@ try { ## `updateEmployee()` ```php -updateEmployee($id, $employee) +updateEmployee($id, $employee): \BhrSdk\Model\GetEmployeeResponse ``` Update Employee -Update an employee, based on employee ID. If employee is currently on a pay schedule syncing with Trax Payroll, or being added to one, the API user will need to update the employee with all of the following required fields for the update to be successful (listed by API field name): employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. +Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). This endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo). Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. ### Example @@ -357,11 +424,12 @@ $apiInstance = new BhrSdk\Api\EmployeesApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is an employee ID. +$id = 'id_example'; // string | The employee ID. $employee = new \BhrSdk\Model\Employee(); // \BhrSdk\Model\Employee try { - $apiInstance->updateEmployee($id, $employee); + $result = $apiInstance->updateEmployee($id, $employee); + print_r($result); } catch (Exception $e) { echo 'Exception when calling EmployeesApi->updateEmployee: ', $e->getMessage(), PHP_EOL; } @@ -371,12 +439,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is an employee ID. | | +| **id** | **string**| The employee ID. | | | **employee** | [**\BhrSdk\Model\Employee**](../Model/Employee.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\GetEmployeeResponse**](../Model/GetEmployeeResponse.md) ### Authorization @@ -384,8 +452,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/GoalsApi.md b/docs/Api/GoalsApi.md index 68ef8ae3..a380a237 100644 --- a/docs/Api/GoalsApi.md +++ b/docs/Api/GoalsApi.md @@ -4,41 +4,41 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**closeGoal()**](GoalsApi.md#closeGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal | +| [**createGoal()**](GoalsApi.md#createGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal | +| [**createGoalComment()**](GoalsApi.md#createGoalComment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment | | [**deleteGoal()**](GoalsApi.md#deleteGoal) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Delete Goal | | [**deleteGoalComment()**](GoalsApi.md#deleteGoalComment) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Delete Goal Comment | -| [**getCanCreateGoal()**](GoalsApi.md#getCanCreateGoal) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Check Goal Creation Permission | +| [**getAlignableGoalOptions()**](GoalsApi.md#getAlignableGoalOptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options | | [**getGoalAggregate()**](GoalsApi.md#getGoalAggregate) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate | Get Goal Aggregate | -| [**getGoalComments()**](GoalsApi.md#getGoalComments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Get Goal Comments | -| [**getGoals()**](GoalsApi.md#getGoals) | **GET** /api/v1/performance/employees/{employeeId}/goals | Get Goals | -| [**getGoalsAggregateV1()**](GoalsApi.md#getGoalsAggregateV1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate | -| [**getGoalsAggregateV11()**](GoalsApi.md#getGoalsAggregateV11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.1 | -| [**getGoalsAggregateV12()**](GoalsApi.md#getGoalsAggregateV12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.2 | -| [**getGoalsAlignmentOptions()**](GoalsApi.md#getGoalsAlignmentOptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options | -| [**getGoalsFiltersV1()**](GoalsApi.md#getGoalsFiltersV1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters | -| [**getGoalsFiltersV11()**](GoalsApi.md#getGoalsFiltersV11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters v1.1 | -| [**getGoalsFiltersV12()**](GoalsApi.md#getGoalsFiltersV12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Status Counts v1.2 | -| [**getGoalsShareOptions()**](GoalsApi.md#getGoalsShareOptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | Get Available Goal Sharing Options | -| [**postCloseGoal()**](GoalsApi.md#postCloseGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal | -| [**postGoal()**](GoalsApi.md#postGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal | -| [**postGoalComment()**](GoalsApi.md#postGoalComment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment | -| [**postReopenGoal()**](GoalsApi.md#postReopenGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal | -| [**putGoalComment()**](GoalsApi.md#putGoalComment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment | -| [**putGoalMilestoneProgress()**](GoalsApi.md#putGoalMilestoneProgress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress | -| [**putGoalProgress()**](GoalsApi.md#putGoalProgress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress | -| [**putGoalSharedWith()**](GoalsApi.md#putGoalSharedWith) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing | -| [**putGoalV1()**](GoalsApi.md#putGoalV1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal | -| [**putGoalV11()**](GoalsApi.md#putGoalV11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal v1.1 | - - -## `deleteGoal()` +| [**getGoalCreationPermission()**](GoalsApi.md#getGoalCreationPermission) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Get Goal Creation Permission | +| [**getGoalsAggregateV1()**](GoalsApi.md#getGoalsAggregateV1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1) | +| [**getGoalsAggregateV11()**](GoalsApi.md#getGoalsAggregateV11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.1) | +| [**getGoalsAggregateV12()**](GoalsApi.md#getGoalsAggregateV12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.2) | +| [**getGoalsFiltersV1()**](GoalsApi.md#getGoalsFiltersV1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1) | +| [**getGoalsFiltersV11()**](GoalsApi.md#getGoalsFiltersV11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.1) | +| [**getGoalsFiltersV12()**](GoalsApi.md#getGoalsFiltersV12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.2) | +| [**listGoalComments()**](GoalsApi.md#listGoalComments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | List Goal Comments | +| [**listGoalShareOptions()**](GoalsApi.md#listGoalShareOptions) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | List Goal Sharing Options | +| [**listGoals()**](GoalsApi.md#listGoals) | **GET** /api/v1/performance/employees/{employeeId}/goals | List Goals | +| [**reopenGoal()**](GoalsApi.md#reopenGoal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal | +| [**updateGoalComment()**](GoalsApi.md#updateGoalComment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment | +| [**updateGoalMilestoneProgress()**](GoalsApi.md#updateGoalMilestoneProgress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress | +| [**updateGoalProgress()**](GoalsApi.md#updateGoalProgress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress | +| [**updateGoalSharing()**](GoalsApi.md#updateGoalSharing) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing | +| [**updateGoalV1()**](GoalsApi.md#updateGoalV1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1) | +| [**updateGoalV11()**](GoalsApi.md#updateGoalV11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) | + + +## `closeGoal()` ```php -deleteGoal($employee_id, $goal_id) +closeGoal($employee_id, $goal_id, $close_goal_request): \BhrSdk\Model\GoalResponse ``` -Delete Goal +Close Goal -Delete a goal. +Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed. ### Example @@ -61,11 +61,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. +$close_goal_request = new \BhrSdk\Model\CloseGoalRequest(); // \BhrSdk\Model\CloseGoalRequest | An optional comment to record when closing the goal. try { - $apiInstance->deleteGoal($employee_id, $goal_id); + $result = $apiInstance->closeGoal($employee_id, $goal_id, $close_goal_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->deleteGoal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->closeGoal: ', $e->getMessage(), PHP_EOL; } ``` @@ -75,10 +77,11 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | +| **close_goal_request** | [**\BhrSdk\Model\CloseGoalRequest**](../Model/CloseGoalRequest.md)| An optional comment to record when closing the goal. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalResponse**](../Model/GoalResponse.md) ### Authorization @@ -93,15 +96,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `deleteGoalComment()` +## `createGoal()` ```php -deleteGoalComment($employee_id, $goal_id, $comment_id) +createGoal($employee_id, $create_goal_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails ``` -Delete Goal Comment +Create Goal -Delete a goal comment. +Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal's progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ \"title\": string }` objects; the goal's percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal). ### Example @@ -123,13 +126,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $config ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. -$goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. -$comment_id = 'comment_id_example'; // string | commentId is the ID of a specific comment for the specified goal. +$create_goal_request = new \BhrSdk\Model\CreateGoalRequest(); // \BhrSdk\Model\CreateGoalRequest try { - $apiInstance->deleteGoalComment($employee_id, $goal_id, $comment_id); + $result = $apiInstance->createGoal($employee_id, $create_goal_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->deleteGoalComment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->createGoal: ', $e->getMessage(), PHP_EOL; } ``` @@ -138,12 +141,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | -| **goal_id** | **string**| goalId is the goal ID for the specified employee. | | -| **comment_id** | **string**| commentId is the ID of a specific comment for the specified goal. | | +| **create_goal_request** | [**\BhrSdk\Model\CreateGoalRequest**](../Model/CreateGoalRequest.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\TransformedApiEmployeeGoalDetails**](../Model/TransformedApiEmployeeGoalDetails.md) ### Authorization @@ -158,15 +160,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getCanCreateGoal()` +## `createGoalComment()` ```php -getCanCreateGoal($employee_id) +createGoalComment($employee_id, $goal_id, $create_goal_comment_request): \BhrSdk\Model\GoalCommentResponse ``` -Check Goal Creation Permission +Create Goal Comment -Determine if the API user has permission to create a goal for this employee. +Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID. ### Example @@ -188,11 +190,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $config ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. +$goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. +$create_goal_comment_request = new \BhrSdk\Model\CreateGoalCommentRequest(); // \BhrSdk\Model\CreateGoalCommentRequest try { - $apiInstance->getCanCreateGoal($employee_id); + $result = $apiInstance->createGoalComment($employee_id, $goal_id, $create_goal_comment_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getCanCreateGoal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->createGoalComment: ', $e->getMessage(), PHP_EOL; } ``` @@ -201,10 +206,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | +| **goal_id** | **string**| goalId is the goal ID for the specified employee. | | +| **create_goal_comment_request** | [**\BhrSdk\Model\CreateGoalCommentRequest**](../Model/CreateGoalCommentRequest.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalCommentResponse**](../Model/GoalCommentResponse.md) ### Authorization @@ -219,15 +226,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalAggregate()` +## `deleteGoal()` ```php -getGoalAggregate($employee_id, $goal_id): \BhrSdk\Model\GoalAggregate +deleteGoal($employee_id, $goal_id) ``` -Get Goal Aggregate +Delete Goal -Provides goal information, goal comments, and employees shared with goals or who have commented on the given goal. +Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found. ### Example @@ -249,13 +256,12 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $config ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. -$goal_id = 'goal_id_example'; // string | goalId is the Goal ID used to generate the aggregate information. +$goal_id = 'goal_id_example'; // string | The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. try { - $result = $apiInstance->getGoalAggregate($employee_id, $goal_id); - print_r($result); + $apiInstance->deleteGoal($employee_id, $goal_id); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalAggregate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->deleteGoal: ', $e->getMessage(), PHP_EOL; } ``` @@ -264,11 +270,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | -| **goal_id** | **string**| goalId is the Goal ID used to generate the aggregate information. | | +| **goal_id** | **string**| The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. | | ### Return type -[**\BhrSdk\Model\GoalAggregate**](../Model/GoalAggregate.md) +void (empty response body) ### Authorization @@ -277,21 +283,21 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/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) -## `getGoalComments()` +## `deleteGoalComment()` ```php -getGoalComments($employee_id, $goal_id) +deleteGoalComment($employee_id, $goal_id, $comment_id) ``` -Get Goal Comments +Delete Goal Comment -Get comments for a goal. +Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification. ### Example @@ -314,11 +320,12 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. +$comment_id = 'comment_id_example'; // string | commentId is the ID of a specific comment for the specified goal. try { - $apiInstance->getGoalComments($employee_id, $goal_id); + $apiInstance->deleteGoalComment($employee_id, $goal_id, $comment_id); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalComments: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->deleteGoalComment: ', $e->getMessage(), PHP_EOL; } ``` @@ -328,6 +335,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | +| **comment_id** | **string**| commentId is the ID of a specific comment for the specified goal. | | ### Return type @@ -346,15 +354,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoals()` +## `getAlignableGoalOptions()` ```php -getGoals($employee_id, $filter): \BhrSdk\Model\GoalsList +getAlignableGoalOptions($employee_id, $goal_id): \BhrSdk\Model\AlignmentOptionsResponse ``` -Get Goals +Get Alignable Goal Options -Get goals for an employee. +Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the API user. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as \"alignment options are permission-restricted,\" not as proof that the goal ID is invalid. ### Example @@ -375,14 +383,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to whom the goals are assigned. -$filter = 'filter_example'; // string | A filter that can be applied to only show the goals that are in a certain state. +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to get alignable goal options for. +$goal_id = 56; // int | Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. try { - $result = $apiInstance->getGoals($employee_id, $filter); + $result = $apiInstance->getAlignableGoalOptions($employee_id, $goal_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoals: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getAlignableGoalOptions: ', $e->getMessage(), PHP_EOL; } ``` @@ -390,12 +398,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID to whom the goals are assigned. | | -| **filter** | **string**| A filter that can be applied to only show the goals that are in a certain state. | [optional] | +| **employee_id** | **string**| employeeId is the employee ID to get alignable goal options for. | | +| **goal_id** | **int**| Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. | [optional] | ### Return type -[**\BhrSdk\Model\GoalsList**](../Model/GoalsList.md) +[**\BhrSdk\Model\AlignmentOptionsResponse**](../Model/AlignmentOptionsResponse.md) ### Authorization @@ -410,15 +418,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsAggregateV1()` +## `getGoalAggregate()` ```php -getGoalsAggregateV1($employee_id): \BhrSdk\Model\GoalsAggregateV1 +getGoalAggregate($employee_id, $goal_id): \BhrSdk\Model\GoalAggregate ``` -Get Goals Aggregate +Get Goal Aggregate -Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. +Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request. ### Example @@ -439,13 +447,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID used to generate the aggregate information. +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. +$goal_id = 'goal_id_example'; // string | goalId is the Goal ID used to generate the aggregate information. try { - $result = $apiInstance->getGoalsAggregateV1($employee_id); + $result = $apiInstance->getGoalAggregate($employee_id, $goal_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsAggregateV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalAggregate: ', $e->getMessage(), PHP_EOL; } ``` @@ -453,11 +462,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID used to generate the aggregate information. | | +| **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | +| **goal_id** | **string**| goalId is the Goal ID used to generate the aggregate information. | | ### Return type -[**\BhrSdk\Model\GoalsAggregateV1**](../Model/GoalsAggregateV1.md) +[**\BhrSdk\Model\GoalAggregate**](../Model/GoalAggregate.md) ### Authorization @@ -472,15 +482,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsAggregateV11()` +## `getGoalCreationPermission()` ```php -getGoalsAggregateV11($employee_id): \BhrSdk\Model\GoalsAggregateV11 +getGoalCreationPermission($employee_id): \BhrSdk\Model\CanCreateGoalsResponse ``` -Get Goals Aggregate v1.1 +Get Goal Creation Permission -Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1: Returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. +Determine if the API user has permission to create a goal for this employee. ### Example @@ -501,13 +511,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID used to generate the aggregate information. +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. try { - $result = $apiInstance->getGoalsAggregateV11($employee_id); + $result = $apiInstance->getGoalCreationPermission($employee_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsAggregateV11: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalCreationPermission: ', $e->getMessage(), PHP_EOL; } ``` @@ -515,11 +525,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID used to generate the aggregate information. | | +| **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | ### Return type -[**\BhrSdk\Model\GoalsAggregateV11**](../Model/GoalsAggregateV11.md) +[**\BhrSdk\Model\CanCreateGoalsResponse**](../Model/CanCreateGoalsResponse.md) ### Authorization @@ -534,15 +544,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsAggregateV12()` +## `getGoalsAggregateV1()` ```php -getGoalsAggregateV12($employee_id): \BhrSdk\Model\GoalsAggregateV12 +getGoalsAggregateV1($employee_id, $filter): \BhrSdk\Model\GoalsAggregateV1 ``` -Get Goals Aggregate v1.2 +Get Goals Aggregate (v1) -Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1.1: Returns all goals, including goals that contain milestones. +Deprecated. Use \"Get Goals Aggregate (v1.1)\" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. ### Example @@ -563,13 +573,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 56; // int | employeeId is the employee ID used to generate the aggregate information. +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID used to generate the aggregate information. +$filter = 'filter_example'; // string | Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. try { - $result = $apiInstance->getGoalsAggregateV12($employee_id); + $result = $apiInstance->getGoalsAggregateV1($employee_id, $filter); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsAggregateV12: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsAggregateV1: ', $e->getMessage(), PHP_EOL; } ``` @@ -577,11 +588,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| employeeId is the employee ID used to generate the aggregate information. | | +| **employee_id** | **string**| employeeId is the employee ID used to generate the aggregate information. | | +| **filter** | **string**| Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. | [optional] | ### Return type -[**\BhrSdk\Model\GoalsAggregateV12**](../Model/GoalsAggregateV12.md) +[**\BhrSdk\Model\GoalsAggregateV1**](../Model/GoalsAggregateV1.md) ### Authorization @@ -596,15 +608,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsAlignmentOptions()` +## `getGoalsAggregateV11()` ```php -getGoalsAlignmentOptions($employee_id, $goal_id, $get_goals_alignment_options_request) +getGoalsAggregateV11($employee_id, $filter): \BhrSdk\Model\GoalsAggregateV11 ``` -Get Alignable Goal Options +Get Goals Aggregate (v1.1) -Get alignable goal options for an employee. +Deprecated. Use \"Get Goals Aggregate (v1.2)\" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to \"Get Goals Aggregate (v1)\", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. ### Example @@ -625,14 +637,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to get alignable goal options for. -$goal_id = 56; // int | Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. -$get_goals_alignment_options_request = new \BhrSdk\Model\GetGoalsAlignmentOptionsRequest(); // \BhrSdk\Model\GetGoalsAlignmentOptionsRequest | Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID used to generate the aggregate information. +$filter = 'filter_example'; // string | Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. try { - $apiInstance->getGoalsAlignmentOptions($employee_id, $goal_id, $get_goals_alignment_options_request); + $result = $apiInstance->getGoalsAggregateV11($employee_id, $filter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsAlignmentOptions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsAggregateV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -640,13 +652,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID to get alignable goal options for. | | -| **goal_id** | **int**| Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. | [optional] | -| **get_goals_alignment_options_request** | [**\BhrSdk\Model\GetGoalsAlignmentOptionsRequest**](../Model/GetGoalsAlignmentOptionsRequest.md)| Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. | [optional] | +| **employee_id** | **string**| employeeId is the employee ID used to generate the aggregate information. | | +| **filter** | **string**| Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalsAggregateV11**](../Model/GoalsAggregateV11.md) ### Authorization @@ -661,15 +672,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsFiltersV1()` +## `getGoalsAggregateV12()` ```php -getGoalsFiltersV1($employee_id): \BhrSdk\Model\GoalFiltersV1 +getGoalsAggregateV12($employee_id, $filter): \BhrSdk\Model\GoalsAggregateV12 ``` -Get Goal Filters +Get Goals Aggregate (v1.2) -Get the number of goals per status for an employee. +Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to \"Get Goals Aggregate (v1.1)\", this version returns goals that contain milestones. ### Example @@ -690,13 +701,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 56; // int | employeeId is the employee ID to whom the goals are assigned. +$employee_id = 56; // int | employeeId is the employee ID used to generate the aggregate information. +$filter = 'filter_example'; // string | Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. try { - $result = $apiInstance->getGoalsFiltersV1($employee_id); + $result = $apiInstance->getGoalsAggregateV12($employee_id, $filter); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsFiltersV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsAggregateV12: ', $e->getMessage(), PHP_EOL; } ``` @@ -704,11 +716,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| employeeId is the employee ID to whom the goals are assigned. | | +| **employee_id** | **int**| employeeId is the employee ID used to generate the aggregate information. | | +| **filter** | **string**| Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. | [optional] | ### Return type -[**\BhrSdk\Model\GoalFiltersV1**](../Model/GoalFiltersV1.md) +[**\BhrSdk\Model\GoalsAggregateV12**](../Model/GoalsAggregateV12.md) ### Authorization @@ -723,15 +736,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsFiltersV11()` +## `getGoalsFiltersV1()` ```php -getGoalsFiltersV11($employee_id): \BhrSdk\Model\GoalFiltersV11 +getGoalsFiltersV1($employee_id): \BhrSdk\Model\GoalFiltersV1 ``` -Get Goal Filters v1.1 +Get Goal Filters (v1) -Get the number of goals per status for an employee. Difference from Version 1: Includes actions. +Deprecated. Use \"Get Goal Filters (v1.1)\" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version. ### Example @@ -755,10 +768,10 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $employee_id = 56; // int | employeeId is the employee ID to whom the goals are assigned. try { - $result = $apiInstance->getGoalsFiltersV11($employee_id); + $result = $apiInstance->getGoalsFiltersV1($employee_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsFiltersV11: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsFiltersV1: ', $e->getMessage(), PHP_EOL; } ``` @@ -770,7 +783,7 @@ try { ### Return type -[**\BhrSdk\Model\GoalFiltersV11**](../Model/GoalFiltersV11.md) +[**\BhrSdk\Model\GoalFiltersV1**](../Model/GoalFiltersV1.md) ### Authorization @@ -785,15 +798,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsFiltersV12()` +## `getGoalsFiltersV11()` ```php -getGoalsFiltersV12($employee_id): \BhrSdk\Model\GoalFiltersV11 +getGoalsFiltersV11($employee_id): \BhrSdk\Model\GoalFiltersV11 ``` -Get Goal Status Counts v1.2 +Get Goal Filters (v1.1) -Get the number of goals per status for an employee. Difference from Version 1_1: Returns goals with milestones. +Deprecated. Use \"Get Goal Filters (v1.2)\" instead. Get the number of goals per status for an employee. Note: Compared to \"Get Goal Filters (v1)\", this version includes actions. ### Example @@ -817,10 +830,10 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $employee_id = 56; // int | employeeId is the employee ID to whom the goals are assigned. try { - $result = $apiInstance->getGoalsFiltersV12($employee_id); + $result = $apiInstance->getGoalsFiltersV11($employee_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsFiltersV12: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsFiltersV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -847,15 +860,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getGoalsShareOptions()` +## `getGoalsFiltersV12()` ```php -getGoalsShareOptions($employee_id, $search, $limit) +getGoalsFiltersV12($employee_id): \BhrSdk\Model\GoalFiltersV11 ``` -Get Available Goal Sharing Options +Get Goal Filters (v1.2) -Provides a list of employees with whom the specified employee\\'s goals may be shared. +Get the number of goals per status for an employee, including goals with milestones. Note: Compared to \"Get Goal Filters (v1.1)\", this version returns goals with milestones. ### Example @@ -876,14 +889,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to get sharing options for. -$search = 'search_example'; // string | The search term used to filter employees returned. Will search name, employee ID and email. -$limit = 'limit_example'; // string | Limit will restrict results to specified number. +$employee_id = 56; // int | employeeId is the employee ID to whom the goals are assigned. try { - $apiInstance->getGoalsShareOptions($employee_id, $search, $limit); + $result = $apiInstance->getGoalsFiltersV12($employee_id); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->getGoalsShareOptions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->getGoalsFiltersV12: ', $e->getMessage(), PHP_EOL; } ``` @@ -891,13 +903,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID to get sharing options for. | | -| **search** | **string**| The search term used to filter employees returned. Will search name, employee ID and email. | [optional] | -| **limit** | **string**| Limit will restrict results to specified number. | [optional] | +| **employee_id** | **int**| employeeId is the employee ID to whom the goals are assigned. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalFiltersV11**](../Model/GoalFiltersV11.md) ### Authorization @@ -912,15 +922,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postCloseGoal()` +## `listGoalComments()` ```php -postCloseGoal($employee_id, $goal_id, $body): \BhrSdk\Model\TransformedApiGoal +listGoalComments($employee_id, $goal_id): \BhrSdk\Model\GoalCommentsResponse ``` -Close Goal +List Goal Comments -Close a goal. +Returns comments for a goal, including each comment's ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says \"my comment\" rather than providing a comment ID. ### Example @@ -943,13 +953,12 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. -$body = 'body_example'; // string | Comment field is optional. try { - $result = $apiInstance->postCloseGoal($employee_id, $goal_id, $body); + $result = $apiInstance->listGoalComments($employee_id, $goal_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->postCloseGoal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->listGoalComments: ', $e->getMessage(), PHP_EOL; } ``` @@ -959,11 +968,10 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | -| **body** | **string**| Comment field is optional. | [optional] | ### Return type -[**\BhrSdk\Model\TransformedApiGoal**](../Model/TransformedApiGoal.md) +[**\BhrSdk\Model\GoalCommentsResponse**](../Model/GoalCommentsResponse.md) ### Authorization @@ -978,15 +986,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postGoal()` +## `listGoalShareOptions()` ```php -postGoal($employee_id, $post_goal_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails +listGoalShareOptions($employee_id, $search, $limit): \BhrSdk\Model\ShareOptionsResponse ``` -Create Goal +List Goal Sharing Options -Create a new goal for an employee. +Provides a list of employees with whom the specified employee\\'s goals may be shared. ### Example @@ -1007,14 +1015,15 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. -$post_goal_request = new \BhrSdk\Model\PostGoalRequest(); // \BhrSdk\Model\PostGoalRequest +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to get sharing options for. +$search = 'search_example'; // string | The search term used to filter employees returned. Will search name, employee ID and email. +$limit = 10; // int | Maximum number of employees to return. Defaults to 10, maximum 100. try { - $result = $apiInstance->postGoal($employee_id, $post_goal_request); + $result = $apiInstance->listGoalShareOptions($employee_id, $search, $limit); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->postGoal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->listGoalShareOptions: ', $e->getMessage(), PHP_EOL; } ``` @@ -1022,12 +1031,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | -| **post_goal_request** | [**\BhrSdk\Model\PostGoalRequest**](../Model/PostGoalRequest.md)| | | +| **employee_id** | **string**| employeeId is the employee ID to get sharing options for. | | +| **search** | **string**| The search term used to filter employees returned. Will search name, employee ID and email. | | +| **limit** | **int**| Maximum number of employees to return. Defaults to 10, maximum 100. | [optional] [default to 10] | ### Return type -[**\BhrSdk\Model\TransformedApiEmployeeGoalDetails**](../Model/TransformedApiEmployeeGoalDetails.md) +[**\BhrSdk\Model\ShareOptionsResponse**](../Model/ShareOptionsResponse.md) ### Authorization @@ -1042,15 +1052,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postGoalComment()` +## `listGoals()` ```php -postGoalComment($employee_id, $goal_id, $body) +listGoals($employee_id, $filter): \BhrSdk\Model\GoalsList ``` -Create Goal Comment +List Goals -Create a new goal comment. +Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says \"all goals\", \"including closed\", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal. ### Example @@ -1071,14 +1081,14 @@ $apiInstance = new BhrSdk\Api\GoalsApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. -$goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. -$body = 'body_example'; // string +$employee_id = 'employee_id_example'; // string | employeeId is the employee ID to whom the goals are assigned. +$filter = 'filter_example'; // string | Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. try { - $apiInstance->postGoalComment($employee_id, $goal_id, $body); + $result = $apiInstance->listGoals($employee_id, $filter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->postGoalComment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->listGoals: ', $e->getMessage(), PHP_EOL; } ``` @@ -1086,13 +1096,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | -| **goal_id** | **string**| goalId is the goal ID for the specified employee. | | -| **body** | **string**| | | +| **employee_id** | **string**| employeeId is the employee ID to whom the goals are assigned. | | +| **filter** | **string**| Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalsList**](../Model/GoalsList.md) ### Authorization @@ -1107,15 +1116,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postReopenGoal()` +## `reopenGoal()` ```php -postReopenGoal($employee_id, $goal_id): \BhrSdk\Model\TransformedApiGoal +reopenGoal($employee_id, $goal_id): \BhrSdk\Model\GoalResponse ``` Reopen Goal -Reopen a goal. +Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. ### Example @@ -1140,10 +1149,10 @@ $employee_id = 'employee_id_example'; // string | employeeId is the employee ID $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. try { - $result = $apiInstance->postReopenGoal($employee_id, $goal_id); + $result = $apiInstance->reopenGoal($employee_id, $goal_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->postReopenGoal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->reopenGoal: ', $e->getMessage(), PHP_EOL; } ``` @@ -1156,7 +1165,7 @@ try { ### Return type -[**\BhrSdk\Model\TransformedApiGoal**](../Model/TransformedApiGoal.md) +[**\BhrSdk\Model\GoalResponse**](../Model/GoalResponse.md) ### Authorization @@ -1171,15 +1180,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalComment()` +## `updateGoalComment()` ```php -putGoalComment($employee_id, $goal_id, $comment_id, $body) +updateGoalComment($employee_id, $goal_id, $comment_id, $update_goal_comment_request): \BhrSdk\Model\GoalCommentResponse ``` Update Goal Comment -Update a goal comment. +Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification. ### Example @@ -1203,12 +1212,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. $comment_id = 'comment_id_example'; // string | commentId is the comment ID for the specified goal. -$body = 'body_example'; // string +$update_goal_comment_request = new \BhrSdk\Model\UpdateGoalCommentRequest(); // \BhrSdk\Model\UpdateGoalCommentRequest try { - $apiInstance->putGoalComment($employee_id, $goal_id, $comment_id, $body); + $result = $apiInstance->updateGoalComment($employee_id, $goal_id, $comment_id, $update_goal_comment_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalComment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalComment: ', $e->getMessage(), PHP_EOL; } ``` @@ -1219,11 +1229,11 @@ try { | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | | **comment_id** | **string**| commentId is the comment ID for the specified goal. | | -| **body** | **string**| | | +| **update_goal_comment_request** | [**\BhrSdk\Model\UpdateGoalCommentRequest**](../Model/UpdateGoalCommentRequest.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\GoalCommentResponse**](../Model/GoalCommentResponse.md) ### Authorization @@ -1238,15 +1248,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalMilestoneProgress()` +## `updateGoalMilestoneProgress()` ```php -putGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails +updateGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails ``` Update Milestone Progress -Update the progress of a milestone in a goal. +Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. ### Example @@ -1270,13 +1280,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( $employee_id = 'employee_id_example'; // string | employeeId is the employee ID to whom the goals are assigned. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. $milestone_id = 'milestone_id_example'; // string | milestoneId is the milestone ID for the specified goal. -$put_goal_milestone_progress_request = new \BhrSdk\Model\PutGoalMilestoneProgressRequest(); // \BhrSdk\Model\PutGoalMilestoneProgressRequest +$update_goal_milestone_progress_request = new \BhrSdk\Model\UpdateGoalMilestoneProgressRequest(); // \BhrSdk\Model\UpdateGoalMilestoneProgressRequest try { - $result = $apiInstance->putGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request); + $result = $apiInstance->updateGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalMilestoneProgress: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalMilestoneProgress: ', $e->getMessage(), PHP_EOL; } ``` @@ -1287,7 +1297,7 @@ try { | **employee_id** | **string**| employeeId is the employee ID to whom the goals are assigned. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | | **milestone_id** | **string**| milestoneId is the milestone ID for the specified goal. | | -| **put_goal_milestone_progress_request** | [**\BhrSdk\Model\PutGoalMilestoneProgressRequest**](../Model/PutGoalMilestoneProgressRequest.md)| | | +| **update_goal_milestone_progress_request** | [**\BhrSdk\Model\UpdateGoalMilestoneProgressRequest**](../Model/UpdateGoalMilestoneProgressRequest.md)| | | ### Return type @@ -1306,15 +1316,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalProgress()` +## `updateGoalProgress()` ```php -putGoalProgress($employee_id, $goal_id, $put_goal_progress_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails +updateGoalProgress($employee_id, $goal_id, $update_goal_progress_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails ``` Update Goal Progress -Update the progress percentage of an individual goal. +Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete. ### Example @@ -1337,13 +1347,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 56; // int | employeeId is the employee ID with whom the goal is associated. $goal_id = 56; // int | goalId is the goal ID for the specified employee. -$put_goal_progress_request = new \BhrSdk\Model\PutGoalProgressRequest(); // \BhrSdk\Model\PutGoalProgressRequest | Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". +$update_goal_progress_request = new \BhrSdk\Model\UpdateGoalProgressRequest(); // \BhrSdk\Model\UpdateGoalProgressRequest | The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. try { - $result = $apiInstance->putGoalProgress($employee_id, $goal_id, $put_goal_progress_request); + $result = $apiInstance->updateGoalProgress($employee_id, $goal_id, $update_goal_progress_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalProgress: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalProgress: ', $e->getMessage(), PHP_EOL; } ``` @@ -1353,7 +1363,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **int**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **int**| goalId is the goal ID for the specified employee. | | -| **put_goal_progress_request** | [**\BhrSdk\Model\PutGoalProgressRequest**](../Model/PutGoalProgressRequest.md)| Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". | | +| **update_goal_progress_request** | [**\BhrSdk\Model\UpdateGoalProgressRequest**](../Model/UpdateGoalProgressRequest.md)| The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. | | ### Return type @@ -1372,15 +1382,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalSharedWith()` +## `updateGoalSharing()` ```php -putGoalSharedWith($employee_id, $goal_id, $put_goal_shared_with_request): \BhrSdk\Model\TransformedApiGoal +updateGoalSharing($employee_id, $goal_id, $update_goal_sharing_request): \BhrSdk\Model\GoalResponse ``` Update Goal Sharing -Updates which employees this goal is shared with. +Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's employee ID. Returns the updated goal object. ### Example @@ -1403,13 +1413,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. -$put_goal_shared_with_request = new \BhrSdk\Model\PutGoalSharedWithRequest(); // \BhrSdk\Model\PutGoalSharedWithRequest | Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". +$update_goal_sharing_request = new \BhrSdk\Model\UpdateGoalSharingRequest(); // \BhrSdk\Model\UpdateGoalSharingRequest | Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". try { - $result = $apiInstance->putGoalSharedWith($employee_id, $goal_id, $put_goal_shared_with_request); + $result = $apiInstance->updateGoalSharing($employee_id, $goal_id, $update_goal_sharing_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalSharedWith: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalSharing: ', $e->getMessage(), PHP_EOL; } ``` @@ -1419,11 +1429,11 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | -| **put_goal_shared_with_request** | [**\BhrSdk\Model\PutGoalSharedWithRequest**](../Model/PutGoalSharedWithRequest.md)| Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". | | +| **update_goal_sharing_request** | [**\BhrSdk\Model\UpdateGoalSharingRequest**](../Model/UpdateGoalSharingRequest.md)| Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". | | ### Return type -[**\BhrSdk\Model\TransformedApiGoal**](../Model/TransformedApiGoal.md) +[**\BhrSdk\Model\GoalResponse**](../Model/GoalResponse.md) ### Authorization @@ -1438,15 +1448,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalV1()` +## `updateGoalV1()` ```php -putGoalV1($employee_id, $goal_id, $goal): \BhrSdk\Model\TransformedApiEmployeeGoalDetails +updateGoalV1($employee_id, $goal_id, $update_goal_v1): \BhrSdk\Model\TransformedApiEmployeeGoalDetails ``` -Update Goal +Update Goal (v1) -Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1 +Deprecated. Use \"Update Goal (v1.1)\" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1. ### Example @@ -1469,13 +1479,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 'employee_id_example'; // string | employeeId is the employee ID with whom the goal is associated. $goal_id = 'goal_id_example'; // string | goalId is the goal ID for the specified employee. -$goal = new \BhrSdk\Model\Goal(); // \BhrSdk\Model\Goal | Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. +$update_goal_v1 = new \BhrSdk\Model\UpdateGoalV1(); // \BhrSdk\Model\UpdateGoalV1 | Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. try { - $result = $apiInstance->putGoalV1($employee_id, $goal_id, $goal); + $result = $apiInstance->updateGoalV1($employee_id, $goal_id, $update_goal_v1); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalV1: ', $e->getMessage(), PHP_EOL; } ``` @@ -1485,7 +1495,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **string**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **string**| goalId is the goal ID for the specified employee. | | -| **goal** | [**\BhrSdk\Model\Goal**](../Model/Goal.md)| Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. | | +| **update_goal_v1** | [**\BhrSdk\Model\UpdateGoalV1**](../Model/UpdateGoalV1.md)| Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. | | ### Return type @@ -1504,15 +1514,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putGoalV11()` +## `updateGoalV11()` ```php -putGoalV11($employee_id, $goal_id, $put_goal_v11_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails +updateGoalV11($employee_id, $goal_id, $update_goal_v11_request): \BhrSdk\Model\TransformedApiEmployeeGoalDetails ``` -Update Goal v1.1 +Update Goal (v1.1) -Update a goal. Version 1.1 allows the updating of the milestones contained within the goal, unlike Version 1. +Update a goal's top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to \"Update Goal (v1)\", this version adds milestone updates. ### Example @@ -1535,13 +1545,13 @@ $apiInstance = new BhrSdk\Api\GoalsApi( ); $employee_id = 56; // int | employeeId is the employee ID with whom the goal is associated. $goal_id = 56; // int | goalId is the goal ID for the specified employee. -$put_goal_v11_request = new \BhrSdk\Model\PutGoalV11Request(); // \BhrSdk\Model\PutGoalV11Request | Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. +$update_goal_v11_request = new \BhrSdk\Model\UpdateGoalV11Request(); // \BhrSdk\Model\UpdateGoalV11Request | Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. try { - $result = $apiInstance->putGoalV11($employee_id, $goal_id, $put_goal_v11_request); + $result = $apiInstance->updateGoalV11($employee_id, $goal_id, $update_goal_v11_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling GoalsApi->putGoalV11: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling GoalsApi->updateGoalV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -1551,7 +1561,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **employee_id** | **int**| employeeId is the employee ID with whom the goal is associated. | | | **goal_id** | **int**| goalId is the goal ID for the specified employee. | | -| **put_goal_v11_request** | [**\BhrSdk\Model\PutGoalV11Request**](../Model/PutGoalV11Request.md)| Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. | | +| **update_goal_v11_request** | [**\BhrSdk\Model\UpdateGoalV11Request**](../Model/UpdateGoalV11Request.md)| Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. | | ### Return type diff --git a/docs/Api/HoursApi.md b/docs/Api/HoursApi.md index 670ad093..d44c4ef0 100644 --- a/docs/Api/HoursApi.md +++ b/docs/Api/HoursApi.md @@ -4,22 +4,22 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addTimeTrackingBulk()**](HoursApi.md#addTimeTrackingBulk) | **POST** /api/v1/timetracking/record | Create or Update Hour Records | -| [**addTimeTrackingHourRecord()**](HoursApi.md#addTimeTrackingHourRecord) | **POST** /api/v1/timetracking/add | Create Hour Record | -| [**deleteTimeTrackingById()**](HoursApi.md#deleteTimeTrackingById) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record | -| [**editTimeTrackingRecord()**](HoursApi.md#editTimeTrackingRecord) | **PUT** /api/v1/timetracking/adjust | Update Hour Record | -| [**getTimeTrackingRecord()**](HoursApi.md#getTimeTrackingRecord) | **GET** /api/v1/timetracking/record/{id} | Get Hour Record | +| [**createOrUpdateTimeTrackingHourRecords()**](HoursApi.md#createOrUpdateTimeTrackingHourRecords) | **POST** /api/v1/timetracking/record | Create or Update Hour Records | +| [**createTimeTrackingHourRecord()**](HoursApi.md#createTimeTrackingHourRecord) | **POST** /api/v1/timetracking/add | Create Hour Record | +| [**deleteTimeTrackingHourRecord()**](HoursApi.md#deleteTimeTrackingHourRecord) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record | +| [**getTimeTrackingRecord()**](HoursApi.md#getTimeTrackingRecord) | **GET** /api/v1/timetracking/record/{id} | Get Time Tracking Record | +| [**updateTimeTrackingRecord()**](HoursApi.md#updateTimeTrackingRecord) | **PUT** /api/v1/timetracking/adjust | Update Hour Record | -## `addTimeTrackingBulk()` +## `createOrUpdateTimeTrackingHourRecords()` ```php -addTimeTrackingBulk($time_tracking_record): \BhrSdk\Model\TimeTrackingBulkResponseSchema +createOrUpdateTimeTrackingHourRecords($time_tracking_record): \BhrSdk\Model\TimeTrackingBulkResponseSchema ``` Create or Update Hour Records -Bulk add/edit hour records +Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. ### Example @@ -43,10 +43,10 @@ $apiInstance = new BhrSdk\Api\HoursApi( $time_tracking_record = array(new \BhrSdk\Model\TimeTrackingRecord()); // \BhrSdk\Model\TimeTrackingRecord[] try { - $result = $apiInstance->addTimeTrackingBulk($time_tracking_record); + $result = $apiInstance->createOrUpdateTimeTrackingHourRecords($time_tracking_record); print_r($result); } catch (Exception $e) { - echo 'Exception when calling HoursApi->addTimeTrackingBulk: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling HoursApi->createOrUpdateTimeTrackingHourRecords: ', $e->getMessage(), PHP_EOL; } ``` @@ -73,15 +73,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `addTimeTrackingHourRecord()` +## `createTimeTrackingHourRecord()` ```php -addTimeTrackingHourRecord($time_tracking_record): \BhrSdk\Model\TimeTrackingIdResponseSchema +createTimeTrackingHourRecord($time_tracking_record): \BhrSdk\Model\TimeTrackingIdResponseSchema ``` Create Hour Record -Add an hour record +Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. ### Example @@ -105,10 +105,10 @@ $apiInstance = new BhrSdk\Api\HoursApi( $time_tracking_record = new \BhrSdk\Model\TimeTrackingRecord(); // \BhrSdk\Model\TimeTrackingRecord try { - $result = $apiInstance->addTimeTrackingHourRecord($time_tracking_record); + $result = $apiInstance->createTimeTrackingHourRecord($time_tracking_record); print_r($result); } catch (Exception $e) { - echo 'Exception when calling HoursApi->addTimeTrackingHourRecord: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling HoursApi->createTimeTrackingHourRecord: ', $e->getMessage(), PHP_EOL; } ``` @@ -135,15 +135,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `deleteTimeTrackingById()` +## `deleteTimeTrackingHourRecord()` ```php -deleteTimeTrackingById($id): \BhrSdk\Model\TimeTrackingDeleteResponseSchema +deleteTimeTrackingHourRecord($id): \BhrSdk\Model\TimeTrackingDeleteResponseSchema ``` Delete Hour Record -Delete an hour record +Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. ### Example @@ -167,10 +167,10 @@ $apiInstance = new BhrSdk\Api\HoursApi( $id = 'id_example'; // string | The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). try { - $result = $apiInstance->deleteTimeTrackingById($id); + $result = $apiInstance->deleteTimeTrackingHourRecord($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling HoursApi->deleteTimeTrackingById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling HoursApi->deleteTimeTrackingHourRecord: ', $e->getMessage(), PHP_EOL; } ``` @@ -197,15 +197,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `editTimeTrackingRecord()` +## `getTimeTrackingRecord()` ```php -editTimeTrackingRecord($adjust_time_tracking_request_schema): \BhrSdk\Model\TimeTrackingIdResponseSchema +getTimeTrackingRecord($id): \BhrSdk\Model\TimeTrackingRecordSchema ``` -Update Hour Record +Get Time Tracking Record -Edit an hour record +Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. ### Example @@ -226,13 +226,13 @@ $apiInstance = new BhrSdk\Api\HoursApi( new GuzzleHttp\Client(), $config ); -$adjust_time_tracking_request_schema = new \BhrSdk\Model\AdjustTimeTrackingRequestSchema(); // \BhrSdk\Model\AdjustTimeTrackingRequestSchema +$id = 'id_example'; // string | The time tracking record ID used to originally create the record. try { - $result = $apiInstance->editTimeTrackingRecord($adjust_time_tracking_request_schema); + $result = $apiInstance->getTimeTrackingRecord($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling HoursApi->editTimeTrackingRecord: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling HoursApi->getTimeTrackingRecord: ', $e->getMessage(), PHP_EOL; } ``` @@ -240,11 +240,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **adjust_time_tracking_request_schema** | [**\BhrSdk\Model\AdjustTimeTrackingRequestSchema**](../Model/AdjustTimeTrackingRequestSchema.md)| | | +| **id** | **string**| The time tracking record ID used to originally create the record. | | ### Return type -[**\BhrSdk\Model\TimeTrackingIdResponseSchema**](../Model/TimeTrackingIdResponseSchema.md) +[**\BhrSdk\Model\TimeTrackingRecordSchema**](../Model/TimeTrackingRecordSchema.md) ### Authorization @@ -259,15 +259,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getTimeTrackingRecord()` +## `updateTimeTrackingRecord()` ```php -getTimeTrackingRecord($id): \BhrSdk\Model\TimeTrackingRecordSchema +updateTimeTrackingRecord($adjust_time_tracking_request_schema): \BhrSdk\Model\TimeTrackingIdResponseSchema ``` -Get Hour Record +Update Hour Record -Get an hour record +Edits an existing hour record by `timeTrackingId`. ### Example @@ -288,13 +288,13 @@ $apiInstance = new BhrSdk\Api\HoursApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the time tracking ID used to originally create the record. +$adjust_time_tracking_request_schema = new \BhrSdk\Model\AdjustTimeTrackingRequestSchema(); // \BhrSdk\Model\AdjustTimeTrackingRequestSchema try { - $result = $apiInstance->getTimeTrackingRecord($id); + $result = $apiInstance->updateTimeTrackingRecord($adjust_time_tracking_request_schema); print_r($result); } catch (Exception $e) { - echo 'Exception when calling HoursApi->getTimeTrackingRecord: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling HoursApi->updateTimeTrackingRecord: ', $e->getMessage(), PHP_EOL; } ``` @@ -302,11 +302,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the time tracking ID used to originally create the record. | | +| **adjust_time_tracking_request_schema** | [**\BhrSdk\Model\AdjustTimeTrackingRequestSchema**](../Model/AdjustTimeTrackingRequestSchema.md)| | | ### Return type -[**\BhrSdk\Model\TimeTrackingRecordSchema**](../Model/TimeTrackingRecordSchema.md) +[**\BhrSdk\Model\TimeTrackingIdResponseSchema**](../Model/TimeTrackingIdResponseSchema.md) ### Authorization diff --git a/docs/Api/LastChangeInformationApi.md b/docs/Api/LastChangeInformationApi.md index 3ef1465f..7d277c85 100644 --- a/docs/Api/LastChangeInformationApi.md +++ b/docs/Api/LastChangeInformationApi.md @@ -4,18 +4,18 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getChangedEmployeeIds()**](LastChangeInformationApi.md#getChangedEmployeeIds) | **GET** /api/v1/employees/changed | Get Updated Employee IDs | +| [**getChangedEmployeeIds()**](LastChangeInformationApi.md#getChangedEmployeeIds) | **GET** /api/v1/employees/changed | Get Changed Employee IDs | ## `getChangedEmployeeIds()` ```php -getChangedEmployeeIds($since, $type) +getChangedEmployeeIds($since, $type): \BhrSdk\Model\ChangedEmployeeIdsResponse ``` -Get Updated Employee IDs +Get Changed Employee IDs -This API allows for efficient syncing of employee data. When you use this API you will provide a timestamp and the results will be limited to just the employees that have changed since the time you provided. This API operates on an employee-last-changed-timestamp, which means that a change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned via this API. +Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. ### Example @@ -36,11 +36,12 @@ $apiInstance = new BhrSdk\Api\LastChangeInformationApi( new GuzzleHttp\Client(), $config ); -$since = 'since_example'; // string | URL encoded iso8601 timestamp -$type = 'type_example'; // string | Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" +$since = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. +$type = 'type_example'; // string | Filter by change type. If omitted, all change types are returned. try { - $apiInstance->getChangedEmployeeIds($since, $type); + $result = $apiInstance->getChangedEmployeeIds($since, $type); + print_r($result); } catch (Exception $e) { echo 'Exception when calling LastChangeInformationApi->getChangedEmployeeIds: ', $e->getMessage(), PHP_EOL; } @@ -50,12 +51,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **since** | **string**| URL encoded iso8601 timestamp | | -| **type** | **string**| Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" | [optional] | +| **since** | **\DateTime**| ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. | | +| **type** | **string**| Filter by change type. If omitted, all change types are returned. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\ChangedEmployeeIdsResponse**](../Model/ChangedEmployeeIdsResponse.md) ### Authorization @@ -64,7 +65,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/LocationsApi.md b/docs/Api/LocationsApi.md new file mode 100644 index 00000000..79f9c04f --- /dev/null +++ b/docs/Api/LocationsApi.md @@ -0,0 +1,335 @@ +# BhrSdk\LocationsApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createLocation()**](LocationsApi.md#createLocation) | **POST** /api/v1/hris/org/locations | Create a job location | +| [**deleteLocation()**](LocationsApi.md#deleteLocation) | **DELETE** /api/v1/hris/org/locations/{id} | Delete a job location | +| [**getLocation()**](LocationsApi.md#getLocation) | **GET** /api/v1/hris/org/locations/{id} | Get a job location | +| [**getLocations()**](LocationsApi.md#getLocations) | **GET** /api/v1/hris/org/locations | List job locations | +| [**updateLocation()**](LocationsApi.md#updateLocation) | **PUT** /api/v1/hris/org/locations/{id} | Update a job location | + + +## `createLocation()` + +```php +createLocation($create_location_request): \BhrSdk\Model\LocationResponseObject +``` + +Create a job location + +Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\LocationsApi( + // 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 +); +$create_location_request = new \BhrSdk\Model\CreateLocationRequest(); // \BhrSdk\Model\CreateLocationRequest + +try { + $result = $apiInstance->createLocation($create_location_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LocationsApi->createLocation: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **create_location_request** | [**\BhrSdk\Model\CreateLocationRequest**](../Model/CreateLocationRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\LocationResponseObject**](../Model/LocationResponseObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteLocation()` + +```php +deleteLocation($id) +``` + +Delete a job location + +Deletes a job location by its ID. Returns 204 No Content on success. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\LocationsApi( + // 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 location to delete + +try { + $apiInstance->deleteLocation($id); +} catch (Exception $e) { + echo 'Exception when calling LocationsApi->deleteLocation: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The ID of the location to delete | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getLocation()` + +```php +getLocation($id, $expand): \BhrSdk\Model\LocationResponseObject +``` + +Get a job location + +Retrieves a single job location by its ID. Returns the full location resource including address details. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\LocationsApi( + // 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 location +$expand = array('expand_example'); // string[] | Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + +try { + $result = $apiInstance->getLocation($id, $expand); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LocationsApi->getLocation: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The ID of the location | | +| **expand** | [**string[]**](../Model/string.md)| Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country | [optional] | + +### Return type + +[**\BhrSdk\Model\LocationResponseObject**](../Model/LocationResponseObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getLocations()` + +```php +getLocations($page_size, $page, $sort, $select, $filter, $expand): \BhrSdk\Model\PagedLocationResponse +``` + +List job locations + +Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\LocationsApi( + // 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 +); +$page_size = 500; // int | The number of items to return per page. +$page = 0; // int | The page number to retrieve. +$sort = ''; // string | Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt +$select = ''; // string | Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt +$filter = ''; // string | Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation +$expand = array('expand_example'); // string[] | Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + +try { + $result = $apiInstance->getLocations($page_size, $page, $sort, $select, $filter, $expand); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LocationsApi->getLocations: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **page_size** | **int**| The number of items to return per page. | [optional] [default to 500] | +| **page** | **int**| The page number to retrieve. | [optional] [default to 0] | +| **sort** | **string**| Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt | [optional] [default to ''] | +| **select** | **string**| Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt | [optional] [default to ''] | +| **filter** | **string**| Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation | [optional] [default to ''] | +| **expand** | [**string[]**](../Model/string.md)| Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country | [optional] | + +### Return type + +[**\BhrSdk\Model\PagedLocationResponse**](../Model/PagedLocationResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateLocation()` + +```php +updateLocation($id, $update_location_request): \BhrSdk\Model\LocationResponseObject +``` + +Update a job location + +Updates an existing job location. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\LocationsApi( + // 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 location to update +$update_location_request = new \BhrSdk\Model\UpdateLocationRequest(); // \BhrSdk\Model\UpdateLocationRequest + +try { + $result = $apiInstance->updateLocation($id, $update_location_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LocationsApi->updateLocation: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The ID of the location to update | | +| **update_location_request** | [**\BhrSdk\Model\UpdateLocationRequest**](../Model/UpdateLocationRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\LocationResponseObject**](../Model/LocationResponseObject.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[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/LoginApi.md b/docs/Api/LoginApi.md index c24186c7..2988276e 100644 --- a/docs/Api/LoginApi.md +++ b/docs/Api/LoginApi.md @@ -4,18 +4,18 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**login()**](LoginApi.md#login) | **POST** /api/v1/login | User Login | +| [**login()**](LoginApi.md#login) | **POST** /api/v1/login | Login | ## `login()` ```php -login($accept_header_parameter, $application_key, $user, $password) +login($application_key, $user, $password, $accept_header_parameter, $format, $device_id): \BhrSdk\Model\LoginResponse ``` -User Login +Login -User Login +Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests. This endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. Note: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response. ### Example @@ -23,26 +23,22 @@ User Login <?php require_once(__DIR__ . '/vendor/autoload.php'); -// Configure API key authorization -$config = BhrSdk\Configuration::getDefaultConfiguration() - ->setApiKey('x-api-key', 'YOUR_API_KEY'); - -// Or configure OAuth2 access token for authorization -// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new BhrSdk\Api\LoginApi( // 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 + new GuzzleHttp\Client() ); +$application_key = 'application_key_example'; // string | The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. +$user = 'user_example'; // string | The user's email address or username. +$password = 'password_example'; // string | The user's password. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. -$application_key = 'application_key_example'; // string -$user = 'user_example'; // string -$password = 'password_example'; // string +$format = 'format_example'; // string | When set to `json`, forces a JSON response regardless of the `Accept` header. +$device_id = 'device_id_example'; // string | Optional device identifier. When provided, the generated API key is associated with this device. try { - $apiInstance->login($accept_header_parameter, $application_key, $user, $password); + $result = $apiInstance->login($application_key, $user, $password, $accept_header_parameter, $format, $device_id); + print_r($result); } catch (Exception $e) { echo 'Exception when calling LoginApi->login: ', $e->getMessage(), PHP_EOL; } @@ -52,14 +48,16 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | +| **application_key** | **string**| The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. | | +| **user** | **string**| The user's email address or username. | | +| **password** | **string**| The user's password. | | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | -| **application_key** | **string**| | [optional] | -| **user** | **string**| | [optional] | -| **password** | **string**| | [optional] | +| **format** | **string**| When set to `json`, forces a JSON response regardless of the `Accept` header. | [optional] | +| **device_id** | **string**| Optional device identifier. When provided, the generated API key is associated with this device. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\LoginResponse**](../Model/LoginResponse.md) ### Authorization diff --git a/docs/Api/OnboardingApi.md b/docs/Api/OnboardingApi.md new file mode 100644 index 00000000..68172968 --- /dev/null +++ b/docs/Api/OnboardingApi.md @@ -0,0 +1,769 @@ +# BhrSdk\OnboardingApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**caa7fc488bcfaef14125398f2ebb987d()**](OnboardingApi.md#caa7fc488bcfaef14125398f2ebb987d) | **DELETE** /api/v1/new-hire-packets/{id} | Delete new hire packet | +| [**call0158de7cde2a4c4cf577f0b25070d809()**](OnboardingApi.md#call0158de7cde2a4c4cf577f0b25070d809) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences | List employee onboarding experiences | +| [**call044949386f2d655c6a627ef53f9434b7()**](OnboardingApi.md#call044949386f2d655c6a627ef53f9434b7) | **GET** /api/v1/onboarding/new-hire-widget | Get welcome new hires widget | +| [**call19c7e26a1347ae7eb22919e9b0595c19()**](OnboardingApi.md#call19c7e26a1347ae7eb22919e9b0595c19) | **POST** /api/v1/new-hire-packets/{id}/cancel | Cancel new hire packet | +| [**call1ab0279d46023eb951a434f24df885f1()**](OnboardingApi.md#call1ab0279d46023eb951a434f24df885f1) | **PUT** /api/v1/new-hire-packets/{id} | Update new hire packet | +| [**call288aa996aba16d7a495c62321ea999a9()**](OnboardingApi.md#call288aa996aba16d7a495c62321ea999a9) | **POST** /api/v1/employees/{employeeId}/onboarding-experiences | Create employee onboarding experience | +| [**call696f0a229cdde60b733568e3c4d043d9()**](OnboardingApi.md#call696f0a229cdde60b733568e3c4d043d9) | **GET** /api/v1/new-hire-packets/{id} | Get new hire packet by id | +| [**call847dd061d1d1859e7ce8cb3adfc9faf2()**](OnboardingApi.md#call847dd061d1d1859e7ce8cb3adfc9faf2) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId} | Get employee onboarding experience by id | +| [**ec1ba8e76f33960b018d0d7518fe97b5()**](OnboardingApi.md#ec1ba8e76f33960b018d0d7518fe97b5) | **POST** /api/v1/new-hire-packets | Create new hire packet | +| [**f44b802c30cdea2b9076b3f82f99c74d()**](OnboardingApi.md#f44b802c30cdea2b9076b3f82f99c74d) | **GET** /api/v1/new-hire-packets | List new hire packets | +| [**f49b0f1f2fb1ef2c408ba12916ee9baa()**](OnboardingApi.md#f49b0f1f2fb1ef2c408ba12916ee9baa) | **POST** /api/v1/new-hire-packets/{id}/send | Send new hire packet | +| [**updateNewHirePacketGtkyAnswerVisibility()**](OnboardingApi.md#updateNewHirePacketGtkyAnswerVisibility) | **PUT** /api/v1/new-hire-packets/{id}/question-visibility | Update GTKY answer visibility for a new hire packet | + + +## `caa7fc488bcfaef14125398f2ebb987d()` + +```php +caa7fc488bcfaef14125398f2ebb987d($id) +``` + +Delete new hire packet + +Deletes a new hire packet instance by primary key. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int + +try { + $apiInstance->caa7fc488bcfaef14125398f2ebb987d($id); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->caa7fc488bcfaef14125398f2ebb987d: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call0158de7cde2a4c4cf577f0b25070d809()` + +```php +call0158de7cde2a4c4cf577f0b25070d809($employee_id): \BhrSdk\Model\OnboardingExperiencesListResponse +``` + +List employee onboarding experiences + +Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); +$employee_id = 56; // int + +try { + $result = $apiInstance->call0158de7cde2a4c4cf577f0b25070d809($employee_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call0158de7cde2a4c4cf577f0b25070d809: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\OnboardingExperiencesListResponse**](../Model/OnboardingExperiencesListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call044949386f2d655c6a627ef53f9434b7()` + +```php +call044949386f2d655c6a627ef53f9434b7(): \BhrSdk\Model\NewHireWidgetResponse +``` + +Get welcome new hires widget + +Returns the upcoming-new-hires data that powers the BambooHR home \"Welcome New Hires\" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user's new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); + +try { + $result = $apiInstance->call044949386f2d655c6a627ef53f9434b7(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call044949386f2d655c6a627ef53f9434b7: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\BhrSdk\Model\NewHireWidgetResponse**](../Model/NewHireWidgetResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call19c7e26a1347ae7eb22919e9b0595c19()` + +```php +call19c7e26a1347ae7eb22919e9b0595c19($id): \BhrSdk\Model\NewHirePacketPublicApi +``` + +Cancel new hire packet + +Cancels the new hire packet. Completed packets cannot be cancelled. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call19c7e26a1347ae7eb22919e9b0595c19($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call19c7e26a1347ae7eb22919e9b0595c19: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketPublicApi**](../Model/NewHirePacketPublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call1ab0279d46023eb951a434f24df885f1()` + +```php +call1ab0279d46023eb951a434f24df885f1($id, $new_hire_packet_public_api_writable_body): \BhrSdk\Model\NewHirePacketPublicApi +``` + +Update new hire packet + +Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int +$new_hire_packet_public_api_writable_body = new \BhrSdk\Model\NewHirePacketPublicApiWritableBody(); // \BhrSdk\Model\NewHirePacketPublicApiWritableBody + +try { + $result = $apiInstance->call1ab0279d46023eb951a434f24df885f1($id, $new_hire_packet_public_api_writable_body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call1ab0279d46023eb951a434f24df885f1: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **new_hire_packet_public_api_writable_body** | [**\BhrSdk\Model\NewHirePacketPublicApiWritableBody**](../Model/NewHirePacketPublicApiWritableBody.md)| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketPublicApi**](../Model/NewHirePacketPublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call288aa996aba16d7a495c62321ea999a9()` + +```php +call288aa996aba16d7a495c62321ea999a9($employee_id, $_288aa996aba16d7a495c62321ea999a9_request): \BhrSdk\Model\OnboardingExperiencePublicApi +``` + +Create employee onboarding experience + +Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); +$employee_id = 56; // int +$_288aa996aba16d7a495c62321ea999a9_request = new \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request(); // \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request + +try { + $result = $apiInstance->call288aa996aba16d7a495c62321ea999a9($employee_id, $_288aa996aba16d7a495c62321ea999a9_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call288aa996aba16d7a495c62321ea999a9: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| | | +| **_288aa996aba16d7a495c62321ea999a9_request** | [**\BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request**](../Model/_288aa996aba16d7a495c62321ea999a9Request.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\OnboardingExperiencePublicApi**](../Model/OnboardingExperiencePublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call696f0a229cdde60b733568e3c4d043d9()` + +```php +call696f0a229cdde60b733568e3c4d043d9($id): \BhrSdk\Model\NewHirePacketPublicApi +``` + +Get new hire packet by id + +Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int + +try { + $result = $apiInstance->call696f0a229cdde60b733568e3c4d043d9($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call696f0a229cdde60b733568e3c4d043d9: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketPublicApi**](../Model/NewHirePacketPublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `call847dd061d1d1859e7ce8cb3adfc9faf2()` + +```php +call847dd061d1d1859e7ce8cb3adfc9faf2($employee_id, $onboarding_experience_id): \BhrSdk\Model\OnboardingExperiencePublicApi +``` + +Get employee onboarding experience by id + +Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); +$employee_id = 56; // int +$onboarding_experience_id = 56; // int + +try { + $result = $apiInstance->call847dd061d1d1859e7ce8cb3adfc9faf2($employee_id, $onboarding_experience_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->call847dd061d1d1859e7ce8cb3adfc9faf2: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| | | +| **onboarding_experience_id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\OnboardingExperiencePublicApi**](../Model/OnboardingExperiencePublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `ec1ba8e76f33960b018d0d7518fe97b5()` + +```php +ec1ba8e76f33960b018d0d7518fe97b5($ec1ba8e76f33960b018d0d7518fe97b5_request): \BhrSdk\Model\NewHirePacketPublicApi +``` + +Create new hire packet + +Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); +$ec1ba8e76f33960b018d0d7518fe97b5_request = new \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request(); // \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request + +try { + $result = $apiInstance->ec1ba8e76f33960b018d0d7518fe97b5($ec1ba8e76f33960b018d0d7518fe97b5_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->ec1ba8e76f33960b018d0d7518fe97b5: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **ec1ba8e76f33960b018d0d7518fe97b5_request** | [**\BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request**](../Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md)| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketPublicApi**](../Model/NewHirePacketPublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `f44b802c30cdea2b9076b3f82f99c74d()` + +```php +f44b802c30cdea2b9076b3f82f99c74d($page, $page_size): \BhrSdk\Model\NewHirePacketsListResponse +``` + +List new hire packets + +Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 +); +$page = 56; // int +$page_size = 56; // int + +try { + $result = $apiInstance->f44b802c30cdea2b9076b3f82f99c74d($page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->f44b802c30cdea2b9076b3f82f99c74d: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **page** | **int**| | [optional] | +| **page_size** | **int**| | [optional] | + +### Return type + +[**\BhrSdk\Model\NewHirePacketsListResponse**](../Model/NewHirePacketsListResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `f49b0f1f2fb1ef2c408ba12916ee9baa()` + +```php +f49b0f1f2fb1ef2c408ba12916ee9baa($id): \BhrSdk\Model\NewHirePacketPublicApi +``` + +Send new hire packet + +Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int + +try { + $result = $apiInstance->f49b0f1f2fb1ef2c408ba12916ee9baa($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->f49b0f1f2fb1ef2c408ba12916ee9baa: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketPublicApi**](../Model/NewHirePacketPublicApi.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateNewHirePacketGtkyAnswerVisibility()` + +```php +updateNewHirePacketGtkyAnswerVisibility($id, $new_hire_packet_gtky_answer_visibility_request): \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse +``` + +Update GTKY answer visibility for a new hire packet + +Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\OnboardingApi( + // 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 = 56; // int +$new_hire_packet_gtky_answer_visibility_request = new \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest(); // \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest + +try { + $result = $apiInstance->updateNewHirePacketGtkyAnswerVisibility($id, $new_hire_packet_gtky_answer_visibility_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OnboardingApi->updateNewHirePacketGtkyAnswerVisibility: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| | | +| **new_hire_packet_gtky_answer_visibility_request** | [**\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest**](../Model/NewHirePacketGtkyAnswerVisibilityRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse**](../Model/NewHirePacketGtkyAnswerVisibilityResponse.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/PhotosApi.md b/docs/Api/PhotosApi.md index e84ea326..0f50e890 100644 --- a/docs/Api/PhotosApi.md +++ b/docs/Api/PhotosApi.md @@ -11,12 +11,12 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op ## `getEmployeePhoto()` ```php -getEmployeePhoto($employee_id, $size) +getEmployeePhoto($employee_id, $size, $width, $height) ``` Get Employee Photo -Get an employee photo +Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation: by default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`. A 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"<value>\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug. ### Example @@ -37,11 +37,13 @@ $apiInstance = new BhrSdk\Api\PhotosApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | The ID for the employee you are getting the photo for. -$size = 'size_example'; // string | Photo size +$employee_id = 56; // int | The ID of the employee whose photo to retrieve. +$size = 'size_example'; // string | The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. +$width = 56; // int | Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. +$height = 56; // int | Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. try { - $apiInstance->getEmployeePhoto($employee_id, $size); + $apiInstance->getEmployeePhoto($employee_id, $size, $width, $height); } catch (Exception $e) { echo 'Exception when calling PhotosApi->getEmployeePhoto: ', $e->getMessage(), PHP_EOL; } @@ -51,8 +53,10 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| The ID for the employee you are getting the photo for. | | -| **size** | **string**| Photo size | | +| **employee_id** | **int**| The ID of the employee whose photo to retrieve. | | +| **size** | **string**| The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. | | +| **width** | **int**| Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. | [optional] | +| **height** | **int**| Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. | [optional] | ### Return type @@ -65,7 +69,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `image/*`, `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -74,12 +78,12 @@ void (empty response body) ## `uploadEmployeePhoto()` ```php -uploadEmployeePhoto($employee_id) +uploadEmployeePhoto($employee_id, $file) ``` Upload Employee Photo -Store a new employee photo +Uploads a new photo for an employee. Accepts either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. ### Example @@ -100,10 +104,11 @@ $apiInstance = new BhrSdk\Api\PhotosApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string | The ID for the employee you are setting the photo for. +$employee_id = 56; // int | The ID of the employee whose photo is being uploaded. +$file = '/path/to/file.txt'; // \SplFileObject | The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. try { - $apiInstance->uploadEmployeePhoto($employee_id); + $apiInstance->uploadEmployeePhoto($employee_id, $file); } catch (Exception $e) { echo 'Exception when calling PhotosApi->uploadEmployeePhoto: ', $e->getMessage(), PHP_EOL; } @@ -113,7 +118,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| The ID for the employee you are setting the photo for. | | +| **employee_id** | **int**| The ID of the employee whose photo is being uploaded. | | +| **file** | **\SplFileObject****\SplFileObject**| The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. | | ### Return type @@ -125,8 +131,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `multipart/form-data`, `application/json` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/ReportsApi.md b/docs/Api/ReportsApi.md index c8a32361..83f974d0 100644 --- a/docs/Api/ReportsApi.md +++ b/docs/Api/ReportsApi.md @@ -11,12 +11,12 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op ## `getCompanyReport()` ```php -getCompanyReport($id, $format, $accept_header_parameter, $fd, $only_current) +getCompanyReport($id, $accept, $format, $fd, $only_current): \BhrSdk\Model\GetCompanyReportResponse ``` Get Company Report -**Warning: This endpoint will soon be deprecated and replaced with Custom Reports - Get Report by ID.** Use this resource to request one of your existing custom company reports from the My Reports or Manage Reports sections in the Reports tab. You can get the report number by hovering over the report name and noting the ID from the URL. At present, only reports from the My Reports or Manage Reports sections are supported. In the future we may implement reports from the Standard Reports section if there is enough demand for it. The report numbers used in this request are different in each company. +**Deprecated. Use Custom Reports > Get Report by ID instead.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*_/_*`) returns 404. ### Example @@ -37,14 +37,15 @@ $apiInstance = new BhrSdk\Api\ReportsApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is a report ID. -$format = 'format_example'; // string | The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON -$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. -$fd = 'fd_example'; // string | yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" -$only_current = false; // bool | Setting to false will return future dated values from history table fields. +$id = 56; // int | The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. +$accept = 'accept_example'; // string | The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. +$format = 'format_example'; // string | The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. +$fd = 'fd_example'; // string | Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). +$only_current = true; // bool | Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. try { - $apiInstance->getCompanyReport($id, $format, $accept_header_parameter, $fd, $only_current); + $result = $apiInstance->getCompanyReport($id, $accept, $format, $fd, $only_current); + print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->getCompanyReport: ', $e->getMessage(), PHP_EOL; } @@ -54,15 +55,15 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is a report ID. | | -| **format** | **string**| The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON | | -| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | -| **fd** | **string**| yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" | [optional] | -| **only_current** | **bool**| Setting to false will return future dated values from history table fields. | [optional] [default to false] | +| **id** | **int**| The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. | | +| **accept** | **string**| The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. | [optional] | +| **format** | **string**| The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. | [optional] | +| **fd** | **string**| Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). | [optional] | +| **only_current** | **bool**| Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. | [optional] [default to true] | ### Return type -void (empty response body) +[**\BhrSdk\Model\GetCompanyReportResponse**](../Model/GetCompanyReportResponse.md) ### Authorization @@ -71,7 +72,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -80,12 +81,12 @@ void (empty response body) ## `requestCustomReport()` ```php -requestCustomReport($format, $request_custom_report, $only_current) +requestCustomReport($request_custom_report, $accept, $format, $only_current): \BhrSdk\Model\RequestCustomReportResponse ``` Request Custom Report -**Warning: This endpoint will soon be deprecated and replaced with Datasets - Get Data from Dataset.** Use this resource to request BambooHR generate a report. You must specify a type of either \"PDF\", \"XLS\", \"CSV\", \"JSON\", or \"XML\". You must specify a list of fields to show on the report. The list of fields is available here. The custom report will return employees regardless of their status, \"Active\" or \"Inactive\". This differs from the UI, which by default applies a quick filter to display only \"Active\" employees. +**Deprecated. Use Datasets > Get Data from Dataset instead.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `<report>` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*_/_*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400. ### Example @@ -106,12 +107,14 @@ $apiInstance = new BhrSdk\Api\ReportsApi( new GuzzleHttp\Client(), $config ); -$format = 'format_example'; // string | The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON $request_custom_report = new \BhrSdk\Model\RequestCustomReport(); // \BhrSdk\Model\RequestCustomReport -$only_current = false; // bool | Limits the report to only current employees. Setting to false will include future-dated employees in the report. +$accept = 'accept_example'; // string | The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. +$format = 'format_example'; // string | The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. +$only_current = true; // bool | Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. try { - $apiInstance->requestCustomReport($format, $request_custom_report, $only_current); + $result = $apiInstance->requestCustomReport($request_custom_report, $accept, $format, $only_current); + print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->requestCustomReport: ', $e->getMessage(), PHP_EOL; } @@ -121,13 +124,14 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **format** | **string**| The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON | | | **request_custom_report** | [**\BhrSdk\Model\RequestCustomReport**](../Model/RequestCustomReport.md)| | | -| **only_current** | **bool**| Limits the report to only current employees. Setting to false will include future-dated employees in the report. | [optional] [default to false] | +| **accept** | **string**| The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. | [optional] | +| **format** | **string**| The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. | [optional] | +| **only_current** | **bool**| Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. | [optional] [default to true] | ### Return type -void (empty response body) +[**\BhrSdk\Model\RequestCustomReportResponse**](../Model/RequestCustomReportResponse.md) ### Authorization @@ -135,8 +139,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml` +- **Accept**: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/SchedulingApi.md b/docs/Api/SchedulingApi.md new file mode 100644 index 00000000..95ed6e84 --- /dev/null +++ b/docs/Api/SchedulingApi.md @@ -0,0 +1,869 @@ +# BhrSdk\SchedulingApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**schedulingCreateSchedule()**](SchedulingApi.md#schedulingCreateSchedule) | **POST** /api/v1/scheduling/schedules | Create Schedule | +| [**schedulingCreateShift()**](SchedulingApi.md#schedulingCreateShift) | **POST** /api/v1/scheduling/shifts | Create Shift | +| [**schedulingDeleteSchedule()**](SchedulingApi.md#schedulingDeleteSchedule) | **DELETE** /api/v1/scheduling/schedules/{id} | Delete Schedule | +| [**schedulingDeleteShift()**](SchedulingApi.md#schedulingDeleteShift) | **DELETE** /api/v1/scheduling/shifts/{id} | Delete Shift | +| [**schedulingGetSchedule()**](SchedulingApi.md#schedulingGetSchedule) | **GET** /api/v1/scheduling/schedules/{id} | Get Schedule | +| [**schedulingGetSchedulePdf()**](SchedulingApi.md#schedulingGetSchedulePdf) | **GET** /api/v1/scheduling/schedules/{id}/pdf | Get Schedule PDF | +| [**schedulingGetShift()**](SchedulingApi.md#schedulingGetShift) | **GET** /api/v1/scheduling/shifts/{id} | Get Shift | +| [**schedulingListSchedules()**](SchedulingApi.md#schedulingListSchedules) | **GET** /api/v1/scheduling/schedules | List Schedules | +| [**schedulingListShifts()**](SchedulingApi.md#schedulingListShifts) | **GET** /api/v1/scheduling/shifts | List Shifts | +| [**schedulingListTimezones()**](SchedulingApi.md#schedulingListTimezones) | **GET** /api/v1/scheduling/timezones | List Timezones | +| [**schedulingPublishShifts()**](SchedulingApi.md#schedulingPublishShifts) | **POST** /api/v1/scheduling/shifts/publish | Publish Shifts | +| [**schedulingUpdateSchedule()**](SchedulingApi.md#schedulingUpdateSchedule) | **PATCH** /api/v1/scheduling/schedules/{id} | Update Schedule | +| [**schedulingUpdateShift()**](SchedulingApi.md#schedulingUpdateShift) | **PATCH** /api/v1/scheduling/shifts/{id} | Update Shift | + + +## `schedulingCreateSchedule()` + +```php +schedulingCreateSchedule($scheduling_create_schedule_request_v1): \BhrSdk\Model\SchedulingScheduleV1 +``` + +Create Schedule + +Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$scheduling_create_schedule_request_v1 = new \BhrSdk\Model\SchedulingCreateScheduleRequestV1(); // \BhrSdk\Model\SchedulingCreateScheduleRequestV1 + +try { + $result = $apiInstance->schedulingCreateSchedule($scheduling_create_schedule_request_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingCreateSchedule: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **scheduling_create_schedule_request_v1** | [**\BhrSdk\Model\SchedulingCreateScheduleRequestV1**](../Model/SchedulingCreateScheduleRequestV1.md)| | | + +### Return type + +[**\BhrSdk\Model\SchedulingScheduleV1**](../Model/SchedulingScheduleV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingCreateShift()` + +```php +schedulingCreateShift($scheduling_create_scheduling_shift_request_v1): \BhrSdk\Model\SchedulingSchedulingShiftV1 +``` + +Create Shift + +Creates a new shift in the specified schedule. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$scheduling_create_scheduling_shift_request_v1 = new \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1(); // \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 + +try { + $result = $apiInstance->schedulingCreateShift($scheduling_create_scheduling_shift_request_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingCreateShift: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **scheduling_create_scheduling_shift_request_v1** | [**\BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1**](../Model/SchedulingCreateSchedulingShiftRequestV1.md)| | | + +### Return type + +[**\BhrSdk\Model\SchedulingSchedulingShiftV1**](../Model/SchedulingSchedulingShiftV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingDeleteSchedule()` + +```php +schedulingDeleteSchedule($id) +``` + +Delete Schedule + +Deletes a schedule by its UUID. Unworked shifts will be deleted as a result. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 schedule UUID + +try { + $apiInstance->schedulingDeleteSchedule($id); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingDeleteSchedule: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The schedule UUID | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingDeleteShift()` + +```php +schedulingDeleteShift($id, $recurrence_edit_option) +``` + +Delete Shift + +Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 shift UUID, or the projected shift composite ID. +$recurrence_edit_option = future; // string | How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. + +try { + $apiInstance->schedulingDeleteShift($id, $recurrence_edit_option); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingDeleteShift: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The shift UUID, or the projected shift composite ID. | | +| **recurrence_edit_option** | **string**| How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. | [optional] [default to 'instance'] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingGetSchedule()` + +```php +schedulingGetSchedule($id): \BhrSdk\Model\SchedulingScheduleV1 +``` + +Get Schedule + +Retrieves a specific schedule by its UUID. Schedules organize shifts for employees. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 schedule + +try { + $result = $apiInstance->schedulingGetSchedule($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingGetSchedule: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The ID of the schedule | | + +### Return type + +[**\BhrSdk\Model\SchedulingScheduleV1**](../Model/SchedulingScheduleV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingGetSchedulePdf()` + +```php +schedulingGetSchedulePdf($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off) +``` + +Get Schedule PDF + +Generates and streams a PDF of the schedule view for the given schedule and date range. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 schedule ID +$start_ymd = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Start date in YYYY-MM-DD format +$end_ymd = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | End date in YYYY-MM-DD format +$group_by = 'group_by_example'; // string | Group employees by this field +$employee_ids = array('employee_ids_example'); // string[] | Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. +$include_employees_without_shifts = false; // bool | Whether to include employees who have no shifts in the date range +$include_holidays = false; // bool | Whether to include holidays in the PDF +$include_time_off = false; // bool | Whether to include time-off entries in the PDF + +try { + $apiInstance->schedulingGetSchedulePdf($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingGetSchedulePdf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The schedule ID | | +| **start_ymd** | **\DateTime**| Start date in YYYY-MM-DD format | | +| **end_ymd** | **\DateTime**| End date in YYYY-MM-DD format | | +| **group_by** | **string**| Group employees by this field | [optional] | +| **employee_ids** | [**string[]**](../Model/string.md)| Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. | [optional] | +| **include_employees_without_shifts** | **bool**| Whether to include employees who have no shifts in the date range | [optional] [default to false] | +| **include_holidays** | **bool**| Whether to include holidays in the PDF | [optional] [default to false] | +| **include_time_off** | **bool**| Whether to include time-off entries in the PDF | [optional] [default to false] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/pdf` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `schedulingGetShift()` + +```php +schedulingGetShift($id): \BhrSdk\Model\SchedulingSchedulingShiftV1 +``` + +Get Shift + +Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 shift uuid + +try { + $result = $apiInstance->schedulingGetShift($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingGetShift: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The shift uuid | | + +### Return type + +[**\BhrSdk\Model\SchedulingSchedulingShiftV1**](../Model/SchedulingSchedulingShiftV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingListSchedules()` + +```php +schedulingListSchedules($filter, $sort, $page, $page_size): \BhrSdk\Model\SchedulingScheduleListResponseV1 +``` + +List Schedules + +Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$filter = 'filter_example'; // string | OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. +$sort = 'sort_example'; // string | Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt +$page = 1; // int | The starting page for pagination +$page_size = 100; // int | The number of items to be returned + +try { + $result = $apiInstance->schedulingListSchedules($filter, $sort, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingListSchedules: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **filter** | **string**| OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. | [optional] | +| **sort** | **string**| Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt | [optional] | +| **page** | **int**| The starting page for pagination | [optional] [default to 1] | +| **page_size** | **int**| The number of items to be returned | [optional] [default to 100] | + +### Return type + +[**\BhrSdk\Model\SchedulingScheduleListResponseV1**](../Model/SchedulingScheduleListResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingListShifts()` + +```php +schedulingListShifts($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size): \BhrSdk\Model\SchedulingShiftListResponseV1 +``` + +List Shifts + +Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$ids = array('ids_example'); // string[] | Filter by shift IDs. If provided, other filters are ignored. +$start = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. +$end = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. +$employee_ids = array('employee_ids_example'); // string[] | Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). +$schedule_ids = array('schedule_ids_example'); // string[] | Filter by schedule IDs. +$statuses = array('statuses_example'); // string[] | Filter by shift statuses. +$page = 1; // int | The starting page for pagination. +$page_size = 1000; // int | The number of items to be returned. + +try { + $result = $apiInstance->schedulingListShifts($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingListShifts: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **ids** | [**string[]**](../Model/string.md)| Filter by shift IDs. If provided, other filters are ignored. | [optional] | +| **start** | **\DateTime**| Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. | [optional] | +| **end** | **\DateTime**| End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. | [optional] | +| **employee_ids** | [**string[]**](../Model/string.md)| Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). | [optional] | +| **schedule_ids** | [**string[]**](../Model/string.md)| Filter by schedule IDs. | [optional] | +| **statuses** | [**string[]**](../Model/string.md)| Filter by shift statuses. | [optional] | +| **page** | **int**| The starting page for pagination. | [optional] [default to 1] | +| **page_size** | **int**| The number of items to be returned. | [optional] [default to 1000] | + +### Return type + +[**\BhrSdk\Model\SchedulingShiftListResponseV1**](../Model/SchedulingShiftListResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingListTimezones()` + +```php +schedulingListTimezones($filter, $sort, $page, $page_size): \BhrSdk\Model\SchedulingTimezoneListResponseV1 +``` + +List Timezones + +Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$filter = 'filter_example'; // string | OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. +$sort = 'sort_example'; // string | Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` +$page = 1; // int | The starting page for pagination. Defaults to 1. +$page_size = 100; // int | The number of items to be returned. Defaults to 100. + +try { + $result = $apiInstance->schedulingListTimezones($filter, $sort, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingListTimezones: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **filter** | **string**| OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. | [optional] | +| **sort** | **string**| Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` | [optional] | +| **page** | **int**| The starting page for pagination. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of items to be returned. Defaults to 100. | [optional] [default to 100] | + +### Return type + +[**\BhrSdk\Model\SchedulingTimezoneListResponseV1**](../Model/SchedulingTimezoneListResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingPublishShifts()` + +```php +schedulingPublishShifts($scheduling_publish_shifts_request): \BhrSdk\Model\SchedulingPublishShiftsResultV1 +``` + +Publish Shifts + +Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 +); +$scheduling_publish_shifts_request = new \BhrSdk\Model\SchedulingPublishShiftsRequest(); // \BhrSdk\Model\SchedulingPublishShiftsRequest + +try { + $result = $apiInstance->schedulingPublishShifts($scheduling_publish_shifts_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingPublishShifts: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **scheduling_publish_shifts_request** | [**\BhrSdk\Model\SchedulingPublishShiftsRequest**](../Model/SchedulingPublishShiftsRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\SchedulingPublishShiftsResultV1**](../Model/SchedulingPublishShiftsResultV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingUpdateSchedule()` + +```php +schedulingUpdateSchedule($id, $scheduling_update_schedule_request_v1): \BhrSdk\Model\SchedulingScheduleV1 +``` + +Update Schedule + +Partially updates an existing schedule by its UUID. Fields not provided retain their existing values. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 schedule UUID +$scheduling_update_schedule_request_v1 = new \BhrSdk\Model\SchedulingUpdateScheduleRequestV1(); // \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 + +try { + $result = $apiInstance->schedulingUpdateSchedule($id, $scheduling_update_schedule_request_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingUpdateSchedule: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The schedule UUID | | +| **scheduling_update_schedule_request_v1** | [**\BhrSdk\Model\SchedulingUpdateScheduleRequestV1**](../Model/SchedulingUpdateScheduleRequestV1.md)| | | + +### Return type + +[**\BhrSdk\Model\SchedulingScheduleV1**](../Model/SchedulingScheduleV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `schedulingUpdateShift()` + +```php +schedulingUpdateShift($id, $scheduling_update_scheduling_shift_request_v1): \BhrSdk\Model\SchedulingSchedulingShiftV1 +``` + +Update Shift + +Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\SchedulingApi( + // 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 shift uuid +$scheduling_update_scheduling_shift_request_v1 = new \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1(); // \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 + +try { + $result = $apiInstance->schedulingUpdateShift($id, $scheduling_update_scheduling_shift_request_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SchedulingApi->schedulingUpdateShift: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The shift uuid | | +| **scheduling_update_scheduling_shift_request_v1** | [**\BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1**](../Model/SchedulingUpdateSchedulingShiftRequestV1.md)| | | + +### Return type + +[**\BhrSdk\Model\SchedulingSchedulingShiftV1**](../Model/SchedulingSchedulingShiftV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/TabularDataApi.md b/docs/Api/TabularDataApi.md index 03b99580..4e52cbe6 100644 --- a/docs/Api/TabularDataApi.md +++ b/docs/Api/TabularDataApi.md @@ -4,24 +4,24 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addEmployeeTableRow()**](TabularDataApi.md#addEmployeeTableRow) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row | -| [**addEmployeeTableRowV1()**](TabularDataApi.md#addEmployeeTableRowV1) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 | -| [**deleteEmployeeTableRowV1()**](TabularDataApi.md#deleteEmployeeTableRowV1) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Table Row | +| [**createTableRow()**](TabularDataApi.md#createTableRow) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row | +| [**createTableRowV11()**](TabularDataApi.md#createTableRowV11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 | +| [**deleteEmployeeTableRow()**](TabularDataApi.md#deleteEmployeeTableRow) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Employee Table Row | | [**getChangedEmployeeTableData()**](TabularDataApi.md#getChangedEmployeeTableData) | **GET** /api/v1/employees/changed/tables/{table} | Get Changed Employee Table Data | -| [**getEmployeeTableRow()**](TabularDataApi.md#getEmployeeTableRow) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Rows | -| [**updateEmployeeTableRow()**](TabularDataApi.md#updateEmployeeTableRow) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row | -| [**updateEmployeeTableRowV()**](TabularDataApi.md#updateEmployeeTableRowV) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 | +| [**getEmployeeTableData()**](TabularDataApi.md#getEmployeeTableData) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Data | +| [**updateTableRow()**](TabularDataApi.md#updateTableRow) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row | +| [**updateTableRowV11()**](TabularDataApi.md#updateTableRowV11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 | -## `addEmployeeTableRow()` +## `createTableRow()` ```php -addEmployeeTableRow($id, $table, $table_row_update) +createTableRow($id, $table, $table_row_update) ``` Create Table Row -Adds a table row. If employee is currently on a pay schedule syncing with Trax Payroll, or being added to one, the row cannot be added if they are missing any required fields for that table. If the API user is adding a row on the compensation table, the row cannot be added if they are missing any of the required employee fields (including fields not on that table). +Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. ### Example @@ -42,14 +42,14 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name +$id = 'id_example'; // string | The employee ID. +$table = 'table_example'; // string | The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. $table_row_update = new \BhrSdk\Model\TableRowUpdate(); // \BhrSdk\Model\TableRowUpdate try { - $apiInstance->addEmployeeTableRow($id, $table, $table_row_update); + $apiInstance->createTableRow($id, $table, $table_row_update); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->addEmployeeTableRow: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->createTableRow: ', $e->getMessage(), PHP_EOL; } ``` @@ -57,8 +57,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | +| **id** | **string**| The employee ID. | | +| **table** | **string**| The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. | | | **table_row_update** | [**\BhrSdk\Model\TableRowUpdate**](../Model/TableRowUpdate.md)| | | ### Return type @@ -71,22 +71,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **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) -## `addEmployeeTableRowV1()` +## `createTableRowV11()` ```php -addEmployeeTableRowV1($id, $table, $table_row_update) +createTableRowV11($id, $table, $table_row_update) ``` Create Table Row v1.1 -Adds a table row. Fundamentally the same as version 1 so choose a version and stay with it unless other changes occur. Changes from version 1 are now minor with a few variations limited to ACA, payroll, terminated rehire, gusto, benetrac, and final pay date. +Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. ### Example @@ -107,14 +107,14 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name +$id = 'id_example'; // string | The employee ID. +$table = 'table_example'; // string | The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. $table_row_update = new \BhrSdk\Model\TableRowUpdate(); // \BhrSdk\Model\TableRowUpdate try { - $apiInstance->addEmployeeTableRowV1($id, $table, $table_row_update); + $apiInstance->createTableRowV11($id, $table, $table_row_update); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->addEmployeeTableRowV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->createTableRowV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -122,8 +122,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | +| **id** | **string**| The employee ID. | | +| **table** | **string**| The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. | | | **table_row_update** | [**\BhrSdk\Model\TableRowUpdate**](../Model/TableRowUpdate.md)| | | ### Return type @@ -136,22 +136,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **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) -## `deleteEmployeeTableRowV1()` +## `deleteEmployeeTableRow()` ```php -deleteEmployeeTableRowV1($id, $table, $row_id): \BhrSdk\Model\TableRowDeleteResponse +deleteEmployeeTableRow($id, $table, $row_id): \BhrSdk\Model\TableRowDeleteResponse ``` -Delete Table Row +Delete Employee Table Row -Deletes a table row +Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list. ### Example @@ -172,15 +172,15 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name -$row_id = 'row_id_example'; // string | Row ID +$id = 'id_example'; // string | The employee ID. +$table = 'table_example'; // string | The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. +$row_id = 'row_id_example'; // string | The ID of the specific row to delete. try { - $result = $apiInstance->deleteEmployeeTableRowV1($id, $table, $row_id); + $result = $apiInstance->deleteEmployeeTableRow($id, $table, $row_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->deleteEmployeeTableRowV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->deleteEmployeeTableRow: ', $e->getMessage(), PHP_EOL; } ``` @@ -188,9 +188,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | -| **row_id** | **string**| Row ID | | +| **id** | **string**| The employee ID. | | +| **table** | **string**| The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. | | +| **row_id** | **string**| The ID of the specific row to delete. | | ### Return type @@ -212,12 +212,12 @@ try { ## `getChangedEmployeeTableData()` ```php -getChangedEmployeeTableData($table, $since) +getChangedEmployeeTableData($table, $since): \BhrSdk\Model\ChangedEmployeeTableDataResponse ``` Get Changed Employee Table Data -This API is merely an optimization to avoid downloading all table data for all employees. When you use this API you will provide a timestamp and the results will be limited to just the employees that have changed since the time you provided. This API operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employees table rows to show up via this API. +Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. ### Example @@ -238,11 +238,12 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$table = 'table_example'; // string | Table name -$since = 'since_example'; // string | URL encoded iso8601 timestamp +$table = 'table_example'; // string | The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. +$since = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. try { - $apiInstance->getChangedEmployeeTableData($table, $since); + $result = $apiInstance->getChangedEmployeeTableData($table, $since); + print_r($result); } catch (Exception $e) { echo 'Exception when calling TabularDataApi->getChangedEmployeeTableData: ', $e->getMessage(), PHP_EOL; } @@ -252,12 +253,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **table** | **string**| Table name | | -| **since** | **string**| URL encoded iso8601 timestamp | | +| **table** | **string**| The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. | | +| **since** | **\DateTime**| ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\ChangedEmployeeTableDataResponse**](../Model/ChangedEmployeeTableDataResponse.md) ### Authorization @@ -266,21 +267,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getEmployeeTableRow()` +## `getEmployeeTableData()` ```php -getEmployeeTableRow($id, $table) +getEmployeeTableData($id, $table, $accept_header_parameter): \BhrSdk\Model\EmployeeTableRow[] ``` -Get Employee Table Rows +Get Employee Table Data -Returns a data structure representing all the table rows for a given employee and table combination. The result is not sorted in any particular order. +Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. ### Example @@ -301,13 +302,15 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name +$id = 'id_example'; // string | The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. +$table = 'table_example'; // string | The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->getEmployeeTableRow($id, $table); + $result = $apiInstance->getEmployeeTableData($id, $table, $accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->getEmployeeTableRow: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->getEmployeeTableData: ', $e->getMessage(), PHP_EOL; } ``` @@ -315,12 +318,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | +| **id** | **string**| The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. | | +| **table** | **string**| The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeTableRow[]**](../Model/EmployeeTableRow.md) ### Authorization @@ -329,21 +333,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/xml` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `updateEmployeeTableRow()` +## `updateTableRow()` ```php -updateEmployeeTableRow($id, $table, $row_id, $table_row_update) +updateTableRow($id, $table, $row_id, $table_row_update) ``` Update Table Row -Updates a table row. If employee is currently on a pay schedule syncing with Trax Payroll, or being added to one, the row cannot be added if they are missing any required fields for that table. If the API user is updating a row on the compensation table, the row cannot be updated if they are missing any of the required employee fields (including fields not on that table). +Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. ### Example @@ -364,15 +368,15 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name -$row_id = 'row_id_example'; // string | Row ID +$id = 'id_example'; // string | The employee ID. +$table = 'table_example'; // string | The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. +$row_id = 'row_id_example'; // string | The ID of the row to update. $table_row_update = new \BhrSdk\Model\TableRowUpdate(); // \BhrSdk\Model\TableRowUpdate try { - $apiInstance->updateEmployeeTableRow($id, $table, $row_id, $table_row_update); + $apiInstance->updateTableRow($id, $table, $row_id, $table_row_update); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->updateEmployeeTableRow: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->updateTableRow: ', $e->getMessage(), PHP_EOL; } ``` @@ -380,9 +384,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | -| **row_id** | **string**| Row ID | | +| **id** | **string**| The employee ID. | | +| **table** | **string**| The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. | | +| **row_id** | **string**| The ID of the row to update. | | | **table_row_update** | [**\BhrSdk\Model\TableRowUpdate**](../Model/TableRowUpdate.md)| | | ### Return type @@ -395,22 +399,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **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) -## `updateEmployeeTableRowV()` +## `updateTableRowV11()` ```php -updateEmployeeTableRowV($id, $table, $row_id, $table_row_update) +updateTableRowV11($id, $table, $row_id, $table_row_update) ``` Update Table Row v1.1 -Updates a table row. Fundamentally the same as version 1 so choose a version and stay with it unless other changes occur. Changes from version 1 are now minor with a few variations limited to ACA, payroll, terminated rehire, gusto, benetrac, and final pay date. +Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. ### Example @@ -431,15 +435,15 @@ $apiInstance = new BhrSdk\Api\TabularDataApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is the employee ID. -$table = 'table_example'; // string | Table name -$row_id = 'row_id_example'; // string | Row ID +$id = 'id_example'; // string | The employee ID. +$table = 'table_example'; // string | The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. +$row_id = 'row_id_example'; // string | The ID of the row to update. $table_row_update = new \BhrSdk\Model\TableRowUpdate(); // \BhrSdk\Model\TableRowUpdate try { - $apiInstance->updateEmployeeTableRowV($id, $table, $row_id, $table_row_update); + $apiInstance->updateTableRowV11($id, $table, $row_id, $table_row_update); } catch (Exception $e) { - echo 'Exception when calling TabularDataApi->updateEmployeeTableRowV: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TabularDataApi->updateTableRowV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -447,9 +451,9 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is the employee ID. | | -| **table** | **string**| Table name | | -| **row_id** | **string**| Row ID | | +| **id** | **string**| The employee ID. | | +| **table** | **string**| The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. | | +| **row_id** | **string**| The ID of the row to update. | | | **table_row_update** | [**\BhrSdk\Model\TableRowUpdate**](../Model/TableRowUpdate.md)| | | ### Return type @@ -462,8 +466,8 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/xml`, `application/json` +- **Content-Type**: `application/json`, `application/xml`, `text/xml` +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/TimeOffApi.md b/docs/Api/TimeOffApi.md index 5410fd14..a44bd372 100644 --- a/docs/Api/TimeOffApi.md +++ b/docs/Api/TimeOffApi.md @@ -4,30 +4,30 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getAListOfWhoIsOut()**](TimeOffApi.md#getAListOfWhoIsOut) | **GET** /api/v1/time_off/whos_out | Get Who’s Out | -| [**getTimeOffPolicies()**](TimeOffApi.md#getTimeOffPolicies) | **GET** /api/v1/meta/time_off/policies | Get Time Off Policies | -| [**getTimeOffTypes()**](TimeOffApi.md#getTimeOffTypes) | **GET** /api/v1/meta/time_off/types | Get Time Off Types | -| [**timeOffAddATimeOffHistoryItemForTimeOffRequest()**](TimeOffApi.md#timeOffAddATimeOffHistoryItemForTimeOffRequest) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off Request History Item | -| [**timeOffAddATimeOffRequest()**](TimeOffApi.md#timeOffAddATimeOffRequest) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request | -| [**timeOffAdjustTimeOffBalance()**](TimeOffApi.md#timeOffAdjustTimeOffBalance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Update Time Off Balance | -| [**timeOffAssignTimeOffPoliciesForAnEmployee()**](TimeOffApi.md#timeOffAssignTimeOffPoliciesForAnEmployee) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies | -| [**timeOffAssignTimeOffPoliciesForAnEmployeeV11()**](TimeOffApi.md#timeOffAssignTimeOffPoliciesForAnEmployeeV11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 | -| [**timeOffChangeARequestStatus()**](TimeOffApi.md#timeOffChangeARequestStatus) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status | -| [**timeOffEstimateFutureTimeOffBalances()**](TimeOffApi.md#timeOffEstimateFutureTimeOffBalances) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Estimate Future Time Off Balances | -| [**timeOffGetTimeOffRequests()**](TimeOffApi.md#timeOffGetTimeOffRequests) | **GET** /api/v1/time_off/requests | Get Time Off Requests | -| [**timeOffListTimeOffPoliciesForEmployee()**](TimeOffApi.md#timeOffListTimeOffPoliciesForEmployee) | **GET** /api/v1/employees/{employeeId}/time_off/policies | Get Time Off Policies for Employee | -| [**timeOffListTimeOffPoliciesForEmployeeV11()**](TimeOffApi.md#timeOffListTimeOffPoliciesForEmployeeV11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | Get Time Off Policies for Employee v1.1 | - - -## `getAListOfWhoIsOut()` +| [**adjustTimeOffBalance()**](TimeOffApi.md#adjustTimeOffBalance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Adjust Time Off Balance | +| [**assignTimeOffPolicies()**](TimeOffApi.md#assignTimeOffPolicies) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies | +| [**assignTimeOffPoliciesV11()**](TimeOffApi.md#assignTimeOffPoliciesV11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 | +| [**createTimeOffHistory()**](TimeOffApi.md#createTimeOffHistory) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off History Item | +| [**createTimeOffRequest()**](TimeOffApi.md#createTimeOffRequest) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request | +| [**getTimeOffBalance()**](TimeOffApi.md#getTimeOffBalance) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Get Time Off Balance | +| [**listEmployeeTimeOffPolicies()**](TimeOffApi.md#listEmployeeTimeOffPolicies) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies | +| [**listEmployeeTimeOffPoliciesV11()**](TimeOffApi.md#listEmployeeTimeOffPoliciesV11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies v1.1 | +| [**listTimeOffPolicies()**](TimeOffApi.md#listTimeOffPolicies) | **GET** /api/v1/meta/time_off/policies | List Time Off Policies | +| [**listTimeOffRequests()**](TimeOffApi.md#listTimeOffRequests) | **GET** /api/v1/time_off/requests | List Time Off Requests | +| [**listTimeOffTypes()**](TimeOffApi.md#listTimeOffTypes) | **GET** /api/v1/meta/time_off/types | List Time Off Types | +| [**listWhosOut()**](TimeOffApi.md#listWhosOut) | **GET** /api/v1/time_off/whos_out | List Who’s Out | +| [**updateTimeOffRequestStatus()**](TimeOffApi.md#updateTimeOffRequestStatus) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status | + + +## `adjustTimeOffBalance()` ```php -getAListOfWhoIsOut($accept_header_parameter, $start, $end) +adjustTimeOffBalance($employee_id, $adjust_time_off_balance) ``` -Get Who’s Out +Adjust Time Off Balance -This endpoint will return a list, sorted by date, of employees who will be out, and company holidays, for a period of time. +Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. ### Example @@ -48,14 +48,13 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. -$start = 'start_example'; // string | A date in the form YYYY-MM-DD - defaults to the current date. -$end = 'end_example'; // string | A date in the form YYYY-MM-DD - defaults to 14 days from the start date. +$employee_id = 56; // int | The ID of the employee. +$adjust_time_off_balance = new \BhrSdk\Model\AdjustTimeOffBalance(); // \BhrSdk\Model\AdjustTimeOffBalance try { - $apiInstance->getAListOfWhoIsOut($accept_header_parameter, $start, $end); + $apiInstance->adjustTimeOffBalance($employee_id, $adjust_time_off_balance); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->getAListOfWhoIsOut: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->adjustTimeOffBalance: ', $e->getMessage(), PHP_EOL; } ``` @@ -63,9 +62,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | -| **start** | **string**| A date in the form YYYY-MM-DD - defaults to the current date. | [optional] | -| **end** | **string**| A date in the form YYYY-MM-DD - defaults to 14 days from the start date. | [optional] | +| **employee_id** | **int**| The ID of the employee. | | +| **adjust_time_off_balance** | [**\BhrSdk\Model\AdjustTimeOffBalance**](../Model/AdjustTimeOffBalance.md)| | | ### Return type @@ -77,22 +75,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Content-Type**: `application/json`, `application/xml` +- **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) -## `getTimeOffPolicies()` +## `assignTimeOffPolicies()` ```php -getTimeOffPolicies($accept_header_parameter) +assignTimeOffPolicies($employee_id, $assign_time_off_policies_request_inner): \BhrSdk\Model\AssignedTimeOffPolicy[] ``` -Get Time Off Policies +Assign Time Off Policies -This endpoint gets a list of time off policies. +Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. ### Example @@ -113,12 +111,14 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$employee_id = 56; // int | The ID of the employee to assign policies to. +$assign_time_off_policies_request_inner = array(new \BhrSdk\Model\AssignTimeOffPoliciesRequestInner()); // \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] try { - $apiInstance->getTimeOffPolicies($accept_header_parameter); + $result = $apiInstance->assignTimeOffPolicies($employee_id, $assign_time_off_policies_request_inner); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->getTimeOffPolicies: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->assignTimeOffPolicies: ', $e->getMessage(), PHP_EOL; } ``` @@ -126,11 +126,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **employee_id** | **int**| The ID of the employee to assign policies to. | | +| **assign_time_off_policies_request_inner** | [**\BhrSdk\Model\AssignTimeOffPoliciesRequestInner[]**](../Model/AssignTimeOffPoliciesRequestInner.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\AssignedTimeOffPolicy[]**](../Model/AssignedTimeOffPolicy.md) ### Authorization @@ -145,15 +146,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getTimeOffTypes()` +## `assignTimeOffPoliciesV11()` ```php -getTimeOffTypes($accept_header_parameter, $mode) +assignTimeOffPoliciesV11($employee_id, $assign_time_off_policies_request_inner): \BhrSdk\Model\AssignedTimeOffPolicyV11[] ``` -Get Time Off Types +Assign Time Off Policies v1.1 -This endpoint gets a list of time off types. +Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. ### Example @@ -174,13 +175,14 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. -$mode = 'mode_example'; // string | set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. +$employee_id = 56; // int | The ID of the employee to assign policies to. +$assign_time_off_policies_request_inner = array(new \BhrSdk\Model\AssignTimeOffPoliciesRequestInner()); // \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] try { - $apiInstance->getTimeOffTypes($accept_header_parameter, $mode); + $result = $apiInstance->assignTimeOffPoliciesV11($employee_id, $assign_time_off_policies_request_inner); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->getTimeOffTypes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->assignTimeOffPoliciesV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -188,12 +190,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | -| **mode** | **string**| set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. | [optional] | +| **employee_id** | **int**| The ID of the employee to assign policies to. | | +| **assign_time_off_policies_request_inner** | [**\BhrSdk\Model\AssignTimeOffPoliciesRequestInner[]**](../Model/AssignTimeOffPoliciesRequestInner.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\AssignedTimeOffPolicyV11[]**](../Model/AssignedTimeOffPolicyV11.md) ### Authorization @@ -208,15 +210,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffAddATimeOffHistoryItemForTimeOffRequest()` +## `createTimeOffHistory()` ```php -timeOffAddATimeOffHistoryItemForTimeOffRequest($employee_id, $time_off_history) +createTimeOffHistory($employee_id, $time_off_history) ``` -Create Time Off Request History Item +Create Time Off History Item -To use this API make an HTTP PUT where the body of the request is the JSON documented below. A new time off history item will be inserted into the database. On success, a 201 Created code is returned and the \"Location\" header of the response will contain a URL that identifies the new history item. +Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. ### Example @@ -241,9 +243,9 @@ $employee_id = 56; // int | The ID of the employee. $time_off_history = new \BhrSdk\Model\TimeOffHistory(); // \BhrSdk\Model\TimeOffHistory try { - $apiInstance->timeOffAddATimeOffHistoryItemForTimeOffRequest($employee_id, $time_off_history); + $apiInstance->createTimeOffHistory($employee_id, $time_off_history); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffAddATimeOffHistoryItemForTimeOffRequest: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->createTimeOffHistory: ', $e->getMessage(), PHP_EOL; } ``` @@ -264,22 +266,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` +- **Content-Type**: `application/json`, `application/xml` - **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) -## `timeOffAddATimeOffRequest()` +## `createTimeOffRequest()` ```php -timeOffAddATimeOffRequest($employee_id, $time_off_request) +createTimeOffRequest($employee_id, $time_off_request): \BhrSdk\Model\CreatedTimeOffRequest ``` Create Time Off Request -A time off request is an entity that describes the decision making process for approving time off. Once a request has been created, a history entry can be created documenting the actual use of time off. +Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies. ### Example @@ -300,13 +302,14 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string +$employee_id = 56; // int | The ID of the employee to create the time off request for. $time_off_request = new \BhrSdk\Model\TimeOffRequest(); // \BhrSdk\Model\TimeOffRequest try { - $apiInstance->timeOffAddATimeOffRequest($employee_id, $time_off_request); + $result = $apiInstance->createTimeOffRequest($employee_id, $time_off_request); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffAddATimeOffRequest: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->createTimeOffRequest: ', $e->getMessage(), PHP_EOL; } ``` @@ -314,12 +317,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| | | +| **employee_id** | **int**| The ID of the employee to create the time off request for. | | | **time_off_request** | [**\BhrSdk\Model\TimeOffRequest**](../Model/TimeOffRequest.md)| | | ### Return type -void (empty response body) +[**\BhrSdk\Model\CreatedTimeOffRequest**](../Model/CreatedTimeOffRequest.md) ### Authorization @@ -327,22 +330,22 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` +- **Content-Type**: `application/json`, `application/xml` - **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) -## `timeOffAdjustTimeOffBalance()` +## `getTimeOffBalance()` ```php -timeOffAdjustTimeOffBalance($employee_id, $adjust_time_off_balance) +getTimeOffBalance($employee_id, $accept_header_parameter, $end, $precision): \BhrSdk\Model\TimeOffBalanceEntry[] ``` -Update Time Off Balance +Get Time Off Balance -To use this API make an HTTP PUT where the body of the request is the JSON documented below. A time off balance adjustment will be inserted into the database. On success, a 201 Created code is returned and the \"Location\" header of the response will contain a URL that identifies the new history item. +Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. ### Example @@ -363,13 +366,16 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 56; // int | The ID of the employee. -$adjust_time_off_balance = new \BhrSdk\Model\AdjustTimeOffBalance(); // \BhrSdk\Model\AdjustTimeOffBalance +$employee_id = 56; // int | The ID of the employee to get time off balances for. +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$end = 2026-12-31; // \DateTime | The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. +$precision = 2; // int | Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. try { - $apiInstance->timeOffAdjustTimeOffBalance($employee_id, $adjust_time_off_balance); + $result = $apiInstance->getTimeOffBalance($employee_id, $accept_header_parameter, $end, $precision); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffAdjustTimeOffBalance: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->getTimeOffBalance: ', $e->getMessage(), PHP_EOL; } ``` @@ -377,12 +383,14 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| The ID of the employee. | | -| **adjust_time_off_balance** | [**\BhrSdk\Model\AdjustTimeOffBalance**](../Model/AdjustTimeOffBalance.md)| | | +| **employee_id** | **int**| The ID of the employee to get time off balances for. | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **end** | **\DateTime**| The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. | [optional] | +| **precision** | **int**| Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. | [optional] [default to 2] | ### Return type -void (empty response body) +[**\BhrSdk\Model\TimeOffBalanceEntry[]**](../Model/TimeOffBalanceEntry.md) ### Authorization @@ -391,21 +399,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffAssignTimeOffPoliciesForAnEmployee()` +## `listEmployeeTimeOffPolicies()` ```php -timeOffAssignTimeOffPoliciesForAnEmployee($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner) +listEmployeeTimeOffPolicies($employee_id): \BhrSdk\Model\EmployeeTimeOffPolicyAssignment[] ``` -Assign Time Off Policies +List Employee Time Off Policies -To use this API make an HTTP PUT where the body of the request is the JSON documented below. A time off policy will be assigned to the employee with accruals starting on the date specified. A null start date will remove the assignment. On success, a 200 Success code is returned and the content of the response will be the same as the List Time off Policies API. +Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. ### Example @@ -426,13 +434,13 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string -$time_off_assign_time_off_policies_for_an_employee_request_inner = array(new \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner()); // \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] +$employee_id = 56; // int | The ID of the employee. try { - $apiInstance->timeOffAssignTimeOffPoliciesForAnEmployee($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner); + $result = $apiInstance->listEmployeeTimeOffPolicies($employee_id); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffAssignTimeOffPoliciesForAnEmployee: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listEmployeeTimeOffPolicies: ', $e->getMessage(), PHP_EOL; } ``` @@ -440,12 +448,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| | | -| **time_off_assign_time_off_policies_for_an_employee_request_inner** | [**\BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[]**](../Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md)| | | +| **employee_id** | **int**| The ID of the employee. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeTimeOffPolicyAssignment[]**](../Model/EmployeeTimeOffPolicyAssignment.md) ### Authorization @@ -460,15 +467,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffAssignTimeOffPoliciesForAnEmployeeV11()` +## `listEmployeeTimeOffPoliciesV11()` ```php -timeOffAssignTimeOffPoliciesForAnEmployeeV11($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner) +listEmployeeTimeOffPoliciesV11($employee_id): \BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[] ``` -Assign Time Off Policies v1.1 +List Employee Time Off Policies v1.1 -To use this API make an HTTP PUT where the body of the request is the JSON documented below. A time off policy will be assigned to the employee with accruals starting on the date specified. On success, a 200 Success code is returned and the content of the response will be the same as the List Time off Policies API. +Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them. ### Example @@ -489,13 +496,13 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string -$time_off_assign_time_off_policies_for_an_employee_request_inner = array(new \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner()); // \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] +$employee_id = 56; // int | The ID of the employee. try { - $apiInstance->timeOffAssignTimeOffPoliciesForAnEmployeeV11($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner); + $result = $apiInstance->listEmployeeTimeOffPoliciesV11($employee_id); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffAssignTimeOffPoliciesForAnEmployeeV11: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listEmployeeTimeOffPoliciesV11: ', $e->getMessage(), PHP_EOL; } ``` @@ -503,12 +510,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| | | -| **time_off_assign_time_off_policies_for_an_employee_request_inner** | [**\BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[]**](../Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md)| | | +| **employee_id** | **int**| The ID of the employee. | | ### Return type -void (empty response body) +[**\BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[]**](../Model/EmployeeTimeOffPolicyAssignmentV11.md) ### Authorization @@ -523,15 +529,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffChangeARequestStatus()` +## `listTimeOffPolicies()` ```php -timeOffChangeARequestStatus($request_id, $request) +listTimeOffPolicies($accept_header_parameter): \BhrSdk\Model\TimeOffPolicy[] ``` -Update Time Off Request Status +List Time Off Policies -This endpoint allows you to change the status of a request in the system. You can use this to approve, deny, or cancel a time off request. +Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. ### Example @@ -552,13 +558,13 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$request_id = 'request_id_example'; // string -$request = new \BhrSdk\Model\Request(); // \BhrSdk\Model\Request +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. try { - $apiInstance->timeOffChangeARequestStatus($request_id, $request); + $result = $apiInstance->listTimeOffPolicies($accept_header_parameter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffChangeARequestStatus: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listTimeOffPolicies: ', $e->getMessage(), PHP_EOL; } ``` @@ -566,12 +572,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **request_id** | **string**| | | -| **request** | [**\BhrSdk\Model\Request**](../Model/Request.md)| | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\TimeOffPolicy[]**](../Model/TimeOffPolicy.md) ### Authorization @@ -586,15 +591,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffEstimateFutureTimeOffBalances()` +## `listTimeOffRequests()` ```php -timeOffEstimateFutureTimeOffBalances($end, $employee_id, $accept_header_parameter) +listTimeOffRequests($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note): \BhrSdk\Model\TimeOffRequest1[] ``` -Estimate Future Time Off Balances +List Time Off Requests -This endpoint will sum future time off accruals, scheduled time off, and carry-over events to produce estimates for the anticipated time off balance on a given date in the future. +Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. ### Example @@ -615,14 +620,21 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$end = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime -$employee_id = 'employee_id_example'; // string +$start = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. +$end = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$id = 56; // int | A particular request ID to limit the response to. +$action = 'view'; // string | Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. +$employee_id = 56; // int | A particular employee ID to limit the response to. +$type = 'type_example'; // string | A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. +$status = 'status_example'; // string | A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. +$exclude_note = 'exclude_note_example'; // string | When set to any truthy value, omits the `notes` object from each request in the response. try { - $apiInstance->timeOffEstimateFutureTimeOffBalances($end, $employee_id, $accept_header_parameter); + $result = $apiInstance->listTimeOffRequests($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffEstimateFutureTimeOffBalances: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listTimeOffRequests: ', $e->getMessage(), PHP_EOL; } ``` @@ -630,13 +642,19 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **end** | **\DateTime**| | | -| **employee_id** | **string**| | | +| **start** | **\DateTime**| The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. | | +| **end** | **\DateTime**| The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. | | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **id** | **int**| A particular request ID to limit the response to. | [optional] | +| **action** | **string**| Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. | [optional] [default to 'view'] | +| **employee_id** | **int**| A particular employee ID to limit the response to. | [optional] | +| **type** | **string**| A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. | [optional] | +| **status** | **string**| A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. | [optional] | +| **exclude_note** | **string**| When set to any truthy value, omits the `notes` object from each request in the response. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\TimeOffRequest1[]**](../Model/TimeOffRequest1.md) ### Authorization @@ -651,15 +669,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffGetTimeOffRequests()` +## `listTimeOffTypes()` ```php -timeOffGetTimeOffRequests($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status) +listTimeOffTypes($accept_header_parameter, $mode): \BhrSdk\Model\TimeOffTypesAndDefaultHours ``` -Get Time Off Requests +List Time Off Types -Retrieves a list of time off requests based on specified filters. This endpoint allows filtering by date range, status, employee, and time off type. It's useful for generating time off reports or displaying a calendar of time off events. +Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. ### Example @@ -680,19 +698,14 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$start = 'start_example'; // string | YYYY-MM-DD. Only show time off that occurs on/after the specified start date. -$end = 'end_example'; // string | YYYY-MM-DD. Only show time off that occurs on/before the specified end date. $accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. -$id = 56; // int | A particular request ID to limit the response to. -$action = 'action_example'; // string | Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. -$employee_id = 'employee_id_example'; // string | A particular employee ID to limit the response to. -$type = 'type_example'; // string | A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. -$status = 'status_example'; // string | A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". +$mode = 'mode_example'; // string | Set to `request` to limit the results to time off types the authenticated employee can request. try { - $apiInstance->timeOffGetTimeOffRequests($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status); + $result = $apiInstance->listTimeOffTypes($accept_header_parameter, $mode); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffGetTimeOffRequests: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listTimeOffTypes: ', $e->getMessage(), PHP_EOL; } ``` @@ -700,18 +713,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **start** | **string**| YYYY-MM-DD. Only show time off that occurs on/after the specified start date. | | -| **end** | **string**| YYYY-MM-DD. Only show time off that occurs on/before the specified end date. | | | **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | -| **id** | **int**| A particular request ID to limit the response to. | [optional] | -| **action** | **string**| Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. | [optional] | -| **employee_id** | **string**| A particular employee ID to limit the response to. | [optional] | -| **type** | **string**| A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. | [optional] | -| **status** | **string**| A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". | [optional] | +| **mode** | **string**| Set to `request` to limit the results to time off types the authenticated employee can request. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\TimeOffTypesAndDefaultHours**](../Model/TimeOffTypesAndDefaultHours.md) ### Authorization @@ -720,21 +727,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **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) -## `timeOffListTimeOffPoliciesForEmployee()` +## `listWhosOut()` ```php -timeOffListTimeOffPoliciesForEmployee($employee_id) +listWhosOut($accept_header_parameter, $start, $end, $filter): \BhrSdk\Model\WhosOutEntry[] ``` -Get Time Off Policies for Employee +List Who’s Out -Retrieves a list of time off policies assigned to a specific employee. This includes policy details such as name, type, and current balance. The response helps in displaying available time off options and balances to employees. +Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`. ### Example @@ -755,12 +762,16 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string +$accept_header_parameter = 'accept_header_parameter_example'; // string | This endpoint can produce either JSON or XML. +$start = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Start date in YYYY-MM-DD format. Defaults to today. +$end = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | End date in YYYY-MM-DD format. Defaults to 14 days after the start date. +$filter = 'filter_example'; // string | Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. try { - $apiInstance->timeOffListTimeOffPoliciesForEmployee($employee_id); + $result = $apiInstance->listWhosOut($accept_header_parameter, $start, $end, $filter); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffListTimeOffPoliciesForEmployee: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->listWhosOut: ', $e->getMessage(), PHP_EOL; } ``` @@ -768,11 +779,14 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| | | +| **accept_header_parameter** | **string**| This endpoint can produce either JSON or XML. | [optional] | +| **start** | **\DateTime**| Start date in YYYY-MM-DD format. Defaults to today. | [optional] | +| **end** | **\DateTime**| End date in YYYY-MM-DD format. Defaults to 14 days after the start date. | [optional] | +| **filter** | **string**| Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\WhosOutEntry[]**](../Model/WhosOutEntry.md) ### Authorization @@ -781,21 +795,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/json`, `application/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `timeOffListTimeOffPoliciesForEmployeeV11()` +## `updateTimeOffRequestStatus()` ```php -timeOffListTimeOffPoliciesForEmployeeV11($employee_id) +updateTimeOffRequestStatus($request_id, $request) ``` -Get Time Off Policies for Employee v1.1 +Update Time Off Request Status -Version 1.1 of the endpoint that retrieves time off policies for a specific employee. This version includes additional policy details and enhanced filtering capabilities compared to v1. It provides comprehensive information about each policy including accrual rates, carryover rules, and policy-specific settings. +Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. ### Example @@ -816,12 +830,13 @@ $apiInstance = new BhrSdk\Api\TimeOffApi( new GuzzleHttp\Client(), $config ); -$employee_id = 'employee_id_example'; // string +$request_id = 56; // int | The ID of the time off request to update. +$request = new \BhrSdk\Model\Request(); // \BhrSdk\Model\Request try { - $apiInstance->timeOffListTimeOffPoliciesForEmployeeV11($employee_id); + $apiInstance->updateTimeOffRequestStatus($request_id, $request); } catch (Exception $e) { - echo 'Exception when calling TimeOffApi->timeOffListTimeOffPoliciesForEmployeeV11: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeOffApi->updateTimeOffRequestStatus: ', $e->getMessage(), PHP_EOL; } ``` @@ -829,7 +844,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **string**| | | +| **request_id** | **int**| The ID of the time off request to update. | | +| **request** | [**\BhrSdk\Model\Request**](../Model/Request.md)| | | ### Return type @@ -841,7 +857,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json` +- **Content-Type**: `application/json`, `application/xml` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TimeTrackingApi.md b/docs/Api/TimeTrackingApi.md index 618c7932..973248e1 100644 --- a/docs/Api/TimeTrackingApi.md +++ b/docs/Api/TimeTrackingApi.md @@ -4,25 +4,244 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addEditTimesheetClockEntries()**](TimeTrackingApi.md#addEditTimesheetClockEntries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries | -| [**addEditTimesheetHourEntries()**](TimeTrackingApi.md#addEditTimesheetHourEntries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries | -| [**addTimesheetClockInEntry()**](TimeTrackingApi.md#addTimesheetClockInEntry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry | -| [**addTimesheetClockOutEntry()**](TimeTrackingApi.md#addTimesheetClockOutEntry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry | +| [**assignEmployeesToBreakPolicy()**](TimeTrackingApi.md#assignEmployeesToBreakPolicy) | **POST** /api/v1/time-tracking/break-policies/{id}/assign | Assign Employees to Break Policy | +| [**createBreak()**](TimeTrackingApi.md#createBreak) | **POST** /api/v1/time-tracking/break-policies/{id}/breaks | Create Break | +| [**createBreakPolicy()**](TimeTrackingApi.md#createBreakPolicy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy | +| [**createOrUpdateTimesheetClockEntries()**](TimeTrackingApi.md#createOrUpdateTimesheetClockEntries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries | +| [**createOrUpdateTimesheetHourEntries()**](TimeTrackingApi.md#createOrUpdateTimesheetHourEntries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries | +| [**createProject()**](TimeTrackingApi.md#createProject) | **POST** /api/v1/time-tracking/projects | Create Time Tracking Project | +| [**createProjectTask()**](TimeTrackingApi.md#createProjectTask) | **POST** /api/v1/time-tracking/projects/{projectId}/tasks | Create Time Tracking Project Task | | [**createTimeTrackingProject()**](TimeTrackingApi.md#createTimeTrackingProject) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project | +| [**createTimesheetClockInEntry()**](TimeTrackingApi.md#createTimesheetClockInEntry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry | +| [**createTimesheetClockOutEntry()**](TimeTrackingApi.md#createTimesheetClockOutEntry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry | +| [**deleteBreak()**](TimeTrackingApi.md#deleteBreak) | **DELETE** /api/v1/time-tracking/breaks/{id} | Delete Break | +| [**deleteBreakPolicy()**](TimeTrackingApi.md#deleteBreakPolicy) | **DELETE** /api/v1/time-tracking/break-policies/{id} | Delete Break Policy | +| [**deleteProject()**](TimeTrackingApi.md#deleteProject) | **DELETE** /api/v1/time-tracking/projects/{id} | Delete Time Tracking Project | +| [**deleteTask()**](TimeTrackingApi.md#deleteTask) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task | | [**deleteTimesheetClockEntriesViaPost()**](TimeTrackingApi.md#deleteTimesheetClockEntriesViaPost) | **POST** /api/v1/time_tracking/clock_entries/delete | Delete Timesheet Clock Entries | | [**deleteTimesheetHourEntriesViaPost()**](TimeTrackingApi.md#deleteTimesheetHourEntriesViaPost) | **POST** /api/v1/time_tracking/hour_entries/delete | Delete Timesheet Hour Entries | -| [**getTimesheetEntries()**](TimeTrackingApi.md#getTimesheetEntries) | **GET** /api/v1/time_tracking/timesheet_entries | Get Timesheet Entries | +| [**getBreak()**](TimeTrackingApi.md#getBreak) | **GET** /api/v1/time-tracking/breaks/{id} | Get Break | +| [**getBreakPolicy()**](TimeTrackingApi.md#getBreakPolicy) | **GET** /api/v1/time-tracking/break-policies/{id} | Get Break Policy | +| [**getBreakPolicySuggestions()**](TimeTrackingApi.md#getBreakPolicySuggestions) | **POST** /api/v1/time-tracking/break-policies/suggestions | Get Break Policy Suggestions | +| [**getProject()**](TimeTrackingApi.md#getProject) | **GET** /api/v1/time-tracking/projects/{projectId} | Get Time Tracking Project | +| [**getTask()**](TimeTrackingApi.md#getTask) | **GET** /api/v1/time-tracking/tasks/{id} | Get Time Tracking Task | +| [**listBreakAssessments()**](TimeTrackingApi.md#listBreakAssessments) | **GET** /api/v1/time-tracking/break-assessments | List Break Assessments | +| [**listBreakPolicies()**](TimeTrackingApi.md#listBreakPolicies) | **GET** /api/v1/time-tracking/break-policies | List Break Policies | +| [**listBreakPolicyBreaks()**](TimeTrackingApi.md#listBreakPolicyBreaks) | **GET** /api/v1/time-tracking/break-policies/{id}/breaks | List Breaks for Break Policy | +| [**listBreakPolicyEmployees()**](TimeTrackingApi.md#listBreakPolicyEmployees) | **GET** /api/v1/time-tracking/break-policies/{id}/employees | List Break Policy Employees | +| [**listEmployeeBreakAvailabilities()**](TimeTrackingApi.md#listEmployeeBreakAvailabilities) | **GET** /api/v1/time-tracking/employees/{id}/break-availabilities | List Employee Break Availabilities | +| [**listEmployeeBreakPolicies()**](TimeTrackingApi.md#listEmployeeBreakPolicies) | **GET** /api/v1/time-tracking/employees/{id}/break-policies | List Employee Break Policies | +| [**listProjectTasks()**](TimeTrackingApi.md#listProjectTasks) | **GET** /api/v1/time-tracking/projects/{projectId}/tasks | List Time Tracking Project Tasks | +| [**listProjects()**](TimeTrackingApi.md#listProjects) | **GET** /api/v1/time-tracking/projects | List Time Tracking Projects | +| [**listTimesheetEntries()**](TimeTrackingApi.md#listTimesheetEntries) | **GET** /api/v1/time_tracking/timesheet_entries | List Timesheet Entries | +| [**replaceBreaksForBreakPolicy()**](TimeTrackingApi.md#replaceBreaksForBreakPolicy) | **PUT** /api/v1/time-tracking/break-policies/{id}/breaks | Replace Breaks for Break Policy | +| [**setBreakPolicyEmployees()**](TimeTrackingApi.md#setBreakPolicyEmployees) | **PUT** /api/v1/time-tracking/break-policies/{id}/assign | Set Employees for Break Policy | +| [**syncBreakPolicy()**](TimeTrackingApi.md#syncBreakPolicy) | **PUT** /api/v1/time-tracking/break-policies/{id}/sync | Sync Break Policy | +| [**unassignEmployeesFromBreakPolicy()**](TimeTrackingApi.md#unassignEmployeesFromBreakPolicy) | **POST** /api/v1/time-tracking/break-policies/{id}/unassign | Unassign Employees from Break Policy | +| [**updateBreak()**](TimeTrackingApi.md#updateBreak) | **PATCH** /api/v1/time-tracking/breaks/{id} | Update Break | +| [**updateBreakPolicy()**](TimeTrackingApi.md#updateBreakPolicy) | **PATCH** /api/v1/time-tracking/break-policies/{id} | Update Break Policy | +| [**updateProject()**](TimeTrackingApi.md#updateProject) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project | +| [**updateTask()**](TimeTrackingApi.md#updateTask) | **PATCH** /api/v1/time-tracking/tasks/{id} | Update Time Tracking Task | + + +## `assignEmployeesToBreakPolicy()` +```php +assignEmployeesToBreakPolicy($id, $assign_employees_to_break_policy_request) +``` + +Assign Employees to Break Policy + +Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$assign_employees_to_break_policy_request = new \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest(); // \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest + +try { + $apiInstance->assignEmployeesToBreakPolicy($id, $assign_employees_to_break_policy_request); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->assignEmployeesToBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **assign_employees_to_break_policy_request** | [**\BhrSdk\Model\AssignEmployeesToBreakPolicyRequest**](../Model/AssignEmployeesToBreakPolicyRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `createBreak()` + +```php +createBreak($id, $time_tracking_create_time_tracking_break_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1 +``` + +Create Break + +Creates a new break and associates it with the specified break policy. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$time_tracking_create_time_tracking_break_v1 = new \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1(); // \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 + +try { + $result = $apiInstance->createBreak($id, $time_tracking_create_time_tracking_break_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->createBreak: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **time_tracking_create_time_tracking_break_v1** | [**\BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1**](../Model/TimeTrackingCreateTimeTrackingBreakV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1**](../Model/TimeTrackingTimeTrackingBreakV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `createBreakPolicy()` + +```php +createBreakPolicy($time_tracking_create_time_tracking_break_policy_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 +``` + +Create Break Policy + +Create a break policy. Breaks and assignments can be optionally included and created at the same time. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$time_tracking_create_time_tracking_break_policy_v1 = new \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1(); // \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 + +try { + $result = $apiInstance->createBreakPolicy($time_tracking_create_time_tracking_break_policy_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->createBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **time_tracking_create_time_tracking_break_policy_v1** | [**\BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1**](../Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1**](../Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md) -## `addEditTimesheetClockEntries()` +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `createOrUpdateTimesheetClockEntries()` ```php -addEditTimesheetClockEntries($clock_entries_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer[] +createOrUpdateTimesheetClockEntries($clock_entries_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer[] ``` Create or Update Timesheet Clock Entries -Add or edit timesheet clock entries. +Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. ### Example @@ -46,10 +265,10 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( $clock_entries_schema = new \BhrSdk\Model\ClockEntriesSchema(); // \BhrSdk\Model\ClockEntriesSchema try { - $result = $apiInstance->addEditTimesheetClockEntries($clock_entries_schema); + $result = $apiInstance->createOrUpdateTimesheetClockEntries($clock_entries_schema); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->addEditTimesheetClockEntries: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createOrUpdateTimesheetClockEntries: ', $e->getMessage(), PHP_EOL; } ``` @@ -57,7 +276,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **clock_entries_schema** | [**\BhrSdk\Model\ClockEntriesSchema**](../Model/ClockEntriesSchema.md)| | [optional] | +| **clock_entries_schema** | [**\BhrSdk\Model\ClockEntriesSchema**](../Model/ClockEntriesSchema.md)| | | ### Return type @@ -76,15 +295,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `addEditTimesheetHourEntries()` +## `createOrUpdateTimesheetHourEntries()` ```php -addEditTimesheetHourEntries($hour_entries_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer[] +createOrUpdateTimesheetHourEntries($hour_entries_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer[] ``` Create or Update Timesheet Hour Entries -Add or edit timesheet hour entries. +Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. ### Example @@ -108,10 +327,10 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( $hour_entries_request_schema = new \BhrSdk\Model\HourEntriesRequestSchema(); // \BhrSdk\Model\HourEntriesRequestSchema try { - $result = $apiInstance->addEditTimesheetHourEntries($hour_entries_request_schema); + $result = $apiInstance->createOrUpdateTimesheetHourEntries($hour_entries_request_schema); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->addEditTimesheetHourEntries: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createOrUpdateTimesheetHourEntries: ', $e->getMessage(), PHP_EOL; } ``` @@ -119,7 +338,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **hour_entries_request_schema** | [**\BhrSdk\Model\HourEntriesRequestSchema**](../Model/HourEntriesRequestSchema.md)| | [optional] | +| **hour_entries_request_schema** | [**\BhrSdk\Model\HourEntriesRequestSchema**](../Model/HourEntriesRequestSchema.md)| | | ### Return type @@ -138,15 +357,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `addTimesheetClockInEntry()` +## `createProject()` ```php -addTimesheetClockInEntry($employee_id, $clock_in_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer +createProject($project_create_time_tracking_project_v1): \BhrSdk\Model\ProjectTimeTrackingProjectV1 ``` -Create Timesheet Clock-In Entry +Create Time Tracking Project -Clock in an employee. +Creates a new time tracking project. Returns the newly created project resource on success. ### Example @@ -167,14 +386,13 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( new GuzzleHttp\Client(), $config ); -$employee_id = 56; // int | ID of the employee to clock in. -$clock_in_request_schema = new \BhrSdk\Model\ClockInRequestSchema(); // \BhrSdk\Model\ClockInRequestSchema +$project_create_time_tracking_project_v1 = new \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1(); // \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 try { - $result = $apiInstance->addTimesheetClockInEntry($employee_id, $clock_in_request_schema); + $result = $apiInstance->createProject($project_create_time_tracking_project_v1); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->addTimesheetClockInEntry: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createProject: ', $e->getMessage(), PHP_EOL; } ``` @@ -182,12 +400,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| ID of the employee to clock in. | | -| **clock_in_request_schema** | [**\BhrSdk\Model\ClockInRequestSchema**](../Model/ClockInRequestSchema.md)| | [optional] | +| **project_create_time_tracking_project_v1** | [**\BhrSdk\Model\ProjectCreateTimeTrackingProjectV1**](../Model/ProjectCreateTimeTrackingProjectV1.md)| | | ### Return type -[**\BhrSdk\Model\TimesheetEntryInfoApiTransformer**](../Model/TimesheetEntryInfoApiTransformer.md) +[**\BhrSdk\Model\ProjectTimeTrackingProjectV1**](../Model/ProjectTimeTrackingProjectV1.md) ### Authorization @@ -202,15 +419,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `addTimesheetClockOutEntry()` +## `createProjectTask()` ```php -addTimesheetClockOutEntry($employee_id, $clock_out_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer +createProjectTask($project_id, $project_create_time_tracking_project_task_v1): \BhrSdk\Model\ProjectTimeTrackingTaskV1 ``` -Create Timesheet Clock-Out Entry +Create Time Tracking Project Task -Clock out an employee. +Creates a new task on the specified time tracking project. ### Example @@ -231,14 +448,14 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( new GuzzleHttp\Client(), $config ); -$employee_id = 56; // int | ID of the employee to clock out. -$clock_out_request_schema = new \BhrSdk\Model\ClockOutRequestSchema(); // \BhrSdk\Model\ClockOutRequestSchema +$project_id = 'project_id_example'; // string | The project ID. +$project_create_time_tracking_project_task_v1 = new \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1(); // \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 try { - $result = $apiInstance->addTimesheetClockOutEntry($employee_id, $clock_out_request_schema); + $result = $apiInstance->createProjectTask($project_id, $project_create_time_tracking_project_task_v1); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->addTimesheetClockOutEntry: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createProjectTask: ', $e->getMessage(), PHP_EOL; } ``` @@ -246,12 +463,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| ID of the employee to clock out. | | -| **clock_out_request_schema** | [**\BhrSdk\Model\ClockOutRequestSchema**](../Model/ClockOutRequestSchema.md)| | [optional] | +| **project_id** | **string**| The project ID. | | +| **project_create_time_tracking_project_task_v1** | [**\BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1**](../Model/ProjectCreateTimeTrackingProjectTaskV1.md)| | | ### Return type -[**\BhrSdk\Model\TimesheetEntryInfoApiTransformer**](../Model/TimesheetEntryInfoApiTransformer.md) +[**\BhrSdk\Model\ProjectTimeTrackingTaskV1**](../Model/ProjectTimeTrackingTaskV1.md) ### Authorization @@ -274,7 +491,7 @@ createTimeTrackingProject($project_create_request_schema): \BhrSdk\Model\TimeTra Create Time Tracking Project -Create a time tracking project with optional tasks. +Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access. By default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees. ### Example @@ -309,7 +526,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **project_create_request_schema** | [**\BhrSdk\Model\ProjectCreateRequestSchema**](../Model/ProjectCreateRequestSchema.md)| | [optional] | +| **project_create_request_schema** | [**\BhrSdk\Model\ProjectCreateRequestSchema**](../Model/ProjectCreateRequestSchema.md)| | | ### Return type @@ -328,15 +545,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `deleteTimesheetClockEntriesViaPost()` +## `createTimesheetClockInEntry()` ```php -deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema) +createTimesheetClockInEntry($employee_id, $clock_in_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer ``` -Delete Timesheet Clock Entries +Create Timesheet Clock-In Entry -Delete timesheet clock entries. +Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. ### Example @@ -357,12 +574,14 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( new GuzzleHttp\Client(), $config ); -$clock_entry_ids_schema = new \BhrSdk\Model\ClockEntryIdsSchema(); // \BhrSdk\Model\ClockEntryIdsSchema +$employee_id = 56; // int | ID of the employee to clock in. +$clock_in_request_schema = new \BhrSdk\Model\ClockInRequestSchema(); // \BhrSdk\Model\ClockInRequestSchema try { - $apiInstance->deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema); + $result = $apiInstance->createTimesheetClockInEntry($employee_id, $clock_in_request_schema); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->deleteTimesheetClockEntriesViaPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createTimesheetClockInEntry: ', $e->getMessage(), PHP_EOL; } ``` @@ -370,11 +589,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **clock_entry_ids_schema** | [**\BhrSdk\Model\ClockEntryIdsSchema**](../Model/ClockEntryIdsSchema.md)| | | +| **employee_id** | **int**| ID of the employee to clock in. | | +| **clock_in_request_schema** | [**\BhrSdk\Model\ClockInRequestSchema**](../Model/ClockInRequestSchema.md)| | [optional] | ### Return type -void (empty response body) +[**\BhrSdk\Model\TimesheetEntryInfoApiTransformer**](../Model/TimesheetEntryInfoApiTransformer.md) ### Authorization @@ -389,15 +609,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `deleteTimesheetHourEntriesViaPost()` +## `createTimesheetClockOutEntry()` ```php -deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema) +createTimesheetClockOutEntry($employee_id, $clock_out_request_schema): \BhrSdk\Model\TimesheetEntryInfoApiTransformer ``` -Delete Timesheet Hour Entries +Create Timesheet Clock-Out Entry -Delete timesheet hour entries. +Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. ### Example @@ -418,12 +638,76 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( new GuzzleHttp\Client(), $config ); -$hour_entry_ids_schema = new \BhrSdk\Model\HourEntryIdsSchema(); // \BhrSdk\Model\HourEntryIdsSchema +$employee_id = 56; // int | ID of the employee to clock out. +$clock_out_request_schema = new \BhrSdk\Model\ClockOutRequestSchema(); // \BhrSdk\Model\ClockOutRequestSchema try { - $apiInstance->deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema); + $result = $apiInstance->createTimesheetClockOutEntry($employee_id, $clock_out_request_schema); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->deleteTimesheetHourEntriesViaPost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->createTimesheetClockOutEntry: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **int**| ID of the employee to clock out. | | +| **clock_out_request_schema** | [**\BhrSdk\Model\ClockOutRequestSchema**](../Model/ClockOutRequestSchema.md)| | [optional] | + +### Return type + +[**\BhrSdk\Model\TimesheetEntryInfoApiTransformer**](../Model/TimesheetEntryInfoApiTransformer.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `deleteBreak()` + +```php +deleteBreak($id) +``` + +Delete Break + +Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break ID. + +try { + $apiInstance->deleteBreak($id); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->deleteBreak: ', $e->getMessage(), PHP_EOL; } ``` @@ -431,7 +715,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **hour_entry_ids_schema** | [**\BhrSdk\Model\HourEntryIdsSchema**](../Model/HourEntryIdsSchema.md)| | [optional] | +| **id** | **string**| The break ID. | | ### Return type @@ -450,15 +734,15 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getTimesheetEntries()` +## `deleteBreakPolicy()` ```php -getTimesheetEntries($start, $end, $employee_ids): \BhrSdk\Model\EmployeeTimesheetEntryTransformer[] +deleteBreakPolicy($id) ``` -Get Timesheet Entries +Delete Break Policy -Get all timesheet entries for a given period of time. +Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. ### Example @@ -479,15 +763,12 @@ $apiInstance = new BhrSdk\Api\TimeTrackingApi( new GuzzleHttp\Client(), $config ); -$start = 2025-01-01; // \DateTime | YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. -$end = 2025-03-01; // \DateTime | YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. -$employee_ids = 1,2,3; // string | A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. +$id = 'id_example'; // string | The break policy ID. try { - $result = $apiInstance->getTimesheetEntries($start, $end, $employee_ids); - print_r($result); + $apiInstance->deleteBreakPolicy($id); } catch (Exception $e) { - echo 'Exception when calling TimeTrackingApi->getTimesheetEntries: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TimeTrackingApi->deleteBreakPolicy: ', $e->getMessage(), PHP_EOL; } ``` @@ -495,13 +776,1677 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **start** | **\DateTime**| YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. | | -| **end** | **\DateTime**| YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. | | -| **employee_ids** | **string**| A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. | [optional] | +| **id** | **string**| The break policy ID. | | ### Return type -[**\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]**](../Model/EmployeeTimesheetEntryTransformer.md) +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `deleteProject()` + +```php +deleteProject($id) +``` + +Delete Time Tracking Project + +Deletes a time tracking project by its ID. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The project ID. + +try { + $apiInstance->deleteProject($id); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->deleteProject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The project ID. | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `deleteTask()` + +```php +deleteTask($id) +``` + +Delete Time Tracking Task + +Deletes a time tracking task by its ID. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The task ID. + +try { + $apiInstance->deleteTask($id); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->deleteTask: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The task ID. | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `deleteTimesheetClockEntriesViaPost()` + +```php +deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema) +``` + +Delete Timesheet Clock Entries + +Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$clock_entry_ids_schema = new \BhrSdk\Model\ClockEntryIdsSchema(); // \BhrSdk\Model\ClockEntryIdsSchema + +try { + $apiInstance->deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->deleteTimesheetClockEntriesViaPost: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **clock_entry_ids_schema** | [**\BhrSdk\Model\ClockEntryIdsSchema**](../Model/ClockEntryIdsSchema.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `deleteTimesheetHourEntriesViaPost()` + +```php +deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema) +``` + +Delete Timesheet Hour Entries + +Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$hour_entry_ids_schema = new \BhrSdk\Model\HourEntryIdsSchema(); // \BhrSdk\Model\HourEntryIdsSchema + +try { + $apiInstance->deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->deleteTimesheetHourEntriesViaPost: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **hour_entry_ids_schema** | [**\BhrSdk\Model\HourEntryIdsSchema**](../Model/HourEntryIdsSchema.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getBreak()` + +```php +getBreak($id): \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1 +``` + +Get Break + +Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break ID. + +try { + $result = $apiInstance->getBreak($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->getBreak: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break ID. | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1**](../Model/TimeTrackingTimeTrackingBreakV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getBreakPolicy()` + +```php +getBreakPolicy($id, $include_counts): \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1 +``` + +Get Break Policy + +Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$include_counts = false; // bool | Include employee and break counts + +try { + $result = $apiInstance->getBreakPolicy($id, $include_counts); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->getBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **include_counts** | **bool**| Include employee and break counts | [optional] [default to false] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1**](../Model/TimeTrackingTimeTrackingBreakPolicyV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getBreakPolicySuggestions()` + +```php +getBreakPolicySuggestions($get_break_policy_suggestions_request): \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1 +``` + +Get Break Policy Suggestions + +Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$get_break_policy_suggestions_request = new \BhrSdk\Model\GetBreakPolicySuggestionsRequest(); // \BhrSdk\Model\GetBreakPolicySuggestionsRequest + +try { + $result = $apiInstance->getBreakPolicySuggestions($get_break_policy_suggestions_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->getBreakPolicySuggestions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **get_break_policy_suggestions_request** | [**\BhrSdk\Model\GetBreakPolicySuggestionsRequest**](../Model/GetBreakPolicySuggestionsRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1**](../Model/TimeTrackingBreakPolicySuggestionsResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getProject()` + +```php +getProject($project_id): \BhrSdk\Model\ProjectTimeTrackingProjectV1 +``` + +Get Time Tracking Project + +Retrieves a single time tracking project by its ID, including the list of employees assigned to it. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$project_id = 56; // int | The project ID. + +try { + $result = $apiInstance->getProject($project_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->getProject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **project_id** | **int**| The project ID. | | + +### Return type + +[**\BhrSdk\Model\ProjectTimeTrackingProjectV1**](../Model/ProjectTimeTrackingProjectV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `getTask()` + +```php +getTask($id): \BhrSdk\Model\ProjectTimeTrackingTaskV1 +``` + +Get Time Tracking Task + +Retrieves a single time tracking task by its ID. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The task ID. + +try { + $result = $apiInstance->getTask($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->getTask: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The task ID. | | + +### Return type + +[**\BhrSdk\Model\ProjectTimeTrackingTaskV1**](../Model/ProjectTimeTrackingTaskV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listBreakAssessments()` + +```php +listBreakAssessments($offset, $limit, $filter): \BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1 +``` + +List Break Assessments + +Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$offset = 0; // int | Number of items to skip before returning results. Defaults to 0. +$limit = 100; // int | Maximum number of items to return. Defaults to 100. Maximum is 500. +$filter = ''; // string | OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. + +try { + $result = $apiInstance->listBreakAssessments($offset, $limit, $filter); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listBreakAssessments: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **offset** | **int**| Number of items to skip before returning results. Defaults to 0. | [optional] [default to 0] | +| **limit** | **int**| Maximum number of items to return. Defaults to 100. Maximum is 500. | [optional] [default to 100] | +| **filter** | **string**| OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. | [optional] [default to ''] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1**](../Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listBreakPolicies()` + +```php +listBreakPolicies($offset, $limit, $filter, $include_counts): \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1 +``` + +List Break Policies + +Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$offset = 0; // int | The offset of items to retrieve +$limit = 100; // int | The maximum items to retrieve +$filter = ''; // string | OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. +$include_counts = false; // bool | Include employee and break counts + +try { + $result = $apiInstance->listBreakPolicies($offset, $limit, $filter, $include_counts); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listBreakPolicies: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **offset** | **int**| The offset of items to retrieve | [optional] [default to 0] | +| **limit** | **int**| The maximum items to retrieve | [optional] [default to 100] | +| **filter** | **string**| OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. | [optional] [default to ''] | +| **include_counts** | **bool**| Include employee and break counts | [optional] [default to false] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1**](../Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listBreakPolicyBreaks()` + +```php +listBreakPolicyBreaks($id, $offset, $limit, $filter): \BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1 +``` + +List Breaks for Break Policy + +Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$offset = 0; // int | The offset of items to retrieve +$limit = 100; // int | The maximum items to retrieve +$filter = ''; // string | OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. + +try { + $result = $apiInstance->listBreakPolicyBreaks($id, $offset, $limit, $filter); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listBreakPolicyBreaks: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **offset** | **int**| The offset of items to retrieve | [optional] [default to 0] | +| **limit** | **int**| The maximum items to retrieve | [optional] [default to 100] | +| **filter** | **string**| OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. | [optional] [default to ''] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1**](../Model/TimeTrackingPaginatedBreaksResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listBreakPolicyEmployees()` + +```php +listBreakPolicyEmployees($id, $offset, $limit): \BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 +``` + +List Break Policy Employees + +Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$offset = 0; // int | The offset of items to retrieve +$limit = 100; // int | The maximum items to retrieve + +try { + $result = $apiInstance->listBreakPolicyEmployees($id, $offset, $limit); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listBreakPolicyEmployees: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **offset** | **int**| The offset of items to retrieve | [optional] [default to 0] | +| **limit** | **int**| The maximum items to retrieve | [optional] [default to 100] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1**](../Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listEmployeeBreakAvailabilities()` + +```php +listEmployeeBreakAvailabilities($id, $effective): \BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[] +``` + +List Employee Break Availabilities + +Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The employee ID. +$effective = 2025-12-15T14:30:00; // string | The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). + +try { + $result = $apiInstance->listEmployeeBreakAvailabilities($id, $effective); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listEmployeeBreakAvailabilities: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The employee ID. | | +| **effective** | **string**| The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). | [optional] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]**](../Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listEmployeeBreakPolicies()` + +```php +listEmployeeBreakPolicies($id, $offset, $limit): \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1 +``` + +List Employee Break Policies + +Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The employee ID. +$offset = 0; // int | The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. +$limit = 100; // int | The maximum number of items to return. Must be between 0 and 500. Defaults to 100. + +try { + $result = $apiInstance->listEmployeeBreakPolicies($id, $offset, $limit); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listEmployeeBreakPolicies: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The employee ID. | | +| **offset** | **int**| The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. | [optional] [default to 0] | +| **limit** | **int**| The maximum number of items to return. Must be between 0 and 500. Defaults to 100. | [optional] [default to 100] | + +### Return type + +[**\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1**](../Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listProjectTasks()` + +```php +listProjectTasks($project_id, $statuses, $page, $page_size): \BhrSdk\Model\ProjectPaginatedTasksResponseV1 +``` + +List Time Tracking Project Tasks + +Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$project_id = 56; // int | The project ID. +$statuses = array('statuses_example'); // string[] | Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. +$page = 1; // int | The page number to retrieve (1-indexed). +$page_size = 25; // int | The maximum number of items per page. + +try { + $result = $apiInstance->listProjectTasks($project_id, $statuses, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listProjectTasks: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **project_id** | **int**| The project ID. | | +| **statuses** | [**string[]**](../Model/string.md)| Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. | [optional] | +| **page** | **int**| The page number to retrieve (1-indexed). | [optional] [default to 1] | +| **page_size** | **int**| The maximum number of items per page. | [optional] [default to 25] | + +### Return type + +[**\BhrSdk\Model\ProjectPaginatedTasksResponseV1**](../Model/ProjectPaginatedTasksResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listProjects()` + +```php +listProjects($filter, $sort, $page, $page_size): \BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1 +``` + +List Time Tracking Projects + +Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500). + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$filter = 'filter_example'; // string | OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. +$sort = 'sort_example'; // string | Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. +$page = 1; // int | The starting page for pagination. Defaults to 1. +$page_size = 100; // int | The number of items per page. Defaults to 100, maximum 500. + +try { + $result = $apiInstance->listProjects($filter, $sort, $page, $page_size); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listProjects: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **filter** | **string**| OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. | [optional] | +| **sort** | **string**| Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. | [optional] | +| **page** | **int**| The starting page for pagination. Defaults to 1. | [optional] [default to 1] | +| **page_size** | **int**| The number of items per page. Defaults to 100, maximum 500. | [optional] [default to 100] | + +### Return type + +[**\BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1**](../Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `listTimesheetEntries()` + +```php +listTimesheetEntries($start, $end, $employee_ids): \BhrSdk\Model\EmployeeTimesheetEntryTransformer[] +``` + +List Timesheet Entries + +Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 +); +$start = 2025-01-01; // \DateTime | YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. +$end = 2025-03-01; // \DateTime | YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. +$employee_ids = 1,2,3; // string | A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. + +try { + $result = $apiInstance->listTimesheetEntries($start, $end, $employee_ids); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->listTimesheetEntries: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **start** | **\DateTime**| YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. | | +| **end** | **\DateTime**| YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. | | +| **employee_ids** | **string**| A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. | [optional] | + +### Return type + +[**\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]**](../Model/EmployeeTimesheetEntryTransformer.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `replaceBreaksForBreakPolicy()` + +```php +replaceBreaksForBreakPolicy($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[] +``` + +Replace Breaks for Break Policy + +Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$time_tracking_create_or_update_time_tracking_break_without_policy_v1 = array(new \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1()); // \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] + +try { + $result = $apiInstance->replaceBreaksForBreakPolicy($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->replaceBreaksForBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **time_tracking_create_or_update_time_tracking_break_without_policy_v1** | [**\BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]**](../Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]**](../Model/TimeTrackingTimeTrackingBreakV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `setBreakPolicyEmployees()` + +```php +setBreakPolicyEmployees($id, $set_break_policy_employees_request) +``` + +Set Employees for Break Policy + +Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$set_break_policy_employees_request = new \BhrSdk\Model\SetBreakPolicyEmployeesRequest(); // \BhrSdk\Model\SetBreakPolicyEmployeesRequest + +try { + $apiInstance->setBreakPolicyEmployees($id, $set_break_policy_employees_request); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->setBreakPolicyEmployees: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **set_break_policy_employees_request** | [**\BhrSdk\Model\SetBreakPolicyEmployeesRequest**](../Model/SetBreakPolicyEmployeesRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `syncBreakPolicy()` + +```php +syncBreakPolicy($id, $time_tracking_sync_time_tracking_break_policy_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 +``` + +Sync Break Policy + +Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$time_tracking_sync_time_tracking_break_policy_v1 = new \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1(); // \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 + +try { + $result = $apiInstance->syncBreakPolicy($id, $time_tracking_sync_time_tracking_break_policy_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->syncBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **time_tracking_sync_time_tracking_break_policy_v1** | [**\BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1**](../Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1**](../Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `unassignEmployeesFromBreakPolicy()` + +```php +unassignEmployeesFromBreakPolicy($id, $unassign_employees_from_break_policy_request) +``` + +Unassign Employees from Break Policy + +Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$unassign_employees_from_break_policy_request = new \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest(); // \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest + +try { + $apiInstance->unassignEmployeesFromBreakPolicy($id, $unassign_employees_from_break_policy_request); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->unassignEmployeesFromBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **unassign_employees_from_break_policy_request** | [**\BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest**](../Model/UnassignEmployeesFromBreakPolicyRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateBreak()` + +```php +updateBreak($id, $time_tracking_update_time_tracking_break_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1 +``` + +Update Break + +Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break ID. +$time_tracking_update_time_tracking_break_v1 = new \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1(); // \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 + +try { + $result = $apiInstance->updateBreak($id, $time_tracking_update_time_tracking_break_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->updateBreak: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break ID. | | +| **time_tracking_update_time_tracking_break_v1** | [**\BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1**](../Model/TimeTrackingUpdateTimeTrackingBreakV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1**](../Model/TimeTrackingTimeTrackingBreakV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateBreakPolicy()` + +```php +updateBreakPolicy($id, $time_tracking_update_time_tracking_break_policy_v1): \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1 +``` + +Update Break Policy + +Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 break policy ID. +$time_tracking_update_time_tracking_break_policy_v1 = new \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1(); // \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 + +try { + $result = $apiInstance->updateBreakPolicy($id, $time_tracking_update_time_tracking_break_policy_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->updateBreakPolicy: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The break policy ID. | | +| **time_tracking_update_time_tracking_break_policy_v1** | [**\BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1**](../Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md)| | | + +### Return type + +[**\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1**](../Model/TimeTrackingTimeTrackingBreakPolicyV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateProject()` + +```php +updateProject($id, $project_update_time_tracking_project_v1): \BhrSdk\Model\ProjectTimeTrackingProjectV1 +``` + +Update Time Tracking Project + +Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The project ID. +$project_update_time_tracking_project_v1 = new \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1(); // \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 + +try { + $result = $apiInstance->updateProject($id, $project_update_time_tracking_project_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->updateProject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The project ID. | | +| **project_update_time_tracking_project_v1** | [**\BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1**](../Model/ProjectUpdateTimeTrackingProjectV1.md)| | | + +### Return type + +[**\BhrSdk\Model\ProjectTimeTrackingProjectV1**](../Model/ProjectTimeTrackingProjectV1.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `updateTask()` + +```php +updateTask($id, $project_update_time_tracking_project_task_v1): \BhrSdk\Model\ProjectTimeTrackingTaskV1 +``` + +Update Time Tracking Task + +Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TimeTrackingApi( + // 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 = 56; // int | The task ID. +$project_update_time_tracking_project_task_v1 = new \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1(); // \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 + +try { + $result = $apiInstance->updateTask($id, $project_update_time_tracking_project_task_v1); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TimeTrackingApi->updateTask: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **int**| The task ID. | | +| **project_update_time_tracking_project_task_v1** | [**\BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1**](../Model/ProjectUpdateTimeTrackingProjectTaskV1.md)| | | + +### Return type + +[**\BhrSdk\Model\ProjectTimeTrackingTaskV1**](../Model/ProjectTimeTrackingTaskV1.md) ### Authorization diff --git a/docs/Api/TotalRewardsApi.md b/docs/Api/TotalRewardsApi.md new file mode 100644 index 00000000..20733c03 --- /dev/null +++ b/docs/Api/TotalRewardsApi.md @@ -0,0 +1,508 @@ +# BhrSdk\TotalRewardsApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**addTotalRewardsEmployees()**](TotalRewardsApi.md#addTotalRewardsEmployees) | **POST** /api/v1/compensation/total_rewards/employees | Add Employees to Total Rewards | +| [**checkTotalRewardsProfile()**](TotalRewardsApi.md#checkTotalRewardsProfile) | **GET** /api/v1/compensation/total_rewards/{employeeId} | Check Total Rewards Profile Availability | +| [**getTotalRewardsPrintableStatement()**](TotalRewardsApi.md#getTotalRewardsPrintableStatement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/printable | Get Printable Total Rewards Statement | +| [**getTotalRewardsStatement()**](TotalRewardsApi.md#getTotalRewardsStatement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/statement | Get Total Rewards Statement | +| [**removeTotalRewardsCustomDisclaimer()**](TotalRewardsApi.md#removeTotalRewardsCustomDisclaimer) | **DELETE** /api/v1/compensation/total_rewards/custom_disclaimer | Remove Total Rewards Custom Disclaimer | +| [**removeTotalRewardsEmployees()**](TotalRewardsApi.md#removeTotalRewardsEmployees) | **DELETE** /api/v1/compensation/total_rewards/employees | Remove Employees from Total Rewards | +| [**setTotalRewardsCustomDisclaimer()**](TotalRewardsApi.md#setTotalRewardsCustomDisclaimer) | **PUT** /api/v1/compensation/total_rewards/custom_disclaimer | Set Total Rewards Custom Disclaimer | +| [**setTotalRewardsOnboardingStep()**](TotalRewardsApi.md#setTotalRewardsOnboardingStep) | **PUT** /api/v1/compensation/total_rewards/onboarding/{stepName} | Set Total Rewards Onboarding Step Status | + + +## `addTotalRewardsEmployees()` + +```php +addTotalRewardsEmployees($add_total_rewards_employees_request) +``` + +Add Employees to Total Rewards + +Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$add_total_rewards_employees_request = new \BhrSdk\Model\AddTotalRewardsEmployeesRequest(); // \BhrSdk\Model\AddTotalRewardsEmployeesRequest + +try { + $apiInstance->addTotalRewardsEmployees($add_total_rewards_employees_request); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->addTotalRewardsEmployees: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **add_total_rewards_employees_request** | [**\BhrSdk\Model\AddTotalRewardsEmployeesRequest**](../Model/AddTotalRewardsEmployeesRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `checkTotalRewardsProfile()` + +```php +checkTotalRewardsProfile($employee_id) +``` + +Check Total Rewards Profile Availability + +Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$employee_id = 'employee_id_example'; // string | The ID of the employee to check. + +try { + $apiInstance->checkTotalRewardsProfile($employee_id); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->checkTotalRewardsProfile: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **string**| The ID of the employee to check. | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getTotalRewardsPrintableStatement()` + +```php +getTotalRewardsPrintableStatement($employee_id, $multiplier, $year) +``` + +Get Printable Total Rewards Statement + +Generate and return a PDF printable version of the employee's Total Rewards statement. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$employee_id = 'employee_id_example'; // string | The ID of the employee. +$multiplier = 3.4; // float | Hours-per-week multiplier for annualizing hourly pay. +$year = 56; // int | Statement year. Defaults to the current year when omitted. + +try { + $apiInstance->getTotalRewardsPrintableStatement($employee_id, $multiplier, $year); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->getTotalRewardsPrintableStatement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **string**| The ID of the employee. | | +| **multiplier** | **float**| Hours-per-week multiplier for annualizing hourly pay. | [optional] | +| **year** | **int**| Statement year. Defaults to the current year when omitted. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/pdf`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getTotalRewardsStatement()` + +```php +getTotalRewardsStatement($employee_id): \BhrSdk\Model\TotalRewardsEmployeeStatement +``` + +Get Total Rewards Statement + +Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$employee_id = 'employee_id_example'; // string | The ID of the employee. + +try { + $result = $apiInstance->getTotalRewardsStatement($employee_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->getTotalRewardsStatement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_id** | **string**| The ID of the employee. | | + +### Return type + +[**\BhrSdk\Model\TotalRewardsEmployeeStatement**](../Model/TotalRewardsEmployeeStatement.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `removeTotalRewardsCustomDisclaimer()` + +```php +removeTotalRewardsCustomDisclaimer() +``` + +Remove Total Rewards Custom Disclaimer + +Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); + +try { + $apiInstance->removeTotalRewardsCustomDisclaimer(); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->removeTotalRewardsCustomDisclaimer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `removeTotalRewardsEmployees()` + +```php +removeTotalRewardsEmployees($remove_total_rewards_employees_request) +``` + +Remove Employees from Total Rewards + +Remove employees from Total Rewards. Their Total Rewards profiles will be deleted. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$remove_total_rewards_employees_request = new \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest(); // \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest + +try { + $apiInstance->removeTotalRewardsEmployees($remove_total_rewards_employees_request); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->removeTotalRewardsEmployees: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **remove_total_rewards_employees_request** | [**\BhrSdk\Model\RemoveTotalRewardsEmployeesRequest**](../Model/RemoveTotalRewardsEmployeesRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setTotalRewardsCustomDisclaimer()` + +```php +setTotalRewardsCustomDisclaimer($set_total_rewards_custom_disclaimer_request) +``` + +Set Total Rewards Custom Disclaimer + +Set the company-wide Total Rewards custom disclaimer text shown on employee statements. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$set_total_rewards_custom_disclaimer_request = new \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest(); // \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest + +try { + $apiInstance->setTotalRewardsCustomDisclaimer($set_total_rewards_custom_disclaimer_request); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->setTotalRewardsCustomDisclaimer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set_total_rewards_custom_disclaimer_request** | [**\BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest**](../Model/SetTotalRewardsCustomDisclaimerRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/problem+json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setTotalRewardsOnboardingStep()` + +```php +setTotalRewardsOnboardingStep($step_name, $set_total_rewards_onboarding_step_request): \BhrSdk\Model\TotalRewardsOnboardingStep +``` + +Set Total Rewards Onboarding Step Status + +Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\TotalRewardsApi( + // 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 +); +$step_name = 'step_name_example'; // string | Name of the onboarding step. +$set_total_rewards_onboarding_step_request = new \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest(); // \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest + +try { + $result = $apiInstance->setTotalRewardsOnboardingStep($step_name, $set_total_rewards_onboarding_step_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TotalRewardsApi->setTotalRewardsOnboardingStep: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **step_name** | **string**| Name of the onboarding step. | | +| **set_total_rewards_onboarding_step_request** | [**\BhrSdk\Model\SetTotalRewardsOnboardingStepRequest**](../Model/SetTotalRewardsOnboardingStepRequest.md)| | | + +### Return type + +[**\BhrSdk\Model\TotalRewardsOnboardingStep**](../Model/TotalRewardsOnboardingStep.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json`, `application/problem+json` + +[[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/TrainingApi.md b/docs/Api/TrainingApi.md index 710c41e0..9e6f9d35 100644 --- a/docs/Api/TrainingApi.md +++ b/docs/Api/TrainingApi.md @@ -4,29 +4,29 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**addNewEmployeeTrainingRecord()**](TrainingApi.md#addNewEmployeeTrainingRecord) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record | -| [**addTrainingCategory()**](TrainingApi.md#addTrainingCategory) | **POST** /api/v1/training/category | Create Training Category | -| [**addTrainingType()**](TrainingApi.md#addTrainingType) | **POST** /api/v1/training/type | Create Training Type | +| [**createEmployeeTrainingRecord()**](TrainingApi.md#createEmployeeTrainingRecord) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record | +| [**createTrainingCategory()**](TrainingApi.md#createTrainingCategory) | **POST** /api/v1/training/category | Create Training Category | +| [**createTrainingType()**](TrainingApi.md#createTrainingType) | **POST** /api/v1/training/type | Create Training Type | | [**deleteEmployeeTrainingRecord()**](TrainingApi.md#deleteEmployeeTrainingRecord) | **DELETE** /api/v1/training/record/{employeeTrainingRecordId} | Delete Employee Training Record | | [**deleteTrainingCategory()**](TrainingApi.md#deleteTrainingCategory) | **DELETE** /api/v1/training/category/{trainingCategoryId} | Delete Training Category | | [**deleteTrainingType()**](TrainingApi.md#deleteTrainingType) | **DELETE** /api/v1/training/type/{trainingTypeId} | Delete Training Type | -| [**listEmployeeTrainings()**](TrainingApi.md#listEmployeeTrainings) | **GET** /api/v1/training/record/employee/{employeeId} | Get Employee Trainings | -| [**listTrainingCategories()**](TrainingApi.md#listTrainingCategories) | **GET** /api/v1/training/category | Get Training Categories | -| [**listTrainingTypes()**](TrainingApi.md#listTrainingTypes) | **GET** /api/v1/training/type | Get Training Types | +| [**listEmployeeTrainings()**](TrainingApi.md#listEmployeeTrainings) | **GET** /api/v1/training/record/employee/{employeeId} | List Employee Training Records | +| [**listTrainingCategories()**](TrainingApi.md#listTrainingCategories) | **GET** /api/v1/training/category | List Training Categories | +| [**listTrainingTypes()**](TrainingApi.md#listTrainingTypes) | **GET** /api/v1/training/type | List Training Types | | [**updateEmployeeTrainingRecord()**](TrainingApi.md#updateEmployeeTrainingRecord) | **PUT** /api/v1/training/record/{employeeTrainingRecordId} | Update Employee Training Record | | [**updateTrainingCategory()**](TrainingApi.md#updateTrainingCategory) | **PUT** /api/v1/training/category/{trainingCategoryId} | Update Training Category | | [**updateTrainingType()**](TrainingApi.md#updateTrainingType) | **PUT** /api/v1/training/type/{trainingTypeId} | Update Training Type | -## `addNewEmployeeTrainingRecord()` +## `createEmployeeTrainingRecord()` ```php -addNewEmployeeTrainingRecord($employee_id, $add_new_employee_training_record_request): \BhrSdk\Model\TrainingRecord +createEmployeeTrainingRecord($employee_id, $create_employee_training_record_request): \BhrSdk\Model\TrainingRecord ``` Create Employee Training Record -Add a new employee training record. The owner of the API key used must have permission to add trainings for the selected employee. +Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee. ### Example @@ -47,14 +47,14 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$employee_id = 0; // int | The ID of the employee to add a training record to. -$add_new_employee_training_record_request = new \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest(); // \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest | Training object to post +$employee_id = 56; // int | The ID of the employee to add a training record to. +$create_employee_training_record_request = new \BhrSdk\Model\CreateEmployeeTrainingRecordRequest(); // \BhrSdk\Model\CreateEmployeeTrainingRecordRequest | Training object to post try { - $result = $apiInstance->addNewEmployeeTrainingRecord($employee_id, $add_new_employee_training_record_request); + $result = $apiInstance->createEmployeeTrainingRecord($employee_id, $create_employee_training_record_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TrainingApi->addNewEmployeeTrainingRecord: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TrainingApi->createEmployeeTrainingRecord: ', $e->getMessage(), PHP_EOL; } ``` @@ -62,8 +62,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| The ID of the employee to add a training record to. | [default to 0] | -| **add_new_employee_training_record_request** | [**\BhrSdk\Model\AddNewEmployeeTrainingRecordRequest**](../Model/AddNewEmployeeTrainingRecordRequest.md)| Training object to post | | +| **employee_id** | **int**| The ID of the employee to add a training record to. | | +| **create_employee_training_record_request** | [**\BhrSdk\Model\CreateEmployeeTrainingRecordRequest**](../Model/CreateEmployeeTrainingRecordRequest.md)| Training object to post | | ### Return type @@ -76,21 +76,21 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **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) -## `addTrainingCategory()` +## `createTrainingCategory()` ```php -addTrainingCategory($add_training_category_request): \BhrSdk\Model\TrainingCategory +createTrainingCategory($create_training_category_request): \BhrSdk\Model\TrainingCategory ``` Create Training Category -Add a training category. The owner of the API key used must have access to training settings. +Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings. ### Example @@ -111,13 +111,13 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$add_training_category_request = new \BhrSdk\Model\AddTrainingCategoryRequest(); // \BhrSdk\Model\AddTrainingCategoryRequest | Training category to post +$create_training_category_request = new \BhrSdk\Model\CreateTrainingCategoryRequest(); // \BhrSdk\Model\CreateTrainingCategoryRequest | Training category to post try { - $result = $apiInstance->addTrainingCategory($add_training_category_request); + $result = $apiInstance->createTrainingCategory($create_training_category_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TrainingApi->addTrainingCategory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TrainingApi->createTrainingCategory: ', $e->getMessage(), PHP_EOL; } ``` @@ -125,7 +125,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **add_training_category_request** | [**\BhrSdk\Model\AddTrainingCategoryRequest**](../Model/AddTrainingCategoryRequest.md)| Training category to post | | +| **create_training_category_request** | [**\BhrSdk\Model\CreateTrainingCategoryRequest**](../Model/CreateTrainingCategoryRequest.md)| Training category to post | | ### Return type @@ -138,21 +138,21 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **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) -## `addTrainingType()` +## `createTrainingType()` ```php -addTrainingType($add_training_type_request): \BhrSdk\Model\TrainingType +createTrainingType($create_training_type_request): \BhrSdk\Model\TrainingType ``` Create Training Type -Add a training type. The owner of the API key used must have access to training settings. +Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings. ### Example @@ -173,13 +173,13 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$add_training_type_request = new \BhrSdk\Model\AddTrainingTypeRequest(); // \BhrSdk\Model\AddTrainingTypeRequest | Training object to post +$create_training_type_request = new \BhrSdk\Model\CreateTrainingTypeRequest(); // \BhrSdk\Model\CreateTrainingTypeRequest | Training object to post try { - $result = $apiInstance->addTrainingType($add_training_type_request); + $result = $apiInstance->createTrainingType($create_training_type_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling TrainingApi->addTrainingType: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling TrainingApi->createTrainingType: ', $e->getMessage(), PHP_EOL; } ``` @@ -187,7 +187,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **add_training_type_request** | [**\BhrSdk\Model\AddTrainingTypeRequest**](../Model/AddTrainingTypeRequest.md)| Training object to post | | +| **create_training_type_request** | [**\BhrSdk\Model\CreateTrainingTypeRequest**](../Model/CreateTrainingTypeRequest.md)| Training object to post | | ### Return type @@ -200,7 +200,7 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -235,7 +235,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$employee_training_record_id = 0; // int | The ID of the training record to delete. +$employee_training_record_id = 56; // int | The ID of the training record to delete. try { $apiInstance->deleteEmployeeTrainingRecord($employee_training_record_id); @@ -248,7 +248,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_training_record_id** | **int**| The ID of the training record to delete. | [default to 0] | +| **employee_training_record_id** | **int**| The ID of the training record to delete. | | ### Return type @@ -261,7 +261,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -296,7 +296,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$training_category_id = 0; // int | The ID of the training category to delete. +$training_category_id = 56; // int | The ID of the training category to delete. try { $apiInstance->deleteTrainingCategory($training_category_id); @@ -309,7 +309,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **training_category_id** | **int**| The ID of the training category to delete. | [default to 0] | +| **training_category_id** | **int**| The ID of the training category to delete. | | ### Return type @@ -322,7 +322,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -336,7 +336,7 @@ deleteTrainingType($training_type_id) Delete Training Type -Delete an existing training type. The owner of the API key used must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. +Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. ### Example @@ -357,7 +357,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$training_type_id = 0; // int | The ID of the training type to delete. +$training_type_id = 56; // int | The ID of the training type to delete. try { $apiInstance->deleteTrainingType($training_type_id); @@ -370,7 +370,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **training_type_id** | **int**| The ID of the training type to delete. | [default to 0] | +| **training_type_id** | **int**| The ID of the training type to delete. | | ### Return type @@ -383,7 +383,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -392,12 +392,12 @@ void (empty response body) ## `listEmployeeTrainings()` ```php -listEmployeeTrainings($employee_id, $training_type_id): \BhrSdk\Model\TrainingRecordList[] +listEmployeeTrainings($employee_id, $type): \BhrSdk\Model\TrainingRecordMap ``` -Get Employee Trainings +List Employee Training Records -Get all employee training records. The owner of the API key used must have access to view the employee. The API will only return trainings for the employee that the owner of the API key has permission to see. Included with each employee training is the training information that has been selected for tracking in settings. +Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee. ### Example @@ -418,11 +418,11 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$employee_id = 0; // int | The ID of the employee to get a list of trainings for. -$training_type_id = 0; // int | The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. +$employee_id = 56; // int | The ID of the employee to get a list of trainings for. +$type = 56; // int | Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. try { - $result = $apiInstance->listEmployeeTrainings($employee_id, $training_type_id); + $result = $apiInstance->listEmployeeTrainings($employee_id, $type); print_r($result); } catch (Exception $e) { echo 'Exception when calling TrainingApi->listEmployeeTrainings: ', $e->getMessage(), PHP_EOL; @@ -433,12 +433,12 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_id** | **int**| The ID of the employee to get a list of trainings for. | [default to 0] | -| **training_type_id** | **int**| The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. | [optional] [default to 0] | +| **employee_id** | **int**| The ID of the employee to get a list of trainings for. | | +| **type** | **int**| Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. | [optional] | ### Return type -[**\BhrSdk\Model\TrainingRecordList[]**](../Model/TrainingRecordList.md) +[**\BhrSdk\Model\TrainingRecordMap**](../Model/TrainingRecordMap.md) ### Authorization @@ -456,12 +456,12 @@ try { ## `listTrainingCategories()` ```php -listTrainingCategories(): \BhrSdk\Model\TrainingCategoryList[] +listTrainingCategories(): array<string,\BhrSdk\Model\TrainingCategory> ``` -Get Training Categories +List Training Categories -Get a list of training categories. The owner of the API key used must have access to training settings. +Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings. ### Example @@ -497,7 +497,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\TrainingCategoryList[]**](../Model/TrainingCategoryList.md) +[**array<string,\BhrSdk\Model\TrainingCategory>**](../Model/TrainingCategory.md) ### Authorization @@ -515,12 +515,12 @@ This endpoint does not need any parameter. ## `listTrainingTypes()` ```php -listTrainingTypes(): \BhrSdk\Model\TrainingTypeList[] +listTrainingTypes(): array<string,\BhrSdk\Model\TrainingType> ``` -Get Training Types +List Training Types -Get a list of training types. The owner of the API key used must have access to training settings. +Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings. ### Example @@ -556,7 +556,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\TrainingTypeList[]**](../Model/TrainingTypeList.md) +[**array<string,\BhrSdk\Model\TrainingType>**](../Model/TrainingType.md) ### Authorization @@ -579,7 +579,7 @@ updateEmployeeTrainingRecord($employee_training_record_id, $update_employee_trai Update Employee Training Record -Update an existing exmployee training record. The owner of the API key used must have permission to add trainings for the selected employee +Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee. ### Example @@ -600,7 +600,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$employee_training_record_id = 0; // int | The ID of the training record to update. +$employee_training_record_id = 56; // int | The ID of the training record to update. $update_employee_training_record_request = new \BhrSdk\Model\UpdateEmployeeTrainingRecordRequest(); // \BhrSdk\Model\UpdateEmployeeTrainingRecordRequest | Training object to update try { @@ -615,7 +615,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **employee_training_record_id** | **int**| The ID of the training record to update. | [default to 0] | +| **employee_training_record_id** | **int**| The ID of the training record to update. | | | **update_employee_training_record_request** | [**\BhrSdk\Model\UpdateEmployeeTrainingRecordRequest**](../Model/UpdateEmployeeTrainingRecordRequest.md)| Training object to update | | ### Return type @@ -629,7 +629,7 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -643,7 +643,7 @@ updateTrainingCategory($training_category_id, $update_training_category_request) Update Training Category -Update an existing training category. The owner of the API key used must have access to training settings. +Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings. ### Example @@ -664,7 +664,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$training_category_id = 0; // int | The ID of the training category to update. +$training_category_id = 56; // int | The ID of the training category to update. $update_training_category_request = new \BhrSdk\Model\UpdateTrainingCategoryRequest(); // \BhrSdk\Model\UpdateTrainingCategoryRequest | Training category to update try { @@ -679,7 +679,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **training_category_id** | **int**| The ID of the training category to update. | [default to 0] | +| **training_category_id** | **int**| The ID of the training category to update. | | | **update_training_category_request** | [**\BhrSdk\Model\UpdateTrainingCategoryRequest**](../Model/UpdateTrainingCategoryRequest.md)| Training category to update | | ### Return type @@ -693,7 +693,7 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -707,7 +707,7 @@ updateTrainingType($training_type_id, $update_training_type_request): \BhrSdk\Mo Update Training Type -Update an existing training type. The owner of the API key used must have access to training settings. +Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings. ### Example @@ -728,7 +728,7 @@ $apiInstance = new BhrSdk\Api\TrainingApi( new GuzzleHttp\Client(), $config ); -$training_type_id = 0; // int | The ID of the training type to update. +$training_type_id = 56; // int | The ID of the training type to update. $update_training_type_request = new \BhrSdk\Model\UpdateTrainingTypeRequest(); // \BhrSdk\Model\UpdateTrainingTypeRequest | Training type object to update to try { @@ -743,7 +743,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **training_type_id** | **int**| The ID of the training type to update. | [default to 0] | +| **training_type_id** | **int**| The ID of the training type to update. | | | **update_training_type_request** | [**\BhrSdk\Model\UpdateTrainingTypeRequest**](../Model/UpdateTrainingTypeRequest.md)| Training type object to update to | | ### Return type @@ -757,7 +757,7 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json`, `application/xml` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/WebhookEventsApi.md b/docs/Api/WebhookEventsApi.md new file mode 100644 index 00000000..ab680e95 --- /dev/null +++ b/docs/Api/WebhookEventsApi.md @@ -0,0 +1,337 @@ +# BhrSdk\WebhookEventsApi + +All URIs are relative to https://companySubDomain.bamboohr.com, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**companyDeletedWebhook()**](WebhookEventsApi.md#companyDeletedWebhook) | **POST** /company.deleted | Company Deleted | +| [**companyIntegrationsUpdatedWebhook()**](WebhookEventsApi.md#companyIntegrationsUpdatedWebhook) | **POST** /company-integrations.updated | Company Integrations Updated | +| [**companyUpdatedWebhook()**](WebhookEventsApi.md#companyUpdatedWebhook) | **POST** /company.updated | Company Updated | +| [**employeeCreatedWebhook()**](WebhookEventsApi.md#employeeCreatedWebhook) | **POST** /employee.created | Employee Created | +| [**employeeDeletedWebhook()**](WebhookEventsApi.md#employeeDeletedWebhook) | **POST** /employee.deleted | Employee Deleted | +| [**employeeUpdatedWebhook()**](WebhookEventsApi.md#employeeUpdatedWebhook) | **POST** /employee.updated | Employee Updated | + + +## `companyDeletedWebhook()` + +```php +companyDeletedWebhook($company_deleted_webhook_payload) +``` + +Company Deleted + +Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$company_deleted_webhook_payload = new \BhrSdk\Model\CompanyDeletedWebhookPayload(); // \BhrSdk\Model\CompanyDeletedWebhookPayload | Webhook payload containing information about the company deletion + +try { + $apiInstance->companyDeletedWebhook($company_deleted_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->companyDeletedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **company_deleted_webhook_payload** | [**\BhrSdk\Model\CompanyDeletedWebhookPayload**](../Model/CompanyDeletedWebhookPayload.md)| Webhook payload containing information about the company deletion | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `companyIntegrationsUpdatedWebhook()` + +```php +companyIntegrationsUpdatedWebhook($company_integrations_updated_webhook_payload) +``` + +Company Integrations Updated + +Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$company_integrations_updated_webhook_payload = new \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload(); // \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload | Webhook payload containing company integration update information + +try { + $apiInstance->companyIntegrationsUpdatedWebhook($company_integrations_updated_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->companyIntegrationsUpdatedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **company_integrations_updated_webhook_payload** | [**\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload**](../Model/CompanyIntegrationsUpdatedWebhookPayload.md)| Webhook payload containing company integration update information | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `companyUpdatedWebhook()` + +```php +companyUpdatedWebhook($company_updated_webhook_payload) +``` + +Company Updated + +Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$company_updated_webhook_payload = new \BhrSdk\Model\CompanyUpdatedWebhookPayload(); // \BhrSdk\Model\CompanyUpdatedWebhookPayload | Webhook payload containing information about the company update + +try { + $apiInstance->companyUpdatedWebhook($company_updated_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->companyUpdatedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **company_updated_webhook_payload** | [**\BhrSdk\Model\CompanyUpdatedWebhookPayload**](../Model/CompanyUpdatedWebhookPayload.md)| Webhook payload containing information about the company update | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `employeeCreatedWebhook()` + +```php +employeeCreatedWebhook($employee_created_webhook_payload) +``` + +Employee Created + +Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$employee_created_webhook_payload = new \BhrSdk\Model\EmployeeCreatedWebhookPayload(); // \BhrSdk\Model\EmployeeCreatedWebhookPayload | Webhook payload containing information about the employee creation + +try { + $apiInstance->employeeCreatedWebhook($employee_created_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->employeeCreatedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_created_webhook_payload** | [**\BhrSdk\Model\EmployeeCreatedWebhookPayload**](../Model/EmployeeCreatedWebhookPayload.md)| Webhook payload containing information about the employee creation | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `employeeDeletedWebhook()` + +```php +employeeDeletedWebhook($employee_deleted_webhook_payload) +``` + +Employee Deleted + +Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$employee_deleted_webhook_payload = new \BhrSdk\Model\EmployeeDeletedWebhookPayload(); // \BhrSdk\Model\EmployeeDeletedWebhookPayload | Webhook payload containing information about the employee deletion + +try { + $apiInstance->employeeDeletedWebhook($employee_deleted_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->employeeDeletedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_deleted_webhook_payload** | [**\BhrSdk\Model\EmployeeDeletedWebhookPayload**](../Model/EmployeeDeletedWebhookPayload.md)| Webhook payload containing information about the employee deletion | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + +## `employeeUpdatedWebhook()` + +```php +employeeUpdatedWebhook($employee_updated_webhook_payload) +``` + +Employee Updated + +Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + + +$apiInstance = new BhrSdk\Api\WebhookEventsApi( + // 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() +); +$employee_updated_webhook_payload = new \BhrSdk\Model\EmployeeUpdatedWebhookPayload(); // \BhrSdk\Model\EmployeeUpdatedWebhookPayload | Webhook payload containing information about the employee update + +try { + $apiInstance->employeeUpdatedWebhook($employee_updated_webhook_payload); +} catch (Exception $e) { + echo 'Exception when calling WebhookEventsApi->employeeUpdatedWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employee_updated_webhook_payload** | [**\BhrSdk\Model\EmployeeUpdatedWebhookPayload**](../Model/EmployeeUpdatedWebhookPayload.md)| Webhook payload containing information about the employee update | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) diff --git a/docs/Api/WebhooksApi.md b/docs/Api/WebhooksApi.md index 92015819..9a0fb2c7 100644 --- a/docs/Api/WebhooksApi.md +++ b/docs/Api/WebhooksApi.md @@ -7,24 +7,87 @@ All URIs are relative to https://companySubDomain.bamboohr.com, except if the op | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**createWebhook()**](WebhooksApi.md#createWebhook) | **POST** /api/v1/webhooks | Create Webhook | | [**deleteWebhook()**](WebhooksApi.md#deleteWebhook) | **DELETE** /api/v1/webhooks/{id} | Delete Webhook | -| [**getMonitorFields()**](WebhooksApi.md#getMonitorFields) | **GET** /api/v1/webhooks/monitor_fields | Get Monitor Fields | +| [**getPostFields()**](WebhooksApi.md#getPostFields) | **GET** /api/v1/webhooks/post-fields | Get Webhook Post Fields | | [**getWebhook()**](WebhooksApi.md#getWebhook) | **GET** /api/v1/webhooks/{id} | Get Webhook | -| [**getWebhookList()**](WebhooksApi.md#getWebhookList) | **GET** /api/v1/webhooks | Get Webhooks | -| [**getWebhookLogs()**](WebhooksApi.md#getWebhookLogs) | **GET** /api/v1/webhooks/{id}/log | Get Webhook Logs | -| [**postWebhook()**](WebhooksApi.md#postWebhook) | **POST** /api/v1/webhooks | Create Webhook | -| [**putWebhook()**](WebhooksApi.md#putWebhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook | +| [**listMonitorFields()**](WebhooksApi.md#listMonitorFields) | **GET** /api/v1/webhooks/monitor_fields | List Monitor Fields | +| [**listWebhookLogs()**](WebhooksApi.md#listWebhookLogs) | **GET** /api/v1/webhooks/{id}/log | List Webhook Logs | +| [**listWebhooks()**](WebhooksApi.md#listWebhooks) | **GET** /api/v1/webhooks | List Webhooks | +| [**updateWebhook()**](WebhooksApi.md#updateWebhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook | +## `createWebhook()` + +```php +createWebhook($new_web_hook): \BhrSdk\Model\Webhook +``` + +Create Webhook + +Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) + +### Example + +```php +<?php +require_once(__DIR__ . '/vendor/autoload.php'); + +// Configure API key authorization +$config = BhrSdk\Configuration::getDefaultConfiguration() + ->setApiKey('x-api-key', 'YOUR_API_KEY'); + +// Or configure OAuth2 access token for authorization +// $config = BhrSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new BhrSdk\Api\WebhooksApi( + // 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 +); +$new_web_hook = new \BhrSdk\Model\NewWebHook(); // \BhrSdk\Model\NewWebHook + +try { + $result = $apiInstance->createWebhook($new_web_hook); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WebhooksApi->createWebhook: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **new_web_hook** | [**\BhrSdk\Model\NewWebHook**](../Model/NewWebHook.md)| | | + +### Return type + +[**\BhrSdk\Model\Webhook**](../Model/Webhook.md) + +### Authorization + +[basic](../../README.md#basic), [oauth](../../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: `application/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) + ## `deleteWebhook()` ```php -deleteWebhook($id) +deleteWebhook($id): string ``` Delete Webhook -Delete a webhook that is tied to a specific user API Key. +Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs. ### Example @@ -45,10 +108,11 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is an webhook ID that is associated with the User API key. +$id = 56; // int | The webhook ID to delete. try { - $apiInstance->deleteWebhook($id); + $result = $apiInstance->deleteWebhook($id); + print_r($result); } catch (Exception $e) { echo 'Exception when calling WebhooksApi->deleteWebhook: ', $e->getMessage(), PHP_EOL; } @@ -58,11 +122,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is an webhook ID that is associated with the User API key. | | +| **id** | **int**| The webhook ID to delete. | | ### Return type -void (empty response body) +**string** ### Authorization @@ -71,21 +135,21 @@ void (empty response body) ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `text/plain`, `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getMonitorFields()` +## `getPostFields()` ```php -getMonitorFields(): \BhrSdk\Model\FieldList +getPostFields(): \BhrSdk\Model\WebHookPostFieldResponseObject ``` -Get Monitor Fields +Get Webhook Post Fields -Get a list fields webhooks can monitor +Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook. ### Example @@ -108,10 +172,10 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( ); try { - $result = $apiInstance->getMonitorFields(); + $result = $apiInstance->getPostFields(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WebhooksApi->getMonitorFields: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WebhooksApi->getPostFields: ', $e->getMessage(), PHP_EOL; } ``` @@ -121,7 +185,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\FieldList**](../Model/FieldList.md) +[**\BhrSdk\Model\WebHookPostFieldResponseObject**](../Model/WebHookPostFieldResponseObject.md) ### Authorization @@ -144,7 +208,7 @@ getWebhook($id): \BhrSdk\Model\WebHookResponse Get Webhook -Get webhook data that is tied to a specific user API Key. +Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist. ### Example @@ -165,7 +229,7 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The webhook ID to display details about. +$id = 56; // int | The webhook ID to retrieve. try { $result = $apiInstance->getWebhook($id); @@ -179,7 +243,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **int**| The webhook ID to display details about. | | +| **id** | **int**| The webhook ID to retrieve. | | ### Return type @@ -198,15 +262,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getWebhookList()` +## `listMonitorFields()` ```php -getWebhookList(): \BhrSdk\Model\WebhooksList +listMonitorFields(): \BhrSdk\Model\MonitorFieldList ``` -Get Webhooks +List Monitor Fields -Gets as list of webhooks for the user API key. +Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook. ### Example @@ -229,10 +293,10 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( ); try { - $result = $apiInstance->getWebhookList(); + $result = $apiInstance->listMonitorFields(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WebhooksApi->getWebhookList: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WebhooksApi->listMonitorFields: ', $e->getMessage(), PHP_EOL; } ``` @@ -242,7 +306,7 @@ This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\WebhooksList**](../Model/WebhooksList.md) +[**\BhrSdk\Model\MonitorFieldList**](../Model/MonitorFieldList.md) ### Authorization @@ -257,15 +321,15 @@ This endpoint does not need any parameter. [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `getWebhookLogs()` +## `listWebhookLogs()` ```php -getWebhookLogs($id): \BhrSdk\Model\WebHookLogResponse +listWebhookLogs($id): \BhrSdk\Model\WebhookLogListResponse ``` -Get Webhook Logs +List Webhook Logs -Get webhook logs for specific webhook id that is associated with the user API Key. +Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. ### Example @@ -286,13 +350,13 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | The webhook ID to get logs about. +$id = 56; // int | The webhook ID to get logs about. try { - $result = $apiInstance->getWebhookLogs($id); + $result = $apiInstance->listWebhookLogs($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WebhooksApi->getWebhookLogs: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WebhooksApi->listWebhookLogs: ', $e->getMessage(), PHP_EOL; } ``` @@ -300,11 +364,11 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| The webhook ID to get logs about. | | +| **id** | **int**| The webhook ID to get logs about. | | ### Return type -[**\BhrSdk\Model\WebHookLogResponse**](../Model/WebHookLogResponse.md) +[**\BhrSdk\Model\WebhookLogListResponse**](../Model/WebhookLogListResponse.md) ### Authorization @@ -313,21 +377,21 @@ try { ### HTTP request headers - **Content-Type**: `application/json` -- **Accept**: `application/json` +- **Accept**: `application/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `postWebhook()` +## `listWebhooks()` ```php -postWebhook($new_web_hook): \BhrSdk\Model\Webhook +listWebhooks(): \BhrSdk\Model\WebhooksList ``` -Create Webhook +List Webhooks -Add a new Webhook. For more details or instructions you can refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks-2). +Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook's ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use \"Get Webhook\" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events. ### Example @@ -348,25 +412,22 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( new GuzzleHttp\Client(), $config ); -$new_web_hook = new \BhrSdk\Model\NewWebHook(); // \BhrSdk\Model\NewWebHook try { - $result = $apiInstance->postWebhook($new_web_hook); + $result = $apiInstance->listWebhooks(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WebhooksApi->postWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WebhooksApi->listWebhooks: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **new_web_hook** | [**\BhrSdk\Model\NewWebHook**](../Model/NewWebHook.md)| | | +This endpoint does not need any parameter. ### Return type -[**\BhrSdk\Model\Webhook**](../Model/Webhook.md) +[**\BhrSdk\Model\WebhooksList**](../Model/WebhooksList.md) ### Authorization @@ -381,15 +442,15 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `putWebhook()` +## `updateWebhook()` ```php -putWebhook($id, $new_web_hook): \BhrSdk\Model\WebHookResponse +updateWebhook($id, $new_web_hook): \BhrSdk\Model\WebHookResponse ``` Update Webhook -Update a webhook, based on webhook ID. +Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs. ### Example @@ -410,14 +471,14 @@ $apiInstance = new BhrSdk\Api\WebhooksApi( new GuzzleHttp\Client(), $config ); -$id = 'id_example'; // string | {id} is a webhook ID. +$id = 56; // int | The webhook ID to update. $new_web_hook = new \BhrSdk\Model\NewWebHook(); // \BhrSdk\Model\NewWebHook try { - $result = $apiInstance->putWebhook($id, $new_web_hook); + $result = $apiInstance->updateWebhook($id, $new_web_hook); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WebhooksApi->putWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WebhooksApi->updateWebhook: ', $e->getMessage(), PHP_EOL; } ``` @@ -425,7 +486,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| {id} is a webhook ID. | | +| **id** | **int**| The webhook ID to update. | | | **new_web_hook** | [**\BhrSdk\Model\NewWebHook**](../Model/NewWebHook.md)| | | ### Return type diff --git a/docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md b/docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md new file mode 100644 index 00000000..85de4fec --- /dev/null +++ b/docs/Model/A05b6d5f564f805d688ff2c1e37c3990Request.md @@ -0,0 +1,11 @@ +# # A05b6d5f564f805d688ff2c1e37c3990Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**template_id** | **string** | The ID of the template | +**assignee_employee_id** | **string** | The ID of the assignee employee | +**approval_stage** | **int** | The current approval stage | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md b/docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md new file mode 100644 index 00000000..997c6a0c --- /dev/null +++ b/docs/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.md @@ -0,0 +1,10 @@ +# # Ad7871529b2a9c6612f8dd3c62192c08Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pay_band_type** | **string** | | +**pay_bands** | [**\BhrSdk\Model\LevelsAndBandsPayBand[]**](LevelsAndBandsPayBand.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/AddCycleAdminsResponse.md b/docs/Model/AddCycleAdminsResponse.md new file mode 100644 index 00000000..0b9e0b02 --- /dev/null +++ b/docs/Model/AddCycleAdminsResponse.md @@ -0,0 +1,10 @@ +# # AddCycleAdminsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | [**\BhrSdk\Model\AddCycleAdminsResponseAddedInner[]**](AddCycleAdminsResponseAddedInner.md) | | [optional] +**skipped** | [**\BhrSdk\Model\AddCycleAdminsResponseSkippedInner[]**](AddCycleAdminsResponseSkippedInner.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/AddCycleAdminsResponseAddedInner.md b/docs/Model/AddCycleAdminsResponseAddedInner.md new file mode 100644 index 00000000..0b389365 --- /dev/null +++ b/docs/Model/AddCycleAdminsResponseAddedInner.md @@ -0,0 +1,10 @@ +# # AddCycleAdminsResponseAddedInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | | [optional] +**display_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/AddCycleAdminsResponseSkippedInner.md b/docs/Model/AddCycleAdminsResponseSkippedInner.md new file mode 100644 index 00000000..e8baa9c4 --- /dev/null +++ b/docs/Model/AddCycleAdminsResponseSkippedInner.md @@ -0,0 +1,10 @@ +# # AddCycleAdminsResponseSkippedInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | | [optional] +**reason** | **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/AddNewEmployeeTrainingRecordRequest.md b/docs/Model/AddNewEmployeeTrainingRecordRequest.md deleted file mode 100644 index 4554e731..00000000 --- a/docs/Model/AddNewEmployeeTrainingRecordRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# # AddNewEmployeeTrainingRecordRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**completed** | **string** | Completed is a required field and must be in yyyy-mm-dd format. | -**cost** | [**\BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost**](AddNewEmployeeTrainingRecordRequestCost.md) | | [optional] -**instructor** | **string** | | [optional] -**hours** | **float** | | [optional] -**credits** | **float** | | [optional] -**notes** | **string** | | [optional] -**type** | **int** | This must be an existing training type id. | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AddTotalRewardsEmployeesRequest.md b/docs/Model/AddTotalRewardsEmployeesRequest.md new file mode 100644 index 00000000..2a5f2141 --- /dev/null +++ b/docs/Model/AddTotalRewardsEmployeesRequest.md @@ -0,0 +1,9 @@ +# # AddTotalRewardsEmployeesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **int[]** | List of employee IDs to add to Total Rewards. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AdjustTimeOffBalance.md b/docs/Model/AdjustTimeOffBalance.md index 2b340c26..8fd58d93 100644 --- a/docs/Model/AdjustTimeOffBalance.md +++ b/docs/Model/AdjustTimeOffBalance.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **string** | The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD). | +**date** | **\DateTime** | The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD). | **time_off_type_id** | **int** | The ID of the time off type to add a balance adjustment for. | **amount** | **float** | The number of hours/days to adjust the balance by. | **note** | **string** | This is an optional note to show in history. | [optional] diff --git a/docs/Model/AdjustTimeTrackingRequestSchema.md b/docs/Model/AdjustTimeTrackingRequestSchema.md index 6fc95a2a..81c2f8a4 100644 --- a/docs/Model/AdjustTimeTrackingRequestSchema.md +++ b/docs/Model/AdjustTimeTrackingRequestSchema.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time_tracking_id** | **string** | The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). | **hours_worked** | **float** | The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0. | -**project_id** | **int** | ID of the project associated with this time tracking record | [optional] -**task_id** | **int** | ID of the task associated with this time tracking record | [optional] -**shift_differential_id** | **int** | ID of the shift differential associated with this time tracking record | [optional] -**holiday_id** | **int** | ID of the holiday associated with this time tracking record | [optional] +**project_id** | **int** | | [optional] +**task_id** | **int** | | [optional] +**shift_differential_id** | **int** | | [optional] +**holiday_id** | **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/AlertTemplateListResponse.md b/docs/Model/AlertTemplateListResponse.md new file mode 100644 index 00000000..039a0311 --- /dev/null +++ b/docs/Model/AlertTemplateListResponse.md @@ -0,0 +1,9 @@ +# # AlertTemplateListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alerts** | [**\BhrSdk\Model\AlertTemplateListResponseAlertsInner[]**](AlertTemplateListResponseAlertsInner.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/AlertTemplateListResponseAlertsInner.md b/docs/Model/AlertTemplateListResponseAlertsInner.md new file mode 100644 index 00000000..b663110a --- /dev/null +++ b/docs/Model/AlertTemplateListResponseAlertsInner.md @@ -0,0 +1,11 @@ +# # AlertTemplateListResponseAlertsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Alert template ID (bambooAlertId) | [optional] +**name** | **string** | Display name of the alert | [optional] +**group_name** | **string** | Category group the alert 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/AlignmentOptionsResponse.md b/docs/Model/AlignmentOptionsResponse.md new file mode 100644 index 00000000..2ed74a72 --- /dev/null +++ b/docs/Model/AlignmentOptionsResponse.md @@ -0,0 +1,9 @@ +# # AlignmentOptionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aligns_with_options** | [**\BhrSdk\Model\AlignmentOptionsResponseAlignsWithOptionsInner[]**](AlignmentOptionsResponseAlignsWithOptionsInner.md) | Array of goals available as alignment targets 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/AlignmentOptionsResponseAlignsWithOptionsInner.md b/docs/Model/AlignmentOptionsResponseAlignsWithOptionsInner.md new file mode 100644 index 00000000..f9120bb6 --- /dev/null +++ b/docs/Model/AlignmentOptionsResponseAlignsWithOptionsInner.md @@ -0,0 +1,10 @@ +# # AlignmentOptionsResponseAlignsWithOptionsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The goal ID. | [optional] +**title** | **string** | The display title of the goal. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicantStatus.md b/docs/Model/ApplicantStatus.md new file mode 100644 index 00000000..0c19828d --- /dev/null +++ b/docs/Model/ApplicantStatus.md @@ -0,0 +1,15 @@ +# # ApplicantStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Status ID | [optional] +**code** | **string** | | [optional] +**name** | **string** | Status display name | [optional] +**translated_name** | **string** | Translated display name | [optional] +**description** | **string** | | [optional] +**enabled** | **bool** | Whether the status is currently active and selectable | [optional] +**manageable** | **bool** | Whether the status can be managed (edited/deleted) by the company | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationDetails.md b/docs/Model/ApplicationDetails.md index 98d1539f..4f588e5b 100644 --- a/docs/Model/ApplicationDetails.md +++ b/docs/Model/ApplicationDetails.md @@ -5,23 +5,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Application ID | [optional] -**applied_date** | **\DateTime** | Date when the application was submitted | [optional] +**applied_date** | **\DateTime** | ISO 8601 datetime when the application was submitted | [optional] **status** | [**\BhrSdk\Model\ApplicationDetailsStatus**](ApplicationDetailsStatus.md) | | [optional] -**rating** | **int** | Applicant rating | [optional] -**education** | **object** | Applicant education information | [optional] -**resume_file_id** | **int** | ID of the resume file | [optional] -**cover_letter_file_id** | **int** | ID of the cover letter file | [optional] -**moved_to** | **object[]** | Positions the applicant was moved to | [optional] -**moved_from** | **object[]** | Positions the applicant was moved from | [optional] -**also_considered_for_count** | **int** | Count of other positions this applicant is being considered for | [optional] -**duplicate_application_count** | **int** | Count of duplicate applications | [optional] -**referred_by** | **string** | Who referred this applicant | [optional] -**desired_salary** | **string** | Applicant's desired salary | [optional] +**rating** | **int** | | [optional] +**resume_file_id** | **int** | | [optional] +**cover_letter_file_id** | **int** | | [optional] +**attachment_count** | **int** | | [optional] +**attachments** | [**\BhrSdk\Model\ApplicationDetailsAttachmentsInner[]**](ApplicationDetailsAttachmentsInner.md) | | [optional] +**moved_to** | **object[]** | | [optional] +**moved_from** | **object[]** | | [optional] +**also_considered_for_count** | **int** | Count of other job openings this applicant is also being considered for | [optional] +**duplicate_application_count** | **int** | Count of duplicate applications from this applicant | [optional] +**referred_by** | **string** | | [optional] +**desired_salary** | **string** | | [optional] **comment_count** | **int** | Number of comments on this application | [optional] -**email_count** | **int** | Number of emails for this application | [optional] -**event_count** | **int** | Number of events for this application | [optional] -**questions_and_answers** | [**\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInner[]**](ApplicationDetailsQuestionsAndAnswersInner.md) | Custom questions and answers | [optional] -**application_references** | **object[]** | Application references | [optional] +**email_count** | **int** | Number of emails sent for this application | [optional] +**event_count** | **int** | Number of events associated with this application | [optional] +**questions_and_answers** | [**\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInner[]**](ApplicationDetailsQuestionsAndAnswersInner.md) | List of custom application questions and the applicant's answers | [optional] +**application_references** | **string** | | [optional] **applicant** | [**\BhrSdk\Model\ApplicationDetailsApplicant**](ApplicationDetailsApplicant.md) | | [optional] **job** | [**\BhrSdk\Model\ApplicationDetailsJob**](ApplicationDetailsJob.md) | | [optional] diff --git a/docs/Model/ApplicationDetailsApplicant.md b/docs/Model/ApplicationDetailsApplicant.md index ab403be7..0f27f290 100644 --- a/docs/Model/ApplicationDetailsApplicant.md +++ b/docs/Model/ApplicationDetailsApplicant.md @@ -8,7 +8,14 @@ Name | Type | Description | Notes **first_name** | **string** | First name | [optional] **last_name** | **string** | Last name | [optional] **email** | **string** | Email address | [optional] -**phone** | **string** | Phone number | [optional] -**address** | **object** | Address information | [optional] +**phone_number** | **string** | | [optional] +**avatar** | **string** | | [optional] +**source** | **string** | | [optional] +**twitter_username** | **string** | | [optional] +**address** | **object** | | [optional] +**linkedin_url** | **string** | | [optional] +**website_url** | **string** | | [optional] +**available_start_date** | **\DateTime** | | [optional] +**education** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationDetailsAttachmentsInner.md b/docs/Model/ApplicationDetailsAttachmentsInner.md new file mode 100644 index 00000000..dca7f517 --- /dev/null +++ b/docs/Model/ApplicationDetailsAttachmentsInner.md @@ -0,0 +1,11 @@ +# # ApplicationDetailsAttachmentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Attachment ID | [optional] +**name** | **string** | Attachment file name | [optional] +**file_url** | **string** | URL to download the attachment | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationDetailsJob.md b/docs/Model/ApplicationDetailsJob.md index badb239f..50b3d63a 100644 --- a/docs/Model/ApplicationDetailsJob.md +++ b/docs/Model/ApplicationDetailsJob.md @@ -4,10 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Job ID | [optional] -**title** | **string** | Job title | [optional] -**department** | **object** | Department information | [optional] -**location** | **object** | Location information | [optional] -**hiring_lead** | **object** | Hiring lead information | [optional] +**id** | **int** | Job opening ID | [optional] +**title** | [**\BhrSdk\Model\ApplicationDetailsJobTitle**](ApplicationDetailsJobTitle.md) | | [optional] +**hiring_lead** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingRecordSchemaProjectTask.md b/docs/Model/ApplicationDetailsJobTitle.md similarity index 77% rename from docs/Model/TimeTrackingRecordSchemaProjectTask.md rename to docs/Model/ApplicationDetailsJobTitle.md index 0e21b7d5..541014a0 100644 --- a/docs/Model/TimeTrackingRecordSchemaProjectTask.md +++ b/docs/Model/ApplicationDetailsJobTitle.md @@ -1,10 +1,10 @@ -# # TimeTrackingRecordSchemaProjectTask +# # ApplicationDetailsJobTitle ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**name** | **string** | | [optional] +**label** | **string** | Title text | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md b/docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md index f666acc5..e31bf641 100644 --- a/docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md +++ b/docs/Model/ApplicationDetailsQuestionsAndAnswersInner.md @@ -6,5 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **question** | [**\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInnerQuestion**](ApplicationDetailsQuestionsAndAnswersInnerQuestion.md) | | [optional] **answer** | [**\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInnerAnswer**](ApplicationDetailsQuestionsAndAnswersInnerAnswer.md) | | [optional] +**has_revisions** | **bool** | | [optional] +**is_archived** | **bool** | | [optional] +**archived_date** | **\DateTime** | | [optional] +**edited_date** | **\DateTime** | | [optional] +**edited_end_date** | **\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/ApplicationDetailsStatus.md b/docs/Model/ApplicationDetailsStatus.md index c03a0c6d..0c711405 100644 --- a/docs/Model/ApplicationDetailsStatus.md +++ b/docs/Model/ApplicationDetailsStatus.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Status ID | [optional] **label** | **string** | Status name | [optional] -**date_changed** | **\DateTime** | Date when status was last changed | [optional] -**changed_by_user** | **int** | ID of the user who changed the status | [optional] +**date_changed** | **\DateTime** | ISO 8601 datetime when status was last changed | [optional] +**changed_by_user** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationsList.md b/docs/Model/ApplicationsList.md index 44743f2d..b31be343 100644 --- a/docs/Model/ApplicationsList.md +++ b/docs/Model/ApplicationsList.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination_complete** | **bool** | Indicates whether there are more pages of results available | [optional] -**next_page_url** | **string** | URL to fetch the next page of results, or null if there are no more results | [optional] -**applications** | [**\BhrSdk\Model\ApplicationsListApplications**](ApplicationsListApplications.md) | | [optional] +**next_page_url** | **string** | | [optional] +**applications** | [**\BhrSdk\Model\ApplicationsListApplicationsInner[]**](ApplicationsListApplicationsInner.md) | List of application objects | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationsListApplicationsInner.md b/docs/Model/ApplicationsListApplicationsInner.md new file mode 100644 index 00000000..67ba8aff --- /dev/null +++ b/docs/Model/ApplicationsListApplicationsInner.md @@ -0,0 +1,14 @@ +# # ApplicationsListApplicationsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Application ID | [optional] +**applied_date** | **\DateTime** | ISO 8601 datetime when the application was submitted | [optional] +**status** | [**\BhrSdk\Model\ApplicationsListApplicationsInnerStatus**](ApplicationsListApplicationsInnerStatus.md) | | [optional] +**rating** | **int** | | [optional] +**applicant** | [**\BhrSdk\Model\ApplicationsListApplicationsInnerApplicant**](ApplicationsListApplicationsInnerApplicant.md) | | [optional] +**job** | [**\BhrSdk\Model\ApplicationsListApplicationsInnerJob**](ApplicationsListApplicationsInnerJob.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/ApplicationsListApplicationsItemsInnerApplicant.md b/docs/Model/ApplicationsListApplicationsInnerApplicant.md similarity index 81% rename from docs/Model/ApplicationsListApplicationsItemsInnerApplicant.md rename to docs/Model/ApplicationsListApplicationsInnerApplicant.md index ef40f19f..d68d7e07 100644 --- a/docs/Model/ApplicationsListApplicationsItemsInnerApplicant.md +++ b/docs/Model/ApplicationsListApplicationsInnerApplicant.md @@ -1,4 +1,4 @@ -# # ApplicationsListApplicationsItemsInnerApplicant +# # ApplicationsListApplicationsInnerApplicant ## Properties @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **int** | Applicant ID | [optional] **first_name** | **string** | Applicant's first name | [optional] **last_name** | **string** | Applicant's last name | [optional] -**avatar** | **string** | URL to applicant's avatar image | [optional] +**avatar** | **string** | | [optional] **email** | **string** | Applicant's email address | [optional] **source** | **string** | Source of the application | [optional] diff --git a/docs/Model/ApplicationsListApplicationsItemsInnerJob.md b/docs/Model/ApplicationsListApplicationsInnerJob.md similarity index 62% rename from docs/Model/ApplicationsListApplicationsItemsInnerJob.md rename to docs/Model/ApplicationsListApplicationsInnerJob.md index 200649cb..2f05789d 100644 --- a/docs/Model/ApplicationsListApplicationsItemsInnerJob.md +++ b/docs/Model/ApplicationsListApplicationsInnerJob.md @@ -1,10 +1,10 @@ -# # ApplicationsListApplicationsItemsInnerJob +# # ApplicationsListApplicationsInnerJob ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Job position ID | [optional] -**title** | **string** | Job position title | [optional] +**title** | [**\BhrSdk\Model\ApplicationsListApplicationsInnerJobTitle**](ApplicationsListApplicationsInnerJobTitle.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/FieldListFieldsInner.md b/docs/Model/ApplicationsListApplicationsInnerJobTitle.md similarity index 73% rename from docs/Model/FieldListFieldsInner.md rename to docs/Model/ApplicationsListApplicationsInnerJobTitle.md index 520aeec3..b9b2bc4b 100644 --- a/docs/Model/FieldListFieldsInner.md +++ b/docs/Model/ApplicationsListApplicationsInnerJobTitle.md @@ -1,11 +1,10 @@ -# # FieldListFieldsInner +# # ApplicationsListApplicationsInnerJobTitle ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**name** | **string** | | [optional] -**alias** | **string** | | [optional] +**label** | **string** | Title text | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationsListApplicationsItemsInnerStatus.md b/docs/Model/ApplicationsListApplicationsInnerStatus.md similarity index 87% rename from docs/Model/ApplicationsListApplicationsItemsInnerStatus.md rename to docs/Model/ApplicationsListApplicationsInnerStatus.md index cc8c64bf..97146867 100644 --- a/docs/Model/ApplicationsListApplicationsItemsInnerStatus.md +++ b/docs/Model/ApplicationsListApplicationsInnerStatus.md @@ -1,4 +1,4 @@ -# # ApplicationsListApplicationsItemsInnerStatus +# # ApplicationsListApplicationsInnerStatus ## Properties diff --git a/docs/Model/ApplicationsListApplicationsItemsInner.md b/docs/Model/ApplicationsListApplicationsItemsInner.md deleted file mode 100644 index 2f564097..00000000 --- a/docs/Model/ApplicationsListApplicationsItemsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# # ApplicationsListApplicationsItemsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Application ID | [optional] -**applied_date** | **\DateTime** | Date when the application was submitted (yyyy-mm-dd) | [optional] -**status** | [**\BhrSdk\Model\ApplicationsListApplicationsItemsInnerStatus**](ApplicationsListApplicationsItemsInnerStatus.md) | | [optional] -**rating** | **int** | Candidate rating (1-5) or null if not rated | [optional] -**applicant** | [**\BhrSdk\Model\ApplicationsListApplicationsItemsInnerApplicant**](ApplicationsListApplicationsItemsInnerApplicant.md) | | [optional] -**job** | [**\BhrSdk\Model\ApplicationsListApplicationsItemsInnerJob**](ApplicationsListApplicationsItemsInnerJob.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/AssignEmployeesToBreakPolicyRequest.md b/docs/Model/AssignEmployeesToBreakPolicyRequest.md new file mode 100644 index 00000000..68e8b005 --- /dev/null +++ b/docs/Model/AssignEmployeesToBreakPolicyRequest.md @@ -0,0 +1,9 @@ +# # AssignEmployeesToBreakPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **int[]** | Array of employee IDs to assign to the break policy | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md b/docs/Model/AssignTimeOffPoliciesRequestInner.md similarity index 71% rename from docs/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md rename to docs/Model/AssignTimeOffPoliciesRequestInner.md index e26c2042..64e01e94 100644 --- a/docs/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.md +++ b/docs/Model/AssignTimeOffPoliciesRequestInner.md @@ -1,10 +1,10 @@ -# # TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner +# # AssignTimeOffPoliciesRequestInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time_off_policy_id** | **int** | | +**time_off_policy_id** | **int** | The ID of the time off policy to assign. | **accrual_start_date** | **\DateTime** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AssignedTimeOffPolicy.md b/docs/Model/AssignedTimeOffPolicy.md new file mode 100644 index 00000000..73ac8cdf --- /dev/null +++ b/docs/Model/AssignedTimeOffPolicy.md @@ -0,0 +1,11 @@ +# # AssignedTimeOffPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_policy_id** | **int** | The ID of the assigned time off policy. | [optional] +**time_off_type_id** | **int** | The ID of the time off type. | [optional] +**accrual_start_date** | **\DateTime** | The date accruals started in YYYY-MM-DD 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/AssignedTimeOffPolicyV11.md b/docs/Model/AssignedTimeOffPolicyV11.md new file mode 100644 index 00000000..da733e8c --- /dev/null +++ b/docs/Model/AssignedTimeOffPolicyV11.md @@ -0,0 +1,11 @@ +# # AssignedTimeOffPolicyV11 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_policy_id** | **int** | The ID of the assigned time off policy. | [optional] +**time_off_type_id** | **int** | The ID of the time off type. | [optional] +**accrual_start_date** | **\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/AvailableAction.md b/docs/Model/AvailableAction.md new file mode 100644 index 00000000..f7b37871 --- /dev/null +++ b/docs/Model/AvailableAction.md @@ -0,0 +1,10 @@ +# # AvailableAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | The URL for this action | [optional] +**fields** | **object[]** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BadRequestV1.md b/docs/Model/BadRequestV1.md new file mode 100644 index 00000000..cc469d59 --- /dev/null +++ b/docs/Model/BadRequestV1.md @@ -0,0 +1,9 @@ +# # BadRequestV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\BadRequestV1Error**](BadRequestV1Error.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/BadRequestV1Error.md b/docs/Model/BadRequestV1Error.md new file mode 100644 index 00000000..f1017517 --- /dev/null +++ b/docs/Model/BadRequestV1Error.md @@ -0,0 +1,10 @@ +# # BadRequestV1Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **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/BankHoliday.md b/docs/Model/BankHoliday.md new file mode 100644 index 00000000..b7991eef --- /dev/null +++ b/docs/Model/BankHoliday.md @@ -0,0 +1,11 @@ +# # BankHoliday + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Stable bank holiday identifier | [optional] +**name** | **string** | Holiday display name | [optional] +**date** | **\DateTime** | Holiday date in YYYY-MM-DD form | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitCoveragesResponse.md b/docs/Model/BenefitCoveragesResponse.md new file mode 100644 index 00000000..f526a8fd --- /dev/null +++ b/docs/Model/BenefitCoveragesResponse.md @@ -0,0 +1,9 @@ +# # BenefitCoveragesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**benefit_coverages** | [**\BhrSdk\Model\BenefitCoveragesResponseBenefitCoveragesInner[]**](BenefitCoveragesResponseBenefitCoveragesInner.md) | Array of benefit coverage level objects. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md b/docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md new file mode 100644 index 00000000..3f328518 --- /dev/null +++ b/docs/Model/BenefitCoveragesResponseBenefitCoveragesInner.md @@ -0,0 +1,13 @@ +# # BenefitCoveragesResponseBenefitCoveragesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The coverage level ID. | [optional] +**short_name** | **string** | The short display name for this coverage level (e.g. \"Employee + Spouse\"). | [optional] +**description** | **string** | | [optional] +**sort_order** | **string** | The display sort order for this coverage level. | [optional] +**benefit_plan_id** | **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/BenefitDeductionSubType.md b/docs/Model/BenefitDeductionSubType.md new file mode 100644 index 00000000..754b2b8b --- /dev/null +++ b/docs/Model/BenefitDeductionSubType.md @@ -0,0 +1,22 @@ +# # BenefitDeductionSubType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The sub-type deduction type ID (always an integer). | [optional] +**deduction_type_name** | **string** | The display name of the sub-type. | [optional] +**default_deduction_code** | **string** | The default payroll deduction code for this sub-type. | [optional] +**allowable_benefit_types** | **string[]** | Benefit plan types this sub-type applies to. | [optional] +**non_benefit_deduction_type** | **bool** | Whether this is a non-benefit deduction type. | [optional] +**can_be_collected_by_trax** | **bool** | Whether this sub-type can be collected via Trax Payroll. | [optional] +**additional_description** | **string** | Additional description for display purposes. | [optional] +**hide_annual_max** | **bool** | Whether the annual maximum field should be hidden. | [optional] +**managed_deduction_type** | **string** | | [optional] +**sub_types** | **object[]** | Always an empty array for sub-types. | [optional] +**sub_type_text** | **string** | Sub-type selection label. Empty string for leaf types. | [optional] +**deduction_note** | **string** | Informational note for this sub-type. | [optional] +**deduction_note_link** | **string** | URL for the deduction note link. | [optional] +**deduction_note_link_text** | **string** | Display text for the deduction note link. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitDeductionType.md b/docs/Model/BenefitDeductionType.md new file mode 100644 index 00000000..c07c1ec5 --- /dev/null +++ b/docs/Model/BenefitDeductionType.md @@ -0,0 +1,22 @@ +# # BenefitDeductionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**\BhrSdk\Model\BenefitDeductionTypeId**](BenefitDeductionTypeId.md) | | [optional] +**deduction_type_name** | **string** | The display name of the deduction type. | [optional] +**default_deduction_code** | **string** | The default payroll deduction code for this type. | [optional] +**allowable_benefit_types** | **string[]** | The benefit plan types this deduction type can be applied to (e.g. \"health\", \"dental\", \"retirement\"). | [optional] +**non_benefit_deduction_type** | **bool** | Whether this is a non-benefit deduction type (e.g. garnishments). | [optional] +**can_be_collected_by_trax** | **bool** | Whether this deduction type can be collected via Trax Payroll. | [optional] +**additional_description** | **string** | An optional additional description for display purposes. | [optional] +**hide_annual_max** | **bool** | Whether the annual maximum field should be hidden for this deduction type. | [optional] +**managed_deduction_type** | **string** | | [optional] +**sub_types** | [**\BhrSdk\Model\BenefitDeductionSubType[]**](BenefitDeductionSubType.md) | Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types. | [optional] +**sub_type_text** | **string** | A label or question displayed alongside sub-type selection (e.g. \"Reportable on the W-2?\"). Empty string for types without sub-types. | [optional] +**deduction_note** | **string** | An informational note to display to the user when configuring this deduction type. | [optional] +**deduction_note_link** | **string** | A URL for a \"learn more\" link associated with the deduction note. | [optional] +**deduction_note_link_text** | **string** | The display text for the deduction note link. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Forbidden.md b/docs/Model/BenefitDeductionTypeId.md similarity index 82% rename from docs/Model/Forbidden.md rename to docs/Model/BenefitDeductionTypeId.md index 21a94796..f2968bfd 100644 --- a/docs/Model/Forbidden.md +++ b/docs/Model/BenefitDeductionTypeId.md @@ -1,9 +1,8 @@ -# # Forbidden +# # BenefitDeductionTypeId ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **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/PutGoalSharedWithRequest.md b/docs/Model/BudgetBreakdownImportResponse.md similarity index 73% rename from docs/Model/PutGoalSharedWithRequest.md rename to docs/Model/BudgetBreakdownImportResponse.md index 1a19ad11..403c931b 100644 --- a/docs/Model/PutGoalSharedWithRequest.md +++ b/docs/Model/BudgetBreakdownImportResponse.md @@ -1,9 +1,9 @@ -# # PutGoalSharedWithRequest +# # BudgetBreakdownImportResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**shared_with_employee_ids** | **int[]** | | [optional] +**message** | **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/BudgetGuidelinesView.md b/docs/Model/BudgetGuidelinesView.md new file mode 100644 index 00000000..ea1e0c4c --- /dev/null +++ b/docs/Model/BudgetGuidelinesView.md @@ -0,0 +1,13 @@ +# # BudgetGuidelinesView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**use_guidelines** | **bool** | Whether to use budget guidelines | [optional] +**soft_minimum** | **float** | | [optional] +**soft_maximum** | **float** | | [optional] +**guidelines_warning_errors** | [**\BhrSdk\Model\BudgetGuidelinesWarnings**](BudgetGuidelinesWarnings.md) | Budget guidelines warning errors | [optional] +**require_comments** | **bool** | Whether a comment is required for recommendations outside of guidelines | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BudgetGuidelinesWarnings.md b/docs/Model/BudgetGuidelinesWarnings.md new file mode 100644 index 00000000..6a6e610e --- /dev/null +++ b/docs/Model/BudgetGuidelinesWarnings.md @@ -0,0 +1,10 @@ +# # BudgetGuidelinesWarnings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**soft_minimum_warning_message** | **string** | | [optional] +**soft_maximum_warning_message** | **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/C79f9c5950f983e59d2626faa30c00a1Request.md b/docs/Model/C79f9c5950f983e59d2626faa30c00a1Request.md new file mode 100644 index 00000000..2664f9cd --- /dev/null +++ b/docs/Model/C79f9c5950f983e59d2626faa30c00a1Request.md @@ -0,0 +1,10 @@ +# # C79f9c5950f983e59d2626faa30c00a1Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_text** | **string** | The email body template text | +**subject_text** | **string** | The email subject template text | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md b/docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md new file mode 100644 index 00000000..aad8fe9e --- /dev/null +++ b/docs/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.md @@ -0,0 +1,10 @@ +# # C7c32ed5278ac67e2e518bf7484a75dcRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **string[]** | Array of employee IDs to add as cycle admins | +**notify_admins** | **bool** | Whether to send email notifications to new admins | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CanCreateGoalsResponse.md b/docs/Model/CanCreateGoalsResponse.md new file mode 100644 index 00000000..a5552eaf --- /dev/null +++ b/docs/Model/CanCreateGoalsResponse.md @@ -0,0 +1,9 @@ +# # CanCreateGoalsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_create_goals** | **bool** | Whether the API user can create a goal for this 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/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md b/docs/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md new file mode 100644 index 00000000..ea5f5b2b --- /dev/null +++ b/docs/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md @@ -0,0 +1,10 @@ +# # Cf87b8e09a001b6fb81dfce6c20ab9e3Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignees** | **string[]** | Array of assignee employee IDs | +**flow_data** | **array<string,mixed>** | Flow data for the approval | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangedEmployeeIdsResponse.md b/docs/Model/ChangedEmployeeIdsResponse.md new file mode 100644 index 00000000..75be3c4e --- /dev/null +++ b/docs/Model/ChangedEmployeeIdsResponse.md @@ -0,0 +1,10 @@ +# # ChangedEmployeeIdsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latest** | **\DateTime** | The latest last-changed timestamp among the returned employees. | +**employees** | [**array<string,\BhrSdk\Model\ChangedEmployeeIdsResponseEmployeesValue>**](ChangedEmployeeIdsResponseEmployeesValue.md) | Map of employee IDs to change metadata for each changed employee. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md b/docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md new file mode 100644 index 00000000..6e58ea2a --- /dev/null +++ b/docs/Model/ChangedEmployeeIdsResponseEmployeesValue.md @@ -0,0 +1,11 @@ +# # ChangedEmployeeIdsResponseEmployeesValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The employee ID. | [optional] +**action** | **string** | The type of change: Inserted, Updated, or Deleted. | [optional] +**last_changed** | **\DateTime** | ISO 8601 timestamp of the last change. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangedEmployeeTableDataResponse.md b/docs/Model/ChangedEmployeeTableDataResponse.md new file mode 100644 index 00000000..ef40be37 --- /dev/null +++ b/docs/Model/ChangedEmployeeTableDataResponse.md @@ -0,0 +1,10 @@ +# # ChangedEmployeeTableDataResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**table** | **string** | The requested table name. | +**employees** | [**array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValue>**](ChangedEmployeeTableDataResponseEmployeesValue.md) | Map of employee IDs to changed table data for that employee. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md new file mode 100644 index 00000000..3f65462c --- /dev/null +++ b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValue.md @@ -0,0 +1,10 @@ +# # ChangedEmployeeTableDataResponseEmployeesValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_changed** | **\DateTime** | ISO 8601 timestamp of the last change for this employee. | [optional] +**rows** | **array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue>[]** | The table rows for this 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/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md new file mode 100644 index 00000000..c6f3912a --- /dev/null +++ b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md @@ -0,0 +1,8 @@ +# # ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue + +## 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/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md new file mode 100644 index 00000000..bf2909c8 --- /dev/null +++ b/docs/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md @@ -0,0 +1,8 @@ +# # ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner + +## 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/ClockEntrySchema.md b/docs/Model/ClockEntrySchema.md index 61eba721..333d30d3 100644 --- a/docs/Model/ClockEntrySchema.md +++ b/docs/Model/ClockEntrySchema.md @@ -12,5 +12,6 @@ Name | Type | Description | Notes **project_id** | **int** | The ID of the project to associate with the timesheet entry. | [optional] **task_id** | **int** | The ID of the task to associate with the timesheet entry. | [optional] **note** | **string** | Optional note to associate with the timesheet entry. | [optional] +**break_id** | **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/ClockInRequestSchema.md b/docs/Model/ClockInRequestSchema.md index 0eebc4b9..812d658b 100644 --- a/docs/Model/ClockInRequestSchema.md +++ b/docs/Model/ClockInRequestSchema.md @@ -4,11 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**project_id** | **int** | ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified. | [optional] -**task_id** | **int** | ID of the time tracking task that should be associated with the timesheet entry. | [optional] -**note** | **string** | The note that should be associated with the timesheet entry | [optional] -**date** | **\DateTime** | Date for the timesheet entry. Must be in YYYY-MM-DD format. | [optional] -**start** | **string** | The time for the clock in. In 24 hour format HH:MM | [optional] -**timezone** | **string** | The timezone associated with the clock in. | [optional] +**project_id** | **int** | | [optional] +**task_id** | **int** | | [optional] +**note** | **string** | | [optional] +**date** | **\DateTime** | | [optional] +**start** | **string** | | [optional] +**timezone** | **string** | | [optional] +**break_id** | **string** | | [optional] +**offline** | **bool** | Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InternalServerError.md b/docs/Model/CloseGoalRequest.md similarity index 79% rename from docs/Model/InternalServerError.md rename to docs/Model/CloseGoalRequest.md index f220deef..f9de4096 100644 --- a/docs/Model/InternalServerError.md +++ b/docs/Model/CloseGoalRequest.md @@ -1,9 +1,9 @@ -# # InternalServerError +# # CloseGoalRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **string** | | [optional] +**comment** | **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/CompanyAlertDataObject.md b/docs/Model/CompanyAlertDataObject.md new file mode 100644 index 00000000..9f6c5f53 --- /dev/null +++ b/docs/Model/CompanyAlertDataObject.md @@ -0,0 +1,31 @@ +# # CompanyAlertDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The unique identifier of the company alert. | [optional] +**bamboo_alert_id** | **int** | The unique identifier of the Bamboo alert. | [optional] +**schedule** | **string** | The schedule for the company alert. | [optional] +**due_within** | **int** | | [optional] +**due_interval** | **string** | | [optional] +**send_to_employee** | **bool** | Whether the alert should be sent to employees. | [optional] +**send_to_manager** | **bool** | Whether the alert should be sent to managers. | [optional] +**send_to_admin** | **bool** | Whether the alert should be sent to admins. | [optional] +**editor_user_id** | **int** | | [optional] +**last_edited** | **mixed** | The last edited date of the company alert. | [optional] +**custom_message** | **string** | | [optional] +**custom_subject** | **string** | | [optional] +**group_by** | **string** | | [optional] +**limit_training_to_required** | **bool** | Whether the training should be limited to required training. | [optional] +**run_at_time** | **string** | | [optional] +**run_at_time_zone** | **string** | | [optional] +**include_position** | **bool** | Whether the alert should include position. | [optional] +**include_location** | **bool** | Whether the alert should include location. | [optional] +**additional_recipient_emails** | **string[]** | The additional recipient emails for the company alert. | [optional] +**employee_ids** | **string[]** | The employee IDs for the company alert. | [optional] +**list_value_ids** | **int[]** | The list value IDs for the company alert. | [optional] +**filter_list_value_ids** | **int[]** | The filter list value IDs for the company alert. | [optional] +**user_ids** | **int[]** | The user IDs for the company alert. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyBenefitSummary.md b/docs/Model/CompanyBenefitSummary.md new file mode 100644 index 00000000..e818002d --- /dev/null +++ b/docs/Model/CompanyBenefitSummary.md @@ -0,0 +1,18 @@ +# # CompanyBenefitSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique identifier of the company benefit plan. | [optional] +**name** | **string** | The name of the company benefit plan. | [optional] +**type** | **string** | The benefit category type. | [optional] +**benefit_vendor_id** | **string** | | [optional] +**deduction_type_id** | **string** | | [optional] +**company_deduction_id** | **string** | | [optional] +**start_date** | **\DateTime** | | [optional] +**end_date** | **\DateTime** | | [optional] +**allows_catch_up** | **bool** | | [optional] +**allows_super_catch_up** | **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/CompanyBenefitsListResponse.md b/docs/Model/CompanyBenefitsListResponse.md new file mode 100644 index 00000000..bf83af11 --- /dev/null +++ b/docs/Model/CompanyBenefitsListResponse.md @@ -0,0 +1,9 @@ +# # CompanyBenefitsListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_benefits** | [**\BhrSdk\Model\CompanyBenefitSummary[]**](CompanyBenefitSummary.md) | List of company benefit plan summaries. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyDeletedWebhookPayload.md b/docs/Model/CompanyDeletedWebhookPayload.md new file mode 100644 index 00000000..37304e27 --- /dev/null +++ b/docs/Model/CompanyDeletedWebhookPayload.md @@ -0,0 +1,11 @@ +# # CompanyDeletedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData**](CompanyIntegrationsUpdatedWebhookPayloadData.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/CompanyFileUpdate.md b/docs/Model/CompanyFileUpdate.md index e4fe39b5..d2d4564b 100644 --- a/docs/Model/CompanyFileUpdate.md +++ b/docs/Model/CompanyFileUpdate.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**category_id** | **string** | | [optional] -**share_with_employee** | **string** | | [optional] +**name** | **string** | The new display name for the file. | [optional] +**category_id** | **string** | The ID of the category (file section) to move the file to. | [optional] +**share_with_employee** | **string** | Whether the file is shared with employees. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyFilesResponse.md b/docs/Model/CompanyFilesResponse.md new file mode 100644 index 00000000..08767ef8 --- /dev/null +++ b/docs/Model/CompanyFilesResponse.md @@ -0,0 +1,9 @@ +# # CompanyFilesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | [**\BhrSdk\Model\CompanyFilesResponseCategoriesInner[]**](CompanyFilesResponseCategoriesInner.md) | List of company file categories. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyFilesResponseCategoriesInner.md b/docs/Model/CompanyFilesResponseCategoriesInner.md new file mode 100644 index 00000000..b9921ef7 --- /dev/null +++ b/docs/Model/CompanyFilesResponseCategoriesInner.md @@ -0,0 +1,12 @@ +# # CompanyFilesResponseCategoriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Category ID. | [optional] +**name** | **string** | Category display name. | [optional] +**can_upload_files** | **string** | Whether the requesting user can upload files to this category. | [optional] +**files** | [**\BhrSdk\Model\CompanyFilesResponseCategoriesInnerFilesInner[]**](CompanyFilesResponseCategoriesInnerFilesInner.md) | Files visible to the requesting user in this category. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md b/docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md new file mode 100644 index 00000000..5e52a55c --- /dev/null +++ b/docs/Model/CompanyFilesResponseCategoriesInnerFilesInner.md @@ -0,0 +1,17 @@ +# # CompanyFilesResponseCategoriesInnerFilesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | File ID. | [optional] +**name** | **string** | File display name. | [optional] +**original_file_name** | **string** | Original uploaded filename including extension. | [optional] +**size** | **string** | File size in bytes. | [optional] +**date_created** | **string** | Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`). | [optional] +**created_by** | **string** | Full name of the user who uploaded the file. | [optional] +**share_with_employees** | **string** | Whether the file is shared with all employees. | [optional] +**can_rename_file** | **string** | Whether the requesting user can rename this file. | [optional] +**can_delete_file** | **string** | Whether the requesting user can delete this file. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyIndustryDataObject.md b/docs/Model/CompanyIndustryDataObject.md new file mode 100644 index 00000000..ec30556b --- /dev/null +++ b/docs/Model/CompanyIndustryDataObject.md @@ -0,0 +1,12 @@ +# # CompanyIndustryDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**industry_id** | **int** | The company's industry id. | +**added_by_customer** | **bool** | If the industry was added by the customer. | +**added_by_user_id** | **int** | | +**added_ymdt** | **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/CompanyInformation.md b/docs/Model/CompanyInformation.md index 682e1600..f78d13fc 100644 --- a/docs/Model/CompanyInformation.md +++ b/docs/Model/CompanyInformation.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**legal_name** | **string** | The legal name of the company | [optional] -**display_name** | **string** | The display name of the company | [optional] +**legal_name** | **string** | The legal name of the company. | [optional] +**display_name** | **string** | The display name of the company. | [optional] **address** | [**\BhrSdk\Model\CompanyInformationAddress**](CompanyInformationAddress.md) | | [optional] -**phone** | **string** | The phone number of the company | [optional] +**phone** | **string** | The primary contact phone number of the company. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyInformationAddress.md b/docs/Model/CompanyInformationAddress.md index d77bf4fc..8348c360 100644 --- a/docs/Model/CompanyInformationAddress.md +++ b/docs/Model/CompanyInformationAddress.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**line1** | **string** | The first line of the address | [optional] -**line2** | **string** | The second line of the address | [optional] -**city** | **string** | The city of the address | [optional] -**state** | **string** | The state of the address | [optional] -**zip** | **string** | The zip code of the address | [optional] +**line1** | **string** | The first line of the address. | [optional] +**line2** | **string** | The second line of the address. May be an empty string. | [optional] +**city** | **string** | The city. | [optional] +**state** | **string** | The state or province abbreviation. | [optional] +**zip** | **string** | The ZIP or postal code. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md b/docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md new file mode 100644 index 00000000..4ac622ab --- /dev/null +++ b/docs/Model/CompanyIntegrationsUpdatedWebhookPayload.md @@ -0,0 +1,11 @@ +# # CompanyIntegrationsUpdatedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData**](CompanyIntegrationsUpdatedWebhookPayloadData.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/CompanyIntegrationsUpdatedWebhookPayloadData.md b/docs/Model/CompanyIntegrationsUpdatedWebhookPayloadData.md new file mode 100644 index 00000000..a0e5c224 --- /dev/null +++ b/docs/Model/CompanyIntegrationsUpdatedWebhookPayloadData.md @@ -0,0 +1,9 @@ +# # CompanyIntegrationsUpdatedWebhookPayloadData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_id** | **string** | The company 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/CompanyProfileData.md b/docs/Model/CompanyProfileData.md new file mode 100644 index 00000000..5c21b0d0 --- /dev/null +++ b/docs/Model/CompanyProfileData.md @@ -0,0 +1,17 @@ +# # CompanyProfileData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**subdomain** | **string** | | [optional] +**legal_name** | **string** | | [optional] +**display_name** | **string** | | [optional] +**address** | [**\BhrSdk\Model\CompanyProfileDataAddress**](CompanyProfileDataAddress.md) | | [optional] +**phone** | **string** | | [optional] +**status** | **string** | | [optional] +**termination_date** | **string** | | [optional] +**industry_code** | **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/CompanyProfileDataAddress.md b/docs/Model/CompanyProfileDataAddress.md new file mode 100644 index 00000000..8b1629e5 --- /dev/null +++ b/docs/Model/CompanyProfileDataAddress.md @@ -0,0 +1,13 @@ +# # CompanyProfileDataAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line1** | **string** | | [optional] +**line2** | **string** | | [optional] +**city** | **string** | | [optional] +**state** | **string** | | [optional] +**zip** | **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/CompanyProfileIntegrations.md b/docs/Model/CompanyProfileIntegrations.md new file mode 100644 index 00000000..3905516e --- /dev/null +++ b/docs/Model/CompanyProfileIntegrations.md @@ -0,0 +1,9 @@ +# # CompanyProfileIntegrations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integrations** | **string[]** | List of installed integration identifiers. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompanyUpdatedWebhookPayload.md b/docs/Model/CompanyUpdatedWebhookPayload.md new file mode 100644 index 00000000..23634f7d --- /dev/null +++ b/docs/Model/CompanyUpdatedWebhookPayload.md @@ -0,0 +1,11 @@ +# # CompanyUpdatedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData**](CompanyIntegrationsUpdatedWebhookPayloadData.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/CompensationBenchmarkDetailEmployee.md b/docs/Model/CompensationBenchmarkDetailEmployee.md new file mode 100644 index 00000000..1524c591 --- /dev/null +++ b/docs/Model/CompensationBenchmarkDetailEmployee.md @@ -0,0 +1,22 @@ +# # CompensationBenchmarkDetailEmployee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | [optional] +**job_title** | [**\BhrSdk\Model\CompensationBenchmarkDetailEmployeeJobTitle**](CompensationBenchmarkDetailEmployeeJobTitle.md) | | [optional] +**location** | **object** | | [optional] +**salary** | [**\BhrSdk\Model\CompensationBenchmarkDetailEmployeeSalary**](CompensationBenchmarkDetailEmployeeSalary.md) | | [optional] +**variance_from_pay_band** | **object** | | [optional] +**years_at_company** | **int** | | [optional] +**range_penetration** | **float** | | [optional] +**compa_ratio** | **float** | | [optional] +**compa_ratio_status** | **string** | | [optional] +**photo_url** | **string** | | [optional] +**country** | **string** | | [optional] +**is_remote** | **bool** | | [optional] +**currency_conversion_failed** | **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/CompensationBenchmarkDetailEmployeeJobTitle.md b/docs/Model/CompensationBenchmarkDetailEmployeeJobTitle.md new file mode 100644 index 00000000..ea5072a7 --- /dev/null +++ b/docs/Model/CompensationBenchmarkDetailEmployeeJobTitle.md @@ -0,0 +1,11 @@ +# # CompensationBenchmarkDetailEmployeeJobTitle + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**value** | **string** | | [optional] +**job_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/CompensationBenchmarkDetailEmployeeSalary.md b/docs/Model/CompensationBenchmarkDetailEmployeeSalary.md new file mode 100644 index 00000000..9ca573da --- /dev/null +++ b/docs/Model/CompensationBenchmarkDetailEmployeeSalary.md @@ -0,0 +1,10 @@ +# # CompensationBenchmarkDetailEmployeeSalary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | | [optional] +**currency_code** | **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/CompensationBenchmarkDetails.md b/docs/Model/CompensationBenchmarkDetails.md new file mode 100644 index 00000000..3fc255ce --- /dev/null +++ b/docs/Model/CompensationBenchmarkDetails.md @@ -0,0 +1,17 @@ +# # CompensationBenchmarkDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_id** | **string** | | [optional] +**job_title** | **string** | | [optional] +**location_id** | **string** | | [optional] +**location** | **string** | | [optional] +**mercer_benchmark_details** | **object** | | [optional] +**company_pay_range** | **object** | | [optional] +**internal_job_pay_band** | **object** | | [optional] +**benchmark_values** | [**\BhrSdk\Model\CompensationBenchmarkDetailsBenchmarkValuesInner[]**](CompensationBenchmarkDetailsBenchmarkValuesInner.md) | All saved benchmarks for this job/location. Empty when no benchmarks exist. | [optional] +**employees** | [**\BhrSdk\Model\CompensationBenchmarkDetailEmployee[]**](CompensationBenchmarkDetailEmployee.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/CompensationBenchmarkDetailsBenchmarkValuesInner.md b/docs/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.md new file mode 100644 index 00000000..2506fe86 --- /dev/null +++ b/docs/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.md @@ -0,0 +1,20 @@ +# # CompensationBenchmarkDetailsBenchmarkValuesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**job_title** | **string** | | [optional] +**last_edited** | **string** | | [optional] +**source_color_code** | **string** | | [optional] +**source_date** | **string** | | [optional] +**created_ymdt** | **string** | | [optional] +**updated_ymdt** | **string** | | [optional] +**data_year** | **string** | | [optional] +**median** | **float** | | [optional] +**min** | **float** | | [optional] +**max** | **float** | | [optional] +**currency_code** | **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/CompensationBenchmarkJobLocationEmployee.md b/docs/Model/CompensationBenchmarkJobLocationEmployee.md new file mode 100644 index 00000000..e8f2a259 --- /dev/null +++ b/docs/Model/CompensationBenchmarkJobLocationEmployee.md @@ -0,0 +1,17 @@ +# # CompensationBenchmarkJobLocationEmployee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | | [optional] +**salary** | [**\BhrSdk\Model\CompensationBenchmarkJobLocationEmployeeSalary**](CompensationBenchmarkJobLocationEmployeeSalary.md) | | [optional] +**photo_url** | **string** | | [optional] +**manager_name** | **string** | | [optional] +**manager_title** | **string** | | [optional] +**division** | **object** | | [optional] +**department** | **object** | | [optional] +**currency_conversion_failed** | **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/CompensationBenchmarkJobLocationEmployeeSalary.md b/docs/Model/CompensationBenchmarkJobLocationEmployeeSalary.md new file mode 100644 index 00000000..6c299cba --- /dev/null +++ b/docs/Model/CompensationBenchmarkJobLocationEmployeeSalary.md @@ -0,0 +1,10 @@ +# # CompensationBenchmarkJobLocationEmployeeSalary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | | [optional] +**currency_code** | **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/CompensationBenchmarkJobLocationPair.md b/docs/Model/CompensationBenchmarkJobLocationPair.md new file mode 100644 index 00000000..04490d2b --- /dev/null +++ b/docs/Model/CompensationBenchmarkJobLocationPair.md @@ -0,0 +1,14 @@ +# # CompensationBenchmarkJobLocationPair + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_details** | [**\BhrSdk\Model\CompensationBenchmarkJobLocationPairJobDetails**](CompensationBenchmarkJobLocationPairJobDetails.md) | | [optional] +**location_details** | **object** | | [optional] +**is_remote** | **bool** | | [optional] +**benchmarks** | [**\BhrSdk\Model\CompensationBenchmarkOverview[]**](CompensationBenchmarkOverview.md) | Saved benchmarks attached to this job/location. Empty when none are configured. | [optional] +**employees** | [**\BhrSdk\Model\CompensationBenchmarkJobLocationEmployee[]**](CompensationBenchmarkJobLocationEmployee.md) | | [optional] +**internal_job_pay_band** | **object** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubErrorPropertyPostFieldsInner.md b/docs/Model/CompensationBenchmarkJobLocationPairJobDetails.md similarity index 75% rename from docs/Model/WebhookSubErrorPropertyPostFieldsInner.md rename to docs/Model/CompensationBenchmarkJobLocationPairJobDetails.md index e352fb90..7aabeef1 100644 --- a/docs/Model/WebhookSubErrorPropertyPostFieldsInner.md +++ b/docs/Model/CompensationBenchmarkJobLocationPairJobDetails.md @@ -1,10 +1,10 @@ -# # WebhookSubErrorPropertyPostFieldsInner +# # CompensationBenchmarkJobLocationPairJobDetails ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **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/CompensationBenchmarkOverview.md b/docs/Model/CompensationBenchmarkOverview.md new file mode 100644 index 00000000..b6c5b00e --- /dev/null +++ b/docs/Model/CompensationBenchmarkOverview.md @@ -0,0 +1,14 @@ +# # CompensationBenchmarkOverview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**values** | [**\BhrSdk\Model\CompensationBenchmarkOverviewValues**](CompensationBenchmarkOverviewValues.md) | | [optional] +**source_id** | **string** | | [optional] +**source_color** | **string** | | [optional] +**is_mercer** | **bool** | | [optional] +**data_year** | **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/CompensationBenchmarkOverviewValues.md b/docs/Model/CompensationBenchmarkOverviewValues.md new file mode 100644 index 00000000..8091ba85 --- /dev/null +++ b/docs/Model/CompensationBenchmarkOverviewValues.md @@ -0,0 +1,16 @@ +# # CompensationBenchmarkOverviewValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**median** | **float** | | [optional] +**min** | **float** | | [optional] +**max** | **float** | | [optional] +**currency_code** | **string** | | [optional] +**original_median** | **float** | | [optional] +**original_min** | **float** | | [optional] +**original_max** | **float** | | [optional] +**original_currency_code** | **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/CompensationBenchmarkSource.md b/docs/Model/CompensationBenchmarkSource.md new file mode 100644 index 00000000..0cbc23a6 --- /dev/null +++ b/docs/Model/CompensationBenchmarkSource.md @@ -0,0 +1,13 @@ +# # CompensationBenchmarkSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | | [optional] +**sort** | **string** | Sort order position, returned as a numeric string. | [optional] +**count** | **string** | Number of benchmarks attached to this source, returned as a numeric string. | [optional] +**color_code** | **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/CompensationBenchmarkingColumnMap.md b/docs/Model/CompensationBenchmarkingColumnMap.md new file mode 100644 index 00000000..7f2ef55d --- /dev/null +++ b/docs/Model/CompensationBenchmarkingColumnMap.md @@ -0,0 +1,10 @@ +# # CompensationBenchmarkingColumnMap + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expected_column_key** | **string** | | [optional] +**column_name** | **string** | Column 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/CompensationBenchmarksList.md b/docs/Model/CompensationBenchmarksList.md new file mode 100644 index 00000000..ad1c79f5 --- /dev/null +++ b/docs/Model/CompensationBenchmarksList.md @@ -0,0 +1,12 @@ +# # CompensationBenchmarksList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_location_pairs** | [**\BhrSdk\Model\CompensationBenchmarkJobLocationPair[]**](CompensationBenchmarkJobLocationPair.md) | | [optional] +**dismiss_review_banner** | **bool** | | [optional] +**dismiss_add_location_banner** | **bool** | | [optional] +**dismiss_mercer_data_info_banner** | **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/CompensationEquitySettingsResponse.md b/docs/Model/CompensationEquitySettingsResponse.md new file mode 100644 index 00000000..71a8240f --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponse.md @@ -0,0 +1,17 @@ +# # CompensationEquitySettingsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**calculation_type** | **string** | | [optional] +**company_valuation** | [**\BhrSdk\Model\CompensationEquitySettingsResponseCompanyValuation**](CompensationEquitySettingsResponseCompanyValuation.md) | | [optional] +**outstanding_shares** | [**\BhrSdk\Model\CompensationEquitySettingsResponseOutstandingShares**](CompensationEquitySettingsResponseOutstandingShares.md) | | [optional] +**price_per_share** | [**\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare**](CompensationEquitySettingsResponsePricePerShare.md) | | [optional] +**currency_code** | **string** | | [optional] +**slider_min** | [**\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin**](CompensationEquitySettingsResponseSliderMin.md) | | [optional] +**slider_max** | [**\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin**](CompensationEquitySettingsResponseSliderMin.md) | | [optional] +**vesting_conditions** | [**\BhrSdk\Model\CompensationEquitySettingsResponseVestingConditions**](CompensationEquitySettingsResponseVestingConditions.md) | | [optional] +**disclaimers** | [**\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers**](CompensationEquitySettingsResponseDisclaimers.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/CompensationEquitySettingsResponseCompanyValuation.md b/docs/Model/CompensationEquitySettingsResponseCompanyValuation.md new file mode 100644 index 00000000..67da2473 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponseCompanyValuation.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponseCompanyValuation + +## 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/CompensationEquitySettingsResponseDisclaimers.md b/docs/Model/CompensationEquitySettingsResponseDisclaimers.md new file mode 100644 index 00000000..12e61be1 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponseDisclaimers.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponseDisclaimers + +## 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/CompensationEquitySettingsResponseOutstandingShares.md b/docs/Model/CompensationEquitySettingsResponseOutstandingShares.md new file mode 100644 index 00000000..e7a50705 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponseOutstandingShares.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponseOutstandingShares + +## 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/CompensationEquitySettingsResponsePricePerShare.md b/docs/Model/CompensationEquitySettingsResponsePricePerShare.md new file mode 100644 index 00000000..8cf88a06 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponsePricePerShare.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponsePricePerShare + +## 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/CompensationEquitySettingsResponseSliderMin.md b/docs/Model/CompensationEquitySettingsResponseSliderMin.md new file mode 100644 index 00000000..a87de308 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponseSliderMin.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponseSliderMin + +## 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/CompensationEquitySettingsResponseVestingConditions.md b/docs/Model/CompensationEquitySettingsResponseVestingConditions.md new file mode 100644 index 00000000..dae6b354 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsResponseVestingConditions.md @@ -0,0 +1,8 @@ +# # CompensationEquitySettingsResponseVestingConditions + +## 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/CompensationEquitySettingsUpdateRequest.md b/docs/Model/CompensationEquitySettingsUpdateRequest.md new file mode 100644 index 00000000..f9aa7689 --- /dev/null +++ b/docs/Model/CompensationEquitySettingsUpdateRequest.md @@ -0,0 +1,17 @@ +# # CompensationEquitySettingsUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**calculation_type** | **string** | | [optional] +**company_valuation** | [**\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare**](CompensationEquitySettingsResponsePricePerShare.md) | | [optional] +**outstanding_shares** | [**\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin**](CompensationEquitySettingsResponseSliderMin.md) | | [optional] +**price_per_share** | [**\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare**](CompensationEquitySettingsResponsePricePerShare.md) | | [optional] +**currency_code** | **string** | | [optional] +**slider_min** | [**\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin**](CompensationEquitySettingsResponseSliderMin.md) | | [optional] +**slider_max** | [**\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin**](CompensationEquitySettingsResponseSliderMin.md) | | [optional] +**vesting_conditions** | [**\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers**](CompensationEquitySettingsResponseDisclaimers.md) | | [optional] +**disclaimers** | [**\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers**](CompensationEquitySettingsResponseDisclaimers.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/CompensationPlanningCycleAdminsResponse.md b/docs/Model/CompensationPlanningCycleAdminsResponse.md new file mode 100644 index 00000000..3d90b7c9 --- /dev/null +++ b/docs/Model/CompensationPlanningCycleAdminsResponse.md @@ -0,0 +1,10 @@ +# # CompensationPlanningCycleAdminsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admins** | [**\BhrSdk\Model\CompensationPlanningCycleAdminsResponseAdminsInner[]**](CompensationPlanningCycleAdminsResponseAdminsInner.md) | List of admins for the cycle | [optional] +**is_full_admin** | **bool** | Whether the requesting user is a full compensation plan admin | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md b/docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md new file mode 100644 index 00000000..2be891ab --- /dev/null +++ b/docs/Model/CompensationPlanningCycleAdminsResponseAdminsInner.md @@ -0,0 +1,18 @@ +# # CompensationPlanningCycleAdminsResponseAdminsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | | [optional] +**display_name** | **string** | Display name of the admin | [optional] +**first_name** | **string** | First name of the admin | [optional] +**last_name** | **string** | Last name of the admin | [optional] +**job_title** | **string** | Job title of the admin | [optional] +**photo_url** | **string** | URL to the admin profile photo | [optional] +**admin_type** | **string** | Type of admin | [optional] +**is_removable** | **bool** | Whether this admin can be removed from the cycle | [optional] +**added_at** | **\DateTime** | | [optional] +**added_by_employee_id** | **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/CompensationPlanningCycleCompleteResponse.md b/docs/Model/CompensationPlanningCycleCompleteResponse.md new file mode 100644 index 00000000..4c1afec2 --- /dev/null +++ b/docs/Model/CompensationPlanningCycleCompleteResponse.md @@ -0,0 +1,12 @@ +# # CompensationPlanningCycleCompleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cycle_id** | **int** | | [optional] +**updated_employees_count** | **int** | | [optional] +**cycle_closed_email_error** | **string** | | [optional] +**errors** | [**\BhrSdk\Model\CompensationPlanningCycleCompleteResponseErrorsInner[]**](CompensationPlanningCycleCompleteResponseErrorsInner.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/CompensationPlanningCycleCompleteResponseErrorsInner.md b/docs/Model/CompensationPlanningCycleCompleteResponseErrorsInner.md new file mode 100644 index 00000000..931e087c --- /dev/null +++ b/docs/Model/CompensationPlanningCycleCompleteResponseErrorsInner.md @@ -0,0 +1,10 @@ +# # CompensationPlanningCycleCompleteResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | | [optional] +**message** | **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/CompensationToolsDataObject.md b/docs/Model/CompensationToolsDataObject.md new file mode 100644 index 00000000..1311c3d3 --- /dev/null +++ b/docs/Model/CompensationToolsDataObject.md @@ -0,0 +1,12 @@ +# # CompensationToolsDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**levels_and_bands** | **bool** | Has access to Levels & Bands tool | [optional] +**compensation_benchmarking** | **bool** | Has access to Compensation Benchmarking tool | [optional] +**compensation_planning** | **bool** | Has access to Compensation Planning tool | [optional] +**total_rewards** | **bool** | Has access to Total Rewards tool | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompensationToolsResponse.md b/docs/Model/CompensationToolsResponse.md new file mode 100644 index 00000000..3d548978 --- /dev/null +++ b/docs/Model/CompensationToolsResponse.md @@ -0,0 +1,11 @@ +# # CompensationToolsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | [optional] +**tools** | [**\BhrSdk\Model\CompensationToolsDataObject**](CompensationToolsDataObject.md) | | [optional] +**upsell** | [**\BhrSdk\Model\CompensationUpsellData**](CompensationUpsellData.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/CompensationUpsellData.md b/docs/Model/CompensationUpsellData.md new file mode 100644 index 00000000..242d6acc --- /dev/null +++ b/docs/Model/CompensationUpsellData.md @@ -0,0 +1,11 @@ +# # CompensationUpsellData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_owner_name** | **string** | Account owner name | [optional] +**can_request_demo** | **bool** | Whether user can request a demo | [optional] +**user_permissions** | [**\BhrSdk\Model\UserPermissionData**](UserPermissionData.md) | User permissions | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompletedQuestionsAndResponseDataObject.md b/docs/Model/CompletedQuestionsAndResponseDataObject.md new file mode 100644 index 00000000..9dfd74ff --- /dev/null +++ b/docs/Model/CompletedQuestionsAndResponseDataObject.md @@ -0,0 +1,16 @@ +# # CompletedQuestionsAndResponseDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**question** | **string** | The question that was completed | [optional] +**is_required** | **bool** | Indicates if the question is required | [optional] +**archived** | **bool** | Indicates if the question is archived | [optional] +**sort_order** | **int** | The sort order of the question | [optional] +**employee_id** | **int** | The employee ID associated with the question | [optional] +**employee_personal_question_id** | **int** | The employee personal question ID associated with the question | [optional] +**employee_response** | **string** | The response to the question | [optional] +**hidden** | **bool** | Indicates if the question is hidden | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConversionRateDataObject.md b/docs/Model/ConversionRateDataObject.md new file mode 100644 index 00000000..f23316a3 --- /dev/null +++ b/docs/Model/ConversionRateDataObject.md @@ -0,0 +1,11 @@ +# # ConversionRateDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_name** | **string** | The full name of the target currency. | [optional] +**currency_code** | **string** | The code of the target currency (e.g. USD, EUR, JPY). | [optional] +**conversion_rate** | **float** | The numeric conversion rate to the target currency. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CountriesOptionsResponse.md b/docs/Model/CountriesOptionsResponse.md new file mode 100644 index 00000000..7592e6bc --- /dev/null +++ b/docs/Model/CountriesOptionsResponse.md @@ -0,0 +1,11 @@ +# # CountriesOptionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits). | [optional] +**name** | **string** | Full display name of the country | [optional] +**iso_code** | **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/CountrySchema.md b/docs/Model/CountrySchema.md index 46f35194..a5ea746e 100644 --- a/docs/Model/CountrySchema.md +++ b/docs/Model/CountrySchema.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique identifier for the country | [optional] -**name** | **string** | Full name of the country | [optional] -**iso_code** | **string** | ISO code for the country | [optional] +**id** | **int** | Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits). | [optional] +**name** | **string** | Full display name of the country | [optional] +**iso_code** | **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/PostApplicationCommentRequest.md b/docs/Model/CreateApplicationCommentRequest.md similarity index 68% rename from docs/Model/PostApplicationCommentRequest.md rename to docs/Model/CreateApplicationCommentRequest.md index 41623efc..dcfdd7fc 100644 --- a/docs/Model/PostApplicationCommentRequest.md +++ b/docs/Model/CreateApplicationCommentRequest.md @@ -1,10 +1,10 @@ -# # PostApplicationCommentRequest +# # CreateApplicationCommentRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | Always the value \"comment\". | +**type** | **string** | The comment type. Defaults to `comment` if omitted. | [optional] **comment** | **string** | The comment being posted. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCandidateResponse.md b/docs/Model/CreateCandidateResponse.md new file mode 100644 index 00000000..8fdec0b0 --- /dev/null +++ b/docs/Model/CreateCandidateResponse.md @@ -0,0 +1,10 @@ +# # CreateCandidateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **string** | Always 'success' on a successful request | [optional] +**candidate_id** | **int** | The ID of the newly created candidate | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCommentResponse.md b/docs/Model/CreateCommentResponse.md new file mode 100644 index 00000000..eb03369b --- /dev/null +++ b/docs/Model/CreateCommentResponse.md @@ -0,0 +1,10 @@ +# # CreateCommentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The type of comment created, e.g. 'comment' | [optional] +**id** | **int** | The ID of the newly created comment | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCompensationBenchmarkRequest.md b/docs/Model/CreateCompensationBenchmarkRequest.md new file mode 100644 index 00000000..a1e5fe95 --- /dev/null +++ b/docs/Model/CreateCompensationBenchmarkRequest.md @@ -0,0 +1,29 @@ +# # CreateCompensationBenchmarkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_title_id** | **string** | ID of the company job title the benchmark applies to. | +**job_location_id** | **string** | Optional job location ID to scope the benchmark to a specific location. | [optional] +**currency_code** | **string** | ISO 4217 currency code for the benchmark values. | +**mjl_job_code** | **string** | Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`. | [optional] +**benchmark_value** | **float** | Benchmark median value. | +**benchmark_min** | **float** | Benchmark minimum value. | +**benchmark_max** | **float** | Benchmark maximum value. | +**benchmark_source** | **string** | Free-text label describing where the benchmark came from. | [optional] +**external_job_title** | **string** | | [optional] +**external_location** | **string** | | [optional] +**external_level** | **string** | | [optional] +**external_job_description** | **string** | | [optional] +**companies_surveyed** | **int** | | [optional] +**employees_surveyed** | **int** | | [optional] +**source_id** | **string** | ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`. | [optional] +**source_date** | **string** | Date the benchmark source data applies to. | [optional] +**data_year** | **string** | Year of the underlying survey data. | [optional] +**external_country** | **string** | | [optional] +**external_secondary_location** | **string** | | [optional] +**external_company_size** | **string** | | [optional] +**external_industry** | **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/CreateCompensationBenchmarkSourceRequest.md b/docs/Model/CreateCompensationBenchmarkSourceRequest.md new file mode 100644 index 00000000..fb6d77af --- /dev/null +++ b/docs/Model/CreateCompensationBenchmarkSourceRequest.md @@ -0,0 +1,10 @@ +# # CreateCompensationBenchmarkSourceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Display name for the new benchmark source. Cannot be empty or equal to `mercer`. | +**color_code** | **string** | Optional hex color used to display the source in the UI. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEmployeeTrainingRecordRequest.md b/docs/Model/CreateEmployeeTrainingRecordRequest.md new file mode 100644 index 00000000..be29e941 --- /dev/null +++ b/docs/Model/CreateEmployeeTrainingRecordRequest.md @@ -0,0 +1,15 @@ +# # CreateEmployeeTrainingRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completed** | **string** | Completed is a required field and must be in yyyy-mm-dd format. | +**cost** | [**\BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost**](CreateEmployeeTrainingRecordRequestCost.md) | | [optional] +**instructor** | **string** | Name of the training instructor. | [optional] +**hours** | **float** | Number of hours for the training. | [optional] +**credits** | **float** | Credits earned for the training. | [optional] +**notes** | **string** | Optional notes about the training record. | [optional] +**type** | **int** | This must be an existing training type ID. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEmployeeTrainingRecordRequestCost.md b/docs/Model/CreateEmployeeTrainingRecordRequestCost.md new file mode 100644 index 00000000..815b1bd7 --- /dev/null +++ b/docs/Model/CreateEmployeeTrainingRecordRequestCost.md @@ -0,0 +1,10 @@ +# # CreateEmployeeTrainingRecordRequestCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | ISO 4217 currency code (e.g. 'USD'). | [optional] +**amount** | **string** | Monetary amount as a decimal string (e.g. '100.00'). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateGoalCommentRequest.md b/docs/Model/CreateGoalCommentRequest.md new file mode 100644 index 00000000..1ee97759 --- /dev/null +++ b/docs/Model/CreateGoalCommentRequest.md @@ -0,0 +1,9 @@ +# # CreateGoalCommentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The text content of the comment. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateGoalRequest.md b/docs/Model/CreateGoalRequest.md new file mode 100644 index 00000000..d0830e38 --- /dev/null +++ b/docs/Model/CreateGoalRequest.md @@ -0,0 +1,16 @@ +# # CreateGoalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | The title of the goal | +**description** | **string** | A detailed description of the goal | [optional] +**due_date** | **\DateTime** | The due date for the goal in YYYY-MM-DD format | +**percent_complete** | **int** | Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`. | [optional] +**completion_date** | **\DateTime** | | [optional] +**shared_with_employee_ids** | **int[]** | List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner. | +**aligns_with_option_id** | **int** | | [optional] +**milestones** | [**\BhrSdk\Model\CreateGoalRequestMilestonesInner[]**](CreateGoalRequestMilestonesInner.md) | Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PostGoalRequestMilestonesInner.md b/docs/Model/CreateGoalRequestMilestonesInner.md similarity index 89% rename from docs/Model/PostGoalRequestMilestonesInner.md rename to docs/Model/CreateGoalRequestMilestonesInner.md index 004b8af1..3a52d8b1 100644 --- a/docs/Model/PostGoalRequestMilestonesInner.md +++ b/docs/Model/CreateGoalRequestMilestonesInner.md @@ -1,4 +1,4 @@ -# # PostGoalRequestMilestonesInner +# # CreateGoalRequestMilestonesInner ## Properties diff --git a/docs/Model/CreateJobOpeningResponse.md b/docs/Model/CreateJobOpeningResponse.md new file mode 100644 index 00000000..57637874 --- /dev/null +++ b/docs/Model/CreateJobOpeningResponse.md @@ -0,0 +1,10 @@ +# # CreateJobOpeningResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **string** | Always 'success' on a successful request | [optional] +**job_opening_id** | **string** | The ID of the newly created job opening | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateLocationRequest.md b/docs/Model/CreateLocationRequest.md new file mode 100644 index 00000000..96fb8602 --- /dev/null +++ b/docs/Model/CreateLocationRequest.md @@ -0,0 +1,11 @@ +# # CreateLocationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **string** | Display name for the location | +**archived** | **bool** | Whether the location is archived | [optional] [default to false] +**address** | [**\BhrSdk\Model\CreateLocationRequestAddress**](CreateLocationRequestAddress.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/CreateLocationRequestAddress.md b/docs/Model/CreateLocationRequestAddress.md new file mode 100644 index 00000000..8a8dc386 --- /dev/null +++ b/docs/Model/CreateLocationRequestAddress.md @@ -0,0 +1,16 @@ +# # CreateLocationRequestAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address1** | **string** | | [optional] +**address2** | **string** | | [optional] +**city** | **string** | | [optional] +**state_id** | **string** | | [optional] +**zipcode** | **string** | | [optional] +**country_id** | **string** | | [optional] +**timezone** | **string** | | [optional] +**remote_location** | **bool** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AddTrainingCategoryRequest.md b/docs/Model/CreateTrainingCategoryRequest.md similarity index 89% rename from docs/Model/AddTrainingCategoryRequest.md rename to docs/Model/CreateTrainingCategoryRequest.md index fe0a233a..a923c070 100644 --- a/docs/Model/AddTrainingCategoryRequest.md +++ b/docs/Model/CreateTrainingCategoryRequest.md @@ -1,4 +1,4 @@ -# # AddTrainingCategoryRequest +# # CreateTrainingCategoryRequest ## Properties diff --git a/docs/Model/AddTrainingTypeRequest.md b/docs/Model/CreateTrainingTypeRequest.md similarity index 82% rename from docs/Model/AddTrainingTypeRequest.md rename to docs/Model/CreateTrainingTypeRequest.md index aca07a0f..1a6ef255 100644 --- a/docs/Model/AddTrainingTypeRequest.md +++ b/docs/Model/CreateTrainingTypeRequest.md @@ -1,4 +1,4 @@ -# # AddTrainingTypeRequest +# # CreateTrainingTypeRequest ## Properties @@ -7,8 +7,8 @@ Name | Type | Description | Notes **name** | **string** | Name of the new training type. | **frequency** | **int** | The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable. | [optional] **renewable** | **bool** | Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals. | [optional] -**category** | [**\BhrSdk\Model\AddTrainingTypeRequestCategory**](AddTrainingTypeRequestCategory.md) | | [optional] -**required** | **bool** | Is this a required training? | +**category** | [**\BhrSdk\Model\CreateTrainingTypeRequestCategory**](CreateTrainingTypeRequestCategory.md) | | [optional] +**required** | **bool** | Is this a required training? | [optional] **due_from_hire_date** | **int** | Number of days before the training is due for new hires. Not valid unless training is required. | [optional] **link_url** | **string** | Optional URL that can be included with a training. | [optional] **description** | **string** | Description for the training. | [optional] diff --git a/docs/Model/AddTrainingTypeRequestCategory.md b/docs/Model/CreateTrainingTypeRequestCategory.md similarity index 66% rename from docs/Model/AddTrainingTypeRequestCategory.md rename to docs/Model/CreateTrainingTypeRequestCategory.md index 12d60c3b..df28a78b 100644 --- a/docs/Model/AddTrainingTypeRequestCategory.md +++ b/docs/Model/CreateTrainingTypeRequestCategory.md @@ -1,4 +1,4 @@ -# # AddTrainingTypeRequestCategory +# # CreateTrainingTypeRequestCategory ## Properties @@ -6,7 +6,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Category ID | [optional] **name** | **string** | Category Name | [optional] -**accuracy** | **int** | Accuracy in meters of the clock in location | [optional] -**address** | **string** | 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/CreateWebhookBadRequestResponse.md b/docs/Model/CreateWebhookBadRequestResponse.md new file mode 100644 index 00000000..25fd5842 --- /dev/null +++ b/docs/Model/CreateWebhookBadRequestResponse.md @@ -0,0 +1,9 @@ +# # CreateWebhookBadRequestResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**\BhrSdk\Model\WebhookErrorErrors**](WebhookErrorErrors.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/TrainingTypeList.md b/docs/Model/CreatedCompensationBenchmark.md similarity index 56% rename from docs/Model/TrainingTypeList.md rename to docs/Model/CreatedCompensationBenchmark.md index a2e084c7..b459a641 100644 --- a/docs/Model/TrainingTypeList.md +++ b/docs/Model/CreatedCompensationBenchmark.md @@ -1,9 +1,10 @@ -# # TrainingTypeList +# # CreatedCompensationBenchmark ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**training_id** | [**\BhrSdk\Model\TrainingType**](TrainingType.md) | | [optional] +**saved_benchmark** | [**\BhrSdk\Model\CreatedCompensationBenchmarkSavedBenchmark**](CreatedCompensationBenchmarkSavedBenchmark.md) | | [optional] +**message** | **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/CreatedCompensationBenchmarkSavedBenchmark.md b/docs/Model/CreatedCompensationBenchmarkSavedBenchmark.md new file mode 100644 index 00000000..6c8d195d --- /dev/null +++ b/docs/Model/CreatedCompensationBenchmarkSavedBenchmark.md @@ -0,0 +1,30 @@ +# # CreatedCompensationBenchmarkSavedBenchmark + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**job_title_id** | **string** | | [optional] +**job_location_id** | **string** | | [optional] +**mercer_job_code** | **string** | | [optional] +**benchmark_source** | **string** | | [optional] +**currency_code** | **string** | | [optional] +**benchmark_value** | **float** | | [optional] +**benchmark_min** | **float** | | [optional] +**benchmark_max** | **float** | | [optional] +**external_job_title** | **string** | | [optional] +**external_location** | **string** | | [optional] +**external_level** | **string** | | [optional] +**external_job_description** | **string** | | [optional] +**companies_surveyed** | **int** | | [optional] +**employees_surveyed** | **int** | | [optional] +**source_id** | **string** | | [optional] +**source_date** | **string** | | [optional] +**data_year** | **string** | | [optional] +**external_country** | **string** | | [optional] +**external_secondary_location** | **string** | | [optional] +**external_company_size** | **string** | | [optional] +**external_industry** | **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/TimeTrackingRecordSchemaShiftDifferential.md b/docs/Model/CreatedCompensationBenchmarkSource.md similarity index 71% rename from docs/Model/TimeTrackingRecordSchemaShiftDifferential.md rename to docs/Model/CreatedCompensationBenchmarkSource.md index 6e642962..2ab77eb3 100644 --- a/docs/Model/TimeTrackingRecordSchemaShiftDifferential.md +++ b/docs/Model/CreatedCompensationBenchmarkSource.md @@ -1,10 +1,10 @@ -# # TimeTrackingRecordSchemaShiftDifferential +# # CreatedCompensationBenchmarkSource ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Shift Differential information | [optional] +**id** | **int** | ID of the newly created benchmark source. | [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/CreatedTimeOffRequest.md b/docs/Model/CreatedTimeOffRequest.md new file mode 100644 index 00000000..343a1e2a --- /dev/null +++ b/docs/Model/CreatedTimeOffRequest.md @@ -0,0 +1,26 @@ +# # CreatedTimeOffRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The newly created time off request ID. Use this to chain follow-up operations such as approving, canceling, or superseding the request. | [optional] +**employee_id** | **int** | The ID of the employee the request was created for. | [optional] +**name** | **string** | The employee's full name. Only present when the employee record could be loaded. | [optional] +**start** | **\DateTime** | The start date of the request in YYYY-MM-DD format. | [optional] +**end** | **\DateTime** | The end date of the request in YYYY-MM-DD format. | [optional] +**created** | **\DateTime** | The date the request was created in YYYY-MM-DD format (company timezone). | [optional] +**status** | [**\BhrSdk\Model\CreatedTimeOffRequestStatus**](CreatedTimeOffRequestStatus.md) | | [optional] +**type** | [**\BhrSdk\Model\CreatedTimeOffRequestType**](CreatedTimeOffRequestType.md) | | [optional] +**amount** | [**\BhrSdk\Model\CreatedTimeOffRequestAmount**](CreatedTimeOffRequestAmount.md) | | [optional] +**dates** | **array<string,float>** | A map of dates (YYYY-MM-DD) to daily amounts. Only present when daily details were attached to the request. | [optional] +**notes** | [**\BhrSdk\Model\CreatedTimeOffRequestNotes**](CreatedTimeOffRequestNotes.md) | | [optional] +**comments** | **object[]** | Comments attached to the request. Always present; empty array when no comments exist. | [optional] +**approvers** | **array[]** | The approval chain for this request. Only present when the request has approvers. | [optional] +**actions** | **array<string,bool>** | Actions the current user can perform on this request. Only present when PTO action permissions are available. Keys are restricted to `view`, `edit`, `cancel`, `approve`, `deny`, `bypass`; values are booleans. | [optional] +**overlapping_requests** | **object[]** | Other existing time off requests whose date ranges overlap this request. Only present when overlap data was loaded with the request. | [optional] +**policy_type** | **string** | The policy type backing this request (e.g. accruing, manual, unlimited). | [optional] +**used_year_to_date** | **float** | | [optional] +**balance_on_date_of_request** | **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/CreatedTimeOffRequestAmount.md b/docs/Model/CreatedTimeOffRequestAmount.md new file mode 100644 index 00000000..49bbdd84 --- /dev/null +++ b/docs/Model/CreatedTimeOffRequestAmount.md @@ -0,0 +1,10 @@ +# # CreatedTimeOffRequestAmount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **string** | The unit of measurement. | [optional] +**amount** | **float** | The total amount requested. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreatedTimeOffRequestNotes.md b/docs/Model/CreatedTimeOffRequestNotes.md new file mode 100644 index 00000000..59f375f8 --- /dev/null +++ b/docs/Model/CreatedTimeOffRequestNotes.md @@ -0,0 +1,10 @@ +# # CreatedTimeOffRequestNotes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee** | **string** | Note from the employee. | [optional] +**manager** | **string** | Note from the manager. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreatedTimeOffRequestStatus.md b/docs/Model/CreatedTimeOffRequestStatus.md new file mode 100644 index 00000000..ab9aff75 --- /dev/null +++ b/docs/Model/CreatedTimeOffRequestStatus.md @@ -0,0 +1,11 @@ +# # CreatedTimeOffRequestStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | The current status value (e.g. `approved`, `denied`, `requested`). | [optional] +**last_changed** | **string** | The date and time the status was last changed, formatted as `YYYY-MM-DD HH:MM:SS` in the company timezone. | [optional] +**last_changed_by_user_id** | **int** | The user ID who last changed 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/CreatedTimeOffRequestType.md b/docs/Model/CreatedTimeOffRequestType.md new file mode 100644 index 00000000..90db3f82 --- /dev/null +++ b/docs/Model/CreatedTimeOffRequestType.md @@ -0,0 +1,10 @@ +# # CreatedTimeOffRequestType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The time off type ID. | [optional] +**name** | **string** | The time off type 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/CurrencyConversionsResponse.md b/docs/Model/CurrencyConversionsResponse.md new file mode 100644 index 00000000..9a9d1f39 --- /dev/null +++ b/docs/Model/CurrencyConversionsResponse.md @@ -0,0 +1,12 @@ +# # CurrencyConversionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_currency** | **string** | ISO 4217 base currency code | [optional] +**last_updated** | **\DateTime** | ISO 8601 UTC timestamp of the last rate update | [optional] +**next_update** | **\DateTime** | ISO 8601 UTC timestamp of the next scheduled rate update | [optional] +**rates** | **array<string,float>** | Map of ISO 4217 currency codes to numeric conversion rates relative to the base currency | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CursorPagesResponse.md b/docs/Model/CursorPagesResponse.md index 1e38eb5d..5ed582eb 100644 --- a/docs/Model/CursorPagesResponse.md +++ b/docs/Model/CursorPagesResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**limit** | **int** | Maximum number of items per page | -**next_cursor** | **string** | Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter. | -**prev_cursor** | **string** | Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter. | +**limit** | **int** | | +**next_cursor** | **string** | | +**prev_cursor** | **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/CursorPaginationQueryObject.md b/docs/Model/CursorPaginationQueryObject.md index 41f59ffa..758051ce 100644 --- a/docs/Model/CursorPaginationQueryObject.md +++ b/docs/Model/CursorPaginationQueryObject.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**before** | **string** | | [optional] -**after** | **string** | | [optional] +**before** | **string** | Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward. | [optional] +**after** | **string** | Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward. | [optional] **limit** | **int** | Maximum number of items to return. This can be at most 100. | [optional] [default to 50] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Dacd313af2106213fc4696175941ce65Request.md b/docs/Model/Dacd313af2106213fc4696175941ce65Request.md new file mode 100644 index 00000000..38a3d21e --- /dev/null +++ b/docs/Model/Dacd313af2106213fc4696175941ce65Request.md @@ -0,0 +1,11 @@ +# # Dacd313af2106213fc4696175941ce65Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**use_guidelines** | **bool** | | [optional] +**soft_min** | **float** | | [optional] +**soft_max** | **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/DataRequest.md b/docs/Model/DataRequest.md index b7fa3636..f694eefb 100644 --- a/docs/Model/DataRequest.md +++ b/docs/Model/DataRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fields** | **string[]** | | -**aggregations** | [**\BhrSdk\Model\DataRequestAggregationsInner[]**](DataRequestAggregationsInner.md) | | [optional] -**sort_by** | [**\BhrSdk\Model\DataRequestSortByInner[]**](DataRequestSortByInner.md) | | [optional] +**fields** | **string[]** | Field names to include in each returned record. Use \"Get Fields from Dataset\" to discover available names. | +**aggregations** | [**\BhrSdk\Model\DataRequestAggregations**](DataRequestAggregations.md) | | [optional] +**sort_by** | [**\BhrSdk\Model\DataRequestSortByInner[]**](DataRequestSortByInner.md) | Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field. | [optional] **filters** | [**\BhrSdk\Model\DataRequestFilters**](DataRequestFilters.md) | | [optional] -**group_by** | **string[]** | | [optional] -**show_history** | **string[]** | | [optional] +**group_by** | **string[]** | Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array. | [optional] +**show_history** | **string[]** | Entity names of historical table fields whose history rows should be included. Entity names are returned by \"Get Fields from Dataset\". | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DataRequestAggregations.md b/docs/Model/DataRequestAggregations.md new file mode 100644 index 00000000..141206b9 --- /dev/null +++ b/docs/Model/DataRequestAggregations.md @@ -0,0 +1,10 @@ +# # DataRequestAggregations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_aggregation** | **string** | | [optional] +**overriding_aggregations** | **array<string,string>[]** | Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DataRequestFilters.md b/docs/Model/DataRequestFilters.md index 9c8e9504..0db39f40 100644 --- a/docs/Model/DataRequestFilters.md +++ b/docs/Model/DataRequestFilters.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**match** | **string** | | [optional] -**filters** | [**\BhrSdk\Model\DataRequestFiltersFiltersInner[]**](DataRequestFiltersFiltersInner.md) | | [optional] +**match** | **string** | Logical operator for combining filters: `all` (AND) or `any` (OR). | [optional] +**filters** | [**\BhrSdk\Model\DataRequestFiltersFiltersInner[]**](DataRequestFiltersFiltersInner.md) | Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DataRequestFiltersFiltersInner.md b/docs/Model/DataRequestFiltersFiltersInner.md index 63e5e9c4..c1ea4245 100644 --- a/docs/Model/DataRequestFiltersFiltersInner.md +++ b/docs/Model/DataRequestFiltersFiltersInner.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | **string** | | [optional] -**operator** | **string** | | [optional] +**field** | **string** | Field name to filter on. | [optional] +**operator** | **string** | Comparison operator. Available operators depend on field type (see endpoint description). | [optional] **value** | **mixed** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DataRequestSortByInner.md b/docs/Model/DataRequestSortByInner.md index e72dcf7b..ccc3cd14 100644 --- a/docs/Model/DataRequestSortByInner.md +++ b/docs/Model/DataRequestSortByInner.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | **string** | | [optional] -**sort** | **string** | | [optional] +**field** | **string** | Field name to sort by. | [optional] +**sort** | **string** | Sort direction. | [optional] +**aggregation_type** | **string** | Optional. Use when sorting by an aggregated value; must match the requested aggregation for this field. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetDataResponseV2.md b/docs/Model/DatasetDataResponseV2.md new file mode 100644 index 00000000..6732f906 --- /dev/null +++ b/docs/Model/DatasetDataResponseV2.md @@ -0,0 +1,11 @@ +# # DatasetDataResponseV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\DatasetDataResponseV2DataInner[]**](DatasetDataResponseV2DataInner.md) | Array of record objects. Each object contains a `fields` object whose keys are the requested field names. Values may be strings, numbers, booleans, arrays/objects, or null depending on the dataset field and value. | [optional] +**links** | [**\BhrSdk\Model\DatasetDataResponseV2Links**](DatasetDataResponseV2Links.md) | | [optional] +**meta** | [**\BhrSdk\Model\DatasetDataResponseV2Meta**](DatasetDataResponseV2Meta.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/DatasetDataResponseV2DataInner.md b/docs/Model/DatasetDataResponseV2DataInner.md new file mode 100644 index 00000000..1a31b960 --- /dev/null +++ b/docs/Model/DatasetDataResponseV2DataInner.md @@ -0,0 +1,9 @@ +# # DatasetDataResponseV2DataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | [**array<string,\BhrSdk\Model\DatasetDataResponseV2DataInnerFieldsValue>**](DatasetDataResponseV2DataInnerFieldsValue.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/DatasetDataResponseV2DataInnerFieldsValue.md b/docs/Model/DatasetDataResponseV2DataInnerFieldsValue.md new file mode 100644 index 00000000..1bb24b6c --- /dev/null +++ b/docs/Model/DatasetDataResponseV2DataInnerFieldsValue.md @@ -0,0 +1,8 @@ +# # DatasetDataResponseV2DataInnerFieldsValue + +## 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/DatasetDataResponseV2Links.md b/docs/Model/DatasetDataResponseV2Links.md new file mode 100644 index 00000000..3f828676 --- /dev/null +++ b/docs/Model/DatasetDataResponseV2Links.md @@ -0,0 +1,10 @@ +# # DatasetDataResponseV2Links + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **string** | | [optional] +**prev** | **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/DatasetDataResponseV2Meta.md b/docs/Model/DatasetDataResponseV2Meta.md new file mode 100644 index 00000000..d7c2bdc0 --- /dev/null +++ b/docs/Model/DatasetDataResponseV2Meta.md @@ -0,0 +1,12 @@ +# # DatasetDataResponseV2Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | [optional] +**page_size** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**total_items** | **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/DatasetFieldsResponse.md b/docs/Model/DatasetFieldsResponse.md index 7d7be0ca..2268262d 100644 --- a/docs/Model/DatasetFieldsResponse.md +++ b/docs/Model/DatasetFieldsResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**\BhrSdk\Model\Pagination**](Pagination.md) | | [optional] -**name** | **string** | | [optional] -**label** | **string** | | [optional] -**fields** | [**\BhrSdk\Model\Field[]**](Field.md) | | [optional] +**name** | **string** | Machine-readable dataset identifier matching the requested datasetName. | [optional] +**label** | **string** | Human-readable display name for the dataset. | [optional] +**fields** | [**\BhrSdk\Model\Field[]**](Field.md) | Paginated array of field descriptors for this dataset. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetResponseV1.md b/docs/Model/DatasetResponseV1.md new file mode 100644 index 00000000..155bdc11 --- /dev/null +++ b/docs/Model/DatasetResponseV1.md @@ -0,0 +1,9 @@ +# # DatasetResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**datasets** | [**\BhrSdk\Model\DatasetV1[]**](DatasetV1.md) | Array of available datasets. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetV1.md b/docs/Model/DatasetV1.md new file mode 100644 index 00000000..f94ba558 --- /dev/null +++ b/docs/Model/DatasetV1.md @@ -0,0 +1,10 @@ +# # DatasetV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints. | [optional] +**label** | **string** | Human-readable display name for the dataset. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetsResponseV12.md b/docs/Model/DatasetsResponseV12.md new file mode 100644 index 00000000..8923d98e --- /dev/null +++ b/docs/Model/DatasetsResponseV12.md @@ -0,0 +1,9 @@ +# # DatasetsResponseV12 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**datasets** | [**\BhrSdk\Model\DatasetsResponseV12DatasetsInner[]**](DatasetsResponseV12DatasetsInner.md) | Array of available datasets | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetsResponseV12DatasetsInner.md b/docs/Model/DatasetsResponseV12DatasetsInner.md new file mode 100644 index 00000000..a5fabba1 --- /dev/null +++ b/docs/Model/DatasetsResponseV12DatasetsInner.md @@ -0,0 +1,10 @@ +# # DatasetsResponseV12DatasetsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints. | [optional] +**label** | **string** | Human-readable display name for the dataset. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteCompensationBenchmarkSourceRequest.md b/docs/Model/DeleteCompensationBenchmarkSourceRequest.md new file mode 100644 index 00000000..c12243cc --- /dev/null +++ b/docs/Model/DeleteCompensationBenchmarkSourceRequest.md @@ -0,0 +1,9 @@ +# # DeleteCompensationBenchmarkSourceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the benchmark source to delete. Must be non-empty. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeleteCompensationBenchmarkSourceResponse.md b/docs/Model/DeleteCompensationBenchmarkSourceResponse.md new file mode 100644 index 00000000..dcf10cdd --- /dev/null +++ b/docs/Model/DeleteCompensationBenchmarkSourceResponse.md @@ -0,0 +1,9 @@ +# # DeleteCompensationBenchmarkSourceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **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/DetailsAndCurrencyRequestDataObject.md b/docs/Model/DetailsAndCurrencyRequestDataObject.md new file mode 100644 index 00000000..22bb56f9 --- /dev/null +++ b/docs/Model/DetailsAndCurrencyRequestDataObject.md @@ -0,0 +1,21 @@ +# # DetailsAndCurrencyRequestDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the cycle to update | [optional] +**cycle_name** | **string** | Name of the cycle to update | [optional] +**cycle_currency** | **string** | | [optional] +**cycle_window_start_ymd** | **\DateTime** | Start date of the cycle window | [optional] +**cycle_window_end_ymd** | **\DateTime** | End date of the cycle window | [optional] +**recommendations_due_ymd** | **\DateTime** | Date when recommendations are due | [optional] +**approvals_due_ymd** | **\DateTime** | Date when approvals are due | [optional] +**cycle_effective_date** | **\DateTime** | Effective date of the cycle | [optional] +**salary_included** | **bool** | Whether salary is included in this cycle | [optional] +**bonus_included** | **bool** | Whether bonus is included in this cycle | [optional] +**equity_included** | **bool** | Whether equity is included in this cycle | [optional] +**cycle_currency_conversion_rates** | [**\BhrSdk\Model\ConversionRateDataObject[]**](ConversionRateDataObject.md) | Currency conversion rates | [optional] +**paycheck_date_ymd** | **\DateTime** | Date of first paycheck with new compensation updates | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md b/docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md new file mode 100644 index 00000000..a7b8c8f8 --- /dev/null +++ b/docs/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.md @@ -0,0 +1,20 @@ +# # Ec1ba8e76f33960b018d0d7518fe97b5Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contact_employee_id** | **int** | | [optional] +**requires_personal_information** | **bool** | Whether personal information collection is required. | [optional] +**requires_photo** | **bool** | Whether a photo is required. | [optional] +**requires_personal_questions** | **bool** | Whether personal questions are required. | [optional] +**arrive_by_time** | **string** | | [optional] +**location** | **string** | | [optional] +**send_get_to_know_you_email** | **bool** | Whether to send the Get To Know You email. | [optional] +**show_payroll_state** | **bool** | Whether to show state payroll fields. | [optional] +**show_payroll_federal** | **bool** | Whether to show federal payroll fields. | [optional] +**show_payroll_direct_deposit** | **bool** | Whether to show direct deposit payroll fields. | [optional] +**nhp_template_id** | **int** | | [optional] +**employee_id** | **int** | Employee to attach the new packet 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/Employee.md b/docs/Model/Employee.md index 1e06f380..36577e7f 100644 --- a/docs/Model/Employee.md +++ b/docs/Model/Employee.md @@ -4,7 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**first_name** | **string** | | [optional] -**last_name** | **string** | | [optional] +**first_name** | **string** | Legal first name. | [optional] +**last_name** | **string** | Legal last name. | [optional] +**work_email** | **string** | Work email address. | [optional] +**job_title** | **string** | Job title. | [optional] +**department** | **string** | Department name. | [optional] +**division** | **string** | Division name. | [optional] +**location** | **string** | Location name. | [optional] +**hire_date** | **\DateTime** | Hire date in YYYY-MM-DD format. | [optional] +**mobile_phone** | **string** | Mobile phone number. | [optional] +**home_phone** | **string** | Home phone number. | [optional] +**work_phone** | **string** | Work phone number. | [optional] +**address1** | **string** | Home street address line 1. The correct alias is `address1` — do not use `homeAddress1`, `homeStreet1`, or `street1`. | [optional] +**address2** | **string** | Home street address line 2 (apartment, suite, etc.). The correct alias is `address2` — do not use `homeAddress2` or `homeStreet2`. | [optional] +**city** | **string** | Home city. The correct alias is `city` — do not use `homeCity`. | [optional] +**state** | **string** | Home state or province. The correct alias is `state` — do not use `homeState`. Values are normalized to standard abbreviations (e.g., \"Pennsylvania\" becomes \"PA\"). | [optional] +**zipcode** | **string** | Home ZIP or postal code. The correct alias is `zipcode` — do not use `homeZipcode` or `homeZip`. | [optional] +**country** | **string** | Home country name. The correct alias is `country` — do not use `homeCountry`. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitFilters.md b/docs/Model/EmployeeBenefitFilters.md new file mode 100644 index 00000000..4e0e4036 --- /dev/null +++ b/docs/Model/EmployeeBenefitFilters.md @@ -0,0 +1,9 @@ +# # EmployeeBenefitFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**\BhrSdk\Model\EmployeeBenefitFiltersFilters**](EmployeeBenefitFiltersFilters.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/EmployeeBenefitFiltersFilters.md b/docs/Model/EmployeeBenefitFiltersFilters.md new file mode 100644 index 00000000..9b3f7b72 --- /dev/null +++ b/docs/Model/EmployeeBenefitFiltersFilters.md @@ -0,0 +1,11 @@ +# # EmployeeBenefitFiltersFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **int** | Return benefit enrollments for a specific employee identified by their numeric ID. Optional unless neither `companyBenefitId` nor `enrollmentStatusEffectiveDate` is supplied. | [optional] +**company_benefit_id** | **int** | Return benefit enrollments for a specific company benefit plan identified by its numeric ID. Optional unless neither `employeeId` nor `enrollmentStatusEffectiveDate` is supplied. | [optional] +**enrollment_status_effective_date** | **\DateTime** | Return benefit enrollments whose enrollment status became effective on this date. Must be in `YYYY-MM-DD` format. Optional unless neither `employeeId` nor `companyBenefitId` is supplied. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitsListResponse.md b/docs/Model/EmployeeBenefitsListResponse.md new file mode 100644 index 00000000..ea253512 --- /dev/null +++ b/docs/Model/EmployeeBenefitsListResponse.md @@ -0,0 +1,9 @@ +# # EmployeeBenefitsListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_benefits** | [**\BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInner[]**](EmployeeBenefitsListResponseEmployeeBenefitsInner.md) | List of per-employee benefit enrollment records. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md b/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md new file mode 100644 index 00000000..629ced9a --- /dev/null +++ b/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.md @@ -0,0 +1,11 @@ +# # EmployeeBenefitsListResponseEmployeeBenefitsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **int** | The ID of the employee. | [optional] +**pay_frequency** | **string** | | [optional] +**employee_benefit** | [**\BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner[]**](EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md) | The employee's benefit plan enrollments, including both current and future scheduled changes. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md b/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md new file mode 100644 index 00000000..a440bbe8 --- /dev/null +++ b/docs/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md @@ -0,0 +1,29 @@ +# # EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_benefit_id** | **string** | The ID of the company benefit plan. | [optional] +**company_benefit_name** | **string** | The name of the company benefit plan. | [optional] +**coverage_level** | **string** | | [optional] +**deduction_end_date** | **\DateTime** | | [optional] +**deduction_start_date** | **\DateTime** | | [optional] +**enrollment_status** | **string** | The current or scheduled enrollment status. | [optional] +**enrollment_status_effective_date** | **\DateTime** | The date the enrollment status takes effect (YYYY-MM-DD). | [optional] +**currency_code** | **string** | | [optional] +**employee_amount** | **float** | | [optional] +**employee_amount_type** | **string** | | [optional] +**employee_percent_based_on** | **string** | | [optional] +**employee_cap_amount** | **float** | | [optional] +**employee_cap_amount_type** | **string** | | [optional] +**employee_annual_max** | **float** | | [optional] +**company_amount** | **float** | | [optional] +**company_amount_type** | **string** | | [optional] +**company_percent_based_on** | **string** | | [optional] +**company_cap_amount** | **float** | | [optional] +**company_cap_amount_type** | **string** | | [optional] +**company_annual_max** | **float** | | [optional] +**occurrences_per_year** | **int** | The number of deduction occurrences per year based on the employee's pay schedule. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeCreatedWebhookPayload.md b/docs/Model/EmployeeCreatedWebhookPayload.md new file mode 100644 index 00000000..79b7407a --- /dev/null +++ b/docs/Model/EmployeeCreatedWebhookPayload.md @@ -0,0 +1,11 @@ +# # EmployeeCreatedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\EmployeeCreatedWebhookPayloadData**](EmployeeCreatedWebhookPayloadData.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/EmployeeCreatedWebhookPayloadData.md b/docs/Model/EmployeeCreatedWebhookPayloadData.md new file mode 100644 index 00000000..05b4d252 --- /dev/null +++ b/docs/Model/EmployeeCreatedWebhookPayloadData.md @@ -0,0 +1,10 @@ +# # EmployeeCreatedWebhookPayloadData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_id** | **string** | The company ID | [optional] +**employee_id** | **string** | The employee ID that was 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/EmployeeCursorPaginationQueryObject.md b/docs/Model/EmployeeCursorPaginationQueryObject.md new file mode 100644 index 00000000..eadc28db --- /dev/null +++ b/docs/Model/EmployeeCursorPaginationQueryObject.md @@ -0,0 +1,11 @@ +# # EmployeeCursorPaginationQueryObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**before** | **string** | Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward. | [optional] +**after** | **string** | Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward. | [optional] +**limit** | **int** | Maximum number of items to return. This can be at most 2500. | [optional] [default to 250] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeDeletedWebhookPayload.md b/docs/Model/EmployeeDeletedWebhookPayload.md new file mode 100644 index 00000000..f70dc492 --- /dev/null +++ b/docs/Model/EmployeeDeletedWebhookPayload.md @@ -0,0 +1,11 @@ +# # EmployeeDeletedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\EmployeeDeletedWebhookPayloadData**](EmployeeDeletedWebhookPayloadData.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/EmployeeDeletedWebhookPayloadData.md b/docs/Model/EmployeeDeletedWebhookPayloadData.md new file mode 100644 index 00000000..7cd3b629 --- /dev/null +++ b/docs/Model/EmployeeDeletedWebhookPayloadData.md @@ -0,0 +1,10 @@ +# # EmployeeDeletedWebhookPayloadData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_id** | **string** | The company ID | [optional] +**employee_id** | **string** | The employee ID that was deleted | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeDependent.md b/docs/Model/EmployeeDependent.md index 8066e778..0129c295 100644 --- a/docs/Model/EmployeeDependent.md +++ b/docs/Model/EmployeeDependent.md @@ -4,22 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee_id** | **string** | | [optional] -**first_name** | **string** | | [optional] -**middle_name** | **string** | | [optional] -**last_name** | **string** | | [optional] -**relationship** | **string** | | [optional] -**gender** | **string** | | [optional] -**ssn** | **string** | | [optional] -**date_of_birth** | **string** | | [optional] -**address_line1** | **string** | | [optional] -**address_line2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip_code** | **string** | | [optional] -**home_phone** | **string** | | [optional] -**country** | **string** | | [optional] -**is_us_citizen** | **string** | | [optional] -**is_student** | **string** | | [optional] +**employee_id** | **string** | The ID of the employee this dependent belongs to. Required. | +**first_name** | **string** | The dependent's first name. | [optional] +**middle_name** | **string** | The dependent's middle name. | [optional] +**last_name** | **string** | The dependent's last name. | [optional] +**relationship** | **string** | The dependent's relationship to the employee (e.g. \"spouse\", \"child\", \"domestic_partner\"). | [optional] +**gender** | **string** | The dependent's gender. | [optional] +**ssn** | **string** | The dependent's Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. \"xxx-xx-1234\") on read. | [optional] +**sin** | **string** | The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read. | [optional] +**date_of_birth** | **\DateTime** | The dependent's date of birth in YYYY-MM-DD format. | [optional] +**address_line1** | **string** | The first line of the dependent's address. | [optional] +**address_line2** | **string** | The second line of the dependent's address. | [optional] +**city** | **string** | The dependent's city. | [optional] +**state** | **string** | The dependent's state, provided as a state code (e.g. \"UT\"). Returned as a full state name on read. | [optional] +**zip_code** | **string** | The dependent's ZIP or postal code. | [optional] +**home_phone** | **string** | The dependent's home phone number. | [optional] +**country** | **string** | The dependent's country, provided as an ISO 3166-1 alpha-2 country code (e.g. \"US\"). Returned as a full country name on read. | [optional] +**is_us_citizen** | **string** | Whether the dependent is a US citizen. Accepted values: \"yes\" or \"no\". | [optional] +**is_student** | **string** | Whether the dependent is currently a student. Accepted values: \"yes\" or \"no\". | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeDependentsResponse.md b/docs/Model/EmployeeDependentsResponse.md new file mode 100644 index 00000000..bf5e0fa5 --- /dev/null +++ b/docs/Model/EmployeeDependentsResponse.md @@ -0,0 +1,9 @@ +# # EmployeeDependentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_dependents** | [**\BhrSdk\Model\EmployeeDependentsResponseEmployeeDependentsInner[]**](EmployeeDependentsResponseEmployeeDependentsInner.md) | Array of employee dependent objects. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md b/docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md new file mode 100644 index 00000000..804704ea --- /dev/null +++ b/docs/Model/EmployeeDependentsResponseEmployeeDependentsInner.md @@ -0,0 +1,27 @@ +# # EmployeeDependentsResponseEmployeeDependentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique ID of the dependent record. | [optional] +**employee_id** | **string** | The ID of the employee this dependent belongs to. | [optional] +**first_name** | **string** | The dependent's first name. | [optional] +**middle_name** | **string** | | [optional] +**last_name** | **string** | The dependent's last name. | [optional] +**relationship** | **string** | The dependent's relationship to the employee. | [optional] +**gender** | **string** | The dependent's gender. | [optional] +**masked_ssn** | **string** | | [optional] +**masked_sin** | **string** | | [optional] +**date_of_birth** | **\DateTime** | The dependent's date of birth in YYYY-MM-DD format. | [optional] +**address_line1** | **string** | | [optional] +**address_line2** | **string** | | [optional] +**city** | **string** | | [optional] +**state** | **string** | | [optional] +**zip_code** | **string** | | [optional] +**home_phone** | **string** | | [optional] +**country** | **string** | | [optional] +**is_us_citizen** | **string** | | [optional] +**is_student** | **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/EmployeeFileUpdate.md b/docs/Model/EmployeeFileUpdate.md index c542dadf..820e044d 100644 --- a/docs/Model/EmployeeFileUpdate.md +++ b/docs/Model/EmployeeFileUpdate.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**category_id** | **string** | | [optional] -**share_with_employee** | **string** | | [optional] +**name** | **string** | The new display name for the file. | [optional] +**category_id** | **int** | The ID of the file category (section) to move the file into. | [optional] +**share_with_employee** | **string** | Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'. | [optional] +**share_with_employees** | **string** | Alias for shareWithEmployee. Whether the file is shared with 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/EmployeeOptionalField.md b/docs/Model/EmployeeOptionalField.md new file mode 100644 index 00000000..7a29bb5e --- /dev/null +++ b/docs/Model/EmployeeOptionalField.md @@ -0,0 +1,8 @@ +# # EmployeeOptionalField + +## 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/EmployeePhotoJsonResponse.md b/docs/Model/EmployeePhotoJsonResponse.md new file mode 100644 index 00000000..1e9dc720 --- /dev/null +++ b/docs/Model/EmployeePhotoJsonResponse.md @@ -0,0 +1,10 @@ +# # EmployeePhotoJsonResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mime_type** | **string** | The actual MIME type of the underlying image (e.g. `image/jpeg`, `image/png`, `image/bmp`, `image/gif`, `image/tiff`). Use this to identify the format of the decoded bytes. | +**file_base64** | **string** | Base64-encoded image bytes. Decoding produces the same bytes returned by the binary variant of this endpoint. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeStringCodeErrorResponseV1.md b/docs/Model/EmployeeStringCodeErrorResponseV1.md new file mode 100644 index 00000000..86b505e0 --- /dev/null +++ b/docs/Model/EmployeeStringCodeErrorResponseV1.md @@ -0,0 +1,9 @@ +# # EmployeeStringCodeErrorResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\EmployeeStringCodeErrorResponseV1Error**](EmployeeStringCodeErrorResponseV1Error.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/EmployeeStringCodeErrorResponseV1Error.md b/docs/Model/EmployeeStringCodeErrorResponseV1Error.md new file mode 100644 index 00000000..379a5f5f --- /dev/null +++ b/docs/Model/EmployeeStringCodeErrorResponseV1Error.md @@ -0,0 +1,10 @@ +# # EmployeeStringCodeErrorResponseV1Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | String error code identifier (for example `BadRequest` or `BadPage`). | +**message** | **string** | Human-readable error message. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeTableRow.md b/docs/Model/EmployeeTableRow.md new file mode 100644 index 00000000..1f2f53a4 --- /dev/null +++ b/docs/Model/EmployeeTableRow.md @@ -0,0 +1,10 @@ +# # EmployeeTableRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The table row ID. | [optional] +**employee_id** | **string** | The employee ID that owns this row. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeTimeOffPolicyAssignment.md b/docs/Model/EmployeeTimeOffPolicyAssignment.md new file mode 100644 index 00000000..3357c943 --- /dev/null +++ b/docs/Model/EmployeeTimeOffPolicyAssignment.md @@ -0,0 +1,11 @@ +# # EmployeeTimeOffPolicyAssignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_policy_id** | **int** | The ID of the assigned time off policy. | [optional] +**time_off_type_id** | **int** | The ID of the time off type. | [optional] +**accrual_start_date** | **\DateTime** | The date accruals started in YYYY-MM-DD 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/EmployeeTimeOffPolicyAssignmentV11.md b/docs/Model/EmployeeTimeOffPolicyAssignmentV11.md new file mode 100644 index 00000000..fb8876b7 --- /dev/null +++ b/docs/Model/EmployeeTimeOffPolicyAssignmentV11.md @@ -0,0 +1,11 @@ +# # EmployeeTimeOffPolicyAssignmentV11 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_policy_id** | **int** | The ID of the assigned time off policy. | [optional] +**time_off_type_id** | **int** | The ID of the time off type. | [optional] +**accrual_start_date** | **\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/EmployeeTimeOffRequestApproverResponseInner.md b/docs/Model/EmployeeTimeOffRequestApproverResponseInner.md new file mode 100644 index 00000000..9b707a45 --- /dev/null +++ b/docs/Model/EmployeeTimeOffRequestApproverResponseInner.md @@ -0,0 +1,12 @@ +# # EmployeeTimeOffRequestApproverResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID of the approver | +**display_name** | **string** | Display name of the approver | +**employee_id** | **int** | Employee ID of the approver | +**photo_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/EmployeeTimesheetEntryTransformer.md b/docs/Model/EmployeeTimesheetEntryTransformer.md index cf8a4499..d7548146 100644 --- a/docs/Model/EmployeeTimesheetEntryTransformer.md +++ b/docs/Model/EmployeeTimesheetEntryTransformer.md @@ -8,13 +8,15 @@ Name | Type | Description | Notes **employee_id** | **int** | Employee ID | [optional] **type** | **string** | Entry type | [optional] **date** | **\DateTime** | Date of the timesheet | [optional] -**start** | **\DateTime** | Start time | [optional] -**end** | **\DateTime** | End time | [optional] -**timezone** | **string** | Timezone | [optional] -**hours** | **float** | Hours worked | [optional] -**note** | **string** | Note | [optional] +**start** | **\DateTime** | | [optional] +**end** | **\DateTime** | | [optional] +**timezone** | **string** | | [optional] +**hours** | **float** | | [optional] +**note** | **string** | | [optional] **project_info** | [**\BhrSdk\Model\ProjectInfoApiTransformer**](ProjectInfoApiTransformer.md) | | [optional] -**approved_at** | **\DateTime** | Approved time | [optional] +**approved_at** | **\DateTime** | | [optional] **approved** | **bool** | Whether the timesheet entry is approved | [optional] +**created_at** | **\DateTime** | Created time | [optional] +**updated_at** | **\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/EmployeeUpdatedWebhookPayload.md b/docs/Model/EmployeeUpdatedWebhookPayload.md new file mode 100644 index 00000000..8eb341a8 --- /dev/null +++ b/docs/Model/EmployeeUpdatedWebhookPayload.md @@ -0,0 +1,11 @@ +# # EmployeeUpdatedWebhookPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The event type identifier | [optional] +**timestamp** | **\DateTime** | ISO 8601 timestamp (UTC) when the event was fired | [optional] +**data** | [**\BhrSdk\Model\EmployeeUpdatedWebhookPayloadData**](EmployeeUpdatedWebhookPayloadData.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/EmployeeUpdatedWebhookPayloadData.md b/docs/Model/EmployeeUpdatedWebhookPayloadData.md new file mode 100644 index 00000000..d6713540 --- /dev/null +++ b/docs/Model/EmployeeUpdatedWebhookPayloadData.md @@ -0,0 +1,11 @@ +# # EmployeeUpdatedWebhookPayloadData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_id** | **string** | The company ID | [optional] +**employee_id** | **string** | The employee ID that was updated | [optional] +**changed_fields** | **string[]** | Array of API aliases for fields that changed and are monitored by this webhook | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeValue.md b/docs/Model/EmployeeValue.md new file mode 100644 index 00000000..343f0790 --- /dev/null +++ b/docs/Model/EmployeeValue.md @@ -0,0 +1,8 @@ +# # EmployeeValue + +## 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/EmployeeValueAnyOfInner.md b/docs/Model/EmployeeValueAnyOfInner.md new file mode 100644 index 00000000..825935ac --- /dev/null +++ b/docs/Model/EmployeeValueAnyOfInner.md @@ -0,0 +1,8 @@ +# # EmployeeValueAnyOfInner + +## 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/EmployeeVerificationIntegration.md b/docs/Model/EmployeeVerificationIntegration.md new file mode 100644 index 00000000..58c62902 --- /dev/null +++ b/docs/Model/EmployeeVerificationIntegration.md @@ -0,0 +1,10 @@ +# # EmployeeVerificationIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | True when the integration is installed for the company and partner endpoints are usable. | +**integration_type** | **string** | Identifier of the configured employee verification partner (opaque string; matches `integrationType` from the integration GET response). | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeVerificationIntegrationResponse.md b/docs/Model/EmployeeVerificationIntegrationResponse.md new file mode 100644 index 00000000..1537d17b --- /dev/null +++ b/docs/Model/EmployeeVerificationIntegrationResponse.md @@ -0,0 +1,9 @@ +# # EmployeeVerificationIntegrationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integration** | [**\BhrSdk\Model\EmployeeVerificationIntegration**](EmployeeVerificationIntegration.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/EmployeeVerificationLifecycleEmailAcceptedResponse.md b/docs/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md new file mode 100644 index 00000000..9dbdd1d8 --- /dev/null +++ b/docs/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.md @@ -0,0 +1,10 @@ +# # EmployeeVerificationLifecycleEmailAcceptedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | | +**message** | **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/EmployeeVerificationPublicApiRecord.md b/docs/Model/EmployeeVerificationPublicApiRecord.md new file mode 100644 index 00000000..5d1f1a3f --- /dev/null +++ b/docs/Model/EmployeeVerificationPublicApiRecord.md @@ -0,0 +1,22 @@ +# # EmployeeVerificationPublicApiRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**employee_id** | **int** | | [optional] +**integration_type** | **string** | | [optional] +**verification_type** | **string** | | [optional] +**verification_status** | **string** | | [optional] +**verification_status_notes** | **string** | | [optional] +**remote_access_url** | **string** | | [optional] +**e_verify_status** | **string** | | [optional] +**archived** | **bool** | | [optional] +**billing_processed** | **bool** | | [optional] +**created_by_user_id** | **int** | | [optional] +**created_ymdt** | **string** | Creation timestamp (company DB format). | [optional] +**last_modified_ymdt** | **string** | Last modified timestamp (company DB format). | [optional] +**start_date_ymdt** | **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/EmployeeVerificationUpdateResponse.md b/docs/Model/EmployeeVerificationUpdateResponse.md new file mode 100644 index 00000000..e7075c58 --- /dev/null +++ b/docs/Model/EmployeeVerificationUpdateResponse.md @@ -0,0 +1,9 @@ +# # EmployeeVerificationUpdateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_verification** | [**\BhrSdk\Model\EmployeeVerificationPublicApiRecord**](EmployeeVerificationPublicApiRecord.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/EmployeeVerificationsListResponse.md b/docs/Model/EmployeeVerificationsListResponse.md new file mode 100644 index 00000000..f2802e8b --- /dev/null +++ b/docs/Model/EmployeeVerificationsListResponse.md @@ -0,0 +1,9 @@ +# # EmployeeVerificationsListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_verifications** | [**\BhrSdk\Model\EmployeeVerificationPublicApiRecord[]**](EmployeeVerificationPublicApiRecord.md) | Verification records for the employee, newest first. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeesDirectoryJsonResponse.md b/docs/Model/EmployeesDirectoryJsonResponse.md new file mode 100644 index 00000000..74a74558 --- /dev/null +++ b/docs/Model/EmployeesDirectoryJsonResponse.md @@ -0,0 +1,10 @@ +# # EmployeesDirectoryJsonResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | [**\BhrSdk\Model\EmployeesDirectoryJsonResponseFieldsInner[]**](EmployeesDirectoryJsonResponseFieldsInner.md) | Field definitions included in this response. Each entry describes one key that appears on every employee object. The set of fields is fixed by company directory configuration; the `canUploadPhoto` entry is always appended. | [optional] +**employees** | **array<string,mixed>[]** | One object per directory employee. Every object includes `id` (employee ID as a string) and `canUploadPhoto` (1 if the authenticated caller may upload a photo for this employee, 0 otherwise), plus one key per entry in `fields`. The exact key set varies with company directory configuration. Field values are returned in the JSON type indicated by the matching `fields[].type` (for example, `bool` fields are JSON booleans). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md b/docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md new file mode 100644 index 00000000..a1a8f23c --- /dev/null +++ b/docs/Model/EmployeesDirectoryJsonResponseFieldsInner.md @@ -0,0 +1,11 @@ +# # EmployeesDirectoryJsonResponseFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Field identifier; appears as a key on each employee object. | [optional] +**type** | **string** | Field data type. Observed values include `text`, `list`, `email`, `bool`, `url`, and `employee`. | [optional] +**name** | **string** | Human-readable field label. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeesDirectoryXmlResponse.md b/docs/Model/EmployeesDirectoryXmlResponse.md new file mode 100644 index 00000000..04cbb399 --- /dev/null +++ b/docs/Model/EmployeesDirectoryXmlResponse.md @@ -0,0 +1,10 @@ +# # EmployeesDirectoryXmlResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fieldset** | [**\BhrSdk\Model\EmployeesDirectoryXmlResponseFieldset**](EmployeesDirectoryXmlResponseFieldset.md) | | [optional] +**employees** | [**\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployees**](EmployeesDirectoryXmlResponseEmployees.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/EmployeesDirectoryXmlResponseEmployees.md b/docs/Model/EmployeesDirectoryXmlResponseEmployees.md new file mode 100644 index 00000000..324abbc7 --- /dev/null +++ b/docs/Model/EmployeesDirectoryXmlResponseEmployees.md @@ -0,0 +1,9 @@ +# # EmployeesDirectoryXmlResponseEmployees + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee** | [**\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInner[]**](EmployeesDirectoryXmlResponseEmployeesEmployeeInner.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/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md b/docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md new file mode 100644 index 00000000..5c06b54c --- /dev/null +++ b/docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md @@ -0,0 +1,10 @@ +# # EmployeesDirectoryXmlResponseEmployeesEmployeeInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Employee ID, serialized as an attribute on the `<employee>` element. | [optional] +**field** | [**\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner[]**](EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md) | Field values for the employee. Each `<field>` element has an `id` attribute matching one of the `<fieldset>` ids and the value as element text. Currency fields additionally carry a `currency` attribute (ISO currency code). Boolean fields are serialized as the strings `true`/`false`; the appended `canUploadPhoto` field is serialized as `yes`/`no`. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md b/docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md new file mode 100644 index 00000000..00027443 --- /dev/null +++ b/docs/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md @@ -0,0 +1,10 @@ +# # EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Field identifier matching one of the ids in `<fieldset>`. | [optional] +**value** | **string** | Field value serialized as element text 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/ApplicationsListApplications.md b/docs/Model/EmployeesDirectoryXmlResponseFieldset.md similarity index 55% rename from docs/Model/ApplicationsListApplications.md rename to docs/Model/EmployeesDirectoryXmlResponseFieldset.md index 27d6e1fb..012f8dd9 100644 --- a/docs/Model/ApplicationsListApplications.md +++ b/docs/Model/EmployeesDirectoryXmlResponseFieldset.md @@ -1,9 +1,9 @@ -# # ApplicationsListApplications +# # EmployeesDirectoryXmlResponseFieldset ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**items** | [**\BhrSdk\Model\ApplicationsListApplicationsItemsInner[]**](ApplicationsListApplicationsItemsInner.md) | List of application objects | [optional] +**field** | [**\BhrSdk\Model\EmployeesDirectoryXmlResponseFieldsetFieldInner[]**](EmployeesDirectoryXmlResponseFieldsetFieldInner.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/EmployeesDirectoryXmlResponseFieldsetFieldInner.md b/docs/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.md new file mode 100644 index 00000000..2a2dc154 --- /dev/null +++ b/docs/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.md @@ -0,0 +1,10 @@ +# # EmployeesDirectoryXmlResponseFieldsetFieldInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Field identifier; matches the `id` attribute on each `<field>` element inside `<employee>`. | [optional] +**value** | **string** | Human-readable field label, serialized as the element's text 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/ErrorResponse.md b/docs/Model/ErrorResponse.md new file mode 100644 index 00000000..6db1443d --- /dev/null +++ b/docs/Model/ErrorResponse.md @@ -0,0 +1,9 @@ +# # ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\ErrorResponseError**](ErrorResponseError.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/ErrorResponseError.md b/docs/Model/ErrorResponseError.md new file mode 100644 index 00000000..24fcd0aa --- /dev/null +++ b/docs/Model/ErrorResponseError.md @@ -0,0 +1,10 @@ +# # ErrorResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **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/F3883a522dadbe9e11b34f8b656e3adbRequest.md b/docs/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md new file mode 100644 index 00000000..cd3dc21d --- /dev/null +++ b/docs/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.md @@ -0,0 +1,15 @@ +# # F3883a522dadbe9e11b34f8b656e3adbRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | The ID of the employee receiving the recommendation | +**assignee_employee_id** | **string** | The ID of the employee making the recommendation | +**approval_flow_id** | **int** | The ID of the approval flow | [optional] +**approval_stage** | **int** | The approval stage | +**rec_salary_increase** | **object** | | [optional] +**rec_bonus_increase** | **object** | | [optional] +**rec_equity_increase** | **object** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Field.md b/docs/Model/Field.md index 7869470d..d5a4ca0a 100644 --- a/docs/Model/Field.md +++ b/docs/Model/Field.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**label** | **string** | | [optional] -**parent_type** | **string** | | [optional] -**parent_name** | **string** | | [optional] -**entity_name** | **string** | | [optional] +**name** | **string** | Machine-readable field identifier. Use this value in the `fields` array when querying data. | [optional] +**label** | **string** | Human-readable display name for the field. | [optional] +**parent_type** | **string** | The type of the parent section (e.g. `page`, `table`). | [optional] +**parent_name** | **string** | The name of the parent section this field belongs to. | [optional] +**entity_name** | **string** | The entity name for the field, used in `showHistory` when querying historical table fields. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Field1.md b/docs/Model/Field1.md new file mode 100644 index 00000000..ef09aff1 --- /dev/null +++ b/docs/Model/Field1.md @@ -0,0 +1,13 @@ +# # Field1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**\BhrSdk\Model\Field1Id**](Field1Id.md) | | +**name** | **string** | The display name of the field. | +**type** | **string** | The data type of the field (e.g., text, date, list, checkbox). | +**alias** | **string** | The API alias for the field. Only present when the field has an alias. | [optional] +**deprecated** | **bool** | Whether the field is deprecated and should no longer be used. Only present for deprecated fields. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Field1Id.md b/docs/Model/Field1Id.md new file mode 100644 index 00000000..2bbf8cd6 --- /dev/null +++ b/docs/Model/Field1Id.md @@ -0,0 +1,8 @@ +# # Field1Id + +## 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/FieldOptionsRequestSchema.md b/docs/Model/FieldOptionsRequestSchema.md index 0aade233..b0a11741 100644 --- a/docs/Model/FieldOptionsRequestSchema.md +++ b/docs/Model/FieldOptionsRequestSchema.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **fields** | **string[]** | List of field names to get options for | -**dependent_fields** | **array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>** | Dependent fields and their values that affect the options of the requested fields | [optional] +**dependent_fields** | **array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>** | | [optional] +**filters** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FieldOptionsTransformer.md b/docs/Model/FieldOptionsTransformer.md index 8e61345a..ead93f90 100644 --- a/docs/Model/FieldOptionsTransformer.md +++ b/docs/Model/FieldOptionsTransformer.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | The ID of the field option | [optional] -**value** | **string** | The value of the field option | [optional] +**id** | [**\BhrSdk\Model\FieldOptionsTransformerId**](FieldOptionsTransformerId.md) | | [optional] +**value** | **string** | The human-readable label of the field option | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FieldOptionsTransformerId.md b/docs/Model/FieldOptionsTransformerId.md new file mode 100644 index 00000000..251fc982 --- /dev/null +++ b/docs/Model/FieldOptionsTransformerId.md @@ -0,0 +1,8 @@ +# # FieldOptionsTransformerId + +## 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/ForbiddenV1.md b/docs/Model/ForbiddenV1.md new file mode 100644 index 00000000..8a76049b --- /dev/null +++ b/docs/Model/ForbiddenV1.md @@ -0,0 +1,9 @@ +# # ForbiddenV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\ForbiddenV1Error**](ForbiddenV1Error.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/ForbiddenV1Error.md b/docs/Model/ForbiddenV1Error.md new file mode 100644 index 00000000..2d485a21 --- /dev/null +++ b/docs/Model/ForbiddenV1Error.md @@ -0,0 +1,10 @@ +# # ForbiddenV1Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **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/GetBreakPolicySuggestionsRequest.md b/docs/Model/GetBreakPolicySuggestionsRequest.md new file mode 100644 index 00000000..d71b87b3 --- /dev/null +++ b/docs/Model/GetBreakPolicySuggestionsRequest.md @@ -0,0 +1,9 @@ +# # GetBreakPolicySuggestionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prompt** | **string** | The user's request or question for break policy suggestions (e.g. \"What policies do we need for our California employees?\") | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetCompanyReportResponse.md b/docs/Model/GetCompanyReportResponse.md new file mode 100644 index 00000000..d721b58d --- /dev/null +++ b/docs/Model/GetCompanyReportResponse.md @@ -0,0 +1,11 @@ +# # GetCompanyReportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | The report title. | [optional] +**fields** | [**\BhrSdk\Model\RequestCustomReportResponseFieldsInner[]**](RequestCustomReportResponseFieldsInner.md) | Metadata for each field included in the report. | [optional] +**employees** | [**\BhrSdk\Model\GetCompanyReportResponseEmployeesInner[]**](GetCompanyReportResponseEmployeesInner.md) | One object per employee. Each object contains an `id` property plus one key per report field. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DatasetResponse.md b/docs/Model/GetCompanyReportResponseEmployeesInner.md similarity index 71% rename from docs/Model/DatasetResponse.md rename to docs/Model/GetCompanyReportResponseEmployeesInner.md index 98d9c522..af23de7e 100644 --- a/docs/Model/DatasetResponse.md +++ b/docs/Model/GetCompanyReportResponseEmployeesInner.md @@ -1,9 +1,9 @@ -# # DatasetResponse +# # GetCompanyReportResponseEmployeesInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**datasets** | [**\BhrSdk\Model\Dataset[]**](Dataset.md) | | [optional] +**id** | **string** | The employee 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/GetDataFromDatasetV2Request.md b/docs/Model/GetDataFromDatasetV2Request.md new file mode 100644 index 00000000..3b57d811 --- /dev/null +++ b/docs/Model/GetDataFromDatasetV2Request.md @@ -0,0 +1,13 @@ +# # GetDataFromDatasetV2Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | **string[]** | Field names to return for each row. Names are dataset-specific; discover valid names via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`). The field-name vocabulary differs from the dedicated employee endpoints (e.g., the `employee` dataset uses `jobInformationReportsTo` / `jobInformationDepartment` / `employmentStatus` rather than List Employees' `reportsTo` / `department` / `status`). | +**filter** | **string** | | [optional] +**order_by** | **string** | | [optional] +**page** | **int** | Page number to retrieve (1-indexed). Defaults to 1. | [optional] [default to 1] +**page_size** | **int** | Number of records per page. Defaults to 100. Maximum is 1000. | [optional] [default to 100] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetEmployeeResponse.md b/docs/Model/GetEmployeeResponse.md new file mode 100644 index 00000000..9f89f67b --- /dev/null +++ b/docs/Model/GetEmployeeResponse.md @@ -0,0 +1,55 @@ +# # GetEmployeeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the employee | +**first_name** | **string** | | [optional] +**last_name** | **string** | | [optional] +**preferred_name** | **string** | | [optional] +**middle_name** | **string** | | [optional] +**photo_url** | **string** | | [optional] +**job_title_name** | **string** | | [optional] +**job_title_id** | **string** | | [optional] +**status** | **string** | | [optional] +**work_email** | **string** | | [optional] +**home_email** | **string** | | [optional] +**best_email** | **string** | | [optional] +**work_phone** | **string** | | [optional] +**work_phone_extension** | **string** | | [optional] +**mobile_phone** | **string** | | [optional] +**home_phone** | **string** | | [optional] +**skype_username** | **string** | | [optional] +**linkedin_url** | **string** | | [optional] +**facebook_url** | **string** | | [optional] +**instagram_url** | **string** | | [optional] +**twitter_url** | **string** | | [optional] +**pinterest_url** | **string** | | [optional] +**birth_date** | **string** | | [optional] +**hire_date** | **string** | | [optional] +**original_hire_date** | **string** | | [optional] +**termination_date** | **string** | | [optional] +**address1** | **string** | | [optional] +**city** | **string** | | [optional] +**state** | **string** | | [optional] +**country** | **string** | | [optional] +**gender** | **string** | | [optional] +**marital** | **string** | | [optional] +**pay_rate** | **string** | | [optional] +**pay_type** | **string** | | [optional] +**pay_period** | **string** | | [optional] +**exempt** | **string** | | [optional] +**can_upload_photo** | **bool** | | [optional] +**division** | **string** | | [optional] +**division_id** | **string** | | [optional] +**department** | **string** | | [optional] +**department_id** | **string** | | [optional] +**location** | **string** | | [optional] +**location_id** | **string** | | [optional] +**employment_status** | **string** | | [optional] +**employment_status_id** | **string** | | [optional] +**reports_to_name** | **string** | | [optional] +**reports_to_id** | **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/GetEmployeesEmployeeBaseResponse.md b/docs/Model/GetEmployeesEmployeeBaseResponse.md new file mode 100644 index 00000000..30167828 --- /dev/null +++ b/docs/Model/GetEmployeesEmployeeBaseResponse.md @@ -0,0 +1,16 @@ +# # GetEmployeesEmployeeBaseResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | Unique identifier for the employee | +**first_name** | **string** | | +**last_name** | **string** | | +**preferred_name** | **string** | | +**photo_url** | **string** | | +**job_title_name** | **string** | | +**status** | **string** | | +**_restricted_fields** | **string[]** | Array of field names that are restricted due to permission checks | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetEmployeesEmployeeResponse.md b/docs/Model/GetEmployeesEmployeeResponse.md index 90d29641..fa73a186 100644 --- a/docs/Model/GetEmployeesEmployeeResponse.md +++ b/docs/Model/GetEmployeesEmployeeResponse.md @@ -5,12 +5,135 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee_id** | **string** | Unique identifier for the employee | -**first_name** | **string** | Employee's first name | -**last_name** | **string** | Employee's last name | -**preferred_name** | **string** | Employee's preferred name | -**photo_url** | **string** | URL to employee's profile photo | -**job_title_name** | **string** | Employee's current job title | -**status** | **string** | Employee's current status (active/inactive) | +**first_name** | **string** | | +**last_name** | **string** | | +**preferred_name** | **string** | | +**photo_url** | **string** | | +**job_title_name** | **string** | | +**status** | **string** | | **_restricted_fields** | **string[]** | Array of field names that are restricted due to permission checks | +**address_line1** | **string** | | [optional] +**address_line2** | **string** | | [optional] +**age** | **string** | | [optional] +**allergies** | **string** | | [optional] +**best_email** | **string** | | [optional] +**birth_date** | **string** | | [optional] +**birthplace** | **string** | | [optional] +**citizenship** | **string** | | [optional] +**citizenship_id** | **string** | | [optional] +**city** | **string** | | [optional] +**compensation_change_reason** | **string** | | [optional] +**compensation_change_reason_id** | **string** | | [optional] +**compensation_comment** | **string** | | [optional] +**compensation_effective_date** | **string** | | [optional] +**compensation_end_date** | **string** | | [optional] +**contract_end_date** | **string** | | [optional] +**country** | **string** | | [optional] +**country_id** | **string** | | [optional] +**department_id** | **string** | | [optional] +**department_name** | **string** | | [optional] +**dietary_restrictions** | **string** | | [optional] +**display_name** | **string** | | [optional] +**division_id** | **string** | | [optional] +**division_name** | **string** | | [optional] +**eeo_job_category** | **string** | | [optional] +**eeo_job_category_id** | **string** | | [optional] +**ein** | **string** | | [optional] +**eligible_for_rehire** | **string** | | [optional] +**eligible_for_rehire_id** | **string** | | [optional] +**employee_name** | **string** | | [optional] +**employee_number** | **string** | | [optional] +**employment_status_comment** | **string** | | [optional] +**employment_status_effective_date** | **string** | | [optional] +**employment_status_id** | **string** | | [optional] +**employment_status_name** | **string** | | [optional] +**employment_type** | **string** | | [optional] +**employment_type_id** | **string** | | [optional] +**ethnicity** | **string** | | [optional] +**ethnicity_id** | **string** | | [optional] +**facebook_url** | **string** | | [optional] +**final_dose_administration_date** | **string** | | [optional] +**final_pay_date** | **string** | | [optional] +**first_name_last_name** | **string** | | [optional] +**first_name_middle_initial** | **string** | | [optional] +**flsa_code** | **string** | | [optional] +**flsa_code_id** | **string** | | [optional] +**gender** | **string** | | [optional] +**gender_identity** | **string** | | [optional] +**gender_identity_id** | **int[]** | Employee's gender identity ID. Only included when requested via the `fields` parameter. | [optional] +**hire_date** | **string** | | [optional] +**home_email** | **string** | | [optional] +**home_phone** | **string** | | [optional] +**hours_per_pay_cycle** | **string** | | [optional] +**instagram_url** | **string** | | [optional] +**is_manager** | **bool** | | [optional] +**jacket_size** | **string** | | [optional] +**jacket_size_id** | **string** | | [optional] +**job_information_effective_date** | **string** | | [optional] +**job_title_id** | **string** | | [optional] +**linkedin_url** | **string** | | [optional] +**location_id** | **string** | | [optional] +**location_name** | **string** | | [optional] +**marital_status** | **string** | | [optional] +**middle_initial** | **string** | | [optional] +**middle_name** | **string** | | [optional] +**mobile_phone** | **string** | | [optional] +**national_id** | **string** | | [optional] +**national_insurance_category** | **string** | | [optional] +**national_insurance_category_id** | **string** | | [optional] +**nationality** | **string** | | [optional] +**nationality_id** | **string** | | [optional] +**nick_name** | **string** | | [optional] +**nin** | **string** | | [optional] +**notice_period** | **string** | | [optional] +**notice_period_id** | **string** | | [optional] +**original_hire_date** | **string** | | [optional] +**overtime** | **string** | | [optional] +**overtime_rate** | [**\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfOvertimeRate**](GetEmployeesEmployeeResponseAllOfOvertimeRate.md) | | [optional] +**paid_per** | **string** | | [optional] +**pay_rate** | [**\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfPayRate**](GetEmployeesEmployeeResponseAllOfPayRate.md) | | [optional] +**pay_schedule** | **string** | | [optional] +**pay_schedule_id** | **string** | | [optional] +**pay_type** | **string** | | [optional] +**pinterest_url** | **string** | | [optional] +**preferred_name_last_name** | **string** | | [optional] +**probation_end_date** | **string** | | [optional] +**pronouns** | **string** | | [optional] +**pronouns_id** | **string** | | [optional] +**proof_of_vaccination** | **bool** | | [optional] +**reports_to_id** | **string** | | [optional] +**reports_to_name** | **string** | | [optional] +**secondary_language** | **string** | | [optional] +**shirt_size** | **string** | | [optional] +**shirt_size_id** | **string** | | [optional] +**sin** | **string** | | [optional] +**skype_username** | **string** | | [optional] +**ssn** | **string** | | [optional] +**state** | **string** | | [optional] +**state_id** | **string** | | [optional] +**tax_type_id** | **string** | | [optional] +**teams** | [**\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfTeams[]**](GetEmployeesEmployeeResponseAllOfTeams.md) | Employee's teams. Only included when requested via the `fields` parameter. | [optional] +**tenure** | **string** | | [optional] +**termination_date** | **string** | | [optional] +**termination_reason** | **string** | | [optional] +**termination_reason_id** | **string** | | [optional] +**termination_regrettable** | **string** | | [optional] +**termination_regrettable_id** | **string** | | [optional] +**termination_type** | **string** | | [optional] +**termination_type_id** | **string** | | [optional] +**t_shirt_size** | **string** | | [optional] +**t_shirt_size_id** | **string** | | [optional] +**twitter_url** | **string** | | [optional] +**user_id** | **string** | | [optional] +**vaccination_status** | **string** | | [optional] +**vaccination_status_id** | **string** | | [optional] +**vaccine_received** | **string** | | [optional] +**vaccine_received_id** | **string** | | [optional] +**veteran_status** | **string** | | [optional] +**veteran_status_id** | **int[]** | Employee's veteran status ID. Only included when requested via the `fields` parameter. | [optional] +**work_email** | **string** | | [optional] +**work_phone** | **string** | | [optional] +**work_phone_extension** | **string** | | [optional] +**zipcode** | **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/GetEmployeesEmployeeResponseAllOfOvertimeRate.md b/docs/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.md new file mode 100644 index 00000000..833d2c82 --- /dev/null +++ b/docs/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.md @@ -0,0 +1,10 @@ +# # GetEmployeesEmployeeResponseAllOfOvertimeRate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **string** | | [optional] +**currency** | **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/AddNewEmployeeTrainingRecordRequestCost.md b/docs/Model/GetEmployeesEmployeeResponseAllOfPayRate.md similarity index 77% rename from docs/Model/AddNewEmployeeTrainingRecordRequestCost.md rename to docs/Model/GetEmployeesEmployeeResponseAllOfPayRate.md index 8370f38a..84059920 100644 --- a/docs/Model/AddNewEmployeeTrainingRecordRequestCost.md +++ b/docs/Model/GetEmployeesEmployeeResponseAllOfPayRate.md @@ -1,10 +1,10 @@ -# # AddNewEmployeeTrainingRecordRequestCost +# # GetEmployeesEmployeeResponseAllOfPayRate ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**amount** | **string** | | [optional] **currency** | **string** | | [optional] -**cost** | **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/Dataset.md b/docs/Model/GetEmployeesEmployeeResponseAllOfTeams.md similarity index 78% rename from docs/Model/Dataset.md rename to docs/Model/GetEmployeesEmployeeResponseAllOfTeams.md index 8f432589..17c90361 100644 --- a/docs/Model/Dataset.md +++ b/docs/Model/GetEmployeesEmployeeResponseAllOfTeams.md @@ -1,10 +1,10 @@ -# # Dataset +# # GetEmployeesEmployeeResponseAllOfTeams ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] +**id** | **int** | | [optional] **label** | **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/GetEmployeesFilterRequestObject.md b/docs/Model/GetEmployeesFilterRequestObject.md index b1eb297c..31969550 100644 --- a/docs/Model/GetEmployeesFilterRequestObject.md +++ b/docs/Model/GetEmployeesFilterRequestObject.md @@ -4,10 +4,118 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address_line1** | **string** | Substring match (case-insensitive). | [optional] +**address_line2** | **string** | Substring match (case-insensitive). | [optional] +**allergies** | **string** | Substring match (case-insensitive). | [optional] +**birthplace** | **string** | Substring match (case-insensitive). | [optional] +**citizenship** | **string** | Substring match (case-insensitive). | [optional] +**city** | **string** | Substring match (case-insensitive). | [optional] +**compensation_change_reason** | **string** | Substring match (case-insensitive). | [optional] +**compensation_comment** | **string** | Substring match (case-insensitive). | [optional] +**country** | **string** | Substring match (case-insensitive). | [optional] +**department_name** | **string** | Substring match (case-insensitive). | [optional] +**dietary_restrictions** | **string** | Substring match (case-insensitive). | [optional] +**display_name** | **string** | Substring match (case-insensitive). | [optional] +**division_name** | **string** | Substring match (case-insensitive). | [optional] +**eeo_job_category** | **string** | Substring match (case-insensitive). | [optional] +**eligible_for_rehire** | **string** | Substring match (case-insensitive). | [optional] +**employee_name** | **string** | Substring match (case-insensitive). | [optional] +**employee_number** | **string** | Substring match (case-insensitive). | [optional] +**employment_status_name** | **string** | Substring match (case-insensitive). | [optional] +**employment_status_comment** | **string** | Substring match (case-insensitive). | [optional] +**employment_type** | **string** | Substring match (case-insensitive). | [optional] +**ethnicity** | **string** | Substring match (case-insensitive). | [optional] +**facebook_url** | **string** | Substring match (case-insensitive). | [optional] +**first_name_last_name** | **string** | Substring match (case-insensitive). | [optional] +**first_name_middle_initial** | **string** | Substring match (case-insensitive). | [optional] +**flsa_code** | **string** | Substring match (case-insensitive). | [optional] +**home_email** | **string** | Substring match (case-insensitive). | [optional] +**home_phone** | **string** | Substring match (case-insensitive). | [optional] +**instagram_url** | **string** | Substring match (case-insensitive). | [optional] +**jacket_size** | **string** | Substring match (case-insensitive). | [optional] +**linkedin_url** | **string** | Substring match (case-insensitive). | [optional] +**location_name** | **string** | Substring match (case-insensitive). | [optional] +**marital_status** | **string** | Substring match (case-insensitive). | [optional] +**middle_initial** | **string** | Substring match (case-insensitive). | [optional] +**middle_name** | **string** | Substring match (case-insensitive). | [optional] +**mobile_phone** | **string** | Substring match (case-insensitive). | [optional] +**national_insurance_category** | **string** | Substring match (case-insensitive). | [optional] +**nationality** | **string** | Substring match (case-insensitive). | [optional] +**nick_name** | **string** | Substring match (case-insensitive). | [optional] +**notice_period** | **string** | Substring match (case-insensitive). | [optional] +**pay_schedule** | **string** | Substring match (case-insensitive). | [optional] +**pinterest_url** | **string** | Substring match (case-insensitive). | [optional] +**preferred_name_last_name** | **string** | Substring match (case-insensitive). | [optional] +**pronouns** | **string** | Substring match (case-insensitive). | [optional] +**reports_to_name** | **string** | Substring match (case-insensitive). | [optional] +**secondary_language** | **string** | Substring match (case-insensitive). | [optional] +**shirt_size** | **string** | Substring match (case-insensitive). | [optional] +**skype_username** | **string** | Substring match (case-insensitive). | [optional] +**state** | **string** | Substring match (case-insensitive). | [optional] +**termination_reason** | **string** | Substring match (case-insensitive). | [optional] +**termination_regrettable** | **string** | Substring match (case-insensitive). | [optional] +**termination_type** | **string** | Substring match (case-insensitive). | [optional] +**t_shirt_size** | **string** | Substring match (case-insensitive). | [optional] +**twitter_url** | **string** | Substring match (case-insensitive). | [optional] +**vaccination_status** | **string** | Substring match (case-insensitive). | [optional] +**vaccine_received** | **string** | Substring match (case-insensitive). | [optional] +**work_email** | **string** | Substring match (case-insensitive). | [optional] +**work_phone** | **string** | Substring match (case-insensitive). | [optional] +**work_phone_extension** | **string** | Substring match (case-insensitive). | [optional] +**zipcode** | **string** | Substring match (case-insensitive). | [optional] +**gender** | **string** | Exact match. | [optional] +**paid_per** | **string** | Exact match. | [optional] +**pay_type** | **string** | Exact match. | [optional] +**citizenship_id** | **int** | Exact match against an integer ID. | [optional] +**compensation_change_reason_id** | **int** | Exact match against an integer ID. | [optional] +**country_id** | **int** | Exact match against an integer ID. | [optional] +**department_id** | **int** | Exact match against an integer ID. | [optional] +**division_id** | **int** | Exact match against an integer ID. | [optional] +**eeo_job_category_id** | **int** | Exact match against an integer ID. | [optional] +**eligible_for_rehire_id** | **int** | Exact match against an integer ID. | [optional] +**employment_status_id** | **int** | Exact match against an integer ID. | [optional] +**employment_type_id** | **int** | Exact match against an integer ID. | [optional] +**ethnicity_id** | **int** | Exact match against an integer ID. | [optional] +**flsa_code_id** | **int** | Exact match against an integer ID. | [optional] +**jacket_size_id** | **int** | Exact match against an integer ID. | [optional] +**job_title_id** | **int** | Exact match against an integer ID. | [optional] +**location_id** | **int** | Exact match against an integer ID. | [optional] +**national_insurance_category_id** | **int** | Exact match against an integer ID. | [optional] +**nationality_id** | **int** | Exact match against an integer ID. | [optional] +**notice_period_id** | **int** | Exact match against an integer ID. | [optional] +**pay_schedule_id** | **int** | Exact match against an integer ID. | [optional] +**pronouns_id** | **int** | Exact match against an integer ID. | [optional] +**reports_to_id** | **int** | Exact match against an integer ID. | [optional] +**shirt_size_id** | **int** | Exact match against an integer ID. | [optional] +**state_id** | **int** | Exact match against an integer ID. | [optional] +**tax_type_id** | **int** | Exact match against an integer ID. | [optional] +**termination_reason_id** | **int** | Exact match against an integer ID. | [optional] +**termination_regrettable_id** | **int** | Exact match against an integer ID. | [optional] +**termination_type_id** | **int** | Exact match against an integer ID. | [optional] +**t_shirt_size_id** | **int** | Exact match against an integer ID. | [optional] +**vaccination_status_id** | **int** | Exact match against an integer ID. | [optional] +**vaccine_received_id** | **int** | Exact match against an integer ID. | [optional] +**is_manager** | **bool** | Exact match (true/false). | [optional] +**proof_of_vaccination** | **bool** | Exact match (true/false). | [optional] +**age** | **float** | Exact numeric match. | [optional] +**tenure** | **float** | Exact numeric match. | [optional] +**hours_per_pay_cycle** | **float** | Exact numeric match. | [optional] +**birth_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**compensation_effective_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**compensation_end_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**contract_end_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**employment_status_effective_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**final_dose_administration_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**final_pay_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**hire_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**job_information_effective_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**original_hire_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**probation_end_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] +**termination_date** | **\DateTime** | Exact match against an ISO 8601 date (YYYY-MM-DD). | [optional] **first_name** | **string** | This will match any employees whose first name contains this string (case insensitive) | [optional] **last_name** | **string** | This will match any employees whose last name contains this string (case insensitive) | [optional] **job_title_name** | **string** | This will match any employees whose current job title descriptor contains this string (case insensitive) | [optional] **status** | **string** | Employee status | [optional] -**ids** | **int[]** | List of employee IDs for batch fetch. Accepts repeated keys (filter[ids][]=123&filter[ids][]=124) or a single comma-separated string (filter[ids]=123,124). | [optional] +**ids** | **int[]** | List of employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`). | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetEmployeesResponseObject.md b/docs/Model/GetEmployeesResponseObject.md index d5b999e8..bdc5ae33 100644 --- a/docs/Model/GetEmployeesResponseObject.md +++ b/docs/Model/GetEmployeesResponseObject.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**\BhrSdk\Model\GetEmployeesEmployeeResponse[]**](GetEmployeesEmployeeResponse.md) | Typed collection of employee response objects | **meta** | [**\BhrSdk\Model\CursorPagedResponseMetadata**](CursorPagedResponseMetadata.md) | Metadata information including total count and pagination details | -**links** | [**\BhrSdk\Model\GetEmployeesResponseObjectLinks**](GetEmployeesResponseObjectLinks.md) | | +**_links** | [**\BhrSdk\Model\GetEmployeesResponseObjectLinks**](GetEmployeesResponseObjectLinks.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/GetEmployeesResponseObjectLinks.md b/docs/Model/GetEmployeesResponseObjectLinks.md index fa5bc13b..1478162c 100644 --- a/docs/Model/GetEmployeesResponseObjectLinks.md +++ b/docs/Model/GetEmployeesResponseObjectLinks.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**self** | **string** | Link to current page | [optional] -**next** | **string** | Link to next page | [optional] -**prev** | **string** | Link to previous page | [optional] +**self** | [**\BhrSdk\Model\GetEmployeesResponseObjectLinksSelf**](GetEmployeesResponseObjectLinksSelf.md) | | [optional] +**next** | [**\BhrSdk\Model\GetEmployeesResponseObjectLinksNext**](GetEmployeesResponseObjectLinksNext.md) | | [optional] +**prev** | [**\BhrSdk\Model\GetEmployeesResponseObjectLinksPrev**](GetEmployeesResponseObjectLinksPrev.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/GetEmployeesResponseObjectLinksNext.md b/docs/Model/GetEmployeesResponseObjectLinksNext.md new file mode 100644 index 00000000..585b1108 --- /dev/null +++ b/docs/Model/GetEmployeesResponseObjectLinksNext.md @@ -0,0 +1,9 @@ +# # GetEmployeesResponseObjectLinksNext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URL of the next page | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetEmployeesResponseObjectLinksPrev.md b/docs/Model/GetEmployeesResponseObjectLinksPrev.md new file mode 100644 index 00000000..4b61bf95 --- /dev/null +++ b/docs/Model/GetEmployeesResponseObjectLinksPrev.md @@ -0,0 +1,9 @@ +# # GetEmployeesResponseObjectLinksPrev + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URL of the previous page | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetEmployeesResponseObjectLinksSelf.md b/docs/Model/GetEmployeesResponseObjectLinksSelf.md new file mode 100644 index 00000000..f3473d2e --- /dev/null +++ b/docs/Model/GetEmployeesResponseObjectLinksSelf.md @@ -0,0 +1,9 @@ +# # GetEmployeesResponseObjectLinksSelf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URL of the current page | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Goal.md b/docs/Model/Goal.md deleted file mode 100644 index 2a647dfb..00000000 --- a/docs/Model/Goal.md +++ /dev/null @@ -1,16 +0,0 @@ -# # Goal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | A unique identifier for the record. Use this ID to reference this goal. | -**title** | **string** | The goal title. | -**description** | **string** | The goal description. | [optional] -**percent_complete** | **int** | The goal completion percentage (0 - 100). | [optional] -**aligns_with_option_id** | **string** | The option ID that aligns with this goal. | [optional] -**shared_with_employee_ids** | **int[]** | Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". | [optional] -**due_date** | **string** | The goal due date in YYYY-mm-dd format. | [optional] -**completion_date** | **float** | The date the goal was completed. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GoalAggregateCommentsInner.md b/docs/Model/GoalAggregateCommentsInner.md index 1160a4f6..e8856186 100644 --- a/docs/Model/GoalAggregateCommentsInner.md +++ b/docs/Model/GoalAggregateCommentsInner.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Id of the comment. | [optional] +**id** | **string** | Id of the comment. | [optional] **author_user_id** | **int** | Id of the author of the comment. | [optional] -**created_at** | **string** | The date and time that the comment was created. | [optional] +**created_at** | **string** | ISO 8601 UTC timestamp when the comment was created. | [optional] **text** | **string** | The actual text of the comment. | [optional] **can_edit** | **bool** | Can the comment be edited. | [optional] **can_delete** | **bool** | Can the comment be deleted. | [optional] diff --git a/docs/Model/GoalCommentResponse.md b/docs/Model/GoalCommentResponse.md new file mode 100644 index 00000000..b593d52c --- /dev/null +++ b/docs/Model/GoalCommentResponse.md @@ -0,0 +1,14 @@ +# # GoalCommentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The comment ID. | [optional] +**author_user_id** | **int** | The user ID of the comment author. | [optional] +**created_at** | **string** | ISO 8601 UTC timestamp when the comment was created. | [optional] +**text** | **string** | The text content of the comment. | [optional] +**can_edit** | **bool** | Whether the API user can edit this comment. | [optional] +**can_delete** | **bool** | Whether the API user can delete this comment. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GoalCommentsResponse.md b/docs/Model/GoalCommentsResponse.md new file mode 100644 index 00000000..b5ebef47 --- /dev/null +++ b/docs/Model/GoalCommentsResponse.md @@ -0,0 +1,9 @@ +# # GoalCommentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**\BhrSdk\Model\GoalCommentsResponseCommentsInner[]**](GoalCommentsResponseCommentsInner.md) | Array of comment objects for the goal. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GoalCommentsResponseCommentsInner.md b/docs/Model/GoalCommentsResponseCommentsInner.md new file mode 100644 index 00000000..8c3bf203 --- /dev/null +++ b/docs/Model/GoalCommentsResponseCommentsInner.md @@ -0,0 +1,14 @@ +# # GoalCommentsResponseCommentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The comment ID. | [optional] +**author_user_id** | **int** | The user ID of the comment author. | [optional] +**created_at** | **string** | ISO 8601 UTC timestamp when the comment was created. | [optional] +**text** | **string** | The text content of the comment. | [optional] +**can_edit** | **bool** | Whether the API user can edit this comment. | [optional] +**can_delete** | **bool** | Whether the API user can delete this comment. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GoalResponse.md b/docs/Model/GoalResponse.md new file mode 100644 index 00000000..667226de --- /dev/null +++ b/docs/Model/GoalResponse.md @@ -0,0 +1,9 @@ +# # GoalResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**goal** | [**\BhrSdk\Model\TransformedApiGoal**](TransformedApiGoal.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/GoalsAggregateV12CommentsInner.md b/docs/Model/GoalsAggregateV12CommentsInner.md index 69f54c40..6f7814ff 100644 --- a/docs/Model/GoalsAggregateV12CommentsInner.md +++ b/docs/Model/GoalsAggregateV12CommentsInner.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**goal_id** | **int** | The goalId that the comments are linked to. | [optional] +**goal_id** | **string** | The goalId that the comments are linked to. | [optional] **comment_count** | **int** | How many comments are linked to the goal | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HiringLead.md b/docs/Model/HiringLead.md index 7863902c..0ca07ae0 100644 --- a/docs/Model/HiringLead.md +++ b/docs/Model/HiringLead.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee_id** | **int** | The employeeId of the potential hiring lead | [optional] -**preferred_full_name** | **string** | The preferred full name of the potential hiring lead | [optional] +**employee_id** | **int** | The employee ID to use as the `hiringLead` value in the Create Job Opening request | [optional] +**preferred_full_name** | **string** | The employee's preferred full 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/HiringLeadsList.md b/docs/Model/HiringLeadsList.md deleted file mode 100644 index a0031a1b..00000000 --- a/docs/Model/HiringLeadsList.md +++ /dev/null @@ -1,9 +0,0 @@ -# # HiringLeadsList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hiring_lead** | [**\BhrSdk\Model\HiringLead**](HiringLead.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/ImportCompensationBenchmarksResponse.md b/docs/Model/ImportCompensationBenchmarksResponse.md new file mode 100644 index 00000000..c0d4833c --- /dev/null +++ b/docs/Model/ImportCompensationBenchmarksResponse.md @@ -0,0 +1,10 @@ +# # ImportCompensationBenchmarksResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upload_data** | **string[][]** | Parsed CSV rows. Each row is an array of cell values as strings. | [optional] +**column_map** | [**\BhrSdk\Model\CompensationBenchmarkingColumnMap[]**](CompensationBenchmarkingColumnMap.md) | Suggested mapping between expected benchmark fields and CSV column headers. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Industry.md b/docs/Model/Industry.md new file mode 100644 index 00000000..1c74ffe4 --- /dev/null +++ b/docs/Model/Industry.md @@ -0,0 +1,10 @@ +# # Industry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Industry ID | [optional] +**name** | **string** | Industry 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/InlineObjectInner.md b/docs/Model/InlineObjectInner.md new file mode 100644 index 00000000..22444cb9 --- /dev/null +++ b/docs/Model/InlineObjectInner.md @@ -0,0 +1,13 @@ +# # InlineObjectInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Plan ID | [optional] +**type** | **string** | Plan category | [optional] +**name** | **string** | Plan name | [optional] +**carrier_name** | **string** | Carrier name | [optional] +**syncing_capabilities** | **string[]** | Which integration the plan is capable of being synced with | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvalidRequest.md b/docs/Model/InvalidRequest.md deleted file mode 100644 index 55c0939c..00000000 --- a/docs/Model/InvalidRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # InvalidRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**\BhrSdk\Model\InvalidRequestError**](InvalidRequestError.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/InvalidRequestError.md b/docs/Model/InvalidRequestError.md deleted file mode 100644 index d34cf67e..00000000 --- a/docs/Model/InvalidRequestError.md +++ /dev/null @@ -1,10 +0,0 @@ -# # InvalidRequestError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **string** | Error code indicating the type of validation failure. For BadPage errors, common causes include: 1) Invalid page parameter format, 2) Using the wrong paging parameter for before/after cursors, or 3) An employee on the page boundary changed between calls (for example, the employee was deleted or no longer matches the filter criteria). | -**message** | **string** | Human-readable message describing the validation failure. | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/JobSummary.md b/docs/Model/JobSummary.md new file mode 100644 index 00000000..c70d609a --- /dev/null +++ b/docs/Model/JobSummary.md @@ -0,0 +1,19 @@ +# # JobSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Job opening ID | [optional] +**title** | [**\BhrSdk\Model\ApplicationDetailsJobTitle**](ApplicationDetailsJobTitle.md) | | [optional] +**posted_date** | **\DateTime** | ISO 8601 datetime when the job opening was posted | [optional] +**location** | **object** | | [optional] +**department** | **object** | | [optional] +**status** | [**\BhrSdk\Model\JobSummaryStatus**](JobSummaryStatus.md) | | [optional] +**hiring_lead** | **object** | | [optional] +**new_applicants_count** | **int** | Number of applicants in 'New' status | [optional] +**active_applicants_count** | **int** | Number of applicants in an active status | [optional] +**total_applicants_count** | **int** | Total number of applicants | [optional] +**posting_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/JobSummaryStatus.md b/docs/Model/JobSummaryStatus.md new file mode 100644 index 00000000..5d1ab2f6 --- /dev/null +++ b/docs/Model/JobSummaryStatus.md @@ -0,0 +1,10 @@ +# # JobSummaryStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Status ID | [optional] +**label** | **string** | Status 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/JsonDirectoryEmployee.md b/docs/Model/JsonDirectoryEmployee.md deleted file mode 100644 index e57ccf88..00000000 --- a/docs/Model/JsonDirectoryEmployee.md +++ /dev/null @@ -1,10 +0,0 @@ -# # JsonDirectoryEmployee - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fields** | [**\BhrSdk\Model\JsonDirectoryEmployeeFieldsInner[]**](JsonDirectoryEmployeeFieldsInner.md) | Array of field definitions | [optional] -**employees** | **object[]** | Array of employee records. Each employee object contains properties matching the 'id' values from the 'fields' array. Property names are dynamically determined by company configuration. Property values can be strings, numbers, booleans, or null. Common fields include: id, displayName, firstName, lastName, preferredName, jobTitle, workPhone, mobilePhone, workEmail, department, location, division, twitterFeed, pronouns, workPhoneExtension, photoUploaded, photoUrl, canUploadPhoto. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/JsonDirectoryEmployeeFieldsInner.md b/docs/Model/JsonDirectoryEmployeeFieldsInner.md deleted file mode 100644 index 2f47b5be..00000000 --- a/docs/Model/JsonDirectoryEmployeeFieldsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# # JsonDirectoryEmployeeFieldsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Field identifier | [optional] -**type** | **string** | Field data type | [optional] -**name** | **string** | Field display 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/JsonEmployeeFiles.md b/docs/Model/JsonEmployeeFiles.md new file mode 100644 index 00000000..29eb68fa --- /dev/null +++ b/docs/Model/JsonEmployeeFiles.md @@ -0,0 +1,10 @@ +# # JsonEmployeeFiles + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee** | [**\BhrSdk\Model\JsonEmployeeFilesEmployee**](JsonEmployeeFilesEmployee.md) | | [optional] +**categories** | [**\BhrSdk\Model\JsonEmployeeFilesCategoriesInner[]**](JsonEmployeeFilesCategoriesInner.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/JsonEmployeeFilesCategoriesInner.md b/docs/Model/JsonEmployeeFilesCategoriesInner.md new file mode 100644 index 00000000..c9092b9e --- /dev/null +++ b/docs/Model/JsonEmployeeFilesCategoriesInner.md @@ -0,0 +1,15 @@ +# # JsonEmployeeFilesCategoriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Category ID. | [optional] +**name** | **string** | Category display name. | [optional] +**can_rename_category** | **string** | Whether the caller can rename this category. | [optional] +**can_delete_category** | **string** | Whether the caller can delete this category. | [optional] +**can_upload_files** | **string** | Whether the caller can upload files to this category. | [optional] +**display_if_empty** | **string** | Whether to display the category when it has no files. | [optional] +**files** | [**\BhrSdk\Model\JsonEmployeeFilesCategoriesInnerFilesInner[]**](JsonEmployeeFilesCategoriesInnerFilesInner.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/JsonEmployeeFilesCategoriesInnerFilesInner.md b/docs/Model/JsonEmployeeFilesCategoriesInnerFilesInner.md new file mode 100644 index 00000000..b23699f3 --- /dev/null +++ b/docs/Model/JsonEmployeeFilesCategoriesInnerFilesInner.md @@ -0,0 +1,18 @@ +# # JsonEmployeeFilesCategoriesInnerFilesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | File ID. | [optional] +**name** | **string** | File display name. | [optional] +**original_file_name** | **string** | Original uploaded filename. | [optional] +**size** | **int** | File size in bytes. | [optional] +**date_created** | **string** | UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`). | [optional] +**created_by** | **string** | Full name of the user who uploaded the file. | [optional] +**share_with_employee** | **string** | Whether the file is shared with the employee. | [optional] +**can_rename_file** | **string** | Whether the caller can rename this file. | [optional] +**can_delete_file** | **string** | Whether the caller can delete this file. | [optional] +**can_change_share_with_employee_field_value** | **string** | Whether the caller can toggle the share-with-employee setting. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/JsonEmployeeFilesEmployee.md b/docs/Model/JsonEmployeeFilesEmployee.md new file mode 100644 index 00000000..aacd047c --- /dev/null +++ b/docs/Model/JsonEmployeeFilesEmployee.md @@ -0,0 +1,9 @@ +# # JsonEmployeeFilesEmployee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Employee 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/LevelsAndBandsColumnMap.md b/docs/Model/LevelsAndBandsColumnMap.md new file mode 100644 index 00000000..3a487a66 --- /dev/null +++ b/docs/Model/LevelsAndBandsColumnMap.md @@ -0,0 +1,10 @@ +# # LevelsAndBandsColumnMap + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expected_column_key** | **string** | | [optional] +**column_name** | **string** | Column 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/LevelsAndBandsEmployee.md b/docs/Model/LevelsAndBandsEmployee.md new file mode 100644 index 00000000..62af6296 --- /dev/null +++ b/docs/Model/LevelsAndBandsEmployee.md @@ -0,0 +1,10 @@ +# # LevelsAndBandsEmployee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Employee id | [optional] +**name** | **string** | Employee 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/FieldList.md b/docs/Model/LevelsAndBandsErrorWarningIdentifier.md similarity index 68% rename from docs/Model/FieldList.md rename to docs/Model/LevelsAndBandsErrorWarningIdentifier.md index 3317a80e..1f048fde 100644 --- a/docs/Model/FieldList.md +++ b/docs/Model/LevelsAndBandsErrorWarningIdentifier.md @@ -1,9 +1,10 @@ -# # FieldList +# # LevelsAndBandsErrorWarningIdentifier ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fields** | [**\BhrSdk\Model\FieldListFieldsInner[]**](FieldListFieldsInner.md) | | [optional] +**group_id** | **int** | Group ID | +**level_id** | **int** | Level ID | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsGroup.md b/docs/Model/LevelsAndBandsGroup.md new file mode 100644 index 00000000..bb357b72 --- /dev/null +++ b/docs/Model/LevelsAndBandsGroup.md @@ -0,0 +1,11 @@ +# # LevelsAndBandsGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**group_name** | **string** | | [optional] +**levels** | [**\BhrSdk\Model\LevelsAndBandsLevel[]**](LevelsAndBandsLevel.md) | Array of levels in this group | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsGroupStatusCounts.md b/docs/Model/LevelsAndBandsGroupStatusCounts.md new file mode 100644 index 00000000..424cee50 --- /dev/null +++ b/docs/Model/LevelsAndBandsGroupStatusCounts.md @@ -0,0 +1,11 @@ +# # LevelsAndBandsGroupStatusCounts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | **int** | Number of levels/bands in draft status | [optional] +**historic** | **int** | Number of levels/bands in historic status | [optional] +**published** | **int** | Number of levels/bands in published 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/LevelsAndBandsJobTitle.md b/docs/Model/LevelsAndBandsJobTitle.md new file mode 100644 index 00000000..682d3e37 --- /dev/null +++ b/docs/Model/LevelsAndBandsJobTitle.md @@ -0,0 +1,10 @@ +# # LevelsAndBandsJobTitle + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Job title id | [optional] +**job_title** | **string** | Job title 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/LevelsAndBandsJobTitleAssignment.md b/docs/Model/LevelsAndBandsJobTitleAssignment.md new file mode 100644 index 00000000..3e284b32 --- /dev/null +++ b/docs/Model/LevelsAndBandsJobTitleAssignment.md @@ -0,0 +1,10 @@ +# # LevelsAndBandsJobTitleAssignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_title_id** | **int** | Job title id | [optional] +**level_id** | **int** | Compensation level 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/LevelsAndBandsJobTitleAssignmentsRequest.md b/docs/Model/LevelsAndBandsJobTitleAssignmentsRequest.md new file mode 100644 index 00000000..8f2b6036 --- /dev/null +++ b/docs/Model/LevelsAndBandsJobTitleAssignmentsRequest.md @@ -0,0 +1,9 @@ +# # LevelsAndBandsJobTitleAssignmentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**job_titles** | [**\BhrSdk\Model\LevelsAndBandsJobTitleAssignment[]**](LevelsAndBandsJobTitleAssignment.md) | Array of job title assignments | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsJobTitleWithEmployees.md b/docs/Model/LevelsAndBandsJobTitleWithEmployees.md new file mode 100644 index 00000000..42f3934e --- /dev/null +++ b/docs/Model/LevelsAndBandsJobTitleWithEmployees.md @@ -0,0 +1,12 @@ +# # LevelsAndBandsJobTitleWithEmployees + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Job id | [optional] +**title** | **string** | Job title | [optional] +**employees** | [**\BhrSdk\Model\LevelsAndBandsEmployee[]**](LevelsAndBandsEmployee.md) | Employees with this job title | [optional] +**level_id** | **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/LevelsAndBandsJobTitlesStatus.md b/docs/Model/LevelsAndBandsJobTitlesStatus.md new file mode 100644 index 00000000..1e963c39 --- /dev/null +++ b/docs/Model/LevelsAndBandsJobTitlesStatus.md @@ -0,0 +1,11 @@ +# # LevelsAndBandsJobTitlesStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_complete** | **bool** | Is the job titles step complete | +**errors** | **string[]** | Array of errors | +**warnings** | **object[]** | Array of warnings | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsLevel.md b/docs/Model/LevelsAndBandsLevel.md new file mode 100644 index 00000000..a3c4106c --- /dev/null +++ b/docs/Model/LevelsAndBandsLevel.md @@ -0,0 +1,14 @@ +# # LevelsAndBandsLevel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level_id** | **int** | | [optional] +**level_name** | **string** | | [optional] +**pay_band** | [**\BhrSdk\Model\LevelsAndBandsPayBand**](LevelsAndBandsPayBand.md) | Pay band associated with this level | [optional] +**job_titles** | [**\BhrSdk\Model\LevelsAndBandsJobTitle[]**](LevelsAndBandsJobTitle.md) | Array of job titles associated with this level | [optional] +**errors** | **string[]** | Array of validation errors for this level | [optional] +**warnings** | **string[]** | Array of validation warnings for this 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/LevelsAndBandsLevelsAndBands.md b/docs/Model/LevelsAndBandsLevelsAndBands.md new file mode 100644 index 00000000..d6bb2029 --- /dev/null +++ b/docs/Model/LevelsAndBandsLevelsAndBands.md @@ -0,0 +1,9 @@ +# # LevelsAndBandsLevelsAndBands + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groups** | [**\BhrSdk\Model\LevelsAndBandsGroup[]**](LevelsAndBandsGroup.md) | Array of compensation level groups to upsert | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsLevelsAndBandsStatus.md b/docs/Model/LevelsAndBandsLevelsAndBandsStatus.md new file mode 100644 index 00000000..a66ff991 --- /dev/null +++ b/docs/Model/LevelsAndBandsLevelsAndBandsStatus.md @@ -0,0 +1,12 @@ +# # LevelsAndBandsLevelsAndBandsStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**levels** | [**\BhrSdk\Model\LevelsAndBandsStepStatus**](LevelsAndBandsStepStatus.md) | Object for compensation level groups and levels | +**pay_bands** | [**\BhrSdk\Model\LevelsAndBandsStepStatus**](LevelsAndBandsStepStatus.md) | Object for compensation level groups and levels | +**job_titles** | [**\BhrSdk\Model\LevelsAndBandsJobTitlesStatus**](LevelsAndBandsJobTitlesStatus.md) | Object for compensation level groups and levels | +**review** | [**\BhrSdk\Model\LevelsAndBandsStepStatus**](LevelsAndBandsStepStatus.md) | Object for compensation level groups and levels | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsPayBand.md b/docs/Model/LevelsAndBandsPayBand.md new file mode 100644 index 00000000..9e54963c --- /dev/null +++ b/docs/Model/LevelsAndBandsPayBand.md @@ -0,0 +1,15 @@ +# # LevelsAndBandsPayBand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level_id** | **int** | | [optional] +**min** | **float** | The minimum value for the level | [optional] +**mid** | **float** | The middle value for the level | [optional] +**max** | **float** | The maximum value for the level | [optional] +**currency_code** | **string** | | [optional] +**percentage_range** | **float** | The percentage range for the level | [optional] +**compensation_type** | **string** | The compensation type for the 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/LevelsAndBandsStepStatus.md b/docs/Model/LevelsAndBandsStepStatus.md new file mode 100644 index 00000000..f1207bbd --- /dev/null +++ b/docs/Model/LevelsAndBandsStepStatus.md @@ -0,0 +1,11 @@ +# # LevelsAndBandsStepStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_complete** | **bool** | Whether the step is complete | +**errors** | [**\BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[]**](LevelsAndBandsErrorWarningIdentifier.md) | Array of errors | +**warnings** | [**\BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[]**](LevelsAndBandsErrorWarningIdentifier.md) | Array of warnings | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LevelsAndBandsUploadResponse.md b/docs/Model/LevelsAndBandsUploadResponse.md new file mode 100644 index 00000000..05f2578e --- /dev/null +++ b/docs/Model/LevelsAndBandsUploadResponse.md @@ -0,0 +1,10 @@ +# # LevelsAndBandsUploadResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upload_data** | **string[]** | Upload data | [optional] +**column_map** | [**\BhrSdk\Model\LevelsAndBandsColumnMap[]**](LevelsAndBandsColumnMap.md) | Column map | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListFieldDetail.md b/docs/Model/ListFieldDetail.md new file mode 100644 index 00000000..023075d7 --- /dev/null +++ b/docs/Model/ListFieldDetail.md @@ -0,0 +1,15 @@ +# # ListFieldDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The list ID. | [optional] +**field_id** | **int** | The field ID. | [optional] +**name** | **string** | The display name of the list field. | [optional] +**alias** | **string** | | [optional] +**manageable** | **string** | Whether the list field options can be modified via the API. | [optional] +**multiple** | **string** | Whether this field supports multiple values. | [optional] +**options** | [**\BhrSdk\Model\ListFieldOption[]**](ListFieldOption.md) | The available options for this list field. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListFieldOption.md b/docs/Model/ListFieldOption.md new file mode 100644 index 00000000..e6619d70 --- /dev/null +++ b/docs/Model/ListFieldOption.md @@ -0,0 +1,15 @@ +# # ListFieldOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The option ID. | [optional] +**name** | **string** | The display value of the option. In XML format, this is the text content of the <option> element. | [optional] +**archived** | **string** | Whether this option is archived. Archived options are preserved for historical data integrity and continue to appear in responses. Filter by archived: no to show only active options. | [optional] +**created_date** | **string** | | [optional] +**archived_date** | **string** | | [optional] +**manageable** | **string** | Whether this individual option can be modified via the API. | [optional] +**frequency** | **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/ListFieldValues.md b/docs/Model/ListFieldValues.md index 2b4ed011..b20de89a 100644 --- a/docs/Model/ListFieldValues.md +++ b/docs/Model/ListFieldValues.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**options** | [**\BhrSdk\Model\ListFieldValuesOptionsInner[]**](ListFieldValuesOptionsInner.md) | | [optional] +**options** | [**\BhrSdk\Model\ListFieldValuesOptionsInner[]**](ListFieldValuesOptionsInner.md) | The list field options to create, update, or archive. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListFieldValuesOptionsInner.md b/docs/Model/ListFieldValuesOptionsInner.md index dc5dc6cb..b9912321 100644 --- a/docs/Model/ListFieldValuesOptionsInner.md +++ b/docs/Model/ListFieldValuesOptionsInner.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**value** | **string** | | [optional] -**archived** | **string** | | [optional] -**adp_code** | **string** | | [optional] +**id** | **int** | The existing option ID. Omit this field to create a new option. Required when archiving an existing option. | [optional] +**value** | **string** | The display value for the option. Required when creating a new option (i.e., when id is omitted). | [optional] +**archived** | **string** | Whether the option should be archived. Use `yes` to soft-delete an option or `no` to reactivate a previously archived option. Archived options continue to appear in GET responses for historical data integrity. | [optional] +**adp_code** | **string** | Optional payroll-mapping code associated with the option. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListFieldValuesXml.md b/docs/Model/ListFieldValuesXml.md new file mode 100644 index 00000000..67a8ed6c --- /dev/null +++ b/docs/Model/ListFieldValuesXml.md @@ -0,0 +1,9 @@ +# # ListFieldValuesXml + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**option** | [**\BhrSdk\Model\ListFieldValuesXmlOptionInner[]**](ListFieldValuesXmlOptionInner.md) | One or more options to create, update, or archive. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListFieldValuesXmlOptionInner.md b/docs/Model/ListFieldValuesXmlOptionInner.md new file mode 100644 index 00000000..15e328e0 --- /dev/null +++ b/docs/Model/ListFieldValuesXmlOptionInner.md @@ -0,0 +1,12 @@ +# # ListFieldValuesXmlOptionInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The existing option ID. Omit to create a new option. Required when archiving. | [optional] +**value** | **string** | The display value for the option. In XML format, this is the text content of the <option> element. | [optional] +**archived** | **string** | Whether to archive this option. Use yes to soft-delete or no to reactivate. | [optional] +**adp_code** | **string** | Optional payroll-mapping code. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListUsersResponseValue.md b/docs/Model/ListUsersResponseValue.md new file mode 100644 index 00000000..df58839a --- /dev/null +++ b/docs/Model/ListUsersResponseValue.md @@ -0,0 +1,15 @@ +# # ListUsersResponseValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The user ID. | [optional] +**employee_id** | **int** | The ID of the employee record linked to this user. Always present in the JSON response; `0` when no employee record is associated. | [optional] +**first_name** | **string** | First name. | [optional] +**last_name** | **string** | Last name. | [optional] +**email** | **string** | The user's email address. Resolved in priority order: work email, home email, account email. | [optional] +**status** | **string** | Account status. | [optional] +**last_login** | **\DateTime** | ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListUsersXmlResponse.md b/docs/Model/ListUsersXmlResponse.md new file mode 100644 index 00000000..c28ebe6a --- /dev/null +++ b/docs/Model/ListUsersXmlResponse.md @@ -0,0 +1,9 @@ +# # ListUsersXmlResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**\BhrSdk\Model\ListUsersXmlResponseUserInner[]**](ListUsersXmlResponseUserInner.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/ListUsersXmlResponseUserInner.md b/docs/Model/ListUsersXmlResponseUserInner.md new file mode 100644 index 00000000..d3baf41f --- /dev/null +++ b/docs/Model/ListUsersXmlResponseUserInner.md @@ -0,0 +1,15 @@ +# # ListUsersXmlResponseUserInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The user ID. | [optional] +**employee_id** | **int** | The employee record ID. Present as an XML attribute only when the user has an associated employee record. | [optional] +**first_name** | **string** | First name. | [optional] +**last_name** | **string** | Last name. | [optional] +**email** | **string** | The user's email address. | [optional] +**status** | **string** | Account status. | [optional] +**last_login** | **\DateTime** | ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LocationResponseObject.md b/docs/Model/LocationResponseObject.md new file mode 100644 index 00000000..08affe37 --- /dev/null +++ b/docs/Model/LocationResponseObject.md @@ -0,0 +1,15 @@ +# # LocationResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the location | [optional] +**label** | **string** | Display name for the location | [optional] +**archived** | **bool** | Whether the location is archived | [optional] +**manageable** | **bool** | Whether the location is manageable | [optional] +**address** | [**\BhrSdk\Model\LocationResponseObjectAddress**](LocationResponseObjectAddress.md) | | [optional] +**created_at** | **\DateTime** | | [optional] +**archived_at** | **\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/LocationResponseObjectAddress.md b/docs/Model/LocationResponseObjectAddress.md new file mode 100644 index 00000000..d0ceed35 --- /dev/null +++ b/docs/Model/LocationResponseObjectAddress.md @@ -0,0 +1,18 @@ +# # LocationResponseObjectAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address1** | **string** | | [optional] +**address2** | **string** | | [optional] +**city** | **string** | | [optional] +**state_id** | **string** | | [optional] +**state** | [**\BhrSdk\Model\LocationResponseObjectAddressState**](LocationResponseObjectAddressState.md) | | [optional] +**zipcode** | **string** | | [optional] +**country_id** | **string** | | [optional] +**country** | [**\BhrSdk\Model\LocationResponseObjectAddressCountry**](LocationResponseObjectAddressCountry.md) | | [optional] +**timezone** | **string** | | [optional] +**remote_location** | **bool** | Whether this is a remote location | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LocationResponseObjectAddressCountry.md b/docs/Model/LocationResponseObjectAddressCountry.md new file mode 100644 index 00000000..7932736b --- /dev/null +++ b/docs/Model/LocationResponseObjectAddressCountry.md @@ -0,0 +1,11 @@ +# # LocationResponseObjectAddressCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Country identifier | [optional] +**name** | **string** | Country name | [optional] +**iso_code** | **string** | Country ISO code | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LocationResponseObjectAddressState.md b/docs/Model/LocationResponseObjectAddressState.md new file mode 100644 index 00000000..0326b116 --- /dev/null +++ b/docs/Model/LocationResponseObjectAddressState.md @@ -0,0 +1,11 @@ +# # LocationResponseObjectAddressState + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | State identifier | [optional] +**name** | **string** | State name | [optional] +**abbreviation** | **string** | State abbreviation | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoginFailureResponse.md b/docs/Model/LoginFailureResponse.md new file mode 100644 index 00000000..e111850b --- /dev/null +++ b/docs/Model/LoginFailureResponse.md @@ -0,0 +1,9 @@ +# # LoginFailureResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Always `false`. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoginFailureXmlResponse.md b/docs/Model/LoginFailureXmlResponse.md new file mode 100644 index 00000000..edc233a5 --- /dev/null +++ b/docs/Model/LoginFailureXmlResponse.md @@ -0,0 +1,9 @@ +# # LoginFailureXmlResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | **string** | Always `declined`. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoginResponse.md b/docs/Model/LoginResponse.md new file mode 100644 index 00000000..ad514ec3 --- /dev/null +++ b/docs/Model/LoginResponse.md @@ -0,0 +1,13 @@ +# # LoginResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Always `true` on HTTP 200. | +**user_id** | **int** | The authenticated user ID. | +**employee_id** | **int** | | [optional] +**key** | **string** | The API key to use for subsequent requests. | +**api_url** | **string** | The base URL for subsequent API calls. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoginXmlResponse.md b/docs/Model/LoginXmlResponse.md new file mode 100644 index 00000000..f23e5a42 --- /dev/null +++ b/docs/Model/LoginXmlResponse.md @@ -0,0 +1,13 @@ +# # LoginXmlResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | **string** | Always `authenticated` on HTTP 200. | [optional] +**user_id** | **int** | The authenticated user ID. | [optional] +**employee_id** | **int** | The employee ID linked to this user. Rendered as `<employeeId isNull=\"yes\"/>` when no employee record is associated. | [optional] +**key** | **string** | The API key to use for subsequent requests. | [optional] +**api_url** | **string** | The base URL for subsequent API calls. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEvent.md b/docs/Model/MemberBenefitEvent.md index 2c539d3b..86be6971 100644 --- a/docs/Model/MemberBenefitEvent.md +++ b/docs/Model/MemberBenefitEvent.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**members** | [**\BhrSdk\Model\MemberBenefitEventMembersInner[]**](MemberBenefitEventMembersInner.md) | Members | [optional] +**member_id** | **string** | The unique identifier of the member. Format: 'employee.{id}' for employees, 'dependent.{id}' for dependents. | [optional] +**coverages** | [**\BhrSdk\Model\MemberBenefitEventCoveragesInner[]**](MemberBenefitEventCoveragesInner.md) | The benefit plan coverages for this member, one entry per plan. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEventCoveragesInner.md b/docs/Model/MemberBenefitEventCoveragesInner.md new file mode 100644 index 00000000..d91b71c8 --- /dev/null +++ b/docs/Model/MemberBenefitEventCoveragesInner.md @@ -0,0 +1,10 @@ +# # MemberBenefitEventCoveragesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **string** | The ID of the benefit plan. | [optional] +**events** | [**\BhrSdk\Model\MemberBenefitEventCoveragesInnerEventsInner[]**](MemberBenefitEventCoveragesInnerEventsInner.md) | Chronological list of benefit events for this member and plan, covering the past year. Event type 'enrollment' includes premiumTierId and monthlyPremiumInCents; 'eligibility' and 'loss' events include only effectiveDate and type. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md b/docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md new file mode 100644 index 00000000..9637edaf --- /dev/null +++ b/docs/Model/MemberBenefitEventCoveragesInnerEventsInner.md @@ -0,0 +1,12 @@ +# # MemberBenefitEventCoveragesInnerEventsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effective_date** | **\DateTime** | The date this event takes effect (YYYY-MM-DD). | [optional] +**type** | **string** | The type of benefit event. | [optional] +**premium_tier_id** | **string** | | [optional] +**monthly_premium_in_cents** | **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/MemberBenefitEventMembersInner.md b/docs/Model/MemberBenefitEventMembersInner.md deleted file mode 100644 index 4191ba2f..00000000 --- a/docs/Model/MemberBenefitEventMembersInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # MemberBenefitEventMembersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**member_id** | **string** | Member ID | [optional] -**coverages** | [**\BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInner[]**](MemberBenefitEventMembersInnerCoveragesInner.md) | Coverages | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md b/docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md deleted file mode 100644 index 1e6c7249..00000000 --- a/docs/Model/MemberBenefitEventMembersInnerCoveragesInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # MemberBenefitEventMembersInnerCoveragesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan_id** | **string** | Plan ID | [optional] -**events** | [**\BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInnerEventsInner[]**](MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md) | Events | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md b/docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md deleted file mode 100644 index 46298d3a..00000000 --- a/docs/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# # MemberBenefitEventMembersInnerCoveragesInnerEventsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**effective_date** | **string** | Event date | [optional] -**type** | **string** | Event type | [optional] -**premium_tier_id** | **string** | Premium Tier ID | [optional] -**monthly_premium_in_cents** | **int** | Monthly Premium in cents | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitEventsResponse.md b/docs/Model/MemberBenefitEventsResponse.md new file mode 100644 index 00000000..bce9839e --- /dev/null +++ b/docs/Model/MemberBenefitEventsResponse.md @@ -0,0 +1,9 @@ +# # MemberBenefitEventsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**\BhrSdk\Model\MemberBenefitEvent[]**](MemberBenefitEvent.md) | List of member benefit event records, one entry per employee or dependent. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitsGetPermissionDeniedResponse.md b/docs/Model/MemberBenefitsGetPermissionDeniedResponse.md new file mode 100644 index 00000000..4cfaf63a --- /dev/null +++ b/docs/Model/MemberBenefitsGetPermissionDeniedResponse.md @@ -0,0 +1,10 @@ +# # MemberBenefitsGetPermissionDeniedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | | [optional] +**message** | **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/MemberBenefitsGetSuccessResponse.md b/docs/Model/MemberBenefitsGetSuccessResponse.md new file mode 100644 index 00000000..ad084e54 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponse.md @@ -0,0 +1,11 @@ +# # MemberBenefitsGetSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInner[]**](MemberBenefitsGetSuccessResponseDataInner.md) | | [optional] +**meta** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseMeta**](MemberBenefitsGetSuccessResponseMeta.md) | | [optional] +**_links** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinks**](MemberBenefitsGetSuccessResponseLinks.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/MemberBenefitsGetSuccessResponseDataInner.md b/docs/Model/MemberBenefitsGetSuccessResponseDataInner.md new file mode 100644 index 00000000..65d32cf1 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseDataInner.md @@ -0,0 +1,11 @@ +# # MemberBenefitsGetSuccessResponseDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member_id** | **string** | The member identifier. Formatted as \"employee.{id}\" for employees and \"dependent.{id}\" for dependents. | [optional] +**subscriber_id** | **string** | The employee ID of the plan subscriber as a string. For dependent members, this is the ID of the employee they are enrolled under. | [optional] +**plans** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInner[]**](MemberBenefitsGetSuccessResponseDataInnerPlansInner.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/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md b/docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md new file mode 100644 index 00000000..4fc19864 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.md @@ -0,0 +1,10 @@ +# # MemberBenefitsGetSuccessResponseDataInnerPlansInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **string** | The benefit plan ID. | [optional] +**date_ranges** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner[]**](MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.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/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md b/docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md new file mode 100644 index 00000000..ce91f573 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.md @@ -0,0 +1,11 @@ +# # MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **\DateTime** | Start date of the enrollment period (YYYY-MM-DD). | [optional] +**end_date** | **\DateTime** | | [optional] +**status** | **string** | The enrollment status for this date range. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitsGetSuccessResponseLinks.md b/docs/Model/MemberBenefitsGetSuccessResponseLinks.md new file mode 100644 index 00000000..f686706a --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseLinks.md @@ -0,0 +1,10 @@ +# # MemberBenefitsGetSuccessResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksNext**](MemberBenefitsGetSuccessResponseLinksNext.md) | | [optional] +**prev** | [**\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksPrev**](MemberBenefitsGetSuccessResponseLinksPrev.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/MemberBenefitsGetSuccessResponseLinksNext.md b/docs/Model/MemberBenefitsGetSuccessResponseLinksNext.md new file mode 100644 index 00000000..0d69e2e3 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseLinksNext.md @@ -0,0 +1,9 @@ +# # MemberBenefitsGetSuccessResponseLinksNext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URL for the next page of results. Points to the current page when already on the last page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md b/docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md new file mode 100644 index 00000000..9c219909 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseLinksPrev.md @@ -0,0 +1,9 @@ +# # MemberBenefitsGetSuccessResponseLinksPrev + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URL for the previous page of results. Points to page 1 when already on the first page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitsGetSuccessResponseMeta.md b/docs/Model/MemberBenefitsGetSuccessResponseMeta.md new file mode 100644 index 00000000..2df929a2 --- /dev/null +++ b/docs/Model/MemberBenefitsGetSuccessResponseMeta.md @@ -0,0 +1,12 @@ +# # MemberBenefitsGetSuccessResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | The current page number. | [optional] +**page_size** | **int** | The number of items per page. | [optional] +**total_pages** | **int** | Total number of pages available. | [optional] +**total_items** | **int** | Total number of member records across all pages. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MemberBenefitsGetValidationErrorResponse.md b/docs/Model/MemberBenefitsGetValidationErrorResponse.md new file mode 100644 index 00000000..2a4b96fe --- /dev/null +++ b/docs/Model/MemberBenefitsGetValidationErrorResponse.md @@ -0,0 +1,10 @@ +# # MemberBenefitsGetValidationErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | | [optional] +**message** | **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/MetaCompanyPropertiesResponse.md b/docs/Model/MetaCompanyPropertiesResponse.md new file mode 100644 index 00000000..63b73a7c --- /dev/null +++ b/docs/Model/MetaCompanyPropertiesResponse.md @@ -0,0 +1,12 @@ +# # MetaCompanyPropertiesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Bamboo company identifier (numeric). | [optional] +**name** | **string** | Company display name. | [optional] +**domain** | **string** | Company’s Bamboo subdomain (same value used in the `baseApiUrl` path segment after `gateway.php/`) | [optional] +**base_api_url** | **string** | Full HTTPS URL of the public API gateway for this company, typically `https://` + the data-center–specific API host for this tenant + ` /api/gateway.php/` + the company’s `domain` from this response. This is the entry point the integrator uses for legacy gateway-style API traffic, not a generic “base URL” name alone. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MetaCurrencyTypeItem.md b/docs/Model/MetaCurrencyTypeItem.md new file mode 100644 index 00000000..9ad43c2f --- /dev/null +++ b/docs/Model/MetaCurrencyTypeItem.md @@ -0,0 +1,13 @@ +# # MetaCurrencyTypeItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal currency id | [optional] +**code** | **string** | ISO 4217-style currency code (e.g. USD, EUR) | [optional] +**name** | **string** | Human-readable currency name (HTML entities decoded in the response) | [optional] +**symbol** | **string** | Display symbol for the currency in UI | [optional] +**symbol_position** | **int** | Placement of the symbol relative to the amount: 0 = prefix, 1 = postfix (this is a numeric code, not a string label). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MonitorFieldList.md b/docs/Model/MonitorFieldList.md new file mode 100644 index 00000000..c26c8a3b --- /dev/null +++ b/docs/Model/MonitorFieldList.md @@ -0,0 +1,9 @@ +# # MonitorFieldList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | [**\BhrSdk\Model\MonitorFieldListFieldsInner[]**](MonitorFieldListFieldsInner.md) | The list of employee fields available for webhook monitoring. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MonitorFieldListFieldsInner.md b/docs/Model/MonitorFieldListFieldsInner.md new file mode 100644 index 00000000..aade3e63 --- /dev/null +++ b/docs/Model/MonitorFieldListFieldsInner.md @@ -0,0 +1,11 @@ +# # MonitorFieldListFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The field ID, returned as a string. | +**name** | **string** | The human-readable field name. | +**alias** | **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/NewHirePacketGtkyAnswerVisibilityItem.md b/docs/Model/NewHirePacketGtkyAnswerVisibilityItem.md new file mode 100644 index 00000000..6ad72b8a --- /dev/null +++ b/docs/Model/NewHirePacketGtkyAnswerVisibilityItem.md @@ -0,0 +1,11 @@ +# # NewHirePacketGtkyAnswerVisibilityItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response_id** | **int** | | +**question_id** | **int** | | +**hidden** | **bool** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md b/docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md new file mode 100644 index 00000000..efd20455 --- /dev/null +++ b/docs/Model/NewHirePacketGtkyAnswerVisibilityRequest.md @@ -0,0 +1,10 @@ +# # NewHirePacketGtkyAnswerVisibilityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hidden** | **bool** | When true, answers are hidden from typical manager views; when false, answers are shown. | +**question_ids** | **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/NewHirePacketGtkyAnswerVisibilityResponse.md b/docs/Model/NewHirePacketGtkyAnswerVisibilityResponse.md new file mode 100644 index 00000000..a1a6d1e8 --- /dev/null +++ b/docs/Model/NewHirePacketGtkyAnswerVisibilityResponse.md @@ -0,0 +1,9 @@ +# # NewHirePacketGtkyAnswerVisibilityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gtkys** | [**\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityItem[]**](NewHirePacketGtkyAnswerVisibilityItem.md) | GTKY personal-question answer rows with visibility flags. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewHirePacketPublicApi.md b/docs/Model/NewHirePacketPublicApi.md new file mode 100644 index 00000000..48ae4336 --- /dev/null +++ b/docs/Model/NewHirePacketPublicApi.md @@ -0,0 +1,32 @@ +# # NewHirePacketPublicApi + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**employee_id** | **int** | Employee this packet belongs to. | [optional] +**contact_employee_id** | **int** | | [optional] +**requires_personal_information** | **bool** | | [optional] +**requires_photo** | **bool** | | [optional] +**requires_personal_questions** | **bool** | | [optional] +**arrive_by_time** | **string** | | [optional] +**location** | **string** | | [optional] +**sent_datetime** | **string** | | [optional] +**viewed_datetime** | **string** | | [optional] +**completed_datetime** | **string** | | [optional] +**created_by_user_id** | **int** | | [optional] +**created_datetime** | **string** | | [optional] +**send_get_to_know_you_email** | **bool** | | [optional] +**get_to_know_you_email_sent** | **bool** | | [optional] +**show_payroll_state** | **bool** | | [optional] +**show_payroll_federal** | **bool** | | [optional] +**show_payroll_direct_deposit** | **bool** | | [optional] +**nhp_configuration_id** | **int** | | [optional] +**nhp_template_id** | **int** | | [optional] +**count_nhp_gtky_sent** | **int** | | [optional] +**cancelled** | **bool** | | [optional] +**include_photo_option** | **bool** | Whether photo collection is offered based on configuration. | [optional] +**status** | **string** | Derived lifecycle status for the instance. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewHirePacketPublicApiWritableBody.md b/docs/Model/NewHirePacketPublicApiWritableBody.md new file mode 100644 index 00000000..e92433f2 --- /dev/null +++ b/docs/Model/NewHirePacketPublicApiWritableBody.md @@ -0,0 +1,19 @@ +# # NewHirePacketPublicApiWritableBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contact_employee_id** | **int** | | [optional] +**requires_personal_information** | **bool** | Whether personal information collection is required. | [optional] +**requires_photo** | **bool** | Whether a photo is required. | [optional] +**requires_personal_questions** | **bool** | Whether personal questions are required. | [optional] +**arrive_by_time** | **string** | | [optional] +**location** | **string** | | [optional] +**send_get_to_know_you_email** | **bool** | Whether to send the Get To Know You email. | [optional] +**show_payroll_state** | **bool** | Whether to show state payroll fields. | [optional] +**show_payroll_federal** | **bool** | Whether to show federal payroll fields. | [optional] +**show_payroll_direct_deposit** | **bool** | Whether to show direct deposit payroll fields. | [optional] +**nhp_template_id** | **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/NewHirePacketsListResponse.md b/docs/Model/NewHirePacketsListResponse.md new file mode 100644 index 00000000..2be9086f --- /dev/null +++ b/docs/Model/NewHirePacketsListResponse.md @@ -0,0 +1,12 @@ +# # NewHirePacketsListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_hire_packets** | [**\BhrSdk\Model\NewHirePacketPublicApi[]**](NewHirePacketPublicApi.md) | Packet summaries for the current page. | [optional] +**page** | **int** | Current page number (1-based). | [optional] +**page_size** | **int** | Page size used for this response. | [optional] +**total_count** | **int** | Total packet rows matching visibility (across all pages). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewHireWidgetItem.md b/docs/Model/NewHireWidgetItem.md new file mode 100644 index 00000000..0a6f67d6 --- /dev/null +++ b/docs/Model/NewHireWidgetItem.md @@ -0,0 +1,17 @@ +# # NewHireWidgetItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Employee id. | +**preferred_first_name** | **string** | Nickname when set, otherwise first name. | +**last_name** | **string** | | +**hire_date** | **\DateTime** | | +**profile_picture_url** | **string** | | [optional] +**department** | **string** | | [optional] +**location** | **string** | | [optional] +**can_see_employee** | **bool** | Whether the authenticated user can navigate to the employee's profile. | +**get_to_know_you** | [**\BhrSdk\Model\CompletedQuestionsAndResponseDataObject[]**](CompletedQuestionsAndResponseDataObject.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/NewHireWidgetResponse.md b/docs/Model/NewHireWidgetResponse.md new file mode 100644 index 00000000..bd394efb --- /dev/null +++ b/docs/Model/NewHireWidgetResponse.md @@ -0,0 +1,9 @@ +# # NewHireWidgetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_hires** | [**\BhrSdk\Model\NewHireWidgetItem[]**](NewHireWidgetItem.md) | Upcoming new hires visible to the authenticated user, sorted by hire date descending. Empty when the user lacks new-hire-packet or company-directory access. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewWebHook.md b/docs/Model/NewWebHook.md index 75e2aad6..2d241592 100644 --- a/docs/Model/NewWebHook.md +++ b/docs/Model/NewWebHook.md @@ -5,10 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name of the webhook. | -**monitor_fields** | **string[]** | A list of fields to monitor. | -**post_fields** | **object** | A list of fields to post to the webhook url. Field ID or alias: external name | [optional] +**monitor_fields** | **string[]** | A list of fields to monitor. At least one field is required to be monitored if events is empty or contains employee_with_fields.updated or employee.updated. | [optional] +**post_fields** | **object** | An object map of field ID or alias to the external name used in the webhook payload (e.g. `{\"firstName\": \"First Name\"}`). Omit or send an empty object to include no extra fields. | [optional] **url** | **string** | The url the webhook should send data to (must begin with https://). | -**format** | **string** | The format the webhook should use (json - default, form-encoded). | [optional] -**include_company_domain** | **bool** | If set to true, the company domain will be added to the header. | [optional] +**format** | **string** | The payload format the webhook uses. Required. | +**include_company_domain** | **bool** | If set to true, the company domain will be added to the webhook request header. | [optional] +**events** | [**\BhrSdk\Model\WebhookEventType[]**](WebhookEventType.md) | Events that trigger this webhook. Defaults to ['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created'] if not specified. Cannot mix employee_with_fields events with employee events. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OnboardingExperiencePublicApi.md b/docs/Model/OnboardingExperiencePublicApi.md new file mode 100644 index 00000000..5ef0f628 --- /dev/null +++ b/docs/Model/OnboardingExperiencePublicApi.md @@ -0,0 +1,14 @@ +# # OnboardingExperiencePublicApi + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Onboarding experience id (same as the new hire packet instance primary key). | [optional] +**employee_id** | **int** | Employee this onboarding experience belongs to. | [optional] +**new_hire_packet_id** | **int** | Primary key of the linked new hire packet instance (NHP row). | [optional] +**nhp_template_id** | **int** | | [optional] +**nhp_configuration_id** | **int** | | [optional] +**status** | **string** | Derived lifecycle status for the linked new hire packet instance. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OnboardingExperiencesListResponse.md b/docs/Model/OnboardingExperiencesListResponse.md new file mode 100644 index 00000000..4cb74d56 --- /dev/null +++ b/docs/Model/OnboardingExperiencesListResponse.md @@ -0,0 +1,9 @@ +# # OnboardingExperiencesListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**onboarding_experiences** | [**\BhrSdk\Model\OnboardingExperiencePublicApi[]**](OnboardingExperiencePublicApi.md) | Onboarding experience summaries (empty when no running workflow for this 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/PagedLocationResponse.md b/docs/Model/PagedLocationResponse.md new file mode 100644 index 00000000..180480a5 --- /dev/null +++ b/docs/Model/PagedLocationResponse.md @@ -0,0 +1,11 @@ +# # PagedLocationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\LocationResponseObject[]**](LocationResponseObject.md) | Array of location resources for the current page | [optional] +**meta** | [**\BhrSdk\Model\PaginationMetaData**](PaginationMetaData.md) | The pagination metadata for the response. | [optional] +**_links** | [**array<string,\BhrSdk\Model\AvailableAction>**](AvailableAction.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/PagedResponse.md b/docs/Model/PagedResponse.md new file mode 100644 index 00000000..3e17ed88 --- /dev/null +++ b/docs/Model/PagedResponse.md @@ -0,0 +1,11 @@ +# # PagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **object[]** | The data for the current page. | [optional] +**meta** | [**\BhrSdk\Model\PaginationMetaData**](PaginationMetaData.md) | The pagination metadata for the response. | [optional] +**_links** | [**array<string,\BhrSdk\Model\AvailableAction>**](AvailableAction.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/PaginationMetaData.md b/docs/Model/PaginationMetaData.md new file mode 100644 index 00000000..49ea8472 --- /dev/null +++ b/docs/Model/PaginationMetaData.md @@ -0,0 +1,12 @@ +# # PaginationMetaData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | The page number of the results. | [optional] +**page_size** | **int** | The number of items per page. | [optional] +**total_pages** | **int** | The total number of pages available. | [optional] +**total_items** | **int** | The total number of items available. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PatchCompanyProfileCompanyInformationRequest.md b/docs/Model/PatchCompanyProfileCompanyInformationRequest.md new file mode 100644 index 00000000..360de59d --- /dev/null +++ b/docs/Model/PatchCompanyProfileCompanyInformationRequest.md @@ -0,0 +1,11 @@ +# # PatchCompanyProfileCompanyInformationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**legal_name** | **string** | Legal name of the company (name_of_employer). Required (non-empty) when this field is present in the patch. | [optional] +**phone** | **string** | Contact phone number. Required (non-empty) when this field is present in the patch. | [optional] +**address** | [**\BhrSdk\Model\PatchCompanyProfileCompanyInformationRequestAddress**](PatchCompanyProfileCompanyInformationRequestAddress.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/PatchCompanyProfileCompanyInformationRequestAddress.md b/docs/Model/PatchCompanyProfileCompanyInformationRequestAddress.md new file mode 100644 index 00000000..b3666a62 --- /dev/null +++ b/docs/Model/PatchCompanyProfileCompanyInformationRequestAddress.md @@ -0,0 +1,13 @@ +# # PatchCompanyProfileCompanyInformationRequestAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line1** | **string** | | [optional] +**line2** | **string** | | [optional] +**city** | **string** | City. Required (non-empty) when address is patched. | [optional] +**state** | **string** | State. Required (non-empty) when address is patched. | [optional] +**zip** | **string** | Zip or postal code. Required (non-empty) when address is patched. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayGradesAndBandsPublishResponse.md b/docs/Model/PayGradesAndBandsPublishResponse.md new file mode 100644 index 00000000..fbb5dd0e --- /dev/null +++ b/docs/Model/PayGradesAndBandsPublishResponse.md @@ -0,0 +1,9 @@ +# # PayGradesAndBandsPublishResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **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/PayGradesAndBandsSaveLevelsResponse.md b/docs/Model/PayGradesAndBandsSaveLevelsResponse.md new file mode 100644 index 00000000..2503dcd1 --- /dev/null +++ b/docs/Model/PayGradesAndBandsSaveLevelsResponse.md @@ -0,0 +1,9 @@ +# # PayGradesAndBandsSaveLevelsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **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/PayGradesAndBandsUpdateJobTitlesResponse.md b/docs/Model/PayGradesAndBandsUpdateJobTitlesResponse.md new file mode 100644 index 00000000..5d5aa93a --- /dev/null +++ b/docs/Model/PayGradesAndBandsUpdateJobTitlesResponse.md @@ -0,0 +1,9 @@ +# # PayGradesAndBandsUpdateJobTitlesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **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/PayGradesAndBandsUpdatePayBandsResponse.md b/docs/Model/PayGradesAndBandsUpdatePayBandsResponse.md new file mode 100644 index 00000000..263af52c --- /dev/null +++ b/docs/Model/PayGradesAndBandsUpdatePayBandsResponse.md @@ -0,0 +1,9 @@ +# # PayGradesAndBandsUpdatePayBandsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **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/PersonInfoApiTransformer.md b/docs/Model/PersonInfoApiTransformer.md new file mode 100644 index 00000000..34798ecb --- /dev/null +++ b/docs/Model/PersonInfoApiTransformer.md @@ -0,0 +1,13 @@ +# # PersonInfoApiTransformer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **int** | | [optional] +**user_id** | **int** | | [optional] +**display_first_name** | **string** | Display first name | [optional] +**last_name** | **string** | Last name | [optional] +**photo_url** | **string** | Photo URL | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PostApplicantStatusRequest.md b/docs/Model/PostApplicantStatusRequest.md deleted file mode 100644 index f8ed06f3..00000000 --- a/docs/Model/PostApplicantStatusRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PostApplicantStatusRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **int** | Associates a status id with an application. | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PostGoalRequest.md b/docs/Model/PostGoalRequest.md deleted file mode 100644 index 772a96b3..00000000 --- a/docs/Model/PostGoalRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# # PostGoalRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **string** | The title of the goal | -**description** | **string** | A detailed description of the goal | [optional] -**due_date** | **\DateTime** | The due date for the goal in YYYY-MM-DD format | -**percent_complete** | **int** | The percentage of completion for the goal (0-100) | -**completion_date** | **\DateTime** | The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. | [optional] -**shared_with_employee_ids** | **int[]** | List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner. | -**aligns_with_option_id** | **int** | ID of the option this goal aligns with | [optional] -**milestones** | [**\BhrSdk\Model\PostGoalRequestMilestonesInner[]**](PostGoalRequestMilestonesInner.md) | List of milestones for this goal | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PostNewEmployee.md b/docs/Model/PostNewEmployee.md index 22884b20..fb9c6d3b 100644 --- a/docs/Model/PostNewEmployee.md +++ b/docs/Model/PostNewEmployee.md @@ -4,7 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**first_name** | **string** | | [optional] -**last_name** | **string** | | [optional] +**first_name** | **string** | Legal first name (required). | +**last_name** | **string** | Legal last name (required). | +**work_email** | **string** | Work email address. | [optional] +**job_title** | **string** | Job title. | [optional] +**department** | **string** | Department name. | [optional] +**hire_date** | **\DateTime** | Hire date in YYYY-MM-DD 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/ProblemDetailsResponse.md b/docs/Model/ProblemDetailsResponse.md new file mode 100644 index 00000000..62c3a016 --- /dev/null +++ b/docs/Model/ProblemDetailsResponse.md @@ -0,0 +1,15 @@ +# # ProblemDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Problem type URI identifying the error category | [optional] +**title** | **string** | Short, human-readable summary of the problem type | [optional] +**status** | **int** | HTTP status code for the error | [optional] +**detail** | **string** | Detailed, human-readable explanation specific to this occurrence of the problem | [optional] +**instance** | **string** | URI reference that identifies the specific occurrence of the problem | [optional] +**code** | **string** | Application-specific error code | [optional] +**fields** | **array<string,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/ProjectCreateRequestSchema.md b/docs/Model/ProjectCreateRequestSchema.md index 60c1312d..cb10b093 100644 --- a/docs/Model/ProjectCreateRequestSchema.md +++ b/docs/Model/ProjectCreateRequestSchema.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the project. | +**name** | **string** | Name of the project. Must be unique and no more than 50 characters. | **billable** | **bool** | Indicates if the project is billable. Defaults to true if not provided. | [optional] **allow_all_employees** | **bool** | Indicates if all employees can log time for this project. Defaults to true if not provided. | [optional] -**employee_ids** | **int[]** | A list of employee IDs that can log time for this project. | [optional] +**employee_ids** | **int[]** | A list of employee IDs that can log time for this project. Only used when `allowAllEmployees` is false. | [optional] **has_tasks** | **bool** | Indicates if the project has tasks. Defaults to false if not provided. | [optional] **tasks** | [**\BhrSdk\Model\TaskCreateSchema[]**](TaskCreateSchema.md) | List of tasks to create and associate with the project. | [optional] diff --git a/docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md b/docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md new file mode 100644 index 00000000..a7a9ea90 --- /dev/null +++ b/docs/Model/ProjectCreateTimeTrackingProjectTaskV1.md @@ -0,0 +1,10 @@ +# # ProjectCreateTimeTrackingProjectTaskV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Display name of the task. | +**billable** | **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/ProjectCreateTimeTrackingProjectV1.md b/docs/Model/ProjectCreateTimeTrackingProjectV1.md new file mode 100644 index 00000000..3d8a6e24 --- /dev/null +++ b/docs/Model/ProjectCreateTimeTrackingProjectV1.md @@ -0,0 +1,14 @@ +# # ProjectCreateTimeTrackingProjectV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**billable** | **bool** | | [optional] [default to false] +**include_in_payroll** | **bool** | | [optional] [default to false] +**all_employees_assigned** | **bool** | If true, every time-tracked employee is assigned to the project. Ignored when `employeeIds` is provided. | [optional] [default to false] +**employee_ids** | **int[]** | Specific employee IDs to assign. Minimum 1 entry required when provided. Takes precedence over `allEmployeesAssigned`. | [optional] +**tasks** | [**\BhrSdk\Model\ProjectCreateTimeTrackingProjectV1TasksInner[]**](ProjectCreateTimeTrackingProjectV1TasksInner.md) | Tasks to create alongside the project. Minimum 1 entry required when provided. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md b/docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md new file mode 100644 index 00000000..2dfce3ca --- /dev/null +++ b/docs/Model/ProjectCreateTimeTrackingProjectV1TasksInner.md @@ -0,0 +1,10 @@ +# # ProjectCreateTimeTrackingProjectV1TasksInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**billable** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectInfoApiTransformer.md b/docs/Model/ProjectInfoApiTransformer.md index 3845308c..c3d1dec0 100644 --- a/docs/Model/ProjectInfoApiTransformer.md +++ b/docs/Model/ProjectInfoApiTransformer.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **project** | [**\BhrSdk\Model\ProjectInfoApiTransformerProject**](ProjectInfoApiTransformerProject.md) | | [optional] -**task** | [**\BhrSdk\Model\ProjectInfoApiTransformerTask**](ProjectInfoApiTransformerTask.md) | | [optional] +**task** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectInfoApiTransformerTask.md b/docs/Model/ProjectInfoApiTransformerTask.md deleted file mode 100644 index dd9ca6ac..00000000 --- a/docs/Model/ProjectInfoApiTransformerTask.md +++ /dev/null @@ -1,10 +0,0 @@ -# # ProjectInfoApiTransformerTask - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Task ID | [optional] -**name** | **string** | Task 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/ProjectPaginatedResponseDataV1.md b/docs/Model/ProjectPaginatedResponseDataV1.md new file mode 100644 index 00000000..0432528f --- /dev/null +++ b/docs/Model/ProjectPaginatedResponseDataV1.md @@ -0,0 +1,10 @@ +# # ProjectPaginatedResponseDataV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1Meta**](ProjectPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1Links**](ProjectPaginatedResponseDataV1Links.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/ProjectPaginatedResponseDataV1Links.md b/docs/Model/ProjectPaginatedResponseDataV1Links.md new file mode 100644 index 00000000..0a0766f6 --- /dev/null +++ b/docs/Model/ProjectPaginatedResponseDataV1Links.md @@ -0,0 +1,10 @@ +# # ProjectPaginatedResponseDataV1Links + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1LinksPrev**](ProjectPaginatedResponseDataV1LinksPrev.md) | | [optional] +**next** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1LinksNext**](ProjectPaginatedResponseDataV1LinksNext.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/ProjectPaginatedResponseDataV1LinksNext.md b/docs/Model/ProjectPaginatedResponseDataV1LinksNext.md new file mode 100644 index 00000000..bfd70883 --- /dev/null +++ b/docs/Model/ProjectPaginatedResponseDataV1LinksNext.md @@ -0,0 +1,9 @@ +# # ProjectPaginatedResponseDataV1LinksNext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **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/ProjectPaginatedResponseDataV1LinksPrev.md b/docs/Model/ProjectPaginatedResponseDataV1LinksPrev.md new file mode 100644 index 00000000..5eb7974a --- /dev/null +++ b/docs/Model/ProjectPaginatedResponseDataV1LinksPrev.md @@ -0,0 +1,9 @@ +# # ProjectPaginatedResponseDataV1LinksPrev + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **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/ProjectPaginatedResponseDataV1Meta.md b/docs/Model/ProjectPaginatedResponseDataV1Meta.md new file mode 100644 index 00000000..492c2e6c --- /dev/null +++ b/docs/Model/ProjectPaginatedResponseDataV1Meta.md @@ -0,0 +1,12 @@ +# # ProjectPaginatedResponseDataV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | | +**total_pages** | **int** | | +**page** | **int** | | +**page_size** | **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/ProjectPaginatedTasksResponseV1.md b/docs/Model/ProjectPaginatedTasksResponseV1.md new file mode 100644 index 00000000..d54b8b98 --- /dev/null +++ b/docs/Model/ProjectPaginatedTasksResponseV1.md @@ -0,0 +1,11 @@ +# # ProjectPaginatedTasksResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\ProjectTimeTrackingTaskV1[]**](ProjectTimeTrackingTaskV1.md) | Collection of time tracking tasks for a project. | +**meta** | [**\BhrSdk\Model\ProjectPaginatedTasksResponseV1Meta**](ProjectPaginatedTasksResponseV1Meta.md) | | +**_links** | [**\BhrSdk\Model\ProjectPaginatedTasksResponseV1Links**](ProjectPaginatedTasksResponseV1Links.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/ProjectPaginatedTasksResponseV1Links.md b/docs/Model/ProjectPaginatedTasksResponseV1Links.md new file mode 100644 index 00000000..93bd34e3 --- /dev/null +++ b/docs/Model/ProjectPaginatedTasksResponseV1Links.md @@ -0,0 +1,10 @@ +# # ProjectPaginatedTasksResponseV1Links + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev** | **object** | | +**next** | **object** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectPaginatedTasksResponseV1Meta.md b/docs/Model/ProjectPaginatedTasksResponseV1Meta.md new file mode 100644 index 00000000..b3aea4c1 --- /dev/null +++ b/docs/Model/ProjectPaginatedTasksResponseV1Meta.md @@ -0,0 +1,12 @@ +# # ProjectPaginatedTasksResponseV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | | +**page** | **int** | | +**page_size** | **int** | | +**total_pages** | **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/ProjectPaginatedTimeTrackingProjectsResponseV1.md b/docs/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md new file mode 100644 index 00000000..127b8ab1 --- /dev/null +++ b/docs/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.md @@ -0,0 +1,11 @@ +# # ProjectPaginatedTimeTrackingProjectsResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1Meta**](ProjectPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\ProjectPaginatedResponseDataV1Links**](ProjectPaginatedResponseDataV1Links.md) | | [optional] +**data** | [**\BhrSdk\Model\ProjectTimeTrackingProjectV1[]**](ProjectTimeTrackingProjectV1.md) | Collection of time tracking projects. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectTimeTrackingProjectV1.md b/docs/Model/ProjectTimeTrackingProjectV1.md new file mode 100644 index 00000000..11889b5f --- /dev/null +++ b/docs/Model/ProjectTimeTrackingProjectV1.md @@ -0,0 +1,19 @@ +# # ProjectTimeTrackingProjectV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the project. | [optional] [readonly] +**name** | **string** | The name of the project. | [optional] +**billable** | **bool** | Whether or not the project is billable. | [optional] +**include_in_payroll** | **bool** | Whether hours logged to this project will show in payroll and payroll reports. | [optional] +**all_employees_assigned** | **bool** | Whether all time & attendance employees are assigned or not. | [optional] +**archived** | **bool** | Whether or not the project is archived. | [optional] +**has_tasks** | **bool** | Whether time is logged to tasks under the project (true) or directly to the project (false). | [optional] +**created_at** | **\DateTime** | | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [optional] [readonly] +**employee_ids** | **int[]** | Array of employeeIds assigned to the project. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectTimeTrackingTaskV1.md b/docs/Model/ProjectTimeTrackingTaskV1.md new file mode 100644 index 00000000..e4d41708 --- /dev/null +++ b/docs/Model/ProjectTimeTrackingTaskV1.md @@ -0,0 +1,15 @@ +# # ProjectTimeTrackingTaskV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the task. | [optional] [readonly] +**name** | **string** | The name of the task. | [optional] +**project_id** | **int** | The ID of the project this task belongs to. | [optional] +**billable** | **bool** | Whether the task is billable. | [optional] +**created_at** | **\DateTime** | | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [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/ProjectUpdateTimeTrackingProjectTaskV1.md b/docs/Model/ProjectUpdateTimeTrackingProjectTaskV1.md new file mode 100644 index 00000000..a8080c8b --- /dev/null +++ b/docs/Model/ProjectUpdateTimeTrackingProjectTaskV1.md @@ -0,0 +1,10 @@ +# # ProjectUpdateTimeTrackingProjectTaskV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Display name of the task. | [optional] +**billable** | **bool** | Whether hours on this task are billable. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProjectUpdateTimeTrackingProjectV1.md b/docs/Model/ProjectUpdateTimeTrackingProjectV1.md new file mode 100644 index 00000000..0721da82 --- /dev/null +++ b/docs/Model/ProjectUpdateTimeTrackingProjectV1.md @@ -0,0 +1,15 @@ +# # ProjectUpdateTimeTrackingProjectV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the project. | [optional] +**billable** | **bool** | Whether or not the project is billable. | [optional] +**include_in_payroll** | **bool** | Whether hours logged to this project will show in payroll and payroll reports. | [optional] +**all_employees_assigned** | **bool** | Whether all time & attendance employees are assigned or not. | [optional] +**archived** | **bool** | Whether or not the project is archived. | [optional] +**employee_ids** | **int[]** | Array of employee IDs to assign to the project. Replaces the current assignment list when present; an empty array clears all assignments. | [optional] +**has_tasks** | **bool** | Toggles whether time is logged directly to the project (false) or to specific tasks on the project (true). Setting to true requires the project to already have at least one active task; setting to false leaves existing tasks unchanged. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProvinceItem.md b/docs/Model/ProvinceItem.md new file mode 100644 index 00000000..25196819 --- /dev/null +++ b/docs/Model/ProvinceItem.md @@ -0,0 +1,13 @@ +# # ProvinceItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | State/province ID | [optional] +**country_id** | **string** | ID of the country this state/province belongs to | [optional] +**label** | **string** | State/province abbreviation (e.g. \"UT\") | [optional] +**iso** | **string** | ISO 3166-2 code (e.g. \"US-UT\") | [optional] +**name** | **string** | Full name of the state/province | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PutCompanyIndustryCodesRequest.md b/docs/Model/PutCompanyIndustryCodesRequest.md new file mode 100644 index 00000000..04895344 --- /dev/null +++ b/docs/Model/PutCompanyIndustryCodesRequest.md @@ -0,0 +1,9 @@ +# # PutCompanyIndustryCodesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**industry_ids** | **int[]** | List of industry IDs associated with the company. Currently limited to a single entry. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PutCompanyProfileDisplayNameRequest.md b/docs/Model/PutCompanyProfileDisplayNameRequest.md new file mode 100644 index 00000000..5ef474c7 --- /dev/null +++ b/docs/Model/PutCompanyProfileDisplayNameRequest.md @@ -0,0 +1,9 @@ +# # PutCompanyProfileDisplayNameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_name** | **string** | The new display name for the company. Must be a non-empty string with a maximum length of 255 characters (character count, not bytes, so multibyte UTF-8 characters are properly supported). | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RemoveCycleAdminSelfResponse.md b/docs/Model/RemoveCycleAdminSelfResponse.md new file mode 100644 index 00000000..0447c693 --- /dev/null +++ b/docs/Model/RemoveCycleAdminSelfResponse.md @@ -0,0 +1,9 @@ +# # RemoveCycleAdminSelfResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self_removed** | **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/RemoveTotalRewardsEmployeesRequest.md b/docs/Model/RemoveTotalRewardsEmployeesRequest.md new file mode 100644 index 00000000..803007d7 --- /dev/null +++ b/docs/Model/RemoveTotalRewardsEmployeesRequest.md @@ -0,0 +1,9 @@ +# # RemoveTotalRewardsEmployeesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **int[]** | List of employee IDs to remove from Total Rewards. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Report.md b/docs/Model/Report.md index 8757352a..c3c053e3 100644 --- a/docs/Model/Report.md +++ b/docs/Model/Report.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] +**id** | **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/Request.md b/docs/Model/Request.md index e5b82b3d..68419895 100644 --- a/docs/Model/Request.md +++ b/docs/Model/Request.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | One of approved, cancelled, denied | [optional] -**note** | **string** | A note to attach to the change in status | [optional] +**status** | **string** | The new status for the time off request. | +**note** | **string** | A note to attach to the change in 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/RequestCustomReport.md b/docs/Model/RequestCustomReport.md index ce7e95ae..369e8b20 100644 --- a/docs/Model/RequestCustomReport.md +++ b/docs/Model/RequestCustomReport.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | [optional] +**title** | **string** | A label for the report. Included in the response and used as the file name for downloaded reports. | [optional] +**fields** | **string[]** | Array of field IDs to include as columns in the report. Maximum of 400 fields. | [optional] **filters** | [**\BhrSdk\Model\RequestCustomReportFilters**](RequestCustomReportFilters.md) | | [optional] -**fields** | **string[]** | | [optional] +**filter_duplicates** | **string** | Whether to apply standard duplicate row filtering. Defaults to enabled. Set to `no` to return raw results without deduplication. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestCustomReportFilters.md b/docs/Model/RequestCustomReportFilters.md index 068d6f5a..fc73edb1 100644 --- a/docs/Model/RequestCustomReportFilters.md +++ b/docs/Model/RequestCustomReportFilters.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **last_changed** | [**\BhrSdk\Model\RequestCustomReportFiltersLastChanged**](RequestCustomReportFiltersLastChanged.md) | | [optional] +**employee_ids** | **int[]** | Restricts the report to only the specified employee IDs. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestCustomReportFiltersLastChanged.md b/docs/Model/RequestCustomReportFiltersLastChanged.md index e707ccf0..a6d0f6ad 100644 --- a/docs/Model/RequestCustomReportFiltersLastChanged.md +++ b/docs/Model/RequestCustomReportFiltersLastChanged.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**include_null** | **string** | yes|no | [optional] -**value** | **string** | Date last changed | [optional] +**value** | **\DateTime** | ISO 8601 date-time value. Only employees whose data has changed at or after this date-time will be included. | [optional] +**include_null** | **string** | Whether to include employees with no last-changed date. `yes` (default) includes them; `no` excludes them. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestCustomReportResponse.md b/docs/Model/RequestCustomReportResponse.md new file mode 100644 index 00000000..8eb97a7c --- /dev/null +++ b/docs/Model/RequestCustomReportResponse.md @@ -0,0 +1,11 @@ +# # RequestCustomReportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | The report title. | [optional] +**fields** | [**\BhrSdk\Model\RequestCustomReportResponseFieldsInner[]**](RequestCustomReportResponseFieldsInner.md) | Metadata for each field included in the report. | [optional] +**employees** | [**\BhrSdk\Model\RequestCustomReportResponseEmployeesInner[]**](RequestCustomReportResponseEmployeesInner.md) | One object per employee. Each object contains an `id` property plus one key per requested field. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestCustomReportResponseEmployeesInner.md b/docs/Model/RequestCustomReportResponseEmployeesInner.md new file mode 100644 index 00000000..aa4e9c69 --- /dev/null +++ b/docs/Model/RequestCustomReportResponseEmployeesInner.md @@ -0,0 +1,9 @@ +# # RequestCustomReportResponseEmployeesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The employee 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/RequestCustomReportResponseFieldsInner.md b/docs/Model/RequestCustomReportResponseFieldsInner.md new file mode 100644 index 00000000..833faf59 --- /dev/null +++ b/docs/Model/RequestCustomReportResponseFieldsInner.md @@ -0,0 +1,11 @@ +# # RequestCustomReportResponseFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The field ID. | [optional] +**type** | **string** | The field data type. | [optional] +**name** | **string** | The human-readable field label. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SaveChangeCommTemplateResponse.md b/docs/Model/SaveChangeCommTemplateResponse.md new file mode 100644 index 00000000..7eb19350 --- /dev/null +++ b/docs/Model/SaveChangeCommTemplateResponse.md @@ -0,0 +1,9 @@ +# # SaveChangeCommTemplateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/SchedulingCreateScheduleRequestV1.md b/docs/Model/SchedulingCreateScheduleRequestV1.md new file mode 100644 index 00000000..66f125aa --- /dev/null +++ b/docs/Model/SchedulingCreateScheduleRequestV1.md @@ -0,0 +1,15 @@ +# # SchedulingCreateScheduleRequestV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the schedule | +**location_id** | **int** | The ID of the location the schedule belongs to | +**timezone** | **string** | | [optional] +**start_of_week** | **string** | The starting day of the week for the schedule | +**early_clock_in_threshold** | **int** | The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule | [optional] +**manager_user_ids** | **int[]** | User IDs of managers for this schedule | [optional] +**employee_ids** | **int[]** | Employee IDs assigned to this schedule | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingCreateSchedulingShiftRequestV1.md b/docs/Model/SchedulingCreateSchedulingShiftRequestV1.md new file mode 100644 index 00000000..0d641e7f --- /dev/null +++ b/docs/Model/SchedulingCreateSchedulingShiftRequestV1.md @@ -0,0 +1,21 @@ +# # SchedulingCreateSchedulingShiftRequestV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schedule_id** | **string** | The ID of the schedule the shift belongs to. | +**name** | **string** | | [optional] +**status** | **string** | The status of the shift. | +**color** | **string** | 6 character color hex code. | +**timezone** | **mixed** | | +**capacity** | **int** | | [optional] +**employee_ids** | **int[]** | What employees are assigned to this shift? | [optional] +**start** | **\DateTime** | UTC timestamp of the start of the shift. | +**end** | **\DateTime** | UTC timestamp of the end of the shift. | +**recurrence_rule** | **string** | | [optional] +**recurrence_dtstart** | **string** | | [optional] +**recurrence_dtend** | **string** | | [optional] +**recurrence_until** | **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/SchedulingPublishShiftsFailureV1.md b/docs/Model/SchedulingPublishShiftsFailureV1.md new file mode 100644 index 00000000..c7c963d2 --- /dev/null +++ b/docs/Model/SchedulingPublishShiftsFailureV1.md @@ -0,0 +1,10 @@ +# # SchedulingPublishShiftsFailureV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shift_id** | **string** | The ID of the shift that failed to publish. | +**reason** | **string** | The reason the shift failed to publish. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingPublishShiftsRequest.md b/docs/Model/SchedulingPublishShiftsRequest.md new file mode 100644 index 00000000..0452b9c6 --- /dev/null +++ b/docs/Model/SchedulingPublishShiftsRequest.md @@ -0,0 +1,9 @@ +# # SchedulingPublishShiftsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shift_ids** | **string[]** | Shift IDs to publish. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingPublishShiftsResultV1.md b/docs/Model/SchedulingPublishShiftsResultV1.md new file mode 100644 index 00000000..4fe06ddf --- /dev/null +++ b/docs/Model/SchedulingPublishShiftsResultV1.md @@ -0,0 +1,10 @@ +# # SchedulingPublishShiftsResultV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**published** | [**\BhrSdk\Model\SchedulingSchedulingShiftV1[]**](SchedulingSchedulingShiftV1.md) | The shifts that were successfully published. | +**failed** | [**\BhrSdk\Model\SchedulingPublishShiftsFailureV1[]**](SchedulingPublishShiftsFailureV1.md) | The shifts that failed to publish due to conflicts. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingScheduleListResponseV1.md b/docs/Model/SchedulingScheduleListResponseV1.md new file mode 100644 index 00000000..c94596c4 --- /dev/null +++ b/docs/Model/SchedulingScheduleListResponseV1.md @@ -0,0 +1,11 @@ +# # SchedulingScheduleListResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\SchedulingScheduleV1[]**](SchedulingScheduleV1.md) | Array of schedule resource objects | [optional] +**meta** | [**\BhrSdk\Model\SchedulingScheduleListResponseV1Meta**](SchedulingScheduleListResponseV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\SchedulingScheduleListResponseV1Links**](SchedulingScheduleListResponseV1Links.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/DataRequestAggregationsInner.md b/docs/Model/SchedulingScheduleListResponseV1Links.md similarity index 67% rename from docs/Model/DataRequestAggregationsInner.md rename to docs/Model/SchedulingScheduleListResponseV1Links.md index 08e3a7e6..8b282410 100644 --- a/docs/Model/DataRequestAggregationsInner.md +++ b/docs/Model/SchedulingScheduleListResponseV1Links.md @@ -1,10 +1,10 @@ -# # DataRequestAggregationsInner +# # SchedulingScheduleListResponseV1Links ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | **string** | | [optional] -**aggregation** | **string** | | [optional] +**prev** | **object** | | [optional] +**next** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingScheduleListResponseV1Meta.md b/docs/Model/SchedulingScheduleListResponseV1Meta.md new file mode 100644 index 00000000..c91dadcf --- /dev/null +++ b/docs/Model/SchedulingScheduleListResponseV1Meta.md @@ -0,0 +1,11 @@ +# # SchedulingScheduleListResponseV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | Total number of schedules matching the filter. | [optional] +**page** | **int** | Current page number. | [optional] +**page_size** | **int** | Number of items per page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingScheduleV1.md b/docs/Model/SchedulingScheduleV1.md new file mode 100644 index 00000000..01d588b5 --- /dev/null +++ b/docs/Model/SchedulingScheduleV1.md @@ -0,0 +1,19 @@ +# # SchedulingScheduleV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The UUID of the schedule | [optional] [readonly] +**name** | **string** | The name of the schedule | [optional] +**location_id** | **int** | The ID of the location the schedule belongs to | [optional] +**timezone** | **string** | The timezone of the schedule, provide if location is missing timezone | [optional] +**start_of_week** | **string** | The starting day of the week for the schedule | [optional] +**early_clock_in_threshold** | **int** | The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule | [optional] +**manager_user_ids** | **int[]** | What users manage this schedule | [optional] +**employee_ids** | **int[]** | What employees are assigned to this schedule | [optional] +**created_at** | **\DateTime** | UTC timestamp when the schedule was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [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/SchedulingSchedulingShiftV1.md b/docs/Model/SchedulingSchedulingShiftV1.md new file mode 100644 index 00000000..38ab2ce1 --- /dev/null +++ b/docs/Model/SchedulingSchedulingShiftV1.md @@ -0,0 +1,27 @@ +# # SchedulingSchedulingShiftV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The ID of the shift. This can be the UUIDv7 of the shift instance, or a composite ID (<recurringShiftDefinitionId>_<recurrenceId>) for uninstantiated recurring shifts. | [readonly] +**schedule_id** | **string** | The ID of the schedule the shift belongs to. | +**name** | **string** | | [optional] +**status** | **string** | The status of the shift. | +**color** | **string** | 6 character color hex code. | +**capacity** | **int** | | [optional] +**start** | **\DateTime** | | +**end** | **\DateTime** | | +**timezone** | **string** | The timezone for the shift. | +**recurrence_rule** | **string** | | [optional] +**recurrence_id** | **string** | | [optional] +**recurrence_dtstart** | **string** | | [optional] +**recurrence_dtend** | **string** | | [optional] +**recurrence_until** | **string** | | [optional] +**employee_ids** | **int[]** | The list of employee IDs currently assigned. | [optional] +**unpublished_changes** | **object** | | [optional] +**created_at** | **\DateTime** | UTC timestamp when the shift was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [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/SchedulingShiftListResponseV1.md b/docs/Model/SchedulingShiftListResponseV1.md new file mode 100644 index 00000000..bfa0fd2f --- /dev/null +++ b/docs/Model/SchedulingShiftListResponseV1.md @@ -0,0 +1,11 @@ +# # SchedulingShiftListResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\SchedulingSchedulingShiftV1[]**](SchedulingSchedulingShiftV1.md) | Array of shifts | [optional] +**meta** | [**\BhrSdk\Model\SchedulingShiftListResponseV1Meta**](SchedulingShiftListResponseV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\SchedulingShiftListResponseV1Links**](SchedulingShiftListResponseV1Links.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/SchedulingShiftListResponseV1Links.md b/docs/Model/SchedulingShiftListResponseV1Links.md new file mode 100644 index 00000000..978ba705 --- /dev/null +++ b/docs/Model/SchedulingShiftListResponseV1Links.md @@ -0,0 +1,10 @@ +# # SchedulingShiftListResponseV1Links + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev** | [**\BhrSdk\Model\SchedulingShiftListResponseV1LinksPrev**](SchedulingShiftListResponseV1LinksPrev.md) | | [optional] +**next** | [**\BhrSdk\Model\SchedulingShiftListResponseV1LinksNext**](SchedulingShiftListResponseV1LinksNext.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/SchedulingShiftListResponseV1LinksNext.md b/docs/Model/SchedulingShiftListResponseV1LinksNext.md new file mode 100644 index 00000000..f1c7309c --- /dev/null +++ b/docs/Model/SchedulingShiftListResponseV1LinksNext.md @@ -0,0 +1,9 @@ +# # SchedulingShiftListResponseV1LinksNext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **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/SchedulingShiftListResponseV1LinksPrev.md b/docs/Model/SchedulingShiftListResponseV1LinksPrev.md new file mode 100644 index 00000000..f07f4e26 --- /dev/null +++ b/docs/Model/SchedulingShiftListResponseV1LinksPrev.md @@ -0,0 +1,9 @@ +# # SchedulingShiftListResponseV1LinksPrev + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **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/SchedulingShiftListResponseV1Meta.md b/docs/Model/SchedulingShiftListResponseV1Meta.md new file mode 100644 index 00000000..72da909f --- /dev/null +++ b/docs/Model/SchedulingShiftListResponseV1Meta.md @@ -0,0 +1,11 @@ +# # SchedulingShiftListResponseV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | Total number of shifts matching the filter. | [optional] +**page** | **int** | Current page number. | [optional] +**page_size** | **int** | Number of items per page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingTimezoneListResponseV1.md b/docs/Model/SchedulingTimezoneListResponseV1.md new file mode 100644 index 00000000..95ceef2b --- /dev/null +++ b/docs/Model/SchedulingTimezoneListResponseV1.md @@ -0,0 +1,11 @@ +# # SchedulingTimezoneListResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\SchedulingTimezoneV1[]**](SchedulingTimezoneV1.md) | | [optional] +**meta** | [**\BhrSdk\Model\SchedulingTimezoneListResponseV1Meta**](SchedulingTimezoneListResponseV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\SchedulingScheduleListResponseV1Links**](SchedulingScheduleListResponseV1Links.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/SchedulingTimezoneListResponseV1Meta.md b/docs/Model/SchedulingTimezoneListResponseV1Meta.md new file mode 100644 index 00000000..dcc36ca0 --- /dev/null +++ b/docs/Model/SchedulingTimezoneListResponseV1Meta.md @@ -0,0 +1,11 @@ +# # SchedulingTimezoneListResponseV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | Total number of timezones matching the filter. | [optional] +**page** | **int** | Current page number. | [optional] +**page_size** | **int** | Number of items per page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingTimezoneV1.md b/docs/Model/SchedulingTimezoneV1.md new file mode 100644 index 00000000..7d0c7c75 --- /dev/null +++ b/docs/Model/SchedulingTimezoneV1.md @@ -0,0 +1,10 @@ +# # SchedulingTimezoneV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The timezone identifier. | +**offset** | **string** | The current UTC offset for this timezone. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingUpdateScheduleRequestV1.md b/docs/Model/SchedulingUpdateScheduleRequestV1.md new file mode 100644 index 00000000..dbf04564 --- /dev/null +++ b/docs/Model/SchedulingUpdateScheduleRequestV1.md @@ -0,0 +1,15 @@ +# # SchedulingUpdateScheduleRequestV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the schedule | [optional] +**location_id** | **int** | The ID of the location the schedule belongs to | [optional] +**timezone** | **string** | The timezone of the schedule. Required if location does not have a timezone. Error if location already has a timezone. | [optional] +**start_of_week** | **string** | The starting day of the week for the schedule | [optional] +**early_clock_in_threshold** | **int** | The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule | [optional] +**manager_user_ids** | **int[]** | User IDs of managers for this schedule | [optional] +**employee_ids** | **int[]** | Employee IDs assigned to this schedule | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md b/docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md new file mode 100644 index 00000000..475dfeeb --- /dev/null +++ b/docs/Model/SchedulingUpdateSchedulingShiftRequestV1.md @@ -0,0 +1,21 @@ +# # SchedulingUpdateSchedulingShiftRequestV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**color** | **string** | 6 character color hex code. | [optional] +**capacity** | **int** | | [optional] +**start** | **\DateTime** | UTC timestamp of the start of the shift. | [optional] +**end** | **\DateTime** | UTC timestamp of the end of the shift. | [optional] +**timezone** | **string** | The timezone for the shift. | [optional] +**recurrence_rule** | **string** | | [optional] +**recurrence_edit_option** | **string** | How should recurrence edits be effective? Edits will not affect any realized shifts regardless of option. | [optional] +**recurrence_dtstart** | **\DateTime** | | [optional] +**recurrence_dtend** | **\DateTime** | | [optional] +**recurrence_until** | **\DateTime** | | [optional] +**employee_ids** | **int[]** | What employees are assigned to this shift? | [optional] +**unpublished_changes** | **mixed** | The pending changes that have not been published. Only accepts null to clear unpublished changes. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md b/docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md new file mode 100644 index 00000000..2226b694 --- /dev/null +++ b/docs/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.md @@ -0,0 +1,9 @@ +# # SendEmployeeVerificationLifecycleEmailByUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_type** | **string** | Which employee verification lifecycle email to send; must be {@see EverifyEmailType::SIGNUP_SURVEY} or {@see EverifyEmailType::APP_INSTALLED} (string values `signup_survey`, `app_installed`). | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SendRecommendationsResponse.md b/docs/Model/SendRecommendationsResponse.md new file mode 100644 index 00000000..faa941fc --- /dev/null +++ b/docs/Model/SendRecommendationsResponse.md @@ -0,0 +1,9 @@ +# # SendRecommendationsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/SetBreakPolicyEmployeesRequest.md b/docs/Model/SetBreakPolicyEmployeesRequest.md new file mode 100644 index 00000000..91c08512 --- /dev/null +++ b/docs/Model/SetBreakPolicyEmployeesRequest.md @@ -0,0 +1,9 @@ +# # SetBreakPolicyEmployeesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **int[]** | Array of employee IDs to assign to the break policy. Replaces all existing assignments. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetTotalRewardsCustomDisclaimerRequest.md b/docs/Model/SetTotalRewardsCustomDisclaimerRequest.md new file mode 100644 index 00000000..2d57291f --- /dev/null +++ b/docs/Model/SetTotalRewardsCustomDisclaimerRequest.md @@ -0,0 +1,9 @@ +# # SetTotalRewardsCustomDisclaimerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_disclaimer** | **string** | Custom disclaimer text. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetTotalRewardsOnboardingStepRequest.md b/docs/Model/SetTotalRewardsOnboardingStepRequest.md new file mode 100644 index 00000000..1e977a05 --- /dev/null +++ b/docs/Model/SetTotalRewardsOnboardingStepRequest.md @@ -0,0 +1,9 @@ +# # SetTotalRewardsOnboardingStepRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completed** | **bool** | Whether the step is completed. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ShareOptionsResponse.md b/docs/Model/ShareOptionsResponse.md new file mode 100644 index 00000000..473812c3 --- /dev/null +++ b/docs/Model/ShareOptionsResponse.md @@ -0,0 +1,9 @@ +# # ShareOptionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**persons** | [**\BhrSdk\Model\PersonInfoApiTransformer[]**](PersonInfoApiTransformer.md) | List of employees with whom goals can be shared. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StateProvinceResponseSchema.md b/docs/Model/StateProvinceResponseSchema.md index d5719641..eafbda29 100644 --- a/docs/Model/StateProvinceResponseSchema.md +++ b/docs/Model/StateProvinceResponseSchema.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**options** | [**\BhrSdk\Model\StateProvinceSchema[]**](StateProvinceSchema.md) | Array of state/province options | [optional] +**options** | [**\BhrSdk\Model\StateProvinceSchema[]**](StateProvinceSchema.md) | Subdivisions for the requested `countryId`. Each object matches StateProvinceSchema; `label` is the subdivision abbreviation, `name` the full name, `iso` the ISO 3166-2 code. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StateProvinceSchema.md b/docs/Model/StateProvinceSchema.md index 658c30b6..ed4abe4d 100644 --- a/docs/Model/StateProvinceSchema.md +++ b/docs/Model/StateProvinceSchema.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | State/province ID | [optional] -**label** | **string** | State/province abbreviation | [optional] -**iso** | **string** | ISO code for the state/province | [optional] -**name** | **string** | Full name of the state/province | [optional] +**label** | **string** | Subdivision abbreviation (e.g. \"UT\" for Utah). This is the short code used in `options[].label`, not the full name (see `name`). | [optional] +**iso** | **string** | ISO 3166-2 subdivision code (e.g. \"US-UT\" for Utah). | [optional] +**name** | **string** | Full subdivision name (e.g. \"Utah\"), distinct from the abbreviation in `label`. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TableRowDeleteResponse.md b/docs/Model/TableRowDeleteResponse.md index 500c806e..67fd3159 100644 --- a/docs/Model/TableRowDeleteResponse.md +++ b/docs/Model/TableRowDeleteResponse.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sucess** | **bool** | | [optional] +**success** | **bool** | Whether the row was successfully deleted. | [optional] +**error** | **string** | Error message when success is false. Absent when success is 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/TableRowUpdate.md b/docs/Model/TableRowUpdate.md index 9f074200..b3b11e9f 100644 --- a/docs/Model/TableRowUpdate.md +++ b/docs/Model/TableRowUpdate.md @@ -4,11 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **string** | | [optional] -**location** | **string** | | [optional] -**division** | **string** | | [optional] -**department** | **string** | | [optional] -**job_title** | **string** | | [optional] -**reports_to** | **string** | | [optional] +**date** | **\DateTime** | The effective date for the row in YYYY-MM-DD format. | [optional] +**location** | **string** | The employee location value for the row. | [optional] +**division** | **string** | The division value for the row. | [optional] +**department** | **string** | The department value for the row. | [optional] +**job_title** | **string** | The job title value for the row. | [optional] +**reports_to** | **string** | The manager or reports-to value for the row. | [optional] +**teams** | **string[]** | Team values associated with the row. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TabularField.md b/docs/Model/TabularField.md new file mode 100644 index 00000000..210d176c --- /dev/null +++ b/docs/Model/TabularField.md @@ -0,0 +1,10 @@ +# # TabularField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **string** | The API alias for the table (e.g., jobInfo, compensation). | [optional] +**fields** | [**\BhrSdk\Model\TabularFieldFieldsInner[]**](TabularFieldFieldsInner.md) | The fields in this table. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TabularFieldFieldsInner.md b/docs/Model/TabularFieldFieldsInner.md new file mode 100644 index 00000000..e87c537a --- /dev/null +++ b/docs/Model/TabularFieldFieldsInner.md @@ -0,0 +1,12 @@ +# # TabularFieldFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The field ID. | [optional] +**name** | **string** | The display name of the field. | [optional] +**alias** | **string** | The API alias for the field within this table. | [optional] +**type** | **string** | The data type of the field (e.g., text, date, list). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffBalanceEntry.md b/docs/Model/TimeOffBalanceEntry.md new file mode 100644 index 00000000..92ddc48a --- /dev/null +++ b/docs/Model/TimeOffBalanceEntry.md @@ -0,0 +1,15 @@ +# # TimeOffBalanceEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_type** | **string** | The ID of the time off type. | [optional] +**name** | **string** | The name of the time off type. | [optional] +**units** | **string** | The unit of measurement for the balance (e.g. 'hours' or 'days'). | [optional] +**balance** | **string** | The calculated time off balance as of the specified date, rounded using `precision`. | [optional] +**end** | **\DateTime** | The date the balance was calculated as of, in YYYY-MM-DD format. | [optional] +**policy_type** | **string** | The type of time off policy assigned to the employee for this time off type. | [optional] +**used_year_to_date** | **string** | The amount of time off used year-to-date as of the specified date, rounded using `precision`. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffHistory.md b/docs/Model/TimeOffHistory.md index 49aa64d8..8f797848 100644 --- a/docs/Model/TimeOffHistory.md +++ b/docs/Model/TimeOffHistory.md @@ -4,8 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **string** | The date the request should be added in history. This will usually be the first date of the request. Should be in ISO8601 date format (YYYY-MM-DD). | -**time_off_request_id** | **int** | The ID of the time off request. | -**note** | **string** | This is an optional note to show in history. | [optional] +**date** | **\DateTime** | The date for the history item in YYYY-MM-DD format. | +**event_type** | **string** | The type of history event. Defaults to `used` for the /history path and `override` for the /balance_adjustment path when omitted. | [optional] +**time_off_request_id** | **int** | The ID of an approved time off request. Required when eventType is `used`. | [optional] +**time_off_type_id** | **int** | The ID of the time off type. Required when eventType is `override`. | [optional] +**amount** | **float** | The number of hours/days to record. Required when eventType is `override`. | [optional] +**note** | **string** | An optional note to show in history. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffPolicy.md b/docs/Model/TimeOffPolicy.md new file mode 100644 index 00000000..7e72e7da --- /dev/null +++ b/docs/Model/TimeOffPolicy.md @@ -0,0 +1,13 @@ +# # TimeOffPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The policy ID. | [optional] +**time_off_type_id** | **int** | The ID of the time off type this policy belongs to. | [optional] +**name** | **string** | The policy name. | [optional] +**effective_date** | **string** | | [optional] +**type** | **string** | The policy type. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffRequest.md b/docs/Model/TimeOffRequest.md index 800ee52b..215a235d 100644 --- a/docs/Model/TimeOffRequest.md +++ b/docs/Model/TimeOffRequest.md @@ -4,12 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | | [optional] -**start** | **string** | | [optional] -**end** | **string** | | [optional] -**time_off_type_id** | **int** | | [optional] -**amount** | **int** | | [optional] -**notes** | [**\BhrSdk\Model\TimeOffRequestNotesInner[]**](TimeOffRequestNotesInner.md) | | [optional] -**dates** | [**\BhrSdk\Model\TimeOffRequestDatesInner[]**](TimeOffRequestDatesInner.md) | | [optional] +**status** | **string** | The initial status of the request. | +**start** | **\DateTime** | Start date in YYYY-MM-DD format. | +**end** | **\DateTime** | End date in YYYY-MM-DD format. Must be on or after the start date. | +**time_off_type_id** | **int** | The ID of the time off type for this request. | +**amount** | **float** | Total hours or days requested. Ignored when `dates` array is provided (sum of daily amounts is used instead). | [optional] +**previous_request** | **int** | The ID of a previous time off request to supersede. The previous request will be cancelled. | [optional] +**notes** | [**\BhrSdk\Model\TimeOffRequestNotesInner[]**](TimeOffRequestNotesInner.md) | Optional notes from the employee or manager. | [optional] +**dates** | [**\BhrSdk\Model\TimeOffRequestDatesInner[]**](TimeOffRequestDatesInner.md) | Optional per-day breakdown. When provided, the top-level `amount` is ignored and the sum of daily amounts is 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/TimeOffRequest1.md b/docs/Model/TimeOffRequest1.md new file mode 100644 index 00000000..9660d73e --- /dev/null +++ b/docs/Model/TimeOffRequest1.md @@ -0,0 +1,20 @@ +# # TimeOffRequest1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The time off request ID. | [optional] +**employee_id** | **int** | The ID of the employee. | [optional] +**name** | **string** | The employee's full name. | [optional] +**start** | **\DateTime** | The start date of the request in YYYY-MM-DD format. | [optional] +**end** | **\DateTime** | The end date of the request in YYYY-MM-DD format. | [optional] +**created** | **\DateTime** | The date the request was created in YYYY-MM-DD format (company timezone). | [optional] +**status** | [**\BhrSdk\Model\TimeOffRequest1Status**](TimeOffRequest1Status.md) | | [optional] +**type** | [**\BhrSdk\Model\TimeOffRequest1Type**](TimeOffRequest1Type.md) | | [optional] +**amount** | [**\BhrSdk\Model\TimeOffRequest1Amount**](TimeOffRequest1Amount.md) | | [optional] +**actions** | [**\BhrSdk\Model\TimeOffRequest1Actions**](TimeOffRequest1Actions.md) | | [optional] +**dates** | **array<string,float>** | A map of dates (YYYY-MM-DD) to daily amounts. | [optional] +**notes** | [**\BhrSdk\Model\TimeOffRequest1Notes**](TimeOffRequest1Notes.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/TimeOffRequest1Actions.md b/docs/Model/TimeOffRequest1Actions.md new file mode 100644 index 00000000..7a580933 --- /dev/null +++ b/docs/Model/TimeOffRequest1Actions.md @@ -0,0 +1,14 @@ +# # TimeOffRequest1Actions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**view** | **bool** | Whether the user can view this request. | [optional] +**edit** | **bool** | Whether the user can edit this request. | [optional] +**cancel** | **bool** | Whether the user can cancel this request. | [optional] +**approve** | **bool** | Whether the user can approve this request. | [optional] +**deny** | **bool** | Whether the user can deny this request. | [optional] +**bypass** | **bool** | Whether the user can bypass the approval workflow. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffRequest1Amount.md b/docs/Model/TimeOffRequest1Amount.md new file mode 100644 index 00000000..afbcb62d --- /dev/null +++ b/docs/Model/TimeOffRequest1Amount.md @@ -0,0 +1,10 @@ +# # TimeOffRequest1Amount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **string** | The unit of measurement. | [optional] +**amount** | **float** | The total amount requested. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffRequest1Notes.md b/docs/Model/TimeOffRequest1Notes.md new file mode 100644 index 00000000..2ca8b1aa --- /dev/null +++ b/docs/Model/TimeOffRequest1Notes.md @@ -0,0 +1,10 @@ +# # TimeOffRequest1Notes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee** | **string** | Note from the employee. | [optional] +**manager** | **string** | Note from the manager. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffRequest1Status.md b/docs/Model/TimeOffRequest1Status.md new file mode 100644 index 00000000..9b1d025f --- /dev/null +++ b/docs/Model/TimeOffRequest1Status.md @@ -0,0 +1,11 @@ +# # TimeOffRequest1Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_changed** | **\DateTime** | The date the status was last changed (company timezone). | [optional] +**last_changed_by_user_id** | **int** | The user ID who last changed the status. | [optional] +**status** | **string** | The current status 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/TimeOffRequest1Type.md b/docs/Model/TimeOffRequest1Type.md new file mode 100644 index 00000000..5ae4ccca --- /dev/null +++ b/docs/Model/TimeOffRequest1Type.md @@ -0,0 +1,11 @@ +# # TimeOffRequest1Type + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The time off type ID. | [optional] +**name** | **string** | The time off type name. | [optional] +**icon** | **string** | The icon name for the time off type. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffRequestDatesInner.md b/docs/Model/TimeOffRequestDatesInner.md index 45af2439..adc87549 100644 --- a/docs/Model/TimeOffRequestDatesInner.md +++ b/docs/Model/TimeOffRequestDatesInner.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ymd** | **string** | | [optional] -**amount** | **int** | | [optional] +**ymd** | **\DateTime** | Date in YYYY-MM-DD format. | [optional] +**amount** | **float** | Hours or days for this 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/TimeOffRequestNotesInner.md b/docs/Model/TimeOffRequestNotesInner.md index 24999a4e..0ea2e9a8 100644 --- a/docs/Model/TimeOffRequestNotesInner.md +++ b/docs/Model/TimeOffRequestNotesInner.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**from** | **string** | | [optional] -**note** | **string** | | [optional] +**from** | **string** | Who the note is from. | [optional] +**note** | **string** | The note text. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffTypesAndDefaultHours.md b/docs/Model/TimeOffTypesAndDefaultHours.md new file mode 100644 index 00000000..ae083124 --- /dev/null +++ b/docs/Model/TimeOffTypesAndDefaultHours.md @@ -0,0 +1,10 @@ +# # TimeOffTypesAndDefaultHours + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_off_types** | [**\BhrSdk\Model\TimeOffTypesAndDefaultHoursTimeOffTypesInner[]**](TimeOffTypesAndDefaultHoursTimeOffTypesInner.md) | | +**default_hours** | [**\BhrSdk\Model\TimeOffTypesAndDefaultHoursDefaultHoursInner[]**](TimeOffTypesAndDefaultHoursDefaultHoursInner.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/TimeOffTypesAndDefaultHoursDefaultHoursInner.md b/docs/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.md new file mode 100644 index 00000000..36fc324f --- /dev/null +++ b/docs/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.md @@ -0,0 +1,10 @@ +# # TimeOffTypesAndDefaultHoursDefaultHoursInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Day of week | +**amount** | **string** | Default hours for the day. Returned as a stringified decimal value. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md b/docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md new file mode 100644 index 00000000..1aa732bb --- /dev/null +++ b/docs/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md @@ -0,0 +1,14 @@ +# # TimeOffTypesAndDefaultHoursTimeOffTypesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Time off type ID | +**name** | **string** | Time off type name | +**units** | **string** | Units for time off | +**color** | **string** | | +**icon** | **string** | | +**source** | **string** | Source of the time off type | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md b/docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md new file mode 100644 index 00000000..e5e56b7e --- /dev/null +++ b/docs/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md @@ -0,0 +1,11 @@ +# # TimeTrackingBreakPolicyEmployeeCollectionV1Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The employee ID | +**name** | **string** | | +**photo_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/TimeTrackingBreakPolicySuggestionsResponseV1.md b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1.md new file mode 100644 index 00000000..92f30c4e --- /dev/null +++ b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1.md @@ -0,0 +1,9 @@ +# # TimeTrackingBreakPolicySuggestionsResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suggested_policies** | [**\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner[]**](TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.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/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md new file mode 100644 index 00000000..acb86406 --- /dev/null +++ b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md @@ -0,0 +1,12 @@ +# # TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | +**title** | **string** | | +**description** | **string** | | [optional] +**breaks** | [**\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner[]**](TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.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/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md new file mode 100644 index 00000000..c88ab4da --- /dev/null +++ b/docs/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md @@ -0,0 +1,13 @@ +# # TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**duration** | **int** | | +**paid** | **bool** | | +**availability_type** | **string** | | +**availability_min_hours_worked** | **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/TimeTrackingBulkResponseSchemaResponse.md b/docs/Model/TimeTrackingBulkResponseSchemaResponse.md index 9b1505b7..b06ca89d 100644 --- a/docs/Model/TimeTrackingBulkResponseSchemaResponse.md +++ b/docs/Model/TimeTrackingBulkResponseSchemaResponse.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Unique identifier for the time tracking record | [optional] -**message** | **string** | Response message, typically used for error details | [optional] +**message** | **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/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md b/docs/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md new file mode 100644 index 00000000..7625261b --- /dev/null +++ b/docs/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md @@ -0,0 +1,17 @@ +# # TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | The name of the break | [optional] +**paid** | **bool** | Whether the break is paid | [optional] +**duration** | **int** | Duration of the break in minutes | [optional] +**availability_type** | **string** | When the break is available to be taken | [optional] +**availability_min_hours_worked** | **float** | | [optional] +**availability_max_hours_worked** | **float** | | [optional] +**availability_start_time** | **string** | | [optional] +**availability_end_time** | **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/TimeTrackingCreateTimeTrackingBreakPolicyV1.md b/docs/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md new file mode 100644 index 00000000..f5b65b7c --- /dev/null +++ b/docs/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.md @@ -0,0 +1,13 @@ +# # TimeTrackingCreateTimeTrackingBreakPolicyV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the break policy | +**description** | **string** | | [optional] +**all_employees_assigned** | **bool** | Whether all employees are assigned to this break policy | [optional] +**breaks** | [**\BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]**](TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md) | Collection of time tracking breaks to create or update without a policy | [optional] +**employee_ids** | **int[]** | The employees that should be assigned to this policy | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md b/docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md new file mode 100644 index 00000000..d740a11e --- /dev/null +++ b/docs/Model/TimeTrackingCreateTimeTrackingBreakV1.md @@ -0,0 +1,17 @@ +# # TimeTrackingCreateTimeTrackingBreakV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the break | [optional] +**policy_id** | **string** | The unique identifier of the break policy this break belongs to | [optional] +**paid** | **bool** | Whether the break is paid | [optional] +**duration** | **int** | Duration of the break in minutes | [optional] +**availability_type** | **string** | When the break is available to be taken | [optional] +**availability_min_hours_worked** | **float** | | [optional] +**availability_max_hours_worked** | **float** | | [optional] +**availability_start_time** | **string** | | [optional] +**availability_end_time** | **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/TimeTrackingOffsetPaginatedResponseDataV1.md b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1.md new file mode 100644 index 00000000..3efe882a --- /dev/null +++ b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1.md @@ -0,0 +1,10 @@ +# # TimeTrackingOffsetPaginatedResponseDataV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta**](TimeTrackingOffsetPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links**](TimeTrackingOffsetPaginatedResponseDataV1Links.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/TimeTrackingOffsetPaginatedResponseDataV1Links.md b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.md new file mode 100644 index 00000000..055c5818 --- /dev/null +++ b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.md @@ -0,0 +1,10 @@ +# # TimeTrackingOffsetPaginatedResponseDataV1Links + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev** | **object** | | +**next** | **object** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md new file mode 100644 index 00000000..e0a8e9c8 --- /dev/null +++ b/docs/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.md @@ -0,0 +1,11 @@ +# # TimeTrackingOffsetPaginatedResponseDataV1Meta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_items** | **int** | | +**offset** | **int** | | +**limit** | **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/TimeTrackingPaginatedBreakAssessmentsResponseV1.md b/docs/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md new file mode 100644 index 00000000..299ef369 --- /dev/null +++ b/docs/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.md @@ -0,0 +1,11 @@ +# # TimeTrackingPaginatedBreakAssessmentsResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta**](TimeTrackingOffsetPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links**](TimeTrackingOffsetPaginatedResponseDataV1Links.md) | | [optional] +**data** | [**\BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentV1[]**](TimeTrackingTimeTrackingBreakAssessmentV1.md) | Collection of time tracking break assessments | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md b/docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md new file mode 100644 index 00000000..f8602cb1 --- /dev/null +++ b/docs/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.md @@ -0,0 +1,11 @@ +# # TimeTrackingPaginatedBreakPoliciesResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta**](TimeTrackingOffsetPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links**](TimeTrackingOffsetPaginatedResponseDataV1Links.md) | | [optional] +**data** | [**\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1[]**](TimeTrackingTimeTrackingBreakPolicyV1.md) | Collection of time tracking break policies | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md b/docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md new file mode 100644 index 00000000..f66bd84b --- /dev/null +++ b/docs/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md @@ -0,0 +1,11 @@ +# # TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta**](TimeTrackingOffsetPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links**](TimeTrackingOffsetPaginatedResponseDataV1Links.md) | | [optional] +**data** | [**\BhrSdk\Model\TimeTrackingBreakPolicyEmployeeCollectionV1Inner[]**](TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md) | Employee data relevant for break policies | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingPaginatedBreaksResponseV1.md b/docs/Model/TimeTrackingPaginatedBreaksResponseV1.md new file mode 100644 index 00000000..749d0a7f --- /dev/null +++ b/docs/Model/TimeTrackingPaginatedBreaksResponseV1.md @@ -0,0 +1,11 @@ +# # TimeTrackingPaginatedBreaksResponseV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta**](TimeTrackingOffsetPaginatedResponseDataV1Meta.md) | | [optional] +**_links** | [**\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links**](TimeTrackingOffsetPaginatedResponseDataV1Links.md) | | [optional] +**data** | [**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]**](TimeTrackingTimeTrackingBreakV1.md) | Collection of time tracking breaks | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingRecordSchema.md b/docs/Model/TimeTrackingRecordSchema.md index 76b74564..d2e1b7bf 100644 --- a/docs/Model/TimeTrackingRecordSchema.md +++ b/docs/Model/TimeTrackingRecordSchema.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time_tracking_id** | **string** | Unique identifier for the time tracking record | [optional] **employee_id** | **string** | ID of the employee associated with this time tracking record | [optional] -**division_id** | **string** | ID of the division associated with this time tracking record | [optional] -**department_id** | **string** | ID of the department associated with this time tracking record | [optional] -**job_title_id** | **string** | ID of the job title associated with this time tracking record | [optional] -**pay_code** | **string** | Pay code for this time tracking record | [optional] +**division_id** | **string** | | [optional] +**department_id** | **string** | | [optional] +**job_title_id** | **string** | | [optional] +**pay_code** | **string** | | [optional] **date_hours_worked** | **\DateTime** | Date the hours were worked | [optional] **type** | **string** | Type of time tracking record | [optional] **pay_rate** | **float** | Pay rate for this time tracking record | [optional] @@ -17,13 +17,13 @@ Name | Type | Description | Notes **hours_worked** | **float** | Number of hours worked | [optional] **adjusted_hours** | **float** | Number of adjusted hours | [optional] **date_adjusted** | **\DateTime** | Date and time when the hours were adjusted | [optional] -**job_code** | **string** | Job code associated with this time tracking record | [optional] -**job_data** | **string** | Additional job data for this time tracking record | [optional] -**project_id** | **string** | ID of the project associated with this time tracking record | [optional] -**task_id** | **string** | ID of the task associated with this time tracking record | [optional] -**shift_differential_id** | **string** | ID of the shift differential associated with this time tracking record | [optional] -**holiday_id** | **string** | ID of the holiday associated with this time tracking record | [optional] -**project** | [**\BhrSdk\Model\TimeTrackingRecordSchemaProject**](TimeTrackingRecordSchemaProject.md) | | [optional] -**shift_differential** | [**\BhrSdk\Model\TimeTrackingRecordSchemaShiftDifferential**](TimeTrackingRecordSchemaShiftDifferential.md) | | [optional] +**job_code** | **string** | | [optional] +**job_data** | **string** | | [optional] +**project_id** | **string** | | [optional] +**task_id** | **string** | | [optional] +**shift_differential_id** | **string** | | [optional] +**holiday_id** | **string** | | [optional] +**project** | **object** | | [optional] +**shift_differential** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingRecordSchemaProject.md b/docs/Model/TimeTrackingRecordSchemaProject.md deleted file mode 100644 index cf0e99c3..00000000 --- a/docs/Model/TimeTrackingRecordSchemaProject.md +++ /dev/null @@ -1,11 +0,0 @@ -# # TimeTrackingRecordSchemaProject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Project information | [optional] -**name** | **string** | | [optional] -**task** | [**\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask**](TimeTrackingRecordSchemaProjectTask.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/TimeTrackingSyncTimeTrackingBreakPolicyV1.md b/docs/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md new file mode 100644 index 00000000..63cfb691 --- /dev/null +++ b/docs/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.md @@ -0,0 +1,13 @@ +# # TimeTrackingSyncTimeTrackingBreakPolicyV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the break policy | [optional] +**description** | **string** | | [optional] +**all_employees_assigned** | **bool** | Whether all employees are assigned to this break policy | [optional] +**breaks** | [**\BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]**](TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md) | Collection of time tracking breaks to create or update without a policy | [optional] +**employee_ids** | **int[]** | The employees that should be assigned to this policy | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md b/docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md new file mode 100644 index 00000000..2f243e77 --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakAssessmentV1.md @@ -0,0 +1,24 @@ +# # TimeTrackingTimeTrackingBreakAssessmentV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique identifier for the time tracking break assessment | [optional] [readonly] +**break_id** | **string** | The unique identifier of the break | [optional] [readonly] +**employee_id** | **int** | The id of the employee | [optional] +**employee_timesheet_id** | **int** | The id of the employee timesheet | [optional] +**date** | **\DateTime** | The date of the break assessment | [optional] +**timezone** | **string** | The timezone of the break assessment | [optional] +**result** | **string** | The result of the break assessment | [optional] +**available_ymdt** | **\DateTime** | | [optional] [readonly] +**unavailable_ymdt** | **\DateTime** | | [optional] [readonly] +**created_at** | **\DateTime** | ISO 8601 timestamp when the break was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**violations** | [**\BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentViolationV1[]**](TimeTrackingTimeTrackingBreakAssessmentViolationV1.md) | Violations associated with the assessment | [optional] +**clock_entry_ids** | **int[]** | Clock entry ids associated with the time tracking break assessment | [optional] +**expected_duration** | **int** | | [optional] +**recorded_duration** | **int** | | [optional] +**duration_difference** | **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/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md b/docs/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md new file mode 100644 index 00000000..42de3c72 --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.md @@ -0,0 +1,12 @@ +# # TimeTrackingTimeTrackingBreakAssessmentViolationV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assessment_id** | **string** | The unique identifier for the time tracking break assessment. | [optional] [readonly] +**type** | **string** | The type of the violation | [optional] [readonly] +**employee_timesheet_clock_entry_id** | **float** | | [optional] [readonly] +**amount** | **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/TimeTrackingTimeTrackingBreakAvailabilityV1.md b/docs/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md new file mode 100644 index 00000000..a9991a84 --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.md @@ -0,0 +1,24 @@ +# # TimeTrackingTimeTrackingBreakAvailabilityV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique identifier for the time tracking break | [optional] [readonly] +**name** | **string** | The name of the break | [optional] [readonly] +**policy_id** | **string** | The unique identifier of the break policy this break belongs to | [optional] [readonly] +**paid** | **bool** | Whether the break is paid | [optional] [readonly] +**duration** | **int** | Duration of the break in minutes | [optional] [readonly] +**availability_type** | **string** | When the break is available to be taken | [optional] [readonly] +**calculated_at** | **\DateTime** | When the break availability was calculated | [optional] [readonly] +**effective_at** | **\DateTime** | Timestamp that all time-based calculations are evaluated relative to. | [optional] [readonly] +**timezone** | **string** | The timezone the break availability is calculated in | [optional] [readonly] +**recorded_duration** | **int** | The duration of the break that has been recorded so far | [optional] [readonly] +**available** | **bool** | Whether the break is currently available to be taken | [optional] [readonly] +**available_after_minutes_worked** | **int** | | [optional] [readonly] +**available_in** | **int** | | [optional] [readonly] +**unavailable_in** | **int** | | [optional] [readonly] +**available_at** | **\DateTime** | | [optional] [readonly] +**unavailable_at** | **\DateTime** | | [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/TimeTrackingTimeTrackingBreakPolicyV1.md b/docs/Model/TimeTrackingTimeTrackingBreakPolicyV1.md new file mode 100644 index 00000000..29a95782 --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakPolicyV1.md @@ -0,0 +1,15 @@ +# # TimeTrackingTimeTrackingBreakPolicyV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the break policy | [optional] [readonly] +**name** | **string** | Name of the break policy | [optional] +**description** | **string** | | [optional] +**all_employees_assigned** | **bool** | Whether all employees are assigned to this break policy | [optional] +**created_at** | **\DateTime** | ISO 8601 timestamp when the break policy was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [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/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md b/docs/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md new file mode 100644 index 00000000..465a1224 --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md @@ -0,0 +1,17 @@ +# # TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the break policy | [optional] [readonly] +**name** | **string** | Name of the break policy | [optional] +**description** | **string** | | [optional] +**all_employees_assigned** | **bool** | Whether all employees are assigned to this break policy | [optional] +**created_at** | **\DateTime** | ISO 8601 timestamp when the break policy was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [optional] [readonly] +**breaks** | [**\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]**](TimeTrackingTimeTrackingBreakV1.md) | The breaks that are assigned to this policy | [optional] +**employee_ids** | **int[]** | The employees that are assigned to this policy | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingTimeTrackingBreakV1.md b/docs/Model/TimeTrackingTimeTrackingBreakV1.md new file mode 100644 index 00000000..b41cc8ec --- /dev/null +++ b/docs/Model/TimeTrackingTimeTrackingBreakV1.md @@ -0,0 +1,21 @@ +# # TimeTrackingTimeTrackingBreakV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique identifier for the time tracking break | [optional] [readonly] +**name** | **string** | The name of the break | [optional] +**policy_id** | **string** | The unique identifier of the break policy this break belongs to | [optional] +**paid** | **bool** | Whether the break is paid | [optional] +**duration** | **int** | Duration of the break in minutes | [optional] +**availability_type** | **string** | When the break is available to be taken | [optional] +**availability_min_hours_worked** | **float** | | [optional] +**availability_max_hours_worked** | **float** | | [optional] +**availability_start_time** | **string** | | [optional] +**availability_end_time** | **string** | | [optional] +**created_at** | **\DateTime** | ISO 8601 timestamp when the break was created | [optional] [readonly] +**updated_at** | **\DateTime** | | [optional] [readonly] +**deleted_at** | **\DateTime** | | [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/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md b/docs/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md new file mode 100644 index 00000000..a827f20c --- /dev/null +++ b/docs/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md @@ -0,0 +1,11 @@ +# # TimeTrackingUpdateTimeTrackingBreakPolicyV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the break policy | [optional] +**description** | **string** | | [optional] +**all_employees_assigned** | **bool** | Whether all employees are assigned to this break policy | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md b/docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md new file mode 100644 index 00000000..85fba31c --- /dev/null +++ b/docs/Model/TimeTrackingUpdateTimeTrackingBreakV1.md @@ -0,0 +1,17 @@ +# # TimeTrackingUpdateTimeTrackingBreakV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the break | [optional] +**policy_id** | **string** | The unique identifier of the break policy this break belongs to | [optional] +**paid** | **bool** | Whether the break is paid | [optional] +**duration** | **int** | Duration of the break in minutes | [optional] +**availability_type** | **string** | When the break is available to be taken | [optional] +**availability_min_hours_worked** | **float** | | [optional] +**availability_max_hours_worked** | **float** | | [optional] +**availability_start_time** | **string** | | [optional] +**availability_end_time** | **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/TimesheetEntryInfoApiTransformer.md b/docs/Model/TimesheetEntryInfoApiTransformer.md index adac0b10..e78e3efa 100644 --- a/docs/Model/TimesheetEntryInfoApiTransformer.md +++ b/docs/Model/TimesheetEntryInfoApiTransformer.md @@ -8,11 +8,12 @@ Name | Type | Description | Notes **employee_id** | **int** | Employee ID | [optional] **type** | **string** | Entry type | [optional] **date** | **\DateTime** | Date of the timesheet | [optional] -**start** | **\DateTime** | Start time | [optional] -**end** | **\DateTime** | End time | [optional] -**timezone** | **string** | Timezone | [optional] -**hours** | **float** | Hours worked | [optional] -**note** | **string** | Note | [optional] +**start** | **\DateTime** | | [optional] +**end** | **\DateTime** | | [optional] +**timezone** | **string** | | [optional] +**hours** | **float** | | [optional] +**note** | **string** | | [optional] **project_info** | [**\BhrSdk\Model\ProjectInfoApiTransformer**](ProjectInfoApiTransformer.md) | | [optional] +**break_info** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimezoneListResponse.md b/docs/Model/TimezoneListResponse.md new file mode 100644 index 00000000..44c02ce6 --- /dev/null +++ b/docs/Model/TimezoneListResponse.md @@ -0,0 +1,11 @@ +# # TimezoneListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\BhrSdk\Model\TimezoneResource[]**](TimezoneResource.md) | Array of timezone resources for the current page | [optional] +**meta** | [**\BhrSdk\Model\PaginationMetaData**](PaginationMetaData.md) | The pagination metadata for the response. | [optional] +**_links** | [**array<string,\BhrSdk\Model\AvailableAction>**](AvailableAction.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/TimezoneResource.md b/docs/Model/TimezoneResource.md new file mode 100644 index 00000000..fb13ebfd --- /dev/null +++ b/docs/Model/TimezoneResource.md @@ -0,0 +1,12 @@ +# # TimezoneResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The timezone ID. | [optional] +**gmt_offset** | **string** | The GMT offset label (e.g. \"(GMT-07:00)\"). | [optional] +**name** | **string** | The display name of the timezone. | [optional] +**utc_name** | **string** | The IANA/UTC timezone 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/TotalRewardsBenefitDetailsValues.md b/docs/Model/TotalRewardsBenefitDetailsValues.md new file mode 100644 index 00000000..83cfbfe2 --- /dev/null +++ b/docs/Model/TotalRewardsBenefitDetailsValues.md @@ -0,0 +1,14 @@ +# # TotalRewardsBenefitDetailsValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name | [optional] +**company_contribution_amount** | **string** | Company contribution amount | [optional] +**company_contribution_subvalue** | **string** | | [optional] +**summary** | **string** | | [optional] +**url** | **string** | | [optional] +**benefit_modal_values_link** | **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/TotalRewardsBenefitSectionValues.md b/docs/Model/TotalRewardsBenefitSectionValues.md new file mode 100644 index 00000000..f5b2e082 --- /dev/null +++ b/docs/Model/TotalRewardsBenefitSectionValues.md @@ -0,0 +1,10 @@ +# # TotalRewardsBenefitSectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comp_summary** | [**\BhrSdk\Model\TotalRewardsCompSummaryValues**](TotalRewardsCompSummaryValues.md) | Compensation summary | [optional] +**benefit_details** | [**\BhrSdk\Model\TotalRewardsBenefitDetailsValues[]**](TotalRewardsBenefitDetailsValues.md) | Benefit details | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TotalRewardsCalendarSectionValues.md b/docs/Model/TotalRewardsCalendarSectionValues.md new file mode 100644 index 00000000..a34f9bf1 --- /dev/null +++ b/docs/Model/TotalRewardsCalendarSectionValues.md @@ -0,0 +1,11 @@ +# # TotalRewardsCalendarSectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**holidays** | [**\BhrSdk\Model\TotalRewardsHolidayValue[]**](TotalRewardsHolidayValue.md) | List of holidays | [optional] +**time_off_policies** | [**\BhrSdk\Model\TotalRewardsTimeOffPolicyValue[]**](TotalRewardsTimeOffPolicyValue.md) | List of time off policies | [optional] +**hourly_accrual_disclaimer** | **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/TotalRewardsCompSummaryValues.md b/docs/Model/TotalRewardsCompSummaryValues.md new file mode 100644 index 00000000..aac60d89 --- /dev/null +++ b/docs/Model/TotalRewardsCompSummaryValues.md @@ -0,0 +1,12 @@ +# # TotalRewardsCompSummaryValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | Title | [optional] +**subtitle** | **string** | | [optional] +**value** | **string** | | [optional] +**subvalue** | **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/LocationsList.md b/docs/Model/TotalRewardsCustomDisclaimerInfo.md similarity index 62% rename from docs/Model/LocationsList.md rename to docs/Model/TotalRewardsCustomDisclaimerInfo.md index cfae6aef..a604a7e3 100644 --- a/docs/Model/LocationsList.md +++ b/docs/Model/TotalRewardsCustomDisclaimerInfo.md @@ -1,9 +1,10 @@ -# # LocationsList +# # TotalRewardsCustomDisclaimerInfo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**location** | [**\BhrSdk\Model\Location**](Location.md) | | [optional] +**is_viewer_admin** | **bool** | Is admin currently viewing | [optional] +**custom_disclaimer** | **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/TotalRewardsEmployeeStatement.md b/docs/Model/TotalRewardsEmployeeStatement.md new file mode 100644 index 00000000..611a7d91 --- /dev/null +++ b/docs/Model/TotalRewardsEmployeeStatement.md @@ -0,0 +1,25 @@ +# # TotalRewardsEmployeeStatement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_id** | **string** | | [optional] +**employee_name** | **string** | Employee Name | [optional] +**job_title** | **string** | | [optional] +**has_mixed_currency_types** | **bool** | | [optional] +**overview_section** | [**\BhrSdk\Model\TotalRewardsOverviewSectionValues**](TotalRewardsOverviewSectionValues.md) | Total Rewards overview section object | [optional] +**pay_section** | [**\BhrSdk\Model\TotalRewardsTimelineSectionValues**](TotalRewardsTimelineSectionValues.md) | Total Rewards pay timeline object | [optional] +**bonus_section** | [**\BhrSdk\Model\TotalRewardsTimelineSectionValues**](TotalRewardsTimelineSectionValues.md) | Total Rewards bonus section timeline object | [optional] +**commission_section** | [**\BhrSdk\Model\TotalRewardsTimelineSectionValues**](TotalRewardsTimelineSectionValues.md) | Total Rewards commission section timeline object | [optional] +**benefit_section** | [**\BhrSdk\Model\TotalRewardsBenefitSectionValues**](TotalRewardsBenefitSectionValues.md) | Total Rewards benefit section object | [optional] +**equity_section** | [**\BhrSdk\Model\TotalRewardsEquitySectionValues**](TotalRewardsEquitySectionValues.md) | Total Rewards equity section object | [optional] +**calendar_section** | [**\BhrSdk\Model\TotalRewardsCalendarSectionValues**](TotalRewardsCalendarSectionValues.md) | Total Rewards equity section object | [optional] +**extra_pay_section** | [**\BhrSdk\Model\TotalRewardsExtraPaySectionValues**](TotalRewardsExtraPaySectionValues.md) | Total Rewards extra pay section object | [optional] +**custom_disclaimer_info** | [**\BhrSdk\Model\TotalRewardsCustomDisclaimerInfo**](TotalRewardsCustomDisclaimerInfo.md) | Total Rewards custom disclaimer object | [optional] +**company_name** | **string** | | [optional] +**company_logo_url** | **string** | | [optional] +**statement_year** | **int** | | [optional] +**min_statement_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/TotalRewardsEquityDetailsValues.md b/docs/Model/TotalRewardsEquityDetailsValues.md new file mode 100644 index 00000000..f29468f1 --- /dev/null +++ b/docs/Model/TotalRewardsEquityDetailsValues.md @@ -0,0 +1,29 @@ +# # TotalRewardsEquityDetailsValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cliff_months** | **int** | | [optional] +**estimated_exercise_cost** | **string** | | [optional] +**estimated_exercise_cost_subvalue** | **string** | | [optional] +**estimated_share_price** | **string** | Estimated share price | [optional] +**estimated_share_price_subvalue** | **string** | | [optional] +**estimated_total_value** | **string** | Estimated total value | [optional] +**estimated_total_value_subvalue** | **string** | | [optional] +**grant_date** | **\DateTime** | Grant date | [optional] +**grant_type** | **string** | Grant type | [optional] +**grant_name** | **string** | | [optional] +**equity_growth_chart_data** | [**\BhrSdk\Model\TotalRewardsEquityGrowthChartItem[]**](TotalRewardsEquityGrowthChartItem.md) | | [optional] +**num_shares** | **int** | Number of shares | [optional] +**num_vested_shares** | **int** | Number of vested shares | [optional] +**percent_vested** | **float** | Percent vested | [optional] +**strike_price** | **string** | | [optional] +**strike_price_subvalue** | **string** | | [optional] +**vesting_months** | **int** | | [optional] +**vesting_schedule** | **string** | Vesting schedule | [optional] +**vesting_start_date** | **\DateTime** | Vesting start date | [optional] +**vested_value** | **string** | Vested value | [optional] +**vested_value_subvalue** | **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/TotalRewardsEquityEstimatedValuationValues.md b/docs/Model/TotalRewardsEquityEstimatedValuationValues.md new file mode 100644 index 00000000..0efee689 --- /dev/null +++ b/docs/Model/TotalRewardsEquityEstimatedValuationValues.md @@ -0,0 +1,13 @@ +# # TotalRewardsEquityEstimatedValuationValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**equity_growth_estimation_items** | [**\BhrSdk\Model\TotalRewardsEquityGrowthEstimation[]**](TotalRewardsEquityGrowthEstimation.md) | Equity estimated growth items | [optional] +**number_of_vested_shares** | **int** | Number of vested shares | [optional] +**number_of_total_shares** | **int** | Number of total shares | [optional] +**equity_growth_slider_max** | **int** | | [optional] +**equity_growth_slider_min** | **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/TotalRewardsEquityGrowthChartItem.md b/docs/Model/TotalRewardsEquityGrowthChartItem.md new file mode 100644 index 00000000..44c588aa --- /dev/null +++ b/docs/Model/TotalRewardsEquityGrowthChartItem.md @@ -0,0 +1,14 @@ +# # TotalRewardsEquityGrowthChartItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **string** | Label | [optional] +**estimated_net_value** | **string** | Estimated value | [optional] +**subvalue** | **string** | | [optional] +**vested** | **float** | | [optional] +**current** | **float** | | [optional] +**unvested** | **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/TotalRewardsEquityGrowthEstimation.md b/docs/Model/TotalRewardsEquityGrowthEstimation.md new file mode 100644 index 00000000..cb6048be --- /dev/null +++ b/docs/Model/TotalRewardsEquityGrowthEstimation.md @@ -0,0 +1,15 @@ +# # TotalRewardsEquityGrowthEstimation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stop** | **int** | Stop | [optional] +**company_valuation** | **string** | Company valuation | [optional] +**company_valuation_subvalue** | **string** | | [optional] +**total_value** | **string** | Total value | [optional] +**total_value_subvalue** | **string** | | [optional] +**vested_value** | **string** | Vested amount value | [optional] +**vested_value_subvalue** | **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/TotalRewardsEquitySectionValues.md b/docs/Model/TotalRewardsEquitySectionValues.md new file mode 100644 index 00000000..e2f9aac7 --- /dev/null +++ b/docs/Model/TotalRewardsEquitySectionValues.md @@ -0,0 +1,13 @@ +# # TotalRewardsEquitySectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comp_summary** | [**\BhrSdk\Model\TotalRewardsCompSummaryValues**](TotalRewardsCompSummaryValues.md) | Compensation summary values for equity | [optional] +**conditions** | **string** | | [optional] +**disclaimers** | **string** | | [optional] +**equity_details** | [**\BhrSdk\Model\TotalRewardsEquityDetailsValues[]**](TotalRewardsEquityDetailsValues.md) | Equity details | [optional] +**equity_estimated_valuation** | [**\BhrSdk\Model\TotalRewardsEquityEstimatedValuationValues**](TotalRewardsEquityEstimatedValuationValues.md) | Total rewards equity estimated valuation object | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TotalRewardsExtraPayDetailsValues.md b/docs/Model/TotalRewardsExtraPayDetailsValues.md new file mode 100644 index 00000000..ee2d224c --- /dev/null +++ b/docs/Model/TotalRewardsExtraPayDetailsValues.md @@ -0,0 +1,15 @@ +# # TotalRewardsExtraPayDetailsValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name | [optional] +**amount** | **string** | Amount | [optional] +**amount_subvalue** | **string** | | [optional] +**frequency** | **string** | Frequency | [optional] +**formatted_date_string** | **\DateTime** | Extra pay formatted date | [optional] +**annualized_amount** | **string** | Annualized amount | [optional] +**annualized_subvalue** | **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/TotalRewardsExtraPaySectionValues.md b/docs/Model/TotalRewardsExtraPaySectionValues.md new file mode 100644 index 00000000..989e00ad --- /dev/null +++ b/docs/Model/TotalRewardsExtraPaySectionValues.md @@ -0,0 +1,11 @@ +# # TotalRewardsExtraPaySectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | Title | [optional] +**comp_summary** | [**\BhrSdk\Model\TotalRewardsCompSummaryValues**](TotalRewardsCompSummaryValues.md) | Compensation summary values for extra pay | [optional] +**extra_pay_details** | [**\BhrSdk\Model\TotalRewardsExtraPayDetailsValues[]**](TotalRewardsExtraPayDetailsValues.md) | Extra pay details | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TotalRewardsHolidayValue.md b/docs/Model/TotalRewardsHolidayValue.md new file mode 100644 index 00000000..ceedeabd --- /dev/null +++ b/docs/Model/TotalRewardsHolidayValue.md @@ -0,0 +1,11 @@ +# # TotalRewardsHolidayValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | Title | [optional] +**start_date** | **string** | Start date | [optional] +**end_date** | **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/TotalRewardsOnboardingStep.md b/docs/Model/TotalRewardsOnboardingStep.md new file mode 100644 index 00000000..fa77315e --- /dev/null +++ b/docs/Model/TotalRewardsOnboardingStep.md @@ -0,0 +1,10 @@ +# # TotalRewardsOnboardingStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the onboarding step | [optional] +**completed** | **bool** | Whether or not the onboarding step is completed | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TotalRewardsOverviewSectionValues.md b/docs/Model/TotalRewardsOverviewSectionValues.md new file mode 100644 index 00000000..8a12f80c --- /dev/null +++ b/docs/Model/TotalRewardsOverviewSectionValues.md @@ -0,0 +1,11 @@ +# # TotalRewardsOverviewSectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**estimated_total_comp_value** | **string** | | [optional] +**paid_per** | **string** | | [optional] +**multiplier_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/TotalRewardsTimeOffPolicyValue.md b/docs/Model/TotalRewardsTimeOffPolicyValue.md new file mode 100644 index 00000000..e9ca0b97 --- /dev/null +++ b/docs/Model/TotalRewardsTimeOffPolicyValue.md @@ -0,0 +1,12 @@ +# # TotalRewardsTimeOffPolicyValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | Title | [optional] +**value** | **string** | Value | [optional] +**show_disclaimer** | **bool** | | [optional] +**show_eligible** | **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/TotalRewardsTimelineItem.md b/docs/Model/TotalRewardsTimelineItem.md new file mode 100644 index 00000000..51139ad7 --- /dev/null +++ b/docs/Model/TotalRewardsTimelineItem.md @@ -0,0 +1,11 @@ +# # TotalRewardsTimelineItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **string** | | [optional] +**subvalue** | **string** | | [optional] +**label** | [**\BhrSdk\Model\TotalRewardsTimelineItemLabel**](TotalRewardsTimelineItemLabel.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/TotalRewardsTimelineItemLabel.md b/docs/Model/TotalRewardsTimelineItemLabel.md new file mode 100644 index 00000000..81f88283 --- /dev/null +++ b/docs/Model/TotalRewardsTimelineItemLabel.md @@ -0,0 +1,8 @@ +# # TotalRewardsTimelineItemLabel + +## 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/TotalRewardsTimelineSectionValues.md b/docs/Model/TotalRewardsTimelineSectionValues.md new file mode 100644 index 00000000..6f4967c0 --- /dev/null +++ b/docs/Model/TotalRewardsTimelineSectionValues.md @@ -0,0 +1,11 @@ +# # TotalRewardsTimelineSectionValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comp_summary** | [**\BhrSdk\Model\TotalRewardsCompSummaryValues**](TotalRewardsCompSummaryValues.md) | Compensation summary | [optional] +**timeline_data** | [**\BhrSdk\Model\TotalRewardsTimelineItem[]**](TotalRewardsTimelineItem.md) | Timeline data | [optional] +**placeholder_text** | **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/TrainingCategory.md b/docs/Model/TrainingCategory.md index 5f8b3f04..84b68bc8 100644 --- a/docs/Model/TrainingCategory.md +++ b/docs/Model/TrainingCategory.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **string** | | [optional] +**id** | **int** | The ID of the training category. | [optional] +**name** | **string** | The name of the training category. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TrainingCategoryList.md b/docs/Model/TrainingCategoryList.md deleted file mode 100644 index 1fa0836c..00000000 --- a/docs/Model/TrainingCategoryList.md +++ /dev/null @@ -1,9 +0,0 @@ -# # TrainingCategoryList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category_id** | [**\BhrSdk\Model\TrainingCategory**](TrainingCategory.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/TrainingRecord.md b/docs/Model/TrainingRecord.md index 7ae23992..23792ad3 100644 --- a/docs/Model/TrainingRecord.md +++ b/docs/Model/TrainingRecord.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | The ID of the training record. | [optional] -**employee_id** | **int** | The ID of the employee associated with the training. | [optional] -**completed** | **string** | Completed is a date in the format yyyy-mm-dd. | [optional] -**notes** | **string** | Notes left on the training record. | [optional] -**instructor** | **string** | Name of the instructor. | [optional] -**credits** | **float** | What was credited for the training record. | [optional] -**hours** | **float** | Hours associated with the training record. | [optional] -**cost** | **string** | The currency and cost for the training record. | [optional] -**type** | **int** | The training type ID. | [optional] +**employee_id** | **string** | The ID of the employee associated with the training, returned as a string. | [optional] +**completed** | **\DateTime** | Completed is a date in the format yyyy-mm-dd. | [optional] +**notes** | **string** | | [optional] +**instructor** | **string** | | [optional] +**credits** | **string** | | [optional] +**hours** | **string** | | [optional] +**cost** | **string** | | [optional] +**type** | [**\BhrSdk\Model\TrainingRecordType**](TrainingRecordType.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/TrainingRecordList.md b/docs/Model/TrainingRecordList.md deleted file mode 100644 index 96462070..00000000 --- a/docs/Model/TrainingRecordList.md +++ /dev/null @@ -1,9 +0,0 @@ -# # TrainingRecordList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**training_id** | [**\BhrSdk\Model\TrainingRecord**](TrainingRecord.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/TrainingRecordMap.md b/docs/Model/TrainingRecordMap.md new file mode 100644 index 00000000..ba2ffd75 --- /dev/null +++ b/docs/Model/TrainingRecordMap.md @@ -0,0 +1,8 @@ +# # TrainingRecordMap + +## 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/TrainingRecordType.md b/docs/Model/TrainingRecordType.md new file mode 100644 index 00000000..c961b312 --- /dev/null +++ b/docs/Model/TrainingRecordType.md @@ -0,0 +1,8 @@ +# # TrainingRecordType + +## 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/TrainingType.md b/docs/Model/TrainingType.md index 0d73f74d..41dfcec6 100644 --- a/docs/Model/TrainingType.md +++ b/docs/Model/TrainingType.md @@ -9,10 +9,10 @@ Name | Type | Description | Notes **renewable** | **bool** | If true, training will be renewed based off of frequency. | [optional] **frequency** | **int** | The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable. | [optional] **due_from_hire_date** | **int** | Number of days before the training is due for new hires. Not valid if training is not required. | [optional] -**required** | **int** | Is this a required training? | [optional] -**category** | [**\BhrSdk\Model\TrainingCategory**](TrainingCategory.md) | | [optional] -**link_url** | **string** | Optional URL that can be included with a training. | [optional] -**description** | **string** | Description for the training. | [optional] +**required** | **bool** | | [optional] +**category** | [**\BhrSdk\Model\TrainingTypeCategory**](TrainingTypeCategory.md) | | [optional] +**link_url** | **string** | | [optional] +**description** | **string** | | [optional] **allow_employees_to_mark_complete** | **bool** | Allows all employees who can view the training to be able to mark it complete. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TrainingTypeCategory.md b/docs/Model/TrainingTypeCategory.md new file mode 100644 index 00000000..0fa5c585 --- /dev/null +++ b/docs/Model/TrainingTypeCategory.md @@ -0,0 +1,10 @@ +# # TrainingTypeCategory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the training category. | [optional] +**name** | **string** | The name of the training category. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransformedApiEmployeeGoalDetailsGoal.md b/docs/Model/TransformedApiEmployeeGoalDetailsGoal.md index a84b84c7..0773559e 100644 --- a/docs/Model/TransformedApiEmployeeGoalDetailsGoal.md +++ b/docs/Model/TransformedApiEmployeeGoalDetailsGoal.md @@ -11,9 +11,10 @@ Name | Type | Description | Notes **aligns_with_option_id** | **string** | | [optional] **shared_with_employee_ids** | **int[]** | Ids of the employees that have access to this goal. | [optional] **due_date** | **string** | The due date of the goal. | [optional] -**completion_date** | **string** | The date the goal was completed. | [optional] +**completion_date** | **string** | | [optional] +**last_changed_date_time** | **string** | | [optional] **status** | **string** | The status of the goal. | [optional] -**milestones** | [**\BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]**](TransformedApiGoalGoalMilestonesInner.md) | All milestones for the individual goal. This array will not exist if milestones are not selected for this goal. | [optional] -**actions** | [**\BhrSdk\Model\TransformedApiGoalGoalActions**](TransformedApiGoalGoalActions.md) | | [optional] +**milestones** | [**\BhrSdk\Model\TransformedApiGoalMilestonesInner[]**](TransformedApiGoalMilestonesInner.md) | | [optional] +**actions** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransformedApiGoal.md b/docs/Model/TransformedApiGoal.md index 467d3968..5f4a5be1 100644 --- a/docs/Model/TransformedApiGoal.md +++ b/docs/Model/TransformedApiGoal.md @@ -4,6 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**goal** | [**\BhrSdk\Model\TransformedApiGoalGoal**](TransformedApiGoalGoal.md) | | [optional] +**id** | **string** | The id of the goal. | [optional] +**title** | **string** | Title of the goal. | [optional] +**description** | **string** | A description of the goal. | [optional] +**percent_complete** | **int** | A percentage (0-100) that denotes how complete the goal is. | [optional] +**aligns_with_option_id** | **string** | | [optional] +**shared_with_employee_ids** | **int[]** | Ids of the employees that have access to this goal. | [optional] +**due_date** | **string** | The due date of the goal. | [optional] +**completion_date** | **string** | | [optional] +**last_changed_date_time** | **string** | | [optional] +**status** | **string** | The status of the goal. | [optional] +**milestones** | [**\BhrSdk\Model\TransformedApiGoalMilestonesInner[]**](TransformedApiGoalMilestonesInner.md) | | [optional] +**actions** | **object** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransformedApiGoalGoal.md b/docs/Model/TransformedApiGoalGoal.md deleted file mode 100644 index 1961b633..00000000 --- a/docs/Model/TransformedApiGoalGoal.md +++ /dev/null @@ -1,19 +0,0 @@ -# # TransformedApiGoalGoal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | The id of the goal. | [optional] -**title** | **string** | Title of the goal. | [optional] -**description** | **string** | A description of the goal. | [optional] -**percent_complete** | **int** | A percentage (0-100) that denotes how complete the goal is. | [optional] -**aligns_with_option_id** | **int** | | [optional] -**shared_with_employee_ids** | **int[]** | Ids of the employees that have access to this goal. | [optional] -**due_date** | **string** | The due date of the goal. | [optional] -**completion_date** | **string** | The date the goal was completed. | [optional] -**status** | **string** | The status of the goal. | [optional] -**milestones** | [**\BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]**](TransformedApiGoalGoalMilestonesInner.md) | All milestones for the individual goal. This array will not exist if milestones are not selected for this goal. | [optional] -**actions** | [**\BhrSdk\Model\TransformedApiGoalGoalActions**](TransformedApiGoalGoalActions.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/TransformedApiGoalGoalActions.md b/docs/Model/TransformedApiGoalGoalActions.md deleted file mode 100644 index 2d227898..00000000 --- a/docs/Model/TransformedApiGoalGoalActions.md +++ /dev/null @@ -1,10 +0,0 @@ -# # TransformedApiGoalGoalActions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_edit_goal_progress_bar** | **bool** | Can the user edit the progress bar of this goal. | [optional] -**can_edit_goal_milestone_progress_bar** | **bool** | can the user edit the progress of a milestone in this goal. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransformedApiGoalGoalMilestonesInner.md b/docs/Model/TransformedApiGoalGoalMilestonesInner.md deleted file mode 100644 index 2a1b4769..00000000 --- a/docs/Model/TransformedApiGoalGoalMilestonesInner.md +++ /dev/null @@ -1,17 +0,0 @@ -# # TransformedApiGoalGoalMilestonesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | The id of the milestone. | [optional] -**employee_goal_id** | **int** | The id of the goal which encompasses this milestone. | [optional] -**title** | **string** | The title of the milestone. | [optional] -**current_value** | **float** | The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null. | [optional] -**start_value** | **float** | The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null. | [optional] -**end_value** | **float** | The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null. | [optional] -**completed_date_time** | **string** | The date and time in which the goal has been completed. If the goal is not completed the value will be null. | [optional] -**last_update_date_date_time** | **string** | The date and time in which the goal was last updated. | [optional] -**last_update_user_id** | **int** | The ID of the user who last updated this milestone. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransformedApiGoalMilestonesInner.md b/docs/Model/TransformedApiGoalMilestonesInner.md new file mode 100644 index 00000000..b78b341d --- /dev/null +++ b/docs/Model/TransformedApiGoalMilestonesInner.md @@ -0,0 +1,17 @@ +# # TransformedApiGoalMilestonesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The id of the milestone. | [optional] +**employee_goal_id** | **int** | The id of the goal which encompasses this milestone. | [optional] +**title** | **string** | The title of the milestone. | [optional] +**current_value** | **float** | | [optional] +**start_value** | **float** | | [optional] +**end_value** | **float** | | [optional] +**completed_date_time** | **string** | The date and time in which the goal has been completed. If the goal is not completed the value will be null. | [optional] +**last_update_date_time** | **string** | The date and time in which the goal was last updated. | [optional] +**last_update_user_id** | **int** | The ID of the user who last updated this milestone. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UnassignEmployeesFromBreakPolicyRequest.md b/docs/Model/UnassignEmployeesFromBreakPolicyRequest.md new file mode 100644 index 00000000..efcea299 --- /dev/null +++ b/docs/Model/UnassignEmployeesFromBreakPolicyRequest.md @@ -0,0 +1,9 @@ +# # UnassignEmployeesFromBreakPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **int[]** | Array of employee IDs to unassign from the break policy | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Unauthorized.md b/docs/Model/Unauthorized.md deleted file mode 100644 index a033bcdf..00000000 --- a/docs/Model/Unauthorized.md +++ /dev/null @@ -1,9 +0,0 @@ -# # Unauthorized - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errors** | [**\BhrSdk\Model\UnauthorizedErrorsInner[]**](UnauthorizedErrorsInner.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/Unauthorized1.md b/docs/Model/Unauthorized1.md deleted file mode 100644 index dc7c0dc5..00000000 --- a/docs/Model/Unauthorized1.md +++ /dev/null @@ -1,9 +0,0 @@ -# # Unauthorized1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errors** | [**\BhrSdk\Model\UnauthorizedErrorsInner[]**](UnauthorizedErrorsInner.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/UpdateApplicantStatusRequest.md b/docs/Model/UpdateApplicantStatusRequest.md new file mode 100644 index 00000000..c6a61078 --- /dev/null +++ b/docs/Model/UpdateApplicantStatusRequest.md @@ -0,0 +1,9 @@ +# # UpdateApplicantStatusRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | The ID of the status to assign to the application. Use the Get Applicant Statuses endpoint to get available status IDs. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetGoalsAlignmentOptionsRequest.md b/docs/Model/UpdateApplicantStatusResponse.md similarity index 59% rename from docs/Model/GetGoalsAlignmentOptionsRequest.md rename to docs/Model/UpdateApplicantStatusResponse.md index 88f76bc9..2dbc3247 100644 --- a/docs/Model/GetGoalsAlignmentOptionsRequest.md +++ b/docs/Model/UpdateApplicantStatusResponse.md @@ -1,9 +1,10 @@ -# # GetGoalsAlignmentOptionsRequest +# # UpdateApplicantStatusResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**goal_id** | **int** | The goal ID to get alignment options for | [optional] +**type** | **string** | Always 'positionApplicantStatus' | [optional] +**id** | **int** | The ID of the created status change record | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCompanyIndustryCodes400Response.md b/docs/Model/UpdateCompanyIndustryCodes400Response.md new file mode 100644 index 00000000..81a5a7d1 --- /dev/null +++ b/docs/Model/UpdateCompanyIndustryCodes400Response.md @@ -0,0 +1,9 @@ +# # UpdateCompanyIndustryCodes400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/UpdateCompanyIndustryCodes403Response.md b/docs/Model/UpdateCompanyIndustryCodes403Response.md new file mode 100644 index 00000000..3036baf1 --- /dev/null +++ b/docs/Model/UpdateCompanyIndustryCodes403Response.md @@ -0,0 +1,9 @@ +# # UpdateCompanyIndustryCodes403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/UpdateCompanyIndustryCodes404Response.md b/docs/Model/UpdateCompanyIndustryCodes404Response.md new file mode 100644 index 00000000..180ab6b4 --- /dev/null +++ b/docs/Model/UpdateCompanyIndustryCodes404Response.md @@ -0,0 +1,9 @@ +# # UpdateCompanyIndustryCodes404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/UpdateCompanyIndustryCodes500Response.md b/docs/Model/UpdateCompanyIndustryCodes500Response.md new file mode 100644 index 00000000..fb9de015 --- /dev/null +++ b/docs/Model/UpdateCompanyIndustryCodes500Response.md @@ -0,0 +1,9 @@ +# # UpdateCompanyIndustryCodes500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/UpdateCompanyIndustryCodesResponse.md b/docs/Model/UpdateCompanyIndustryCodesResponse.md new file mode 100644 index 00000000..9bc19e42 --- /dev/null +++ b/docs/Model/UpdateCompanyIndustryCodesResponse.md @@ -0,0 +1,9 @@ +# # UpdateCompanyIndustryCodesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**company_industries** | [**\BhrSdk\Model\CompanyIndustryDataObject[]**](CompanyIndustryDataObject.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/UpdateCompanyNameBadRequestResponse.md b/docs/Model/UpdateCompanyNameBadRequestResponse.md new file mode 100644 index 00000000..b7bbfeb5 --- /dev/null +++ b/docs/Model/UpdateCompanyNameBadRequestResponse.md @@ -0,0 +1,9 @@ +# # UpdateCompanyNameBadRequestResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\UpdateCompanyNameBadRequestResponseError**](UpdateCompanyNameBadRequestResponseError.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/UpdateCompanyNameBadRequestResponseError.md b/docs/Model/UpdateCompanyNameBadRequestResponseError.md new file mode 100644 index 00000000..ec3d39f8 --- /dev/null +++ b/docs/Model/UpdateCompanyNameBadRequestResponseError.md @@ -0,0 +1,9 @@ +# # UpdateCompanyNameBadRequestResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/XmlDirectoryEmployeeFieldset.md b/docs/Model/UpdateCompanyNameForbiddenResponse.md similarity index 59% rename from docs/Model/XmlDirectoryEmployeeFieldset.md rename to docs/Model/UpdateCompanyNameForbiddenResponse.md index f48e128e..d9d7d36f 100644 --- a/docs/Model/XmlDirectoryEmployeeFieldset.md +++ b/docs/Model/UpdateCompanyNameForbiddenResponse.md @@ -1,9 +1,9 @@ -# # XmlDirectoryEmployeeFieldset +# # UpdateCompanyNameForbiddenResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | [**\BhrSdk\Model\XmlDirectoryEmployeeFieldsetFieldInner[]**](XmlDirectoryEmployeeFieldsetFieldInner.md) | | [optional] +**error** | [**\BhrSdk\Model\UpdateCompanyNameForbiddenResponseError**](UpdateCompanyNameForbiddenResponseError.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/UpdateCompanyNameForbiddenResponseError.md b/docs/Model/UpdateCompanyNameForbiddenResponseError.md new file mode 100644 index 00000000..6a9c1472 --- /dev/null +++ b/docs/Model/UpdateCompanyNameForbiddenResponseError.md @@ -0,0 +1,9 @@ +# # UpdateCompanyNameForbiddenResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **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/UpdateCompanyNameInternalErrorResponse.md b/docs/Model/UpdateCompanyNameInternalErrorResponse.md new file mode 100644 index 00000000..3cd4cc0e --- /dev/null +++ b/docs/Model/UpdateCompanyNameInternalErrorResponse.md @@ -0,0 +1,9 @@ +# # UpdateCompanyNameInternalErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\UpdateCompanyNameForbiddenResponseError**](UpdateCompanyNameForbiddenResponseError.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/UpdateCompanyNameSuccessResponse.md b/docs/Model/UpdateCompanyNameSuccessResponse.md new file mode 100644 index 00000000..db19f9a1 --- /dev/null +++ b/docs/Model/UpdateCompanyNameSuccessResponse.md @@ -0,0 +1,9 @@ +# # UpdateCompanyNameSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Indicates whether the operation was successful | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCompensationBenchmarkRequest.md b/docs/Model/UpdateCompensationBenchmarkRequest.md new file mode 100644 index 00000000..6498e84d --- /dev/null +++ b/docs/Model/UpdateCompensationBenchmarkRequest.md @@ -0,0 +1,28 @@ +# # UpdateCompensationBenchmarkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the benchmark to update. | +**currency_code** | **string** | ISO 4217 currency code for the benchmark values. | +**mjl_job_code** | **string** | Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`. | [optional] +**benchmark_value** | **float** | Benchmark median value. | +**benchmark_min** | **float** | Benchmark minimum value. | +**benchmark_max** | **float** | Benchmark maximum value. | +**benchmark_source** | **string** | Free-text label describing where the benchmark came from. | [optional] +**external_job_title** | **string** | | [optional] +**external_location** | **string** | | [optional] +**external_level** | **string** | | [optional] +**external_job_description** | **string** | | [optional] +**companies_surveyed** | **int** | | [optional] +**employees_surveyed** | **int** | | [optional] +**source_id** | **string** | ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`. | [optional] +**source_date** | **string** | Date the benchmark source data applies to. | [optional] +**data_year** | **string** | Year of the underlying survey data. Omitting this field clears `data_year` on the stored benchmark, so callers updating a Mercer benchmark should resend the existing value. | [optional] +**external_country** | **string** | | [optional] +**external_secondary_location** | **string** | | [optional] +**external_company_size** | **string** | | [optional] +**external_industry** | **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/UpdateCompensationBenchmarkSourceItem.md b/docs/Model/UpdateCompensationBenchmarkSourceItem.md new file mode 100644 index 00000000..78cd876e --- /dev/null +++ b/docs/Model/UpdateCompensationBenchmarkSourceItem.md @@ -0,0 +1,11 @@ +# # UpdateCompensationBenchmarkSourceItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the existing benchmark source to update. | +**name** | **string** | New display name for the source. Cannot equal `mercer`. | +**sort** | **string** | Optional new sort position, as a numeric 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/UpdateCompensationBenchmarkSourcesRequest.md b/docs/Model/UpdateCompensationBenchmarkSourcesRequest.md new file mode 100644 index 00000000..4b7b4a30 --- /dev/null +++ b/docs/Model/UpdateCompensationBenchmarkSourcesRequest.md @@ -0,0 +1,9 @@ +# # UpdateCompensationBenchmarkSourcesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**benchmark_sources** | [**\BhrSdk\Model\UpdateCompensationBenchmarkSourceItem[]**](UpdateCompensationBenchmarkSourceItem.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/UpdateCompensationBenchmarkSourcesResponse.md b/docs/Model/UpdateCompensationBenchmarkSourcesResponse.md new file mode 100644 index 00000000..563142f7 --- /dev/null +++ b/docs/Model/UpdateCompensationBenchmarkSourcesResponse.md @@ -0,0 +1,9 @@ +# # UpdateCompensationBenchmarkSourcesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **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/UpdateEmployeeTrainingRecordRequest.md b/docs/Model/UpdateEmployeeTrainingRecordRequest.md index 577d90fd..02b44369 100644 --- a/docs/Model/UpdateEmployeeTrainingRecordRequest.md +++ b/docs/Model/UpdateEmployeeTrainingRecordRequest.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **completed** | **string** | Completed is the only required field and must be in yyyy-mm-dd format. The other parameters are optional. | -**cost** | [**\BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost**](AddNewEmployeeTrainingRecordRequestCost.md) | | [optional] -**instructor** | **string** | | [optional] -**hours** | **float** | | [optional] -**credits** | **float** | | [optional] -**notes** | **float** | | [optional] +**cost** | [**\BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost**](CreateEmployeeTrainingRecordRequestCost.md) | | [optional] +**instructor** | **string** | Name of the training instructor. | [optional] +**hours** | **float** | Number of hours for the training. | [optional] +**credits** | **float** | Credits earned for the training. | [optional] +**notes** | **string** | Optional notes about the training record. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateEmployeeVerificationIntegrationRequest.md b/docs/Model/UpdateEmployeeVerificationIntegrationRequest.md new file mode 100644 index 00000000..24787a0b --- /dev/null +++ b/docs/Model/UpdateEmployeeVerificationIntegrationRequest.md @@ -0,0 +1,9 @@ +# # UpdateEmployeeVerificationIntegrationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Desired enabled state for the integration. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateEmployeeVerificationRequest.md b/docs/Model/UpdateEmployeeVerificationRequest.md new file mode 100644 index 00000000..8be3e539 --- /dev/null +++ b/docs/Model/UpdateEmployeeVerificationRequest.md @@ -0,0 +1,13 @@ +# # UpdateEmployeeVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_type** | **string** | | [optional] +**verification_status** | **string** | | [optional] +**verification_status_notes** | **string** | | [optional] +**remote_access_url** | **string** | | [optional] +**e_verify_status** | **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/UpdateGoalCommentRequest.md b/docs/Model/UpdateGoalCommentRequest.md new file mode 100644 index 00000000..bb45590f --- /dev/null +++ b/docs/Model/UpdateGoalCommentRequest.md @@ -0,0 +1,9 @@ +# # UpdateGoalCommentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The updated text content of the comment. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PutGoalMilestoneProgressRequest.md b/docs/Model/UpdateGoalMilestoneProgressRequest.md similarity index 88% rename from docs/Model/PutGoalMilestoneProgressRequest.md rename to docs/Model/UpdateGoalMilestoneProgressRequest.md index bc6f8651..220440ba 100644 --- a/docs/Model/PutGoalMilestoneProgressRequest.md +++ b/docs/Model/UpdateGoalMilestoneProgressRequest.md @@ -1,4 +1,4 @@ -# # PutGoalMilestoneProgressRequest +# # UpdateGoalMilestoneProgressRequest ## Properties diff --git a/docs/Model/PutGoalProgressRequest.md b/docs/Model/UpdateGoalProgressRequest.md similarity index 65% rename from docs/Model/PutGoalProgressRequest.md rename to docs/Model/UpdateGoalProgressRequest.md index f99cab32..6fb9ed9a 100644 --- a/docs/Model/PutGoalProgressRequest.md +++ b/docs/Model/UpdateGoalProgressRequest.md @@ -1,10 +1,10 @@ -# # PutGoalProgressRequest +# # UpdateGoalProgressRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **percent_complete** | **int** | The percentage of completion for the goal (0-100) | -**completion_date** | **\DateTime** | The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. | [optional] +**completion_date** | **\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/UpdateGoalSharingRequest.md b/docs/Model/UpdateGoalSharingRequest.md new file mode 100644 index 00000000..10334da7 --- /dev/null +++ b/docs/Model/UpdateGoalSharingRequest.md @@ -0,0 +1,9 @@ +# # UpdateGoalSharingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shared_with_employee_ids** | **int[]** | List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateGoalV1.md b/docs/Model/UpdateGoalV1.md new file mode 100644 index 00000000..0551e8c2 --- /dev/null +++ b/docs/Model/UpdateGoalV1.md @@ -0,0 +1,15 @@ +# # UpdateGoalV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | [Required] The goal title. | +**description** | **string** | [Optional] The goal description. If omitted, the existing value will be overwritten with an empty string. | [optional] +**percent_complete** | **int** | [Optional] The goal completion percentage (0-100). If omitted, the existing value will be overwritten with 0. | [optional] +**aligns_with_option_id** | **string** | | [optional] +**shared_with_employee_ids** | **int[]** | [Required] Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". This must include the employee for whom the goal is created. | +**due_date** | **\DateTime** | [Required] The goal due date in YYYY-MM-DD format. | +**completion_date** | **\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/PutGoalV11Request.md b/docs/Model/UpdateGoalV11Request.md similarity index 57% rename from docs/Model/PutGoalV11Request.md rename to docs/Model/UpdateGoalV11Request.md index 25159950..41cd82f7 100644 --- a/docs/Model/PutGoalV11Request.md +++ b/docs/Model/UpdateGoalV11Request.md @@ -1,4 +1,4 @@ -# # PutGoalV11Request +# # UpdateGoalV11Request ## Properties @@ -7,12 +7,12 @@ Name | Type | Description | Notes **title** | **string** | The title of the goal | **description** | **string** | A detailed description of the goal | [optional] **due_date** | **\DateTime** | The due date for the goal in YYYY-MM-DD format | -**percent_complete** | **int** | The percentage of completion for the goal (0-100). Required when milestonesEnabled is not true. | [optional] -**completion_date** | **\DateTime** | The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. | [optional] +**percent_complete** | **int** | The percentage of completion for the goal (0-100). Defaults to 0 if omitted. Ignored when milestonesEnabled is true. | [optional] +**completion_date** | **\DateTime** | | [optional] **shared_with_employee_ids** | **int[]** | List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner. | -**aligns_with_option_id** | **int** | ID of the option this goal aligns with | [optional] +**aligns_with_option_id** | **int** | | [optional] **milestones_enabled** | **bool** | Flag indicating whether milestones are enabled for this goal | [optional] **deleted_milestone_ids** | **int[]** | List of milestone IDs to be deleted from the goal | [optional] -**milestones** | [**\BhrSdk\Model\PutGoalV11RequestMilestonesInner[]**](PutGoalV11RequestMilestonesInner.md) | List of milestones to add to this goal | [optional] +**milestones** | [**\BhrSdk\Model\UpdateGoalV11RequestMilestonesInner[]**](UpdateGoalV11RequestMilestonesInner.md) | Optional. New milestones to add to the goal. Each object in this array creates a new milestone — even if its title matches an existing milestone. Do not include existing milestones here unless you intentionally want duplicates. To remove milestones, use `deletedMilestoneIds`. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PutGoalV11RequestMilestonesInner.md b/docs/Model/UpdateGoalV11RequestMilestonesInner.md similarity index 88% rename from docs/Model/PutGoalV11RequestMilestonesInner.md rename to docs/Model/UpdateGoalV11RequestMilestonesInner.md index f57aebe1..b172eeb7 100644 --- a/docs/Model/PutGoalV11RequestMilestonesInner.md +++ b/docs/Model/UpdateGoalV11RequestMilestonesInner.md @@ -1,4 +1,4 @@ -# # PutGoalV11RequestMilestonesInner +# # UpdateGoalV11RequestMilestonesInner ## Properties diff --git a/docs/Model/UpdateLocationRequest.md b/docs/Model/UpdateLocationRequest.md new file mode 100644 index 00000000..c82b0f14 --- /dev/null +++ b/docs/Model/UpdateLocationRequest.md @@ -0,0 +1,11 @@ +# # UpdateLocationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **string** | Updated display name | +**archived** | **bool** | Whether the location is archived | [optional] [default to false] +**address** | [**\BhrSdk\Model\UpdateLocationRequestAddress**](UpdateLocationRequestAddress.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/UpdateLocationRequestAddress.md b/docs/Model/UpdateLocationRequestAddress.md new file mode 100644 index 00000000..4f47f289 --- /dev/null +++ b/docs/Model/UpdateLocationRequestAddress.md @@ -0,0 +1,16 @@ +# # UpdateLocationRequestAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address1** | **string** | | [optional] +**address2** | **string** | | [optional] +**city** | **string** | | [optional] +**state_id** | **string** | | [optional] +**zipcode** | **string** | | [optional] +**country_id** | **string** | | [optional] +**timezone** | **string** | | [optional] +**remote_location** | **bool** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateTrainingTypeRequest.md b/docs/Model/UpdateTrainingTypeRequest.md index 09607123..b6799eab 100644 --- a/docs/Model/UpdateTrainingTypeRequest.md +++ b/docs/Model/UpdateTrainingTypeRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the training type. | +**name** | **string** | Name of the training type. | [optional] **frequency** | **int** | The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable. | [optional] **renewable** | **bool** | Renewable is optional but if you are setting it to true you must pass a frequency. | [optional] **category** | [**\BhrSdk\Model\UpdateTrainingTypeRequestCategory**](UpdateTrainingTypeRequestCategory.md) | | [optional] -**required** | **bool** | Is this a required training? | +**required** | **bool** | Is this a required training? | [optional] **due_from_hire_date** | **int** | Number of days before the training is due for new hires. Not valid unless training is required. | [optional] **link_url** | **string** | Optional URL that can be included with a training. | [optional] **description** | **string** | Description for the training. | [optional] diff --git a/docs/Model/UpdateTrainingTypeRequestCategory.md b/docs/Model/UpdateTrainingTypeRequestCategory.md index 2db1722f..4288abdc 100644 --- a/docs/Model/UpdateTrainingTypeRequestCategory.md +++ b/docs/Model/UpdateTrainingTypeRequestCategory.md @@ -6,7 +6,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Category ID | [optional] **name** | **string** | Category Name | [optional] -**accuracy** | **int** | Accuracy in meters of the clock in location | [optional] -**address** | **string** | 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/UpdateWebhookBadRequestResponse.md b/docs/Model/UpdateWebhookBadRequestResponse.md new file mode 100644 index 00000000..7706d624 --- /dev/null +++ b/docs/Model/UpdateWebhookBadRequestResponse.md @@ -0,0 +1,9 @@ +# # UpdateWebhookBadRequestResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**\BhrSdk\Model\WebhookErrorErrors**](WebhookErrorErrors.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/UpdatedCompensationBenchmark.md b/docs/Model/UpdatedCompensationBenchmark.md new file mode 100644 index 00000000..c9d67c19 --- /dev/null +++ b/docs/Model/UpdatedCompensationBenchmark.md @@ -0,0 +1,10 @@ +# # UpdatedCompensationBenchmark + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saved_benchmark** | [**\BhrSdk\Model\UpdatedCompensationBenchmarkSavedBenchmark**](UpdatedCompensationBenchmarkSavedBenchmark.md) | | [optional] +**message** | **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/UpdatedCompensationBenchmarkSavedBenchmark.md b/docs/Model/UpdatedCompensationBenchmarkSavedBenchmark.md new file mode 100644 index 00000000..a3f40808 --- /dev/null +++ b/docs/Model/UpdatedCompensationBenchmarkSavedBenchmark.md @@ -0,0 +1,30 @@ +# # UpdatedCompensationBenchmarkSavedBenchmark + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**job_title_id** | **string** | | [optional] +**job_location_id** | **string** | | [optional] +**mercer_job_code** | **string** | | [optional] +**benchmark_source** | **string** | | [optional] +**currency_code** | **string** | | [optional] +**benchmark_value** | **float** | | [optional] +**benchmark_min** | **float** | | [optional] +**benchmark_max** | **float** | | [optional] +**external_job_title** | **string** | | [optional] +**external_location** | **string** | | [optional] +**external_level** | **string** | | [optional] +**external_job_description** | **string** | | [optional] +**companies_surveyed** | **int** | | [optional] +**employees_surveyed** | **int** | | [optional] +**source_id** | **string** | | [optional] +**source_date** | **string** | | [optional] +**data_year** | **string** | | [optional] +**external_country** | **string** | | [optional] +**external_secondary_location** | **string** | | [optional] +**external_company_size** | **string** | | [optional] +**external_industry** | **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/UploadEmployeePhotoRequest1.md b/docs/Model/UploadEmployeePhotoRequest1.md new file mode 100644 index 00000000..af8c087d --- /dev/null +++ b/docs/Model/UploadEmployeePhotoRequest1.md @@ -0,0 +1,9 @@ +# # UploadEmployeePhotoRequest1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_base64** | **string** | Base64-encoded image bytes. Same format/size/dimension rules as the multipart `file` field: JPEG, PNG, BMP, or GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream); square within 1 pixel; at least 150×150 pixels; decoded payload no larger than 20MB. Whitespace inside the base64 string is tolerated and stripped before decoding. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserPermissionData.md b/docs/Model/UserPermissionData.md new file mode 100644 index 00000000..577fa507 --- /dev/null +++ b/docs/Model/UserPermissionData.md @@ -0,0 +1,12 @@ +# # UserPermissionData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_admin** | **bool** | Whether user is an admin | [optional] +**is_billing_contact** | **bool** | Whether user is a billing contact | [optional] +**is_owner** | **bool** | Whether user is the owner | [optional] +**is_support_admin** | **bool** | Whether user is a support admin | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebHookLogResponse.md b/docs/Model/WebHookLogResponse.md deleted file mode 100644 index 27022251..00000000 --- a/docs/Model/WebHookLogResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# # WebHookLogResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**webhook_id** | **int** | The id of the webhook. | [optional] -**url** | **string** | The URL of the webhook. | [optional] -**last_attempted** | **string** | timestamp of last time the webhook was sent | [optional] -**last_success** | **string** | timestamp of last time the webhook was sent successfully | [optional] -**failure_count** | **int** | Count of how many times this call failed since last success | [optional] -**status** | **int** | Status code of last request | [optional] -**employee_ids** | **int[]** | A list of employee ids that were changed. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebHookPostFieldDataObject.md b/docs/Model/WebHookPostFieldDataObject.md new file mode 100644 index 00000000..c74a1b82 --- /dev/null +++ b/docs/Model/WebHookPostFieldDataObject.md @@ -0,0 +1,14 @@ +# # WebHookPostFieldDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **string** | | +**name** | **string** | Field name | +**type** | **string** | | +**id** | **int** | Field ID. This may be a standard/custom field ID or a synthetic negative ID for calculated fields. | +**page_id** | **int** | ID of the page the field belongs to. Calculated fields may use `-1`. Fields without a usable page ID are not available in webhooks. | +**table_id** | **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/WebHookPostFieldPageDataObject.md b/docs/Model/WebHookPostFieldPageDataObject.md new file mode 100644 index 00000000..be79ecfc --- /dev/null +++ b/docs/Model/WebHookPostFieldPageDataObject.md @@ -0,0 +1,10 @@ +# # WebHookPostFieldPageDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Page ID | +**name** | **string** | Page Name | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebHookPostFieldResponseObject.md b/docs/Model/WebHookPostFieldResponseObject.md new file mode 100644 index 00000000..cdaecd8a --- /dev/null +++ b/docs/Model/WebHookPostFieldResponseObject.md @@ -0,0 +1,11 @@ +# # WebHookPostFieldResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fields** | [**\BhrSdk\Model\WebHookPostFieldDataObject[]**](WebHookPostFieldDataObject.md) | | +**pages** | [**\BhrSdk\Model\WebHookPostFieldPageDataObject[]**](WebHookPostFieldPageDataObject.md) | | +**tables** | [**\BhrSdk\Model\WebHookPostFieldTableDataObject[]**](WebHookPostFieldTableDataObject.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/WebHookPostFieldTableDataObject.md b/docs/Model/WebHookPostFieldTableDataObject.md new file mode 100644 index 00000000..8d6bf8d8 --- /dev/null +++ b/docs/Model/WebHookPostFieldTableDataObject.md @@ -0,0 +1,10 @@ +# # WebHookPostFieldTableDataObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Table ID | +**name** | **string** | Table Name | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebHookResponse.md b/docs/Model/WebHookResponse.md index 1ae31e07..7c2ad775 100644 --- a/docs/Model/WebHookResponse.md +++ b/docs/Model/WebHookResponse.md @@ -4,14 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | The id of the webhook. | [optional] +**id** | **string** | The ID of the webhook. | [optional] **name** | **string** | The name of the webhook. | [optional] -**created** | **string** | timestamp of creation | [optional] -**last_sent** | **string** | timestamp of last webhook sent | [optional] -**monitor_fields** | **string[]** | A list of fields to monitor. | [optional] -**post_fields** | **object** | A list of fields to post to the webhook url. Field ID or alias: external name | [optional] -**url** | **string** | The url the webhook should send data to. | [optional] -**format** | **string** | The format the webhook should use (json, form-encoded). | [optional] -**include_company_domain** | **bool** | If set to true, the company domain will be added to the header. | [optional] +**created** | **string** | Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). | [optional] +**last_sent** | **string** | | [optional] +**monitor_fields** | **string[]** | | [optional] +**post_fields** | **object** | A map of field ID or alias to the external name used in the webhook payload. | [optional] +**url** | **string** | The URL the webhook sends data to. | [optional] +**format** | **string** | The payload format used by the webhook. | [optional] +**include_company_domain** | **bool** | Whether the company domain is added to the webhook request header. | [optional] +**events** | [**\BhrSdk\Model\WebhookEventType[]**](WebhookEventType.md) | Events that trigger this webhook. | [optional] +**errors** | [**\BhrSdk\Model\WebhookSubErrorProperty[]**](WebhookSubErrorProperty.md) | Field-level permission errors associated with the webhook configuration, when present. | [optional] [[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 25b3e406..d09ddd8e 100644 --- a/docs/Model/Webhook.md +++ b/docs/Model/Webhook.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | The id of the webhook. | [optional] +**id** | **string** | The ID of the webhook. | [optional] **name** | **string** | The name of the webhook. | [optional] -**created** | **string** | timestamp of creation | [optional] -**last_sent** | **string** | timestamp of last webhook sent | [optional] -**monitor_fields** | **string[]** | A list of fields to monitor. | [optional] -**post_fields** | **object** | A list of fields to post to the webhook url. Field ID or alias: external name | [optional] -**url** | **string** | The url the webhook should send data to. | [optional] -**format** | **string** | The format the webhook should use (json, form-encoded). | [optional] -**private_key** | **string** | The private key which can be used to verify that the webhook is secure (uses HMAC-SHA256) | [optional] -**include_company_domain** | **bool** | If set to true, the company domain will be added to the header. | [optional] +**created** | **string** | Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). | [optional] +**last_sent** | **string** | | [optional] +**monitor_fields** | **string[]** | | [optional] +**post_fields** | **object** | An object map of field ID or alias to the external name used in the webhook payload. | [optional] +**url** | **string** | The URL the webhook sends data to. | [optional] +**format** | **string** | The payload format used by the webhook. | [optional] +**private_key** | **string** | The private key used to verify webhook authenticity via HMAC-SHA256. Only returned at creation time. | [optional] +**include_company_domain** | **bool** | Whether the company domain is added to the webhook request header. | [optional] +**events** | [**\BhrSdk\Model\WebhookEventType[]**](WebhookEventType.md) | Events that trigger this webhook. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookBadRequest.md b/docs/Model/WebhookBadRequest.md index 4498bbf9..511f394d 100644 --- a/docs/Model/WebhookBadRequest.md +++ b/docs/Model/WebhookBadRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**\BhrSdk\Model\UnauthorizedErrorsInner[]**](UnauthorizedErrorsInner.md) | | [optional] +**errors** | [**\BhrSdk\Model\WebhookBadRequestErrorsInner[]**](WebhookBadRequestErrorsInner.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/UnauthorizedErrorsInner.md b/docs/Model/WebhookBadRequestErrorsInner.md similarity index 78% rename from docs/Model/UnauthorizedErrorsInner.md rename to docs/Model/WebhookBadRequestErrorsInner.md index d07869f6..d89e90fe 100644 --- a/docs/Model/UnauthorizedErrorsInner.md +++ b/docs/Model/WebhookBadRequestErrorsInner.md @@ -1,9 +1,10 @@ -# # UnauthorizedErrorsInner +# # WebhookBadRequestErrorsInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **string** | | [optional] +**issues** | **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/WebhookErrorErrors.md b/docs/Model/WebhookErrorErrors.md index bbc9ba2e..ef4cbd0d 100644 --- a/docs/Model/WebhookErrorErrors.md +++ b/docs/Model/WebhookErrorErrors.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **string** | | [optional] **unknown_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInner[]**](WebhookSubErrorPropertyUnknownFieldsInner.md) | | [optional] -**monitor_fields** | [**\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]**](TimeTrackingRecordSchemaProjectTask.md) | | [optional] +**monitor_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]**](WebhookSubErrorPropertyMonitorFieldsInner.md) | | [optional] **duplicate_post_string** | **string[]** | | [optional] -**post_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]**](WebhookSubErrorPropertyPostFieldsInner.md) | | [optional] +**post_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]**](WebhookSubErrorPropertyMonitorFieldsInner.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/WebhookEventType.md b/docs/Model/WebhookEventType.md new file mode 100644 index 00000000..9b9dd6f7 --- /dev/null +++ b/docs/Model/WebhookEventType.md @@ -0,0 +1,8 @@ +# # WebhookEventType + +## 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/WebhookLogEntry.md b/docs/Model/WebhookLogEntry.md new file mode 100644 index 00000000..1a213313 --- /dev/null +++ b/docs/Model/WebhookLogEntry.md @@ -0,0 +1,15 @@ +# # WebhookLogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_id** | **string** | The ID of the webhook. | [optional] +**url** | **string** | The URL the webhook was delivered to. | [optional] +**last_attempted** | **string** | Datetime of the last delivery attempt (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as \"Webhook Not Found\" when the delivery target could not be reached. | [optional] +**last_success** | **string** | Datetime of the last successful delivery (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as \"Webhook Not Found\" when no successful delivery has been recorded. | [optional] +**status_code** | **string** | HTTP status code returned by the webhook endpoint on the last delivery attempt. | [optional] +**format** | **string** | The payload format used for this delivery. | [optional] +**employee_ids** | **string[]** | Array of employee IDs included in the webhook payload, returned as strings. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookLogListResponse.md b/docs/Model/WebhookLogListResponse.md new file mode 100644 index 00000000..5966d8fb --- /dev/null +++ b/docs/Model/WebhookLogListResponse.md @@ -0,0 +1,9 @@ +# # WebhookLogListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\WebhookLogRateLimitResponseError**](WebhookLogRateLimitResponseError.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/WebhookLogRateLimitResponse.md b/docs/Model/WebhookLogRateLimitResponse.md new file mode 100644 index 00000000..b653fda5 --- /dev/null +++ b/docs/Model/WebhookLogRateLimitResponse.md @@ -0,0 +1,9 @@ +# # WebhookLogRateLimitResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\BhrSdk\Model\WebhookLogRateLimitResponseError**](WebhookLogRateLimitResponseError.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/WebhookLogRateLimitResponseError.md b/docs/Model/WebhookLogRateLimitResponseError.md new file mode 100644 index 00000000..bddfa20a --- /dev/null +++ b/docs/Model/WebhookLogRateLimitResponseError.md @@ -0,0 +1,10 @@ +# # WebhookLogRateLimitResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **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/WebhookSubErrorProperty.md b/docs/Model/WebhookSubErrorProperty.md index 93b4e9fd..55c2303a 100644 --- a/docs/Model/WebhookSubErrorProperty.md +++ b/docs/Model/WebhookSubErrorProperty.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **string** | | [optional] **unknown_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInner[]**](WebhookSubErrorPropertyUnknownFieldsInner.md) | | [optional] -**monitor_fields** | [**\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]**](TimeTrackingRecordSchemaProjectTask.md) | | [optional] +**monitor_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]**](WebhookSubErrorPropertyMonitorFieldsInner.md) | | [optional] **duplicate_post_string** | **string[]** | | [optional] -**post_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]**](WebhookSubErrorPropertyPostFieldsInner.md) | | [optional] +**post_fields** | [**\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]**](WebhookSubErrorPropertyMonitorFieldsInner.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/WebhookSubErrorPropertyMonitorFieldsInner.md b/docs/Model/WebhookSubErrorPropertyMonitorFieldsInner.md new file mode 100644 index 00000000..e35e1d52 --- /dev/null +++ b/docs/Model/WebhookSubErrorPropertyMonitorFieldsInner.md @@ -0,0 +1,10 @@ +# # WebhookSubErrorPropertyMonitorFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInnerId**](WebhookSubErrorPropertyMonitorFieldsInnerId.md) | | [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/WebhookSubErrorPropertyMonitorFieldsInnerId.md b/docs/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.md new file mode 100644 index 00000000..3bbe3e02 --- /dev/null +++ b/docs/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.md @@ -0,0 +1,8 @@ +# # WebhookSubErrorPropertyMonitorFieldsInnerId + +## 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/WebhookSubErrorPropertyUnknownFieldsInner.md b/docs/Model/WebhookSubErrorPropertyUnknownFieldsInner.md index 98c04926..d094157e 100644 --- a/docs/Model/WebhookSubErrorPropertyUnknownFieldsInner.md +++ b/docs/Model/WebhookSubErrorPropertyUnknownFieldsInner.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] +**id** | [**\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInnerId**](WebhookSubErrorPropertyUnknownFieldsInnerId.md) | | [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/WebhookSubErrorPropertyUnknownFieldsInnerId.md b/docs/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.md new file mode 100644 index 00000000..4725b5db --- /dev/null +++ b/docs/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.md @@ -0,0 +1,8 @@ +# # WebhookSubErrorPropertyUnknownFieldsInnerId + +## 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/WebhooksListWebhooksInner.md b/docs/Model/WebhooksListWebhooksInner.md index d7da5569..5316838c 100644 --- a/docs/Model/WebhooksListWebhooksInner.md +++ b/docs/Model/WebhooksListWebhooksInner.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The ID of the webhook. | [optional] **name** | **string** | The name of the webhook. | [optional] -**created** | **string** | The creation date of the webhook. | [optional] -**last_sent** | **string** | The date the webhook was last sent. | [optional] -**url** | **string** | The url of the webhook. | [optional] +**created** | **string** | Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). | [optional] +**last_sent** | **string** | | [optional] +**url** | **string** | The URL the webhook sends data 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/WhosOutEntry.md b/docs/Model/WhosOutEntry.md new file mode 100644 index 00000000..58ee0496 --- /dev/null +++ b/docs/Model/WhosOutEntry.md @@ -0,0 +1,14 @@ +# # WhosOutEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The time off request ID or holiday ID. | [optional] +**type** | **string** | Whether this entry is a time off request or a company holiday. Entries have two shapes depending on `type`: `timeOff` entries include `employeeId` and `name` (the employee's name); `holiday` entries include only `name` (the holiday name) and omit `employeeId`. Always check `type` before accessing `employeeId`. | [optional] +**employee_id** | **int** | The employee ID. Only present for `timeOff` entries; omitted for `holiday` entries. | [optional] +**name** | **string** | For `timeOff` entries, the employee's name. For `holiday` entries, the holiday's name. | [optional] +**start** | **\DateTime** | Start date in YYYY-MM-DD format. | [optional] +**end** | **\DateTime** | End date in YYYY-MM-DD 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/XmlDirectoryEmployee.md b/docs/Model/XmlDirectoryEmployee.md deleted file mode 100644 index e61b8356..00000000 --- a/docs/Model/XmlDirectoryEmployee.md +++ /dev/null @@ -1,10 +0,0 @@ -# # XmlDirectoryEmployee - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fieldset** | [**\BhrSdk\Model\XmlDirectoryEmployeeFieldset**](XmlDirectoryEmployeeFieldset.md) | | [optional] -**employees** | [**\BhrSdk\Model\XmlDirectoryEmployeeEmployees**](XmlDirectoryEmployeeEmployees.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/XmlDirectoryEmployeeEmployees.md b/docs/Model/XmlDirectoryEmployeeEmployees.md deleted file mode 100644 index 1c1fb2b9..00000000 --- a/docs/Model/XmlDirectoryEmployeeEmployees.md +++ /dev/null @@ -1,9 +0,0 @@ -# # XmlDirectoryEmployeeEmployees - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**employee** | [**\BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInner[]**](XmlDirectoryEmployeeEmployeesEmployeeInner.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/XmlDirectoryEmployeeEmployeesEmployeeInner.md b/docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.md deleted file mode 100644 index a0b2e741..00000000 --- a/docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # XmlDirectoryEmployeeEmployeesEmployeeInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Employee ID (XML attribute) | [optional] -**field** | [**\BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner[]**](XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md) | Employee field values | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md b/docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md deleted file mode 100644 index 02f049bd..00000000 --- a/docs/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Field identifier (XML attribute). Array of employee records. Each employee object contains dynamic field values based on the fields defined in the 'fields' array. Common fields include: id, displayName, firstName, lastName, preferredName, jobTitle, workPhone, mobilePhone, workEmail, department, location, division, twitterFeed, pronouns, workPhoneExtension, photoUploaded, photoUrl, canUploadPhoto. Actual fields may vary by company configuration. | [optional] -**value** | **string** | Field value (element text 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/XmlDirectoryEmployeeFieldsetFieldInner.md b/docs/Model/XmlDirectoryEmployeeFieldsetFieldInner.md deleted file mode 100644 index 18f24a6b..00000000 --- a/docs/Model/XmlDirectoryEmployeeFieldsetFieldInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# # XmlDirectoryEmployeeFieldsetFieldInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Field identifier (XML attribute) | [optional] -**value** | **string** | Field display name (element text 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/XmlEmployeeFiles.md b/docs/Model/XmlEmployeeFiles.md new file mode 100644 index 00000000..7761863f --- /dev/null +++ b/docs/Model/XmlEmployeeFiles.md @@ -0,0 +1,10 @@ +# # XmlEmployeeFiles + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Employee ID on the root `<employee>` element. | [optional] +**category** | [**\BhrSdk\Model\XmlEmployeeFilesCategoryInner[]**](XmlEmployeeFilesCategoryInner.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/XmlEmployeeFilesCategoryInner.md b/docs/Model/XmlEmployeeFilesCategoryInner.md new file mode 100644 index 00000000..1e3a9a0c --- /dev/null +++ b/docs/Model/XmlEmployeeFilesCategoryInner.md @@ -0,0 +1,15 @@ +# # XmlEmployeeFilesCategoryInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Category ID on the `<category>` element. | [optional] +**name** | **string** | | [optional] +**can_rename_category** | **string** | | [optional] +**can_delete_category** | **string** | | [optional] +**can_upload_files** | **string** | | [optional] +**display_if_empty** | **string** | | [optional] +**file** | [**\BhrSdk\Model\XmlEmployeeFilesCategoryInnerFileInner[]**](XmlEmployeeFilesCategoryInnerFileInner.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/XmlEmployeeFilesCategoryInnerFileInner.md b/docs/Model/XmlEmployeeFilesCategoryInnerFileInner.md new file mode 100644 index 00000000..d4473a59 --- /dev/null +++ b/docs/Model/XmlEmployeeFilesCategoryInnerFileInner.md @@ -0,0 +1,18 @@ +# # XmlEmployeeFilesCategoryInnerFileInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | File ID on the `<file>` element. | [optional] +**name** | **string** | | [optional] +**original_file_name** | **string** | | [optional] +**size** | **string** | File size in bytes (serialized as string in XML). | [optional] +**date_created** | **string** | UTC creation timestamp in `YYYY-MM-DD HH:MM:SS` format. | [optional] +**created_by** | **string** | | [optional] +**share_with_employee** | **string** | | [optional] +**can_rename_file** | **string** | | [optional] +**can_delete_file** | **string** | | [optional] +**can_change_share_with_employee_field_value** | **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/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md b/docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md new file mode 100644 index 00000000..ca1c6d7a --- /dev/null +++ b/docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md @@ -0,0 +1,9 @@ +# # _1d1fc0f164cb51973a0206b8e2fb2d2dRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budget_breakdown** | [**\BhrSdk\Model\Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner[]**](_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.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/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md b/docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md new file mode 100644 index 00000000..550df959 --- /dev/null +++ b/docs/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md @@ -0,0 +1,13 @@ +# # _1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_name** | **string** | | [optional] +**email_address** | **string** | | [optional] +**salary_budget** | **float** | | [optional] +**bonus_budget** | **float** | | [optional] +**equity_budget** | **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/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md b/docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md new file mode 100644 index 00000000..22120425 --- /dev/null +++ b/docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.md @@ -0,0 +1,11 @@ +# # _1d64402ee192568adbd5e3179a91e6e2RequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**employee_id** | **string** | | [optional] +**budget_allocations** | [**\BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations**](_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.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/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md b/docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md new file mode 100644 index 00000000..f655859d --- /dev/null +++ b/docs/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md @@ -0,0 +1,11 @@ +# # _1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**salary_increase** | **float** | | [optional] +**bonuses** | **float** | | [optional] +**equity** | **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/_288aa996aba16d7a495c62321ea999a9Request.md b/docs/Model/_288aa996aba16d7a495c62321ea999a9Request.md new file mode 100644 index 00000000..0d3f78fc --- /dev/null +++ b/docs/Model/_288aa996aba16d7a495c62321ea999a9Request.md @@ -0,0 +1,9 @@ +# # _288aa996aba16d7a495c62321ea999a9Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sent_date_time** | [**\BhrSdk\Model\Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime**](_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.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/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md b/docs/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md new file mode 100644 index 00000000..5f25c447 --- /dev/null +++ b/docs/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md @@ -0,0 +1,8 @@ +# # _288aa996aba16d7a495c62321ea999a9RequestSentDateTime + +## 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/_3958585c861325ea7a2cd30a8c74f042Request.md b/docs/Model/_3958585c861325ea7a2cd30a8c74f042Request.md new file mode 100644 index 00000000..fecdcce5 --- /dev/null +++ b/docs/Model/_3958585c861325ea7a2cd30a8c74f042Request.md @@ -0,0 +1,9 @@ +# # _3958585c861325ea7a2cd30a8c74f042Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **string[]** | Array of employee IDs to add to the cycle | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md b/docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md new file mode 100644 index 00000000..3ae75273 --- /dev/null +++ b/docs/Model/_89a5068111ec499135c7d6e9a53d5a30Request.md @@ -0,0 +1,9 @@ +# # _89a5068111ec499135c7d6e9a53d5a30Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_ids** | **string[]** | Array of employee IDs to remove from the cycle | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/AccountInformationApi.php b/lib/Api/AccountInformationApi.php index dea4f78e..f5a12850 100644 --- a/lib/Api/AccountInformationApi.php +++ b/lib/Api/AccountInformationApi.php @@ -79,26 +79,45 @@ class AccountInformationApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ + 'baa7162824294d030115568d1d8e6ca7' => [ + 'application/json', + ], + 'call10d66d8561dd7dac50ff9c21ef63d83b' => [ + 'application/json', + ], + 'call5c5fb0f1211ae1c9451753f92f1053b6' => [ + 'application/json', + ], + 'getAllCurrencyTypes' => [ + 'application/json', + ], + 'getAllProvinces' => [ + 'application/json', + ], 'getCountriesOptions' => [ 'application/json', ], - 'getListOfUsers' => [ + 'getMetaCompany' => [ 'application/json', ], 'getStatesByCountryId' => [ 'application/json', ], - 'metadataAddOrUpdateValuesForListFields' => [ + 'listFields' => [ + 'application/json', + ], + 'listListFields' => [ 'application/json', ], - 'metadataGetAListOfFields' => [ + 'listTabularFields' => [ 'application/json', ], - 'metadataGetAListOfTabularFields' => [ + 'listUsers' => [ 'application/json', ], - 'metadataGetDetailsForListFields' => [ + 'updateListFieldValues' => [ 'application/json', + 'text/xml', ], ]; @@ -149,34 +168,36 @@ public function getConfig() { } /** - * Operation getCountriesOptions + * Operation baa7162824294d030115568d1d8e6ca7 * - * Get Countries + * Get timezone by ID * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * @param int $id The numeric ID of the timezone to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\CountrySchema[] + * @return \BhrSdk\Model\TimezoneResource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getCountriesOptions(string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { - list($response) = $this->getCountriesOptionsWithHttpInfo($contentType); + public function baa7162824294d030115568d1d8e6ca7($id, string $contentType = self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'][0]) { + list($response) = $this->baa7162824294d030115568d1d8e6ca7WithHttpInfo($id, $contentType); return $response; } /** - * Operation getCountriesOptionsWithHttpInfo + * Operation baa7162824294d030115568d1d8e6ca7WithHttpInfo * - * Get Countries + * Get timezone by ID * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * @param int $id The numeric ID of the timezone to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\CountrySchema[], HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimezoneResource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getCountriesOptionsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { - $request = $this->getCountriesOptionsRequest($contentType); + public function baa7162824294d030115568d1d8e6ca7WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'][0]) { + $request = $this->baa7162824294d030115568d1d8e6ca7Request($id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -187,7 +208,31 @@ public function getCountriesOptionsWithHttpInfo(string $contentType = self::CONT switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\CountrySchema[]', + '\BhrSdk\Model\TimezoneResource', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -207,24 +252,25 @@ public function getCountriesOptionsWithHttpInfo(string $contentType = self::CONT } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\CountrySchema[]', + '\BhrSdk\Model\TimezoneResource', $request, $response, ); } /** - * Operation getCountriesOptionsAsync + * Operation baa7162824294d030115568d1d8e6ca7Async * - * Get Countries + * Get timezone by ID * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * @param int $id The numeric ID of the timezone to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountriesOptionsAsync(string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { - return $this->getCountriesOptionsAsyncWithHttpInfo($contentType) + public function baa7162824294d030115568d1d8e6ca7Async($id, string $contentType = self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'][0]) { + return $this->baa7162824294d030115568d1d8e6ca7AsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -233,18 +279,19 @@ function ($response) { } /** - * Operation getCountriesOptionsAsyncWithHttpInfo + * Operation baa7162824294d030115568d1d8e6ca7AsyncWithHttpInfo * - * Get Countries + * Get timezone by ID * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * @param int $id The numeric ID of the timezone to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCountriesOptionsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { - $returnType = '\BhrSdk\Model\CountrySchema[]'; - $request = $this->getCountriesOptionsRequest($contentType); + public function baa7162824294d030115568d1d8e6ca7AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'][0]) { + $returnType = '\BhrSdk\Model\TimezoneResource'; + $request = $this->baa7162824294d030115568d1d8e6ca7Request($id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -278,16 +325,24 @@ function ($exception) { } /** - * Create request for operation 'getCountriesOptions' + * Create request for operation 'baa7162824294d030115568d1d8e6ca7' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * @param int $id The numeric ID of the timezone to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCountriesOptionsRequest(string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + public function baa7162824294d030115568d1d8e6ca7Request($id, string $contentType = self::CONTENT_TYPES['baa7162824294d030115568d1d8e6ca7'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'baa7162824294d030115568d1d8e6ca7' + ); - $resourcePath = '/api/v1/meta/countries/options'; + $resourcePath = '/api/v1/meta/timezones/{id}'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -295,8 +350,17 @@ public function getCountriesOptionsRequest(string $contentType = self::CONTENT_T $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/problem+json', ], $contentType, $multipart ); @@ -346,34 +410,36 @@ public function getCountriesOptionsRequest(string $contentType = self::CONTENT_T } /** - * Operation getListOfUsers + * Operation call10d66d8561dd7dac50ff9c21ef63d83b * - * Get Users + * Get timezone by ZIP code * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getListOfUsers'] to see the possible values for this operation + * @param string $zip A 5-digit US ZIP code. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimezoneResource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getListOfUsers(string $contentType = self::CONTENT_TYPES['getListOfUsers'][0]) { - list($response) = $this->getListOfUsersWithHttpInfo($contentType); + public function call10d66d8561dd7dac50ff9c21ef63d83b($zip, string $contentType = self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'][0]) { + list($response) = $this->call10d66d8561dd7dac50ff9c21ef63d83bWithHttpInfo($zip, $contentType); return $response; } /** - * Operation getListOfUsersWithHttpInfo + * Operation call10d66d8561dd7dac50ff9c21ef63d83bWithHttpInfo * - * Get Users + * Get timezone by ZIP code * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getListOfUsers'] to see the possible values for this operation + * @param string $zip A 5-digit US ZIP code. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimezoneResource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getListOfUsersWithHttpInfo(string $contentType = self::CONTENT_TYPES['getListOfUsers'][0]) { - $request = $this->getListOfUsersRequest($contentType); + public function call10d66d8561dd7dac50ff9c21ef63d83bWithHttpInfo($zip, string $contentType = self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'][0]) { + $request = $this->call10d66d8561dd7dac50ff9c21ef63d83bRequest($zip, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -381,25 +447,78 @@ public function getListOfUsersWithHttpInfo(string $contentType = self::CONTENT_T $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimezoneResource', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimezoneResource', $request, $response, ); } /** - * Operation getListOfUsersAsync + * Operation call10d66d8561dd7dac50ff9c21ef63d83bAsync * - * Get Users + * Get timezone by ZIP code * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getListOfUsers'] to see the possible values for this operation + * @param string $zip A 5-digit US ZIP code. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListOfUsersAsync(string $contentType = self::CONTENT_TYPES['getListOfUsers'][0]) { - return $this->getListOfUsersAsyncWithHttpInfo($contentType) + public function call10d66d8561dd7dac50ff9c21ef63d83bAsync($zip, string $contentType = self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'][0]) { + return $this->call10d66d8561dd7dac50ff9c21ef63d83bAsyncWithHttpInfo($zip, $contentType) ->then( function ($response) { return $response[0]; @@ -408,27 +527,30 @@ function ($response) { } /** - * Operation getListOfUsersAsyncWithHttpInfo + * Operation call10d66d8561dd7dac50ff9c21ef63d83bAsyncWithHttpInfo * - * Get Users + * Get timezone by ZIP code * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getListOfUsers'] to see the possible values for this operation + * @param string $zip A 5-digit US ZIP code. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListOfUsersAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getListOfUsers'][0]) { - - $request = $this->getListOfUsersRequest($contentType); + public function call10d66d8561dd7dac50ff9c21ef63d83bAsyncWithHttpInfo($zip, string $contentType = self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'][0]) { + $returnType = '\BhrSdk\Model\TimezoneResource'; + $request = $this->call10d66d8561dd7dac50ff9c21ef63d83bRequest($zip, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -451,16 +573,28 @@ function ($exception) { } /** - * Create request for operation 'getListOfUsers' + * Create request for operation 'call10d66d8561dd7dac50ff9c21ef63d83b' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getListOfUsers'] to see the possible values for this operation + * @param string $zip A 5-digit US ZIP code. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getListOfUsersRequest(string $contentType = self::CONTENT_TYPES['getListOfUsers'][0]) { + public function call10d66d8561dd7dac50ff9c21ef63d83bRequest($zip, string $contentType = self::CONTENT_TYPES['call10d66d8561dd7dac50ff9c21ef63d83b'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'zip' => $zip, + ], + methodName: 'call10d66d8561dd7dac50ff9c21ef63d83b' + ); - $resourcePath = '/api/v1/meta/users'; + if (!preg_match("/^\\d{5}$/", $zip)) { + throw new \InvalidArgumentException("invalid value for \"zip\" when calling AccountInformationApi.call10d66d8561dd7dac50ff9c21ef63d83b, must conform to the pattern /^\\d{5}$/."); + } + + $resourcePath = '/api/v1/meta/timezones/by-zip/{zip}'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -468,8 +602,17 @@ public function getListOfUsersRequest(string $contentType = self::CONTENT_TYPES[ $httpBody = ''; $multipart = false; + // path params + if ($zip !== null) { + $resourcePath = str_replace( + '{' . 'zip' . '}', + ObjectSerializer::toPathValue((string) $zip), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/problem+json', ], $contentType, $multipart ); @@ -519,36 +662,44 @@ public function getListOfUsersRequest(string $contentType = self::CONTENT_TYPES[ } /** - * Operation getStatesByCountryId + * Operation call5c5fb0f1211ae1c9451753f92f1053b6 * - * Get States by Country ID + * List timezones * - * @param int $country_id ID of the country to get states/provinces for (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 1) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\StateProvinceResponseSchema + * @return \BhrSdk\Model\TimezoneListResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getStatesByCountryId($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { - list($response) = $this->getStatesByCountryIdWithHttpInfo($country_id, $contentType); + public function call5c5fb0f1211ae1c9451753f92f1053b6($page_size = 500, $page = 1, $sort = '', $select = '', $filter = '', string $contentType = self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'][0]) { + list($response) = $this->call5c5fb0f1211ae1c9451753f92f1053b6WithHttpInfo($page_size, $page, $sort, $select, $filter, $contentType); return $response; } /** - * Operation getStatesByCountryIdWithHttpInfo + * Operation call5c5fb0f1211ae1c9451753f92f1053b6WithHttpInfo * - * Get States by Country ID + * List timezones * - * @param int $country_id ID of the country to get states/provinces for (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 1) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\StateProvinceResponseSchema, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimezoneListResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getStatesByCountryIdWithHttpInfo($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { - $request = $this->getStatesByCountryIdRequest($country_id, $contentType); + public function call5c5fb0f1211ae1c9451753f92f1053b6WithHttpInfo($page_size = 500, $page = 1, $sort = '', $select = '', $filter = '', string $contentType = self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'][0]) { + $request = $this->call5c5fb0f1211ae1c9451753f92f1053b6Request($page_size, $page, $sort, $select, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -559,7 +710,31 @@ public function getStatesByCountryIdWithHttpInfo($country_id, string $contentTyp switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\StateProvinceResponseSchema', + '\BhrSdk\Model\TimezoneListResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -579,25 +754,29 @@ public function getStatesByCountryIdWithHttpInfo($country_id, string $contentTyp } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\StateProvinceResponseSchema', + '\BhrSdk\Model\TimezoneListResponse', $request, $response, ); } /** - * Operation getStatesByCountryIdAsync + * Operation call5c5fb0f1211ae1c9451753f92f1053b6Async * - * Get States by Country ID + * List timezones * - * @param int $country_id ID of the country to get states/provinces for (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 1) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStatesByCountryIdAsync($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { - return $this->getStatesByCountryIdAsyncWithHttpInfo($country_id, $contentType) + public function call5c5fb0f1211ae1c9451753f92f1053b6Async($page_size = 500, $page = 1, $sort = '', $select = '', $filter = '', string $contentType = self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'][0]) { + return $this->call5c5fb0f1211ae1c9451753f92f1053b6AsyncWithHttpInfo($page_size, $page, $sort, $select, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -606,19 +785,23 @@ function ($response) { } /** - * Operation getStatesByCountryIdAsyncWithHttpInfo + * Operation call5c5fb0f1211ae1c9451753f92f1053b6AsyncWithHttpInfo * - * Get States by Country ID + * List timezones * - * @param int $country_id ID of the country to get states/provinces for (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 1) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStatesByCountryIdAsyncWithHttpInfo($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { - $returnType = '\BhrSdk\Model\StateProvinceResponseSchema'; - $request = $this->getStatesByCountryIdRequest($country_id, $contentType); + public function call5c5fb0f1211ae1c9451753f92f1053b6AsyncWithHttpInfo($page_size = 500, $page = 1, $sort = '', $select = '', $filter = '', string $contentType = self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'][0]) { + $returnType = '\BhrSdk\Model\TimezoneListResponse'; + $request = $this->call5c5fb0f1211ae1c9451753f92f1053b6Request($page_size, $page, $sort, $select, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -652,24 +835,21 @@ function ($exception) { } /** - * Create request for operation 'getStatesByCountryId' + * Create request for operation 'call5c5fb0f1211ae1c9451753f92f1053b6' * - * @param int $country_id ID of the country to get states/provinces for (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 1) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getStatesByCountryIdRequest($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'country_id' => $country_id, - ], - methodName: 'getStatesByCountryId' - ); + public function call5c5fb0f1211ae1c9451753f92f1053b6Request($page_size = 500, $page = 1, $sort = '', $select = '', $filter = '', string $contentType = self::CONTENT_TYPES['call5c5fb0f1211ae1c9451753f92f1053b6'][0]) { - $resourcePath = '/api/v1/meta/provinces/{countryId}'; + $resourcePath = '/api/v1/meta/timezones'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -677,17 +857,28 @@ public function getStatesByCountryIdRequest($country_id, string $contentType = s $httpBody = ''; $multipart = false; - // path params - if ($country_id !== null) { - $resourcePath = str_replace( - '{' . 'countryId' . '}', - ObjectSerializer::toPathValue((string) $country_id), - $resourcePath - ); + $parameters = [ + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'select' => ['value' => $select, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/problem+json', ], $contentType, $multipart ); @@ -737,38 +928,34 @@ public function getStatesByCountryIdRequest($country_id, string $contentType = s } /** - * Operation metadataAddOrUpdateValuesForListFields + * Operation getAllCurrencyTypes * - * Create or Update List Field Values + * Get all currency types * - * @param string $list_field_id list_field_id (required) - * @param \BhrSdk\Model\ListFieldValues $list_field_values list_field_values (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllCurrencyTypes'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\MetaCurrencyTypeItem[] */ - public function metadataAddOrUpdateValuesForListFields($list_field_id, $list_field_values, string $contentType = self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'][0]) { - list($response) = $this->metadataAddOrUpdateValuesForListFieldsWithHttpInfo($list_field_id, $list_field_values, $contentType); + public function getAllCurrencyTypes(string $contentType = self::CONTENT_TYPES['getAllCurrencyTypes'][0]) { + list($response) = $this->getAllCurrencyTypesWithHttpInfo($contentType); return $response; } /** - * Operation metadataAddOrUpdateValuesForListFieldsWithHttpInfo + * Operation getAllCurrencyTypesWithHttpInfo * - * Create or Update List Field Values + * Get all currency types * - * @param string $list_field_id (required) - * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllCurrencyTypes'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\MetaCurrencyTypeItem[], HTTP status code, HTTP response headers (array of strings) */ - public function metadataAddOrUpdateValuesForListFieldsWithHttpInfo($list_field_id, $list_field_values, string $contentType = self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'][0]) { - $request = $this->metadataAddOrUpdateValuesForListFieldsRequest($list_field_id, $list_field_values, $contentType); + public function getAllCurrencyTypesWithHttpInfo(string $contentType = self::CONTENT_TYPES['getAllCurrencyTypes'][0]) { + $request = $this->getAllCurrencyTypesRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -776,27 +963,47 @@ public function metadataAddOrUpdateValuesForListFieldsWithHttpInfo($list_field_i $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MetaCurrencyTypeItem[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\MetaCurrencyTypeItem[]', $request, $response, ); } /** - * Operation metadataAddOrUpdateValuesForListFieldsAsync + * Operation getAllCurrencyTypesAsync * - * Create or Update List Field Values + * Get all currency types * - * @param string $list_field_id (required) - * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllCurrencyTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataAddOrUpdateValuesForListFieldsAsync($list_field_id, $list_field_values, string $contentType = self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'][0]) { - return $this->metadataAddOrUpdateValuesForListFieldsAsyncWithHttpInfo($list_field_id, $list_field_values, $contentType) + public function getAllCurrencyTypesAsync(string $contentType = self::CONTENT_TYPES['getAllCurrencyTypes'][0]) { + return $this->getAllCurrencyTypesAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -805,29 +1012,29 @@ function ($response) { } /** - * Operation metadataAddOrUpdateValuesForListFieldsAsyncWithHttpInfo + * Operation getAllCurrencyTypesAsyncWithHttpInfo * - * Create or Update List Field Values + * Get all currency types * - * @param string $list_field_id (required) - * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllCurrencyTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataAddOrUpdateValuesForListFieldsAsyncWithHttpInfo($list_field_id, $list_field_values, string $contentType = self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'][0]) { - - $request = $this->metadataAddOrUpdateValuesForListFieldsRequest($list_field_id, $list_field_values, $contentType); + public function getAllCurrencyTypesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getAllCurrencyTypes'][0]) { + $returnType = '\BhrSdk\Model\MetaCurrencyTypeItem[]'; + $request = $this->getAllCurrencyTypesRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -850,58 +1057,29 @@ function ($exception) { } /** - * Create request for operation 'metadataAddOrUpdateValuesForListFields' + * Create request for operation 'getAllCurrencyTypes' * - * @param string $list_field_id (required) - * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllCurrencyTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function metadataAddOrUpdateValuesForListFieldsRequest($list_field_id, $list_field_values, string $contentType = self::CONTENT_TYPES['metadataAddOrUpdateValuesForListFields'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'list_field_id' => $list_field_id, - 'list_field_values' => $list_field_values, - ], - methodName: 'metadataAddOrUpdateValuesForListFields' - ); + public function getAllCurrencyTypesRequest(string $contentType = self::CONTENT_TYPES['getAllCurrencyTypes'][0]) { - $resourcePath = '/api/v1/meta/lists/{listFieldId}'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + $resourcePath = '/api/v1/meta/currency/types'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // path params - if ($list_field_id !== null) { - $resourcePath = str_replace( - '{' . 'listFieldId' . '}', - ObjectSerializer::toPathValue((string) $list_field_id), - $resourcePath - ); - } - $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + ['application/json', ], $contentType, $multipart ); - // for model (json/xml) - if (isset($list_field_values)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($list_field_values)); - } else { - $httpBody = is_array($list_field_values) ? json_encode($list_field_values) : $list_field_values; - } - } - // Authentication methods // Basic authentication @@ -939,7 +1117,7 @@ public function metadataAddOrUpdateValuesForListFieldsRequest($list_field_id, $l $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -947,36 +1125,34 @@ public function metadataAddOrUpdateValuesForListFieldsRequest($list_field_id, $l } /** - * Operation metadataGetAListOfFields + * Operation getAllProvinces * - * Get Fields + * Get All Provinces * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllProvinces'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ProvinceItem[] */ - public function metadataGetAListOfFields($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfFields'][0]) { - list($response) = $this->metadataGetAListOfFieldsWithHttpInfo($accept_header_parameter, $contentType); + public function getAllProvinces(string $contentType = self::CONTENT_TYPES['getAllProvinces'][0]) { + list($response) = $this->getAllProvincesWithHttpInfo($contentType); return $response; } /** - * Operation metadataGetAListOfFieldsWithHttpInfo + * Operation getAllProvincesWithHttpInfo * - * Get Fields + * Get All Provinces * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllProvinces'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\ProvinceItem[], HTTP status code, HTTP response headers (array of strings) */ - public function metadataGetAListOfFieldsWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfFields'][0]) { - $request = $this->metadataGetAListOfFieldsRequest($accept_header_parameter, $contentType); + public function getAllProvincesWithHttpInfo(string $contentType = self::CONTENT_TYPES['getAllProvinces'][0]) { + $request = $this->getAllProvincesRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -984,26 +1160,1325 @@ public function metadataGetAListOfFieldsWithHttpInfo($accept_header_parameter = $statusCode = $response->getStatusCode(); - return ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type - $request, - $response, - ); - } - - /** - * Operation metadataGetAListOfFieldsAsync - * - * Get Fields - * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfFields'] to see the possible values for this operation - * + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProvinceItem[]', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProvinceItem[]', + $request, + $response, + ); + } + + /** + * Operation getAllProvincesAsync + * + * Get All Provinces + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllProvinces'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllProvincesAsync(string $contentType = self::CONTENT_TYPES['getAllProvinces'][0]) { + return $this->getAllProvincesAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAllProvincesAsyncWithHttpInfo + * + * Get All Provinces + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllProvinces'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllProvincesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getAllProvinces'][0]) { + $returnType = '\BhrSdk\Model\ProvinceItem[]'; + $request = $this->getAllProvincesRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getAllProvinces' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAllProvinces'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAllProvincesRequest(string $contentType = self::CONTENT_TYPES['getAllProvinces'][0]) { + + $resourcePath = '/api/v1/meta/provinces'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getCountriesOptions + * + * Get Countries + * + * @param string|null $iso_code ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CountriesOptionsResponse + */ + public function getCountriesOptions($iso_code = null, string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + list($response) = $this->getCountriesOptionsWithHttpInfo($iso_code, $contentType); + return $response; + } + + /** + * Operation getCountriesOptionsWithHttpInfo + * + * Get Countries + * + * @param string|null $iso_code ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CountriesOptionsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getCountriesOptionsWithHttpInfo($iso_code = null, string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + $request = $this->getCountriesOptionsRequest($iso_code, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CountriesOptionsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CountriesOptionsResponse', + $request, + $response, + ); + } + + /** + * Operation getCountriesOptionsAsync + * + * Get Countries + * + * @param string|null $iso_code ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCountriesOptionsAsync($iso_code = null, string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + return $this->getCountriesOptionsAsyncWithHttpInfo($iso_code, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCountriesOptionsAsyncWithHttpInfo + * + * Get Countries + * + * @param string|null $iso_code ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCountriesOptionsAsyncWithHttpInfo($iso_code = null, string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + $returnType = '\BhrSdk\Model\CountriesOptionsResponse'; + $request = $this->getCountriesOptionsRequest($iso_code, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getCountriesOptions' + * + * @param string|null $iso_code ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCountriesOptions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCountriesOptionsRequest($iso_code = null, string $contentType = self::CONTENT_TYPES['getCountriesOptions'][0]) { + + if ($iso_code !== null && strlen($iso_code) > 2) { + throw new \InvalidArgumentException('invalid length for "$iso_code" when calling AccountInformationApi.getCountriesOptions, must be smaller than or equal to 2.'); + } + if ($iso_code !== null && strlen($iso_code) < 2) { + throw new \InvalidArgumentException('invalid length for "$iso_code" when calling AccountInformationApi.getCountriesOptions, must be bigger than or equal to 2.'); + } + if ($iso_code !== null && !preg_match("/^[A-Za-z]{2}$/", $iso_code)) { + throw new \InvalidArgumentException("invalid value for \"iso_code\" when calling AccountInformationApi.getCountriesOptions, must conform to the pattern /^[A-Za-z]{2}$/."); + } + + $resourcePath = '/api/v1/meta/countries/options'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'isoCode' => ['value' => $iso_code, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getMetaCompany + * + * Get company properties + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMetaCompany'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\MetaCompanyPropertiesResponse + */ + public function getMetaCompany(string $contentType = self::CONTENT_TYPES['getMetaCompany'][0]) { + list($response) = $this->getMetaCompanyWithHttpInfo($contentType); + return $response; + } + + /** + * Operation getMetaCompanyWithHttpInfo + * + * Get company properties + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMetaCompany'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\MetaCompanyPropertiesResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getMetaCompanyWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMetaCompany'][0]) { + $request = $this->getMetaCompanyRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MetaCompanyPropertiesResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MetaCompanyPropertiesResponse', + $request, + $response, + ); + } + + /** + * Operation getMetaCompanyAsync + * + * Get company properties + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMetaCompany'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMetaCompanyAsync(string $contentType = self::CONTENT_TYPES['getMetaCompany'][0]) { + return $this->getMetaCompanyAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMetaCompanyAsyncWithHttpInfo + * + * Get company properties + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMetaCompany'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMetaCompanyAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMetaCompany'][0]) { + $returnType = '\BhrSdk\Model\MetaCompanyPropertiesResponse'; + $request = $this->getMetaCompanyRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getMetaCompany' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMetaCompany'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMetaCompanyRequest(string $contentType = self::CONTENT_TYPES['getMetaCompany'][0]) { + + $resourcePath = '/api/v1/meta/company'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getStatesByCountryId + * + * List states and provinces for a country by Country ID + * + * @param int $country_id Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\StateProvinceResponseSchema + */ + public function getStatesByCountryId($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { + list($response) = $this->getStatesByCountryIdWithHttpInfo($country_id, $contentType); + return $response; + } + + /** + * Operation getStatesByCountryIdWithHttpInfo + * + * List states and provinces for a country by Country ID + * + * @param int $country_id Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\StateProvinceResponseSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getStatesByCountryIdWithHttpInfo($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { + $request = $this->getStatesByCountryIdRequest($country_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\StateProvinceResponseSchema', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\StateProvinceResponseSchema', + $request, + $response, + ); + } + + /** + * Operation getStatesByCountryIdAsync + * + * List states and provinces for a country by Country ID + * + * @param int $country_id Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getStatesByCountryIdAsync($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { + return $this->getStatesByCountryIdAsyncWithHttpInfo($country_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getStatesByCountryIdAsyncWithHttpInfo + * + * List states and provinces for a country by Country ID + * + * @param int $country_id Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getStatesByCountryIdAsyncWithHttpInfo($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { + $returnType = '\BhrSdk\Model\StateProvinceResponseSchema'; + $request = $this->getStatesByCountryIdRequest($country_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getStatesByCountryId' + * + * @param int $country_id Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getStatesByCountryId'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getStatesByCountryIdRequest($country_id, string $contentType = self::CONTENT_TYPES['getStatesByCountryId'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'country_id' => $country_id, + ], + methodName: 'getStatesByCountryId' + ); + + $resourcePath = '/api/v1/meta/provinces/{countryId}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($country_id !== null) { + $resourcePath = str_replace( + '{' . 'countryId' . '}', + ObjectSerializer::toPathValue((string) $country_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listFields + * + * List Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\Field1[] + */ + public function listFields($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listFields'][0]) { + list($response) = $this->listFieldsWithHttpInfo($accept_header_parameter, $contentType); + return $response; + } + + /** + * Operation listFieldsWithHttpInfo + * + * List Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\Field1[], HTTP status code, HTTP response headers (array of strings) + */ + public function listFieldsWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listFields'][0]) { + $request = $this->listFieldsRequest($accept_header_parameter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\Field1[]', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\Field1[]', + $request, + $response, + ); + } + + /** + * Operation listFieldsAsync + * + * List Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFieldsAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listFields'][0]) { + return $this->listFieldsAsyncWithHttpInfo($accept_header_parameter, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listFieldsAsyncWithHttpInfo + * + * List Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listFieldsAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listFields'][0]) { + $returnType = '\BhrSdk\Model\Field1[]'; + $request = $this->listFieldsRequest($accept_header_parameter, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listFields' + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listFieldsRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listFields'][0]) { + + $resourcePath = '/api/v1/meta/fields'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/xml', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listListFields + * + * List List Fields + * + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listListFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ListFieldDetail[] + */ + public function listListFields($format = null, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listListFields'][0]) { + list($response) = $this->listListFieldsWithHttpInfo($format, $accept_header_parameter, $contentType); + return $response; + } + + /** + * Operation listListFieldsWithHttpInfo + * + * List List Fields + * + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listListFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ListFieldDetail[], HTTP status code, HTTP response headers (array of strings) + */ + public function listListFieldsWithHttpInfo($format = null, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listListFields'][0]) { + $request = $this->listListFieldsRequest($format, $accept_header_parameter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ListFieldDetail[]', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ListFieldDetail[]', + $request, + $response, + ); + } + + /** + * Operation listListFieldsAsync + * + * List List Fields + * + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listListFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listListFieldsAsync($format = null, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listListFields'][0]) { + return $this->listListFieldsAsyncWithHttpInfo($format, $accept_header_parameter, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listListFieldsAsyncWithHttpInfo + * + * List List Fields + * + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listListFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listListFieldsAsyncWithHttpInfo($format = null, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listListFields'][0]) { + $returnType = '\BhrSdk\Model\ListFieldDetail[]'; + $request = $this->listListFieldsRequest($format, $accept_header_parameter, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listListFields' + * + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listListFields'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listListFieldsRequest($format = null, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listListFields'][0]) { + + $resourcePath = '/api/v1/meta/lists'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'format' => ['value' => $format, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/xml', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listTabularFields + * + * List Tabular Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTabularFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TabularField[] + */ + public function listTabularFields($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTabularFields'][0]) { + list($response) = $this->listTabularFieldsWithHttpInfo($accept_header_parameter, $contentType); + return $response; + } + + /** + * Operation listTabularFieldsWithHttpInfo + * + * List Tabular Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTabularFields'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TabularField[], HTTP status code, HTTP response headers (array of strings) + */ + public function listTabularFieldsWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTabularFields'][0]) { + $request = $this->listTabularFieldsRequest($accept_header_parameter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TabularField[]', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TabularField[]', + $request, + $response, + ); + } + + /** + * Operation listTabularFieldsAsync + * + * List Tabular Fields + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTabularFields'] to see the possible values for this operation + * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetAListOfFieldsAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfFields'][0]) { - return $this->metadataGetAListOfFieldsAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function listTabularFieldsAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTabularFields'][0]) { + return $this->listTabularFieldsAsyncWithHttpInfo($accept_header_parameter, $contentType) ->then( function ($response) { return $response[0]; @@ -1012,28 +2487,30 @@ function ($response) { } /** - * Operation metadataGetAListOfFieldsAsyncWithHttpInfo + * Operation listTabularFieldsAsyncWithHttpInfo * - * Get Fields + * List Tabular Fields * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTabularFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetAListOfFieldsAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfFields'][0]) { - - $request = $this->metadataGetAListOfFieldsRequest($accept_header_parameter, $contentType); + public function listTabularFieldsAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTabularFields'][0]) { + $returnType = '\BhrSdk\Model\TabularField[]'; + $request = $this->listTabularFieldsRequest($accept_header_parameter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1056,17 +2533,17 @@ function ($exception) { } /** - * Create request for operation 'metadataGetAListOfFields' + * Create request for operation 'listTabularFields' * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTabularFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function metadataGetAListOfFieldsRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfFields'][0]) { + public function listTabularFieldsRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTabularFields'][0]) { - $resourcePath = '/api/v1/meta/fields'; + $resourcePath = '/api/v1/meta/tables'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1130,36 +2607,38 @@ public function metadataGetAListOfFieldsRequest($accept_header_parameter = null, } /** - * Operation metadataGetAListOfTabularFields + * Operation listUsers * - * Get Tabular Fields + * List Users * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfTabularFields'] to see the possible values for this operation + * @param string|null $status Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listUsers'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return array<string,\BhrSdk\Model\ListUsersResponseValue> */ - public function metadataGetAListOfTabularFields($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfTabularFields'][0]) { - list($response) = $this->metadataGetAListOfTabularFieldsWithHttpInfo($accept_header_parameter, $contentType); + public function listUsers($accept_header_parameter = null, $status = null, string $contentType = self::CONTENT_TYPES['listUsers'][0]) { + list($response) = $this->listUsersWithHttpInfo($accept_header_parameter, $status, $contentType); return $response; } /** - * Operation metadataGetAListOfTabularFieldsWithHttpInfo + * Operation listUsersWithHttpInfo * - * Get Tabular Fields + * List Users * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfTabularFields'] to see the possible values for this operation + * @param string|null $status Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listUsers'] to see the possible values for this operation * * @throws \BhrSdk\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 array<string,\BhrSdk\Model\ListUsersResponseValue>, HTTP status code, HTTP response headers (array of strings) */ - public function metadataGetAListOfTabularFieldsWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfTabularFields'][0]) { - $request = $this->metadataGetAListOfTabularFieldsRequest($accept_header_parameter, $contentType); + public function listUsersWithHttpInfo($accept_header_parameter = null, $status = null, string $contentType = self::CONTENT_TYPES['listUsers'][0]) { + $request = $this->listUsersRequest($accept_header_parameter, $status, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1167,26 +2646,49 @@ public function metadataGetAListOfTabularFieldsWithHttpInfo($accept_header_param $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,\BhrSdk\Model\ListUsersResponseValue>', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + 'array<string,\BhrSdk\Model\ListUsersResponseValue>', $request, $response, ); } /** - * Operation metadataGetAListOfTabularFieldsAsync + * Operation listUsersAsync * - * Get Tabular Fields + * List Users * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfTabularFields'] to see the possible values for this operation + * @param string|null $status Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetAListOfTabularFieldsAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfTabularFields'][0]) { - return $this->metadataGetAListOfTabularFieldsAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function listUsersAsync($accept_header_parameter = null, $status = null, string $contentType = self::CONTENT_TYPES['listUsers'][0]) { + return $this->listUsersAsyncWithHttpInfo($accept_header_parameter, $status, $contentType) ->then( function ($response) { return $response[0]; @@ -1195,28 +2697,31 @@ function ($response) { } /** - * Operation metadataGetAListOfTabularFieldsAsyncWithHttpInfo + * Operation listUsersAsyncWithHttpInfo * - * Get Tabular Fields + * List Users * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfTabularFields'] to see the possible values for this operation + * @param string|null $status Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetAListOfTabularFieldsAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfTabularFields'][0]) { - - $request = $this->metadataGetAListOfTabularFieldsRequest($accept_header_parameter, $contentType); + public function listUsersAsyncWithHttpInfo($accept_header_parameter = null, $status = null, string $contentType = self::CONTENT_TYPES['listUsers'][0]) { + $returnType = 'array<string,\BhrSdk\Model\ListUsersResponseValue>'; + $request = $this->listUsersRequest($accept_header_parameter, $status, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1239,17 +2744,18 @@ function ($exception) { } /** - * Create request for operation 'metadataGetAListOfTabularFields' + * Create request for operation 'listUsers' * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetAListOfTabularFields'] to see the possible values for this operation + * @param string|null $status Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function metadataGetAListOfTabularFieldsRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetAListOfTabularFields'][0]) { + public function listUsersRequest($accept_header_parameter = null, $status = null, string $contentType = self::CONTENT_TYPES['listUsers'][0]) { - $resourcePath = '/api/v1/meta/tables'; + $resourcePath = '/api/v1/meta/users'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1257,6 +2763,22 @@ public function metadataGetAListOfTabularFieldsRequest($accept_header_parameter $httpBody = ''; $multipart = false; + $parameters = [ + 'status' => ['value' => $status, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // header params if ($accept_header_parameter !== null) { $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); @@ -1313,36 +2835,40 @@ public function metadataGetAListOfTabularFieldsRequest($accept_header_parameter } /** - * Operation metadataGetDetailsForListFields + * Operation updateListFieldValues * - * Get List Field Details + * Update List Field Values * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetDetailsForListFields'] to see the possible values for this operation + * @param string $list_field_id The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) + * @param \BhrSdk\Model\ListFieldValues $list_field_values list_field_values (required) + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateListFieldValues'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ListFieldDetail */ - public function metadataGetDetailsForListFields($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetDetailsForListFields'][0]) { - list($response) = $this->metadataGetDetailsForListFieldsWithHttpInfo($accept_header_parameter, $contentType); + public function updateListFieldValues($list_field_id, $list_field_values, $format = null, string $contentType = self::CONTENT_TYPES['updateListFieldValues'][0]) { + list($response) = $this->updateListFieldValuesWithHttpInfo($list_field_id, $list_field_values, $format, $contentType); return $response; } /** - * Operation metadataGetDetailsForListFieldsWithHttpInfo + * Operation updateListFieldValuesWithHttpInfo * - * Get List Field Details + * Update List Field Values * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetDetailsForListFields'] to see the possible values for this operation + * @param string $list_field_id The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) + * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateListFieldValues'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\ListFieldDetail, HTTP status code, HTTP response headers (array of strings) */ - public function metadataGetDetailsForListFieldsWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetDetailsForListFields'][0]) { - $request = $this->metadataGetDetailsForListFieldsRequest($accept_header_parameter, $contentType); + public function updateListFieldValuesWithHttpInfo($list_field_id, $list_field_values, $format = null, string $contentType = self::CONTENT_TYPES['updateListFieldValues'][0]) { + $request = $this->updateListFieldValuesRequest($list_field_id, $list_field_values, $format, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1350,26 +2876,50 @@ public function metadataGetDetailsForListFieldsWithHttpInfo($accept_header_param $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ListFieldDetail', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\ListFieldDetail', $request, $response, ); } /** - * Operation metadataGetDetailsForListFieldsAsync + * Operation updateListFieldValuesAsync * - * Get List Field Details + * Update List Field Values * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetDetailsForListFields'] to see the possible values for this operation + * @param string $list_field_id The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) + * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateListFieldValues'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetDetailsForListFieldsAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetDetailsForListFields'][0]) { - return $this->metadataGetDetailsForListFieldsAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function updateListFieldValuesAsync($list_field_id, $list_field_values, $format = null, string $contentType = self::CONTENT_TYPES['updateListFieldValues'][0]) { + return $this->updateListFieldValuesAsyncWithHttpInfo($list_field_id, $list_field_values, $format, $contentType) ->then( function ($response) { return $response[0]; @@ -1378,28 +2928,32 @@ function ($response) { } /** - * Operation metadataGetDetailsForListFieldsAsyncWithHttpInfo + * Operation updateListFieldValuesAsyncWithHttpInfo * - * Get List Field Details + * Update List Field Values * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetDetailsForListFields'] to see the possible values for this operation + * @param string $list_field_id The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) + * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateListFieldValues'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function metadataGetDetailsForListFieldsAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetDetailsForListFields'][0]) { - - $request = $this->metadataGetDetailsForListFieldsRequest($accept_header_parameter, $contentType); + public function updateListFieldValuesAsyncWithHttpInfo($list_field_id, $list_field_values, $format = null, string $contentType = self::CONTENT_TYPES['updateListFieldValues'][0]) { + $returnType = '\BhrSdk\Model\ListFieldDetail'; + $request = $this->updateListFieldValuesRequest($list_field_id, $list_field_values, $format, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1422,35 +2976,75 @@ function ($exception) { } /** - * Create request for operation 'metadataGetDetailsForListFields' + * Create request for operation 'updateListFieldValues' * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['metadataGetDetailsForListFields'] to see the possible values for this operation + * @param string $list_field_id The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) + * @param \BhrSdk\Model\ListFieldValues $list_field_values (required) + * @param string|null $format Set to \"json\" to receive JSON output as an alternative to using the Accept header. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateListFieldValues'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function metadataGetDetailsForListFieldsRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['metadataGetDetailsForListFields'][0]) { + public function updateListFieldValuesRequest($list_field_id, $list_field_values, $format = null, string $contentType = self::CONTENT_TYPES['updateListFieldValues'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'list_field_id' => $list_field_id, + 'list_field_values' => $list_field_values, + ], + methodName: 'updateListFieldValues' + ); - $resourcePath = '/api/v1/meta/lists'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/meta/lists/{listFieldId}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + $parameters = [ + 'format' => ['value' => $format, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($list_field_id !== null) { + $resourcePath = str_replace( + '{' . 'listFieldId' . '}', + ObjectSerializer::toPathValue((string) $list_field_id), + $resourcePath + ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', 'text/xml', ], $contentType, $multipart ); + // for model (json/xml) + if (isset($list_field_values)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($list_field_values)); + } else { + $httpBody = is_array($list_field_values) ? json_encode($list_field_values) : $list_field_values; + } + } + // Authentication methods // Basic authentication @@ -1488,7 +3082,7 @@ public function metadataGetDetailsForListFieldsRequest($accept_header_parameter $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody diff --git a/lib/Api/AlertApi.php b/lib/Api/AlertApi.php new file mode 100644 index 00000000..abe038b8 --- /dev/null +++ b/lib/Api/AlertApi.php @@ -0,0 +1,330 @@ +<?php +declare(strict_types=1); +/** + * AlertApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * AlertApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class AlertApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'call0f0dcb585e5883175b6557c16cf6755a' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation call0f0dcb585e5883175b6557c16cf6755a + * + * List alert templates + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\AlertTemplateListResponse + */ + public function call0f0dcb585e5883175b6557c16cf6755a(string $contentType = self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'][0]) { + list($response) = $this->call0f0dcb585e5883175b6557c16cf6755aWithHttpInfo($contentType); + return $response; + } + + /** + * Operation call0f0dcb585e5883175b6557c16cf6755aWithHttpInfo + * + * List alert templates + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\AlertTemplateListResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call0f0dcb585e5883175b6557c16cf6755aWithHttpInfo(string $contentType = self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'][0]) { + $request = $this->call0f0dcb585e5883175b6557c16cf6755aRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AlertTemplateListResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AlertTemplateListResponse', + $request, + $response, + ); + } + + /** + * Operation call0f0dcb585e5883175b6557c16cf6755aAsync + * + * List alert templates + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call0f0dcb585e5883175b6557c16cf6755aAsync(string $contentType = self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'][0]) { + return $this->call0f0dcb585e5883175b6557c16cf6755aAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call0f0dcb585e5883175b6557c16cf6755aAsyncWithHttpInfo + * + * List alert templates + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call0f0dcb585e5883175b6557c16cf6755aAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'][0]) { + $returnType = '\BhrSdk\Model\AlertTemplateListResponse'; + $request = $this->call0f0dcb585e5883175b6557c16cf6755aRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call0f0dcb585e5883175b6557c16cf6755a' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call0f0dcb585e5883175b6557c16cf6755aRequest(string $contentType = self::CONTENT_TYPES['call0f0dcb585e5883175b6557c16cf6755a'][0]) { + + $resourcePath = '/api/v1/alerts'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/AlertConfigurationsApi.php b/lib/Api/AlertConfigurationsApi.php new file mode 100644 index 00000000..0e25e41c --- /dev/null +++ b/lib/Api/AlertConfigurationsApi.php @@ -0,0 +1,1076 @@ +<?php +declare(strict_types=1); +/** + * AlertConfigurationsApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * AlertConfigurationsApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class AlertConfigurationsApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'a05e93bc2eb9c39a40fbd71e6e07f3c6' => [ + 'application/json', + ], + 'call14e66bfb5f075043221ce1e843c97493' => [ + 'application/json', + ], + 'call6d0a073cbf3e97fe0409de42c68fe779' => [ + 'application/json', + ], + 'eb42aa2fa339ba5c08b147fc13c6a79e' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation a05e93bc2eb9c39a40fbd71e6e07f3c6 + * + * Create an alert configuration + * + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function a05e93bc2eb9c39a40fbd71e6e07f3c6($company_alert_data_object, string $contentType = self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'][0]) { + list($response) = $this->a05e93bc2eb9c39a40fbd71e6e07f3c6WithHttpInfo($company_alert_data_object, $contentType); + return $response; + } + + /** + * Operation a05e93bc2eb9c39a40fbd71e6e07f3c6WithHttpInfo + * + * Create an alert configuration + * + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function a05e93bc2eb9c39a40fbd71e6e07f3c6WithHttpInfo($company_alert_data_object, string $contentType = self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'][0]) { + $request = $this->a05e93bc2eb9c39a40fbd71e6e07f3c6Request($company_alert_data_object, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + } + + /** + * Operation a05e93bc2eb9c39a40fbd71e6e07f3c6Async + * + * Create an alert configuration + * + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a05e93bc2eb9c39a40fbd71e6e07f3c6Async($company_alert_data_object, string $contentType = self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'][0]) { + return $this->a05e93bc2eb9c39a40fbd71e6e07f3c6AsyncWithHttpInfo($company_alert_data_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation a05e93bc2eb9c39a40fbd71e6e07f3c6AsyncWithHttpInfo + * + * Create an alert configuration + * + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a05e93bc2eb9c39a40fbd71e6e07f3c6AsyncWithHttpInfo($company_alert_data_object, string $contentType = self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'][0]) { + $returnType = '\BhrSdk\Model\CompanyAlertDataObject'; + $request = $this->a05e93bc2eb9c39a40fbd71e6e07f3c6Request($company_alert_data_object, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'a05e93bc2eb9c39a40fbd71e6e07f3c6' + * + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function a05e93bc2eb9c39a40fbd71e6e07f3c6Request($company_alert_data_object, string $contentType = self::CONTENT_TYPES['a05e93bc2eb9c39a40fbd71e6e07f3c6'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'company_alert_data_object' => $company_alert_data_object, + ], + methodName: 'a05e93bc2eb9c39a40fbd71e6e07f3c6' + ); + + $resourcePath = '/api/v1/alert-configurations'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($company_alert_data_object)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($company_alert_data_object)); + } else { + $httpBody = is_array($company_alert_data_object) ? json_encode($company_alert_data_object) : $company_alert_data_object; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call14e66bfb5f075043221ce1e843c97493 + * + * Get an alert configuration + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function call14e66bfb5f075043221ce1e843c97493($id, string $contentType = self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'][0]) { + list($response) = $this->call14e66bfb5f075043221ce1e843c97493WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call14e66bfb5f075043221ce1e843c97493WithHttpInfo + * + * Get an alert configuration + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call14e66bfb5f075043221ce1e843c97493WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'][0]) { + $request = $this->call14e66bfb5f075043221ce1e843c97493Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + } + + /** + * Operation call14e66bfb5f075043221ce1e843c97493Async + * + * Get an alert configuration + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call14e66bfb5f075043221ce1e843c97493Async($id, string $contentType = self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'][0]) { + return $this->call14e66bfb5f075043221ce1e843c97493AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call14e66bfb5f075043221ce1e843c97493AsyncWithHttpInfo + * + * Get an alert configuration + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call14e66bfb5f075043221ce1e843c97493AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'][0]) { + $returnType = '\BhrSdk\Model\CompanyAlertDataObject'; + $request = $this->call14e66bfb5f075043221ce1e843c97493Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call14e66bfb5f075043221ce1e843c97493' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call14e66bfb5f075043221ce1e843c97493Request($id, string $contentType = self::CONTENT_TYPES['call14e66bfb5f075043221ce1e843c97493'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call14e66bfb5f075043221ce1e843c97493' + ); + + $resourcePath = '/api/v1/alert-configurations/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call6d0a073cbf3e97fe0409de42c68fe779 + * + * List alert configurations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyAlertDataObject[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function call6d0a073cbf3e97fe0409de42c68fe779(string $contentType = self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'][0]) { + list($response) = $this->call6d0a073cbf3e97fe0409de42c68fe779WithHttpInfo($contentType); + return $response; + } + + /** + * Operation call6d0a073cbf3e97fe0409de42c68fe779WithHttpInfo + * + * List alert configurations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyAlertDataObject[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call6d0a073cbf3e97fe0409de42c68fe779WithHttpInfo(string $contentType = self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'][0]) { + $request = $this->call6d0a073cbf3e97fe0409de42c68fe779Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject[]', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject[]', + $request, + $response, + ); + } + + /** + * Operation call6d0a073cbf3e97fe0409de42c68fe779Async + * + * List alert configurations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call6d0a073cbf3e97fe0409de42c68fe779Async(string $contentType = self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'][0]) { + return $this->call6d0a073cbf3e97fe0409de42c68fe779AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call6d0a073cbf3e97fe0409de42c68fe779AsyncWithHttpInfo + * + * List alert configurations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call6d0a073cbf3e97fe0409de42c68fe779AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'][0]) { + $returnType = '\BhrSdk\Model\CompanyAlertDataObject[]'; + $request = $this->call6d0a073cbf3e97fe0409de42c68fe779Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call6d0a073cbf3e97fe0409de42c68fe779' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call6d0a073cbf3e97fe0409de42c68fe779Request(string $contentType = self::CONTENT_TYPES['call6d0a073cbf3e97fe0409de42c68fe779'][0]) { + + $resourcePath = '/api/v1/alert-configurations'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation eb42aa2fa339ba5c08b147fc13c6a79e + * + * Update an alert configuration + * + * @param int $id id (required) + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function eb42aa2fa339ba5c08b147fc13c6a79e($id, $company_alert_data_object, string $contentType = self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'][0]) { + list($response) = $this->eb42aa2fa339ba5c08b147fc13c6a79eWithHttpInfo($id, $company_alert_data_object, $contentType); + return $response; + } + + /** + * Operation eb42aa2fa339ba5c08b147fc13c6a79eWithHttpInfo + * + * Update an alert configuration + * + * @param int $id (required) + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyAlertDataObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function eb42aa2fa339ba5c08b147fc13c6a79eWithHttpInfo($id, $company_alert_data_object, string $contentType = self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'][0]) { + $request = $this->eb42aa2fa339ba5c08b147fc13c6a79eRequest($id, $company_alert_data_object, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyAlertDataObject', + $request, + $response, + ); + } + + /** + * Operation eb42aa2fa339ba5c08b147fc13c6a79eAsync + * + * Update an alert configuration + * + * @param int $id (required) + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function eb42aa2fa339ba5c08b147fc13c6a79eAsync($id, $company_alert_data_object, string $contentType = self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'][0]) { + return $this->eb42aa2fa339ba5c08b147fc13c6a79eAsyncWithHttpInfo($id, $company_alert_data_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation eb42aa2fa339ba5c08b147fc13c6a79eAsyncWithHttpInfo + * + * Update an alert configuration + * + * @param int $id (required) + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function eb42aa2fa339ba5c08b147fc13c6a79eAsyncWithHttpInfo($id, $company_alert_data_object, string $contentType = self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'][0]) { + $returnType = '\BhrSdk\Model\CompanyAlertDataObject'; + $request = $this->eb42aa2fa339ba5c08b147fc13c6a79eRequest($id, $company_alert_data_object, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'eb42aa2fa339ba5c08b147fc13c6a79e' + * + * @param int $id (required) + * @param \BhrSdk\Model\CompanyAlertDataObject $company_alert_data_object (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function eb42aa2fa339ba5c08b147fc13c6a79eRequest($id, $company_alert_data_object, string $contentType = self::CONTENT_TYPES['eb42aa2fa339ba5c08b147fc13c6a79e'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'company_alert_data_object' => $company_alert_data_object, + ], + methodName: 'eb42aa2fa339ba5c08b147fc13c6a79e' + ); + + $resourcePath = '/api/v1/alert-configurations/{id}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($company_alert_data_object)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($company_alert_data_object)); + } else { + $httpBody = is_array($company_alert_data_object) ? json_encode($company_alert_data_object) : $company_alert_data_object; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/ApplicantTrackingApi.php b/lib/Api/ApplicantTrackingApi.php index 80865bcf..be6e5303 100644 --- a/lib/Api/ApplicantTrackingApi.php +++ b/lib/Api/ApplicantTrackingApi.php @@ -79,10 +79,13 @@ class ApplicantTrackingApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addNewCandidate' => [ + 'createApplicationComment' => [ + 'application/json', + ], + 'createCandidate' => [ 'multipart/form-data', ], - 'addNewJobOpening' => [ + 'createJobOpening' => [ 'multipart/form-data', ], 'getApplicationDetails' => [ @@ -103,10 +106,7 @@ class ApplicantTrackingApi { 'getStatuses' => [ 'application/json', ], - 'postApplicantStatus' => [ - 'application/json', - ], - 'postApplicationComment' => [ + 'updateApplicantStatus' => [ 'application/json', ], ]; @@ -158,14 +158,248 @@ public function getConfig() { } /** - * Operation addNewCandidate + * Operation createApplicationComment + * + * Create Job Application Comment + * + * @param int $application_id The ID of the application to add a comment to. (required) + * @param \BhrSdk\Model\CreateApplicationCommentRequest $create_application_comment_request Comment object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createApplicationComment'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CreateCommentResponse + */ + public function createApplicationComment($application_id, $create_application_comment_request, string $contentType = self::CONTENT_TYPES['createApplicationComment'][0]) { + list($response) = $this->createApplicationCommentWithHttpInfo($application_id, $create_application_comment_request, $contentType); + return $response; + } + + /** + * Operation createApplicationCommentWithHttpInfo + * + * Create Job Application Comment + * + * @param int $application_id The ID of the application to add a comment to. (required) + * @param \BhrSdk\Model\CreateApplicationCommentRequest $create_application_comment_request Comment object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createApplicationComment'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CreateCommentResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createApplicationCommentWithHttpInfo($application_id, $create_application_comment_request, string $contentType = self::CONTENT_TYPES['createApplicationComment'][0]) { + $request = $this->createApplicationCommentRequest($application_id, $create_application_comment_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreateCommentResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreateCommentResponse', + $request, + $response, + ); + } + + /** + * Operation createApplicationCommentAsync + * + * Create Job Application Comment + * + * @param int $application_id The ID of the application to add a comment to. (required) + * @param \BhrSdk\Model\CreateApplicationCommentRequest $create_application_comment_request Comment object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createApplicationComment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createApplicationCommentAsync($application_id, $create_application_comment_request, string $contentType = self::CONTENT_TYPES['createApplicationComment'][0]) { + return $this->createApplicationCommentAsyncWithHttpInfo($application_id, $create_application_comment_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createApplicationCommentAsyncWithHttpInfo + * + * Create Job Application Comment + * + * @param int $application_id The ID of the application to add a comment to. (required) + * @param \BhrSdk\Model\CreateApplicationCommentRequest $create_application_comment_request Comment object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createApplicationComment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createApplicationCommentAsyncWithHttpInfo($application_id, $create_application_comment_request, string $contentType = self::CONTENT_TYPES['createApplicationComment'][0]) { + $returnType = '\BhrSdk\Model\CreateCommentResponse'; + $request = $this->createApplicationCommentRequest($application_id, $create_application_comment_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createApplicationComment' + * + * @param int $application_id The ID of the application to add a comment to. (required) + * @param \BhrSdk\Model\CreateApplicationCommentRequest $create_application_comment_request Comment object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createApplicationComment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createApplicationCommentRequest($application_id, $create_application_comment_request, string $contentType = self::CONTENT_TYPES['createApplicationComment'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'application_id' => $application_id, + 'create_application_comment_request' => $create_application_comment_request, + ], + methodName: 'createApplicationComment' + ); + + $resourcePath = '/api/v1/applicant_tracking/applications/{applicationId}/comments'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($application_id !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue((string) $application_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_application_comment_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_application_comment_request)); + } else { + $httpBody = is_array($create_application_comment_request) ? json_encode($create_application_comment_request) : $create_application_comment_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createCandidate * * Create Candidate * * @param string $first_name The first name of the candidate. (required) * @param string $last_name The last name of the candidate. (required) * @param int $job_id The id of the job opening for the candidate application. (required) - * @param string|null $email The email address of the candidate. (optional) + * @param string|null $email The email address of the candidate. Must be a valid email address. (optional) * @param string|null $phone_number The phone number of the candidate. (optional) * @param string|null $source The source of the candidate application, e.g. LinkedIn, Indeed, etc. (optional) * @param string|null $address The street address of the candidate. (optional) @@ -173,36 +407,36 @@ public function getConfig() { * @param string|null $state The state or province of the candidate. Accepts state name, abbreviation, or ISO code. (optional) * @param string|null $zip The zip code or postal code of the candidate. (optional) * @param string|null $country The country of the candidate. Accepts country name or ISO code. (optional) - * @param string|null $linkedin_url The LinkedIn profile url of the candidate. (optional) - * @param string|null $date_available The available start date of the candidate with the format YYYY-MM-DD. (optional) + * @param string|null $linkedin_url The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. (optional) + * @param \DateTime|null $date_available The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). (optional) * @param string|null $desired_salary The desired salary of the candidate. (optional) * @param string|null $referred_by The person or entity that referred the candidate. (optional) - * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. (optional) + * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. Must be a valid URL. (optional) * @param string|null $highest_education The highest completed education level of the candidate. (optional) * @param string|null $college_name The college or university of the candidate. (optional) * @param string|null $references A list of references supplied by the candidate. (optional) - * @param string|null $resume Resume of the candidate. (optional) - * @param string|null $cover_letter Cover letter of the candidate. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewCandidate'] to see the possible values for this operation + * @param \SplFileObject|null $resume Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param \SplFileObject|null $cover_letter Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCandidate'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\CreateCandidateResponse */ - public function addNewCandidate($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['addNewCandidate'][0]) { - list($response) = $this->addNewCandidateWithHttpInfo($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); + public function createCandidate($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['createCandidate'][0]) { + list($response) = $this->createCandidateWithHttpInfo($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); return $response; } /** - * Operation addNewCandidateWithHttpInfo + * Operation createCandidateWithHttpInfo * * Create Candidate * * @param string $first_name The first name of the candidate. (required) * @param string $last_name The last name of the candidate. (required) * @param int $job_id The id of the job opening for the candidate application. (required) - * @param string|null $email The email address of the candidate. (optional) + * @param string|null $email The email address of the candidate. Must be a valid email address. (optional) * @param string|null $phone_number The phone number of the candidate. (optional) * @param string|null $source The source of the candidate application, e.g. LinkedIn, Indeed, etc. (optional) * @param string|null $address The street address of the candidate. (optional) @@ -210,24 +444,24 @@ public function addNewCandidate($first_name, $last_name, $job_id, $email = null, * @param string|null $state The state or province of the candidate. Accepts state name, abbreviation, or ISO code. (optional) * @param string|null $zip The zip code or postal code of the candidate. (optional) * @param string|null $country The country of the candidate. Accepts country name or ISO code. (optional) - * @param string|null $linkedin_url The LinkedIn profile url of the candidate. (optional) - * @param string|null $date_available The available start date of the candidate with the format YYYY-MM-DD. (optional) + * @param string|null $linkedin_url The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. (optional) + * @param \DateTime|null $date_available The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). (optional) * @param string|null $desired_salary The desired salary of the candidate. (optional) * @param string|null $referred_by The person or entity that referred the candidate. (optional) - * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. (optional) + * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. Must be a valid URL. (optional) * @param string|null $highest_education The highest completed education level of the candidate. (optional) * @param string|null $college_name The college or university of the candidate. (optional) * @param string|null $references A list of references supplied by the candidate. (optional) - * @param string|null $resume Resume of the candidate. (optional) - * @param string|null $cover_letter Cover letter of the candidate. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewCandidate'] to see the possible values for this operation + * @param \SplFileObject|null $resume Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param \SplFileObject|null $cover_letter Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCandidate'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\CreateCandidateResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addNewCandidateWithHttpInfo($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['addNewCandidate'][0]) { - $request = $this->addNewCandidateRequest($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); + public function createCandidateWithHttpInfo($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['createCandidate'][0]) { + $request = $this->createCandidateRequest($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -235,22 +469,44 @@ public function addNewCandidateWithHttpInfo($first_name, $last_name, $job_id, $e $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreateCandidateResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\CreateCandidateResponse', $request, $response, ); } /** - * Operation addNewCandidateAsync + * Operation createCandidateAsync * * Create Candidate * * @param string $first_name The first name of the candidate. (required) * @param string $last_name The last name of the candidate. (required) * @param int $job_id The id of the job opening for the candidate application. (required) - * @param string|null $email The email address of the candidate. (optional) + * @param string|null $email The email address of the candidate. Must be a valid email address. (optional) * @param string|null $phone_number The phone number of the candidate. (optional) * @param string|null $source The source of the candidate application, e.g. LinkedIn, Indeed, etc. (optional) * @param string|null $address The street address of the candidate. (optional) @@ -258,23 +514,23 @@ public function addNewCandidateWithHttpInfo($first_name, $last_name, $job_id, $e * @param string|null $state The state or province of the candidate. Accepts state name, abbreviation, or ISO code. (optional) * @param string|null $zip The zip code or postal code of the candidate. (optional) * @param string|null $country The country of the candidate. Accepts country name or ISO code. (optional) - * @param string|null $linkedin_url The LinkedIn profile url of the candidate. (optional) - * @param string|null $date_available The available start date of the candidate with the format YYYY-MM-DD. (optional) + * @param string|null $linkedin_url The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. (optional) + * @param \DateTime|null $date_available The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). (optional) * @param string|null $desired_salary The desired salary of the candidate. (optional) * @param string|null $referred_by The person or entity that referred the candidate. (optional) - * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. (optional) + * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. Must be a valid URL. (optional) * @param string|null $highest_education The highest completed education level of the candidate. (optional) * @param string|null $college_name The college or university of the candidate. (optional) * @param string|null $references A list of references supplied by the candidate. (optional) - * @param string|null $resume Resume of the candidate. (optional) - * @param string|null $cover_letter Cover letter of the candidate. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewCandidate'] to see the possible values for this operation + * @param \SplFileObject|null $resume Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param \SplFileObject|null $cover_letter Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCandidate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewCandidateAsync($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['addNewCandidate'][0]) { - return $this->addNewCandidateAsyncWithHttpInfo($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType) + public function createCandidateAsync($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['createCandidate'][0]) { + return $this->createCandidateAsyncWithHttpInfo($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType) ->then( function ($response) { return $response[0]; @@ -283,14 +539,14 @@ function ($response) { } /** - * Operation addNewCandidateAsyncWithHttpInfo + * Operation createCandidateAsyncWithHttpInfo * * Create Candidate * * @param string $first_name The first name of the candidate. (required) * @param string $last_name The last name of the candidate. (required) * @param int $job_id The id of the job opening for the candidate application. (required) - * @param string|null $email The email address of the candidate. (optional) + * @param string|null $email The email address of the candidate. Must be a valid email address. (optional) * @param string|null $phone_number The phone number of the candidate. (optional) * @param string|null $source The source of the candidate application, e.g. LinkedIn, Indeed, etc. (optional) * @param string|null $address The street address of the candidate. (optional) @@ -298,33 +554,35 @@ function ($response) { * @param string|null $state The state or province of the candidate. Accepts state name, abbreviation, or ISO code. (optional) * @param string|null $zip The zip code or postal code of the candidate. (optional) * @param string|null $country The country of the candidate. Accepts country name or ISO code. (optional) - * @param string|null $linkedin_url The LinkedIn profile url of the candidate. (optional) - * @param string|null $date_available The available start date of the candidate with the format YYYY-MM-DD. (optional) + * @param string|null $linkedin_url The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. (optional) + * @param \DateTime|null $date_available The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). (optional) * @param string|null $desired_salary The desired salary of the candidate. (optional) * @param string|null $referred_by The person or entity that referred the candidate. (optional) - * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. (optional) + * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. Must be a valid URL. (optional) * @param string|null $highest_education The highest completed education level of the candidate. (optional) * @param string|null $college_name The college or university of the candidate. (optional) * @param string|null $references A list of references supplied by the candidate. (optional) - * @param string|null $resume Resume of the candidate. (optional) - * @param string|null $cover_letter Cover letter of the candidate. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewCandidate'] to see the possible values for this operation + * @param \SplFileObject|null $resume Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param \SplFileObject|null $cover_letter Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCandidate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewCandidateAsyncWithHttpInfo($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['addNewCandidate'][0]) { - - $request = $this->addNewCandidateRequest($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); + public function createCandidateAsyncWithHttpInfo($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['createCandidate'][0]) { + $returnType = '\BhrSdk\Model\CreateCandidateResponse'; + $request = $this->createCandidateRequest($first_name, $last_name, $job_id, $email, $phone_number, $source, $address, $city, $state, $zip, $country, $linkedin_url, $date_available, $desired_salary, $referred_by, $website_url, $highest_education, $college_name, $references, $resume, $cover_letter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -347,12 +605,12 @@ function ($exception) { } /** - * Create request for operation 'addNewCandidate' + * Create request for operation 'createCandidate' * * @param string $first_name The first name of the candidate. (required) * @param string $last_name The last name of the candidate. (required) * @param int $job_id The id of the job opening for the candidate application. (required) - * @param string|null $email The email address of the candidate. (optional) + * @param string|null $email The email address of the candidate. Must be a valid email address. (optional) * @param string|null $phone_number The phone number of the candidate. (optional) * @param string|null $source The source of the candidate application, e.g. LinkedIn, Indeed, etc. (optional) * @param string|null $address The street address of the candidate. (optional) @@ -360,22 +618,22 @@ function ($exception) { * @param string|null $state The state or province of the candidate. Accepts state name, abbreviation, or ISO code. (optional) * @param string|null $zip The zip code or postal code of the candidate. (optional) * @param string|null $country The country of the candidate. Accepts country name or ISO code. (optional) - * @param string|null $linkedin_url The LinkedIn profile url of the candidate. (optional) - * @param string|null $date_available The available start date of the candidate with the format YYYY-MM-DD. (optional) + * @param string|null $linkedin_url The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`. (optional) + * @param \DateTime|null $date_available The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`). (optional) * @param string|null $desired_salary The desired salary of the candidate. (optional) * @param string|null $referred_by The person or entity that referred the candidate. (optional) - * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. (optional) + * @param string|null $website_url The personal website, blog, or online portfolio of the candidate. Must be a valid URL. (optional) * @param string|null $highest_education The highest completed education level of the candidate. (optional) * @param string|null $college_name The college or university of the candidate. (optional) * @param string|null $references A list of references supplied by the candidate. (optional) - * @param string|null $resume Resume of the candidate. (optional) - * @param string|null $cover_letter Cover letter of the candidate. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewCandidate'] to see the possible values for this operation + * @param \SplFileObject|null $resume Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param \SplFileObject|null $cover_letter Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCandidate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addNewCandidateRequest($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['addNewCandidate'][0]) { + public function createCandidateRequest($first_name, $last_name, $job_id, $email = null, $phone_number = null, $source = null, $address = null, $city = null, $state = null, $zip = null, $country = null, $linkedin_url = null, $date_available = null, $desired_salary = null, $referred_by = null, $website_url = null, $highest_education = null, $college_name = null, $references = null, $resume = null, $cover_letter = null, string $contentType = self::CONTENT_TYPES['createCandidate'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -383,7 +641,7 @@ public function addNewCandidateRequest($first_name, $last_name, $job_id, $email 'last_name' => $last_name, 'job_id' => $job_id, ], - methodName: 'addNewCandidate' + methodName: 'createCandidate' ); $resourcePath = '/api/v1/applicant_tracking/application'; @@ -500,7 +758,7 @@ public function addNewCandidateRequest($first_name, $last_name, $job_id, $email } /** - * Operation addNewJobOpening + * Operation createJobOpening * * Create Job Opening * @@ -525,19 +783,20 @@ public function addNewCandidateRequest($first_name, $last_name, $job_id, $email * @param string|null $application_question_college Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). (optional) * @param string|null $application_question_references Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). (optional) * @param string|null $internal_job_code The internal job code for the job opening. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewJobOpening'] to see the possible values for this operation + * @param int|null $location_type The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createJobOpening'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\CreateJobOpeningResponse */ - public function addNewJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, string $contentType = self::CONTENT_TYPES['addNewJobOpening'][0]) { - list($response) = $this->addNewJobOpeningWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $contentType); + public function createJobOpening($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, $location_type = null, string $contentType = self::CONTENT_TYPES['createJobOpening'][0]) { + list($response) = $this->createJobOpeningWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type, $contentType); return $response; } /** - * Operation addNewJobOpeningWithHttpInfo + * Operation createJobOpeningWithHttpInfo * * Create Job Opening * @@ -562,14 +821,15 @@ public function addNewJobOpening($posting_title, $job_status, $hiring_lead, $emp * @param string|null $application_question_college Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). (optional) * @param string|null $application_question_references Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). (optional) * @param string|null $internal_job_code The internal job code for the job opening. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewJobOpening'] to see the possible values for this operation + * @param int|null $location_type The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createJobOpening'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\CreateJobOpeningResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addNewJobOpeningWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, string $contentType = self::CONTENT_TYPES['addNewJobOpening'][0]) { - $request = $this->addNewJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $contentType); + public function createJobOpeningWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, $location_type = null, string $contentType = self::CONTENT_TYPES['createJobOpening'][0]) { + $request = $this->createJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -577,15 +837,37 @@ public function addNewJobOpeningWithHttpInfo($posting_title, $job_status, $hirin $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreateJobOpeningResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\CreateJobOpeningResponse', $request, $response, ); } /** - * Operation addNewJobOpeningAsync + * Operation createJobOpeningAsync * * Create Job Opening * @@ -610,13 +892,14 @@ public function addNewJobOpeningWithHttpInfo($posting_title, $job_status, $hirin * @param string|null $application_question_college Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). (optional) * @param string|null $application_question_references Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). (optional) * @param string|null $internal_job_code The internal job code for the job opening. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewJobOpening'] to see the possible values for this operation + * @param int|null $location_type The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createJobOpening'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewJobOpeningAsync($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, string $contentType = self::CONTENT_TYPES['addNewJobOpening'][0]) { - return $this->addNewJobOpeningAsyncWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $contentType) + public function createJobOpeningAsync($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, $location_type = null, string $contentType = self::CONTENT_TYPES['createJobOpening'][0]) { + return $this->createJobOpeningAsyncWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type, $contentType) ->then( function ($response) { return $response[0]; @@ -625,7 +908,7 @@ function ($response) { } /** - * Operation addNewJobOpeningAsyncWithHttpInfo + * Operation createJobOpeningAsyncWithHttpInfo * * Create Job Opening * @@ -650,23 +933,26 @@ function ($response) { * @param string|null $application_question_college Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). (optional) * @param string|null $application_question_references Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). (optional) * @param string|null $internal_job_code The internal job code for the job opening. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewJobOpening'] to see the possible values for this operation + * @param int|null $location_type The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createJobOpening'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewJobOpeningAsyncWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, string $contentType = self::CONTENT_TYPES['addNewJobOpening'][0]) { - - $request = $this->addNewJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $contentType); + public function createJobOpeningAsyncWithHttpInfo($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, $location_type = null, string $contentType = self::CONTENT_TYPES['createJobOpening'][0]) { + $returnType = '\BhrSdk\Model\CreateJobOpeningResponse'; + $request = $this->createJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department, $minimum_experience, $compensation, $job_location, $application_question_resume, $application_question_address, $application_question_linkedin_url, $application_question_date_available, $application_question_desired_salary, $application_question_cover_letter, $application_question_referred_by, $application_question_website_url, $application_question_highest_education, $application_question_college, $application_question_references, $internal_job_code, $location_type, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -689,7 +975,7 @@ function ($exception) { } /** - * Create request for operation 'addNewJobOpening' + * Create request for operation 'createJobOpening' * * @param string $posting_title The posting title of the job opening. (required) * @param string $job_status The status of the job opening. (required) @@ -712,12 +998,13 @@ function ($exception) { * @param string|null $application_question_college Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required). (optional) * @param string|null $application_question_references Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required). (optional) * @param string|null $internal_job_code The internal job code for the job opening. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewJobOpening'] to see the possible values for this operation + * @param int|null $location_type The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createJobOpening'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addNewJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, string $contentType = self::CONTENT_TYPES['addNewJobOpening'][0]) { + public function createJobOpeningRequest($posting_title, $job_status, $hiring_lead, $employment_type, $job_description, $department = null, $minimum_experience = null, $compensation = null, $job_location = null, $application_question_resume = null, $application_question_address = null, $application_question_linkedin_url = null, $application_question_date_available = null, $application_question_desired_salary = null, $application_question_cover_letter = null, $application_question_referred_by = null, $application_question_website_url = null, $application_question_highest_education = null, $application_question_college = null, $application_question_references = null, $internal_job_code = null, $location_type = null, string $contentType = self::CONTENT_TYPES['createJobOpening'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -727,7 +1014,7 @@ public function addNewJobOpeningRequest($posting_title, $job_status, $hiring_lea 'employment_type' => $employment_type, 'job_description' => $job_description, ], - methodName: 'addNewJobOpening' + methodName: 'createJobOpening' ); $resourcePath = '/api/v1/applicant_tracking/job_opening'; @@ -763,6 +1050,7 @@ public function addNewJobOpeningRequest($posting_title, $job_status, $hiring_lea 'applicationQuestionCollege' => $application_question_college, 'applicationQuestionReferences' => $application_question_references, 'internalJobCode' => $internal_job_code, + 'locationType' => $location_type, ]); $formParams = $formDataProcessor->flatten($formData); @@ -848,7 +1136,7 @@ public function addNewJobOpeningRequest($posting_title, $job_status, $hiring_lea * * Get Job Application Details * - * @param int $application_id The ID of the application to look up details. (required) + * @param int $application_id The ID of the application to retrieve details for. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplicationDetails'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -865,7 +1153,7 @@ public function getApplicationDetails($application_id, string $contentType = sel * * Get Job Application Details * - * @param int $application_id The ID of the application to look up details. (required) + * @param int $application_id The ID of the application to retrieve details for. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplicationDetails'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -915,7 +1203,7 @@ public function getApplicationDetailsWithHttpInfo($application_id, string $conte * * Get Job Application Details * - * @param int $application_id The ID of the application to look up details. (required) + * @param int $application_id The ID of the application to retrieve details for. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplicationDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -935,7 +1223,7 @@ function ($response) { * * Get Job Application Details * - * @param int $application_id The ID of the application to look up details. (required) + * @param int $application_id The ID of the application to retrieve details for. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplicationDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -979,7 +1267,7 @@ function ($exception) { /** * Create request for operation 'getApplicationDetails' * - * @param int $application_id The ID of the application to look up details. (required) + * @param int $application_id The ID of the application to retrieve details for. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplicationDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1068,13 +1356,13 @@ public function getApplicationDetailsRequest($application_id, string $contentTyp * * @param int|null $page The page number (optional) * @param int|null $job_id A Job Id to limit results to (optional) - * @param int|null $application_status_id Application status id to filter by. (optional) - * @param string|null $application_status A list of application status groups to filter by. (optional) - * @param string|null $job_status_groups A list of position status groups to filter by. (optional) + * @param string|null $application_status_id One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). (optional) + * @param string|null $application_status One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. (optional) + * @param string|null $job_status_groups One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. (optional) * @param string|null $search_string A general search criteria by which to find applications. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) - * @param \DateTime|null $new_since Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 (optional) + * @param string|null $new_since Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplications'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -1093,13 +1381,13 @@ public function getApplications($page = null, $job_id = null, $application_statu * * @param int|null $page The page number (optional) * @param int|null $job_id A Job Id to limit results to (optional) - * @param int|null $application_status_id Application status id to filter by. (optional) - * @param string|null $application_status A list of application status groups to filter by. (optional) - * @param string|null $job_status_groups A list of position status groups to filter by. (optional) + * @param string|null $application_status_id One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). (optional) + * @param string|null $application_status One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. (optional) + * @param string|null $job_status_groups One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. (optional) * @param string|null $search_string A general search criteria by which to find applications. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) - * @param \DateTime|null $new_since Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 (optional) + * @param string|null $new_since Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplications'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -1151,13 +1439,13 @@ public function getApplicationsWithHttpInfo($page = null, $job_id = null, $appli * * @param int|null $page The page number (optional) * @param int|null $job_id A Job Id to limit results to (optional) - * @param int|null $application_status_id Application status id to filter by. (optional) - * @param string|null $application_status A list of application status groups to filter by. (optional) - * @param string|null $job_status_groups A list of position status groups to filter by. (optional) + * @param string|null $application_status_id One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). (optional) + * @param string|null $application_status One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. (optional) + * @param string|null $job_status_groups One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. (optional) * @param string|null $search_string A general search criteria by which to find applications. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) - * @param \DateTime|null $new_since Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 (optional) + * @param string|null $new_since Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplications'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1179,13 +1467,13 @@ function ($response) { * * @param int|null $page The page number (optional) * @param int|null $job_id A Job Id to limit results to (optional) - * @param int|null $application_status_id Application status id to filter by. (optional) - * @param string|null $application_status A list of application status groups to filter by. (optional) - * @param string|null $job_status_groups A list of position status groups to filter by. (optional) + * @param string|null $application_status_id One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). (optional) + * @param string|null $application_status One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. (optional) + * @param string|null $job_status_groups One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. (optional) * @param string|null $search_string A general search criteria by which to find applications. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) - * @param \DateTime|null $new_since Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 (optional) + * @param string|null $new_since Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplications'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1231,13 +1519,13 @@ function ($exception) { * * @param int|null $page The page number (optional) * @param int|null $job_id A Job Id to limit results to (optional) - * @param int|null $application_status_id Application status id to filter by. (optional) - * @param string|null $application_status A list of application status groups to filter by. (optional) - * @param string|null $job_status_groups A list of position status groups to filter by. (optional) + * @param string|null $application_status_id One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`). (optional) + * @param string|null $application_status One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`. (optional) + * @param string|null $job_status_groups One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. (optional) * @param string|null $search_string A general search criteria by which to find applications. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) - * @param \DateTime|null $new_since Only get applications newer than a given UTC timestamp, for example 2024-01-01 13:00:00 (optional) + * @param string|null $new_since Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getApplications'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1256,7 +1544,7 @@ public function getApplicationsRequest($page = null, $job_id = null, $applicatio $parameters = [ 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], 'jobId' => ['value' => $job_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], - 'applicationStatusId' => ['value' => $application_status_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'applicationStatusId' => ['value' => $application_status_id, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'applicationStatus' => ['value' => $application_status, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'jobStatusGroups' => ['value' => $job_status_groups, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'searchString' => ['value' => $search_string, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], @@ -1336,7 +1624,7 @@ public function getApplicationsRequest($page = null, $job_id = null, $applicatio * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\LocationsList[] + * @return \BhrSdk\Model\Location[] */ public function getCompanyLocations(string $contentType = self::CONTENT_TYPES['getCompanyLocations'][0]) { list($response) = $this->getCompanyLocationsWithHttpInfo($contentType); @@ -1352,7 +1640,7 @@ public function getCompanyLocations(string $contentType = self::CONTENT_TYPES['g * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\LocationsList[], HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\Location[], HTTP status code, HTTP response headers (array of strings) */ public function getCompanyLocationsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCompanyLocations'][0]) { $request = $this->getCompanyLocationsRequest($contentType); @@ -1366,7 +1654,7 @@ public function getCompanyLocationsWithHttpInfo(string $contentType = self::CONT switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\LocationsList[]', + '\BhrSdk\Model\Location[]', $request, $response, ); @@ -1386,7 +1674,7 @@ public function getCompanyLocationsWithHttpInfo(string $contentType = self::CONT } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\LocationsList[]', + '\BhrSdk\Model\Location[]', $request, $response, ); @@ -1422,7 +1710,7 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function getCompanyLocationsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCompanyLocations'][0]) { - $returnType = '\BhrSdk\Model\LocationsList[]'; + $returnType = '\BhrSdk\Model\Location[]'; $request = $this->getCompanyLocationsRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) @@ -1533,7 +1821,7 @@ public function getCompanyLocationsRequest(string $contentType = self::CONTENT_T * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\HiringLeadsList[] + * @return \BhrSdk\Model\HiringLead[] */ public function getHiringLeads(string $contentType = self::CONTENT_TYPES['getHiringLeads'][0]) { list($response) = $this->getHiringLeadsWithHttpInfo($contentType); @@ -1549,7 +1837,7 @@ public function getHiringLeads(string $contentType = self::CONTENT_TYPES['getHir * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\HiringLeadsList[], HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\HiringLead[], HTTP status code, HTTP response headers (array of strings) */ public function getHiringLeadsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getHiringLeads'][0]) { $request = $this->getHiringLeadsRequest($contentType); @@ -1563,7 +1851,7 @@ public function getHiringLeadsWithHttpInfo(string $contentType = self::CONTENT_T switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\HiringLeadsList[]', + '\BhrSdk\Model\HiringLead[]', $request, $response, ); @@ -1583,7 +1871,7 @@ public function getHiringLeadsWithHttpInfo(string $contentType = self::CONTENT_T } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\HiringLeadsList[]', + '\BhrSdk\Model\HiringLead[]', $request, $response, ); @@ -1619,7 +1907,7 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function getHiringLeadsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getHiringLeads'][0]) { - $returnType = '\BhrSdk\Model\HiringLeadsList[]'; + $returnType = '\BhrSdk\Model\HiringLead[]'; $request = $this->getHiringLeadsRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) @@ -1726,17 +2014,18 @@ public function getHiringLeadsRequest(string $contentType = self::CONTENT_TYPES[ * * Get Job Summaries * - * @param string|null $status_groups A list of status groups to filter positions by. (optional) + * @param string|null $status_groups One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. (optional) + * @param string|null $status_ids One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getJobSummaries'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\JobSummary[] */ - public function getJobSummaries($status_groups = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { - list($response) = $this->getJobSummariesWithHttpInfo($status_groups, $sort_by, $sort_order, $contentType); + public function getJobSummaries($status_groups = null, $status_ids = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { + list($response) = $this->getJobSummariesWithHttpInfo($status_groups, $status_ids, $sort_by, $sort_order, $contentType); return $response; } @@ -1745,17 +2034,18 @@ public function getJobSummaries($status_groups = null, $sort_by = null, $sort_or * * Get Job Summaries * - * @param string|null $status_groups A list of status groups to filter positions by. (optional) + * @param string|null $status_groups One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. (optional) + * @param string|null $status_ids One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getJobSummaries'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\JobSummary[], HTTP status code, HTTP response headers (array of strings) */ - public function getJobSummariesWithHttpInfo($status_groups = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { - $request = $this->getJobSummariesRequest($status_groups, $sort_by, $sort_order, $contentType); + public function getJobSummariesWithHttpInfo($status_groups = null, $status_ids = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { + $request = $this->getJobSummariesRequest($status_groups, $status_ids, $sort_by, $sort_order, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1763,8 +2053,30 @@ public function getJobSummariesWithHttpInfo($status_groups = null, $sort_by = nu $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\JobSummary[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\JobSummary[]', $request, $response, ); @@ -1775,7 +2087,8 @@ public function getJobSummariesWithHttpInfo($status_groups = null, $sort_by = nu * * Get Job Summaries * - * @param string|null $status_groups A list of status groups to filter positions by. (optional) + * @param string|null $status_groups One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. (optional) + * @param string|null $status_ids One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getJobSummaries'] to see the possible values for this operation @@ -1783,8 +2096,8 @@ public function getJobSummariesWithHttpInfo($status_groups = null, $sort_by = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJobSummariesAsync($status_groups = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { - return $this->getJobSummariesAsyncWithHttpInfo($status_groups, $sort_by, $sort_order, $contentType) + public function getJobSummariesAsync($status_groups = null, $status_ids = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { + return $this->getJobSummariesAsyncWithHttpInfo($status_groups, $status_ids, $sort_by, $sort_order, $contentType) ->then( function ($response) { return $response[0]; @@ -1797,7 +2110,8 @@ function ($response) { * * Get Job Summaries * - * @param string|null $status_groups A list of status groups to filter positions by. (optional) + * @param string|null $status_groups One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. (optional) + * @param string|null $status_ids One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getJobSummaries'] to see the possible values for this operation @@ -1805,18 +2119,20 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJobSummariesAsyncWithHttpInfo($status_groups = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { - - $request = $this->getJobSummariesRequest($status_groups, $sort_by, $sort_order, $contentType); + public function getJobSummariesAsyncWithHttpInfo($status_groups = null, $status_ids = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { + $returnType = '\BhrSdk\Model\JobSummary[]'; + $request = $this->getJobSummariesRequest($status_groups, $status_ids, $sort_by, $sort_order, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1841,7 +2157,8 @@ function ($exception) { /** * Create request for operation 'getJobSummaries' * - * @param string|null $status_groups A list of status groups to filter positions by. (optional) + * @param string|null $status_groups One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. (optional) + * @param string|null $status_ids One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided. (optional) * @param string|null $sort_by A specific field to sort the results by. (optional) * @param string|null $sort_order Order by which to sort results. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getJobSummaries'] to see the possible values for this operation @@ -1849,7 +2166,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getJobSummariesRequest($status_groups = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { + public function getJobSummariesRequest($status_groups = null, $status_ids = null, $sort_by = null, $sort_order = null, string $contentType = self::CONTENT_TYPES['getJobSummaries'][0]) { $resourcePath = '/api/v1/applicant_tracking/jobs'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); @@ -1861,6 +2178,7 @@ public function getJobSummariesRequest($status_groups = null, $sort_by = null, $ $parameters = [ 'statusGroups' => ['value' => $status_groups, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'status_ids' => ['value' => $status_ids, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'sortBy' => ['value' => $sort_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'sortOrder' => ['value' => $sort_order, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], ]; @@ -1936,7 +2254,7 @@ public function getJobSummariesRequest($status_groups = null, $sort_by = null, $ * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ApplicantStatus[] */ public function getStatuses(string $contentType = self::CONTENT_TYPES['getStatuses'][0]) { list($response) = $this->getStatusesWithHttpInfo($contentType); @@ -1952,7 +2270,7 @@ public function getStatuses(string $contentType = self::CONTENT_TYPES['getStatus * * @throws \BhrSdk\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 \BhrSdk\Model\ApplicantStatus[], HTTP status code, HTTP response headers (array of strings) */ public function getStatusesWithHttpInfo(string $contentType = self::CONTENT_TYPES['getStatuses'][0]) { $request = $this->getStatusesRequest($contentType); @@ -1963,8 +2281,30 @@ public function getStatusesWithHttpInfo(string $contentType = self::CONTENT_TYPE $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ApplicantStatus[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\ApplicantStatus[]', $request, $response, ); @@ -2000,17 +2340,19 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function getStatusesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getStatuses'][0]) { - + $returnType = '\BhrSdk\Model\ApplicantStatus[]'; $request = $this->getStatusesRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2101,38 +2443,38 @@ public function getStatusesRequest(string $contentType = self::CONTENT_TYPES['ge } /** - * Operation postApplicantStatus + * Operation updateApplicantStatus * * Update Applicant Status * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicantStatusRequest $post_applicant_status_request Sample Post Data. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicantStatus'] to see the possible values for this operation + * @param int $application_id The ID of the application whose status should be updated. (required) + * @param \BhrSdk\Model\UpdateApplicantStatusRequest $update_applicant_status_request The new status to assign to the application. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateApplicantStatus'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\UpdateApplicantStatusResponse */ - public function postApplicantStatus($application_id, $post_applicant_status_request, string $contentType = self::CONTENT_TYPES['postApplicantStatus'][0]) { - list($response) = $this->postApplicantStatusWithHttpInfo($application_id, $post_applicant_status_request, $contentType); + public function updateApplicantStatus($application_id, $update_applicant_status_request, string $contentType = self::CONTENT_TYPES['updateApplicantStatus'][0]) { + list($response) = $this->updateApplicantStatusWithHttpInfo($application_id, $update_applicant_status_request, $contentType); return $response; } /** - * Operation postApplicantStatusWithHttpInfo + * Operation updateApplicantStatusWithHttpInfo * * Update Applicant Status * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicantStatusRequest $post_applicant_status_request Sample Post Data. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicantStatus'] to see the possible values for this operation + * @param int $application_id The ID of the application whose status should be updated. (required) + * @param \BhrSdk\Model\UpdateApplicantStatusRequest $update_applicant_status_request The new status to assign to the application. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateApplicantStatus'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\UpdateApplicantStatusResponse, HTTP status code, HTTP response headers (array of strings) */ - public function postApplicantStatusWithHttpInfo($application_id, $post_applicant_status_request, string $contentType = self::CONTENT_TYPES['postApplicantStatus'][0]) { - $request = $this->postApplicantStatusRequest($application_id, $post_applicant_status_request, $contentType); + public function updateApplicantStatusWithHttpInfo($application_id, $update_applicant_status_request, string $contentType = self::CONTENT_TYPES['updateApplicantStatus'][0]) { + $request = $this->updateApplicantStatusRequest($application_id, $update_applicant_status_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2140,237 +2482,49 @@ public function postApplicantStatusWithHttpInfo($application_id, $post_applicant $statusCode = $response->getStatusCode(); - return ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type - $request, - $response, - ); - } - - /** - * Operation postApplicantStatusAsync - * - * Update Applicant Status - * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicantStatusRequest $post_applicant_status_request Sample Post Data. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicantStatus'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function postApplicantStatusAsync($application_id, $post_applicant_status_request, string $contentType = self::CONTENT_TYPES['postApplicantStatus'][0]) { - return $this->postApplicantStatusAsyncWithHttpInfo($application_id, $post_applicant_status_request, $contentType) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation postApplicantStatusAsyncWithHttpInfo - * - * Update Applicant Status - * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicantStatusRequest $post_applicant_status_request Sample Post Data. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicantStatus'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function postApplicantStatusAsyncWithHttpInfo($application_id, $post_applicant_status_request, string $contentType = self::CONTENT_TYPES['postApplicantStatus'][0]) { - - $request = $this->postApplicantStatusRequest($application_id, $post_applicant_status_request, $contentType); - - return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) - ->then( - function ($response) { - $content = (string) $response->getBody(); - $content = json_decode($content); - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $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 'postApplicantStatus' - * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicantStatusRequest $post_applicant_status_request Sample Post Data. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicantStatus'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function postApplicantStatusRequest($application_id, $post_applicant_status_request, string $contentType = self::CONTENT_TYPES['postApplicantStatus'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'application_id' => $application_id, - 'post_applicant_status_request' => $post_applicant_status_request, - ], - methodName: 'postApplicantStatus' - ); - - $resourcePath = '/api/v1/applicant_tracking/applications/{applicationId}/status'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); - - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // path params - if ($application_id !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue((string) $application_id), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json', ], - $contentType, - $multipart - ); - - // for model (json/xml) - if (isset($post_applicant_status_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_applicant_status_request)); - } else { - $httpBody = is_array($post_applicant_status_request) ? json_encode($post_applicant_status_request) : $post_applicant_status_request; - } - } - - // Authentication methods - - // Basic authentication - if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { - $this->logger?->info('Using Basic authentication'); - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth/Bearer authentication - if (!empty($this->config->getAccessToken())) { - $this->logger?->info('Using Bearer authentication'); - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateApplicantStatusResponse', + $request, + $response, + ); } - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - // Special handling for accept_header_parameter to set the Accept header directly - /** @phpstan-ignore-next-line */ - if (isset($accept_header_parameter) && $accept_header_parameter !== null) { - $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); - /** @phpstan-ignore-next-line */ - $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + 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() + ); } - $operationHost = $this->config->getHost(); - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - is_string($httpBody) ? $httpBody : (string)$httpBody - ); - } - - /** - * Operation postApplicationComment - * - * Create Job Application Comment - * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicationCommentRequest $post_application_comment_request Comment object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicationComment'] to see the possible values for this operation - * - * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format - * @throws \InvalidArgumentException - * @return mixed - */ - public function postApplicationComment($application_id, $post_application_comment_request, string $contentType = self::CONTENT_TYPES['postApplicationComment'][0]) { - list($response) = $this->postApplicationCommentWithHttpInfo($application_id, $post_application_comment_request, $contentType); - return $response; - } - - /** - * Operation postApplicationCommentWithHttpInfo - * - * Create Job Application Comment - * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicationCommentRequest $post_application_comment_request Comment object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicationComment'] to see the possible values for this operation - * - * @throws \BhrSdk\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 postApplicationCommentWithHttpInfo($application_id, $post_application_comment_request, string $contentType = self::CONTENT_TYPES['postApplicationComment'][0]) { - $request = $this->postApplicationCommentRequest($application_id, $post_application_comment_request, $contentType); - $options = ApiHelper::createHttpClientOption($this->config); - - // Send request with retry support for timeout errors - $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); - - $statusCode = $response->getStatusCode(); - return ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\UpdateApplicantStatusResponse', $request, $response, ); } /** - * Operation postApplicationCommentAsync + * Operation updateApplicantStatusAsync * - * Create Job Application Comment + * Update Applicant Status * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicationCommentRequest $post_application_comment_request Comment object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicationComment'] to see the possible values for this operation + * @param int $application_id The ID of the application whose status should be updated. (required) + * @param \BhrSdk\Model\UpdateApplicantStatusRequest $update_applicant_status_request The new status to assign to the application. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateApplicantStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postApplicationCommentAsync($application_id, $post_application_comment_request, string $contentType = self::CONTENT_TYPES['postApplicationComment'][0]) { - return $this->postApplicationCommentAsyncWithHttpInfo($application_id, $post_application_comment_request, $contentType) + public function updateApplicantStatusAsync($application_id, $update_applicant_status_request, string $contentType = self::CONTENT_TYPES['updateApplicantStatus'][0]) { + return $this->updateApplicantStatusAsyncWithHttpInfo($application_id, $update_applicant_status_request, $contentType) ->then( function ($response) { return $response[0]; @@ -2379,29 +2533,31 @@ function ($response) { } /** - * Operation postApplicationCommentAsyncWithHttpInfo + * Operation updateApplicantStatusAsyncWithHttpInfo * - * Create Job Application Comment + * Update Applicant Status * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicationCommentRequest $post_application_comment_request Comment object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicationComment'] to see the possible values for this operation + * @param int $application_id The ID of the application whose status should be updated. (required) + * @param \BhrSdk\Model\UpdateApplicantStatusRequest $update_applicant_status_request The new status to assign to the application. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateApplicantStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postApplicationCommentAsyncWithHttpInfo($application_id, $post_application_comment_request, string $contentType = self::CONTENT_TYPES['postApplicationComment'][0]) { - - $request = $this->postApplicationCommentRequest($application_id, $post_application_comment_request, $contentType); + public function updateApplicantStatusAsyncWithHttpInfo($application_id, $update_applicant_status_request, string $contentType = self::CONTENT_TYPES['updateApplicantStatus'][0]) { + $returnType = '\BhrSdk\Model\UpdateApplicantStatusResponse'; + $request = $this->updateApplicantStatusRequest($application_id, $update_applicant_status_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2424,26 +2580,26 @@ function ($exception) { } /** - * Create request for operation 'postApplicationComment' + * Create request for operation 'updateApplicantStatus' * - * @param int $application_id The ID of the application to add a comment to. (required) - * @param \BhrSdk\Model\PostApplicationCommentRequest $post_application_comment_request Comment object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postApplicationComment'] to see the possible values for this operation + * @param int $application_id The ID of the application whose status should be updated. (required) + * @param \BhrSdk\Model\UpdateApplicantStatusRequest $update_applicant_status_request The new status to assign to the application. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateApplicantStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postApplicationCommentRequest($application_id, $post_application_comment_request, string $contentType = self::CONTENT_TYPES['postApplicationComment'][0]) { + public function updateApplicantStatusRequest($application_id, $update_applicant_status_request, string $contentType = self::CONTENT_TYPES['updateApplicantStatus'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'application_id' => $application_id, - 'post_application_comment_request' => $post_application_comment_request, + 'update_applicant_status_request' => $update_applicant_status_request, ], - methodName: 'postApplicationComment' + methodName: 'updateApplicantStatus' ); - $resourcePath = '/api/v1/applicant_tracking/applications/{applicationId}/comments'; + $resourcePath = '/api/v1/applicant_tracking/applications/{applicationId}/status'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; @@ -2461,18 +2617,18 @@ public function postApplicationCommentRequest($application_id, $post_application } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', 'text/html', ], $contentType, $multipart ); // for model (json/xml) - if (isset($post_application_comment_request)) { + if (isset($update_applicant_status_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_application_comment_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_applicant_status_request)); } else { - $httpBody = is_array($post_application_comment_request) ? json_encode($post_application_comment_request) : $post_application_comment_request; + $httpBody = is_array($update_applicant_status_request) ? json_encode($update_applicant_status_request) : $update_applicant_status_request; } } diff --git a/lib/Api/BenefitsApi.php b/lib/Api/BenefitsApi.php index 4ed1bd2e..f9731f1e 100644 --- a/lib/Api/BenefitsApi.php +++ b/lib/Api/BenefitsApi.php @@ -79,26 +79,37 @@ class BenefitsApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addEmployeeDependent' => [ + 'createEmployeeDependent' => [ 'application/json', + 'application/xml', ], - 'getBenefitCoverages' => [ + 'getEmployeeDependent' => [ 'application/json', ], - 'getBenefitDeductionTypes' => [ + 'listBenefitCoverages' => [ 'application/json', ], - 'getEmployeeDependent' => [ + 'listBenefitDeductionTypes' => [ + 'application/json', + ], + 'listCompanyBenefits' => [ + 'application/json', + ], + 'listEmployeeBenefits' => [ + 'application/json', + ], + 'listEmployeeDependents' => [ 'application/json', ], - 'getEmployeeDependents' => [ + 'listMemberBenefitEvents' => [ 'application/json', ], - 'getMemberBenefit' => [ + 'listMemberBenefits' => [ 'application/json', ], 'updateEmployeeDependent' => [ 'application/json', + 'application/xml', ], ]; @@ -149,36 +160,36 @@ public function getConfig() { } /** - * Operation addEmployeeDependent + * Operation createEmployeeDependent * * Create Employee Dependent * * @param \BhrSdk\Model\EmployeeDependent $employee_dependent employee_dependent (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeDependent'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeDependentsResponse */ - public function addEmployeeDependent($employee_dependent, string $contentType = self::CONTENT_TYPES['addEmployeeDependent'][0]) { - list($response) = $this->addEmployeeDependentWithHttpInfo($employee_dependent, $contentType); + public function createEmployeeDependent($employee_dependent, string $contentType = self::CONTENT_TYPES['createEmployeeDependent'][0]) { + list($response) = $this->createEmployeeDependentWithHttpInfo($employee_dependent, $contentType); return $response; } /** - * Operation addEmployeeDependentWithHttpInfo + * Operation createEmployeeDependentWithHttpInfo * * Create Employee Dependent * * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeDependent'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeDependentsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addEmployeeDependentWithHttpInfo($employee_dependent, string $contentType = self::CONTENT_TYPES['addEmployeeDependent'][0]) { - $request = $this->addEmployeeDependentRequest($employee_dependent, $contentType); + public function createEmployeeDependentWithHttpInfo($employee_dependent, string $contentType = self::CONTENT_TYPES['createEmployeeDependent'][0]) { + $request = $this->createEmployeeDependentRequest($employee_dependent, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -186,26 +197,48 @@ public function addEmployeeDependentWithHttpInfo($employee_dependent, string $co $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeDependentsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeDependentsResponse', $request, $response, ); } /** - * Operation addEmployeeDependentAsync + * Operation createEmployeeDependentAsync * * Create Employee Dependent * * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeDependent'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeDependent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeDependentAsync($employee_dependent, string $contentType = self::CONTENT_TYPES['addEmployeeDependent'][0]) { - return $this->addEmployeeDependentAsyncWithHttpInfo($employee_dependent, $contentType) + public function createEmployeeDependentAsync($employee_dependent, string $contentType = self::CONTENT_TYPES['createEmployeeDependent'][0]) { + return $this->createEmployeeDependentAsyncWithHttpInfo($employee_dependent, $contentType) ->then( function ($response) { return $response[0]; @@ -214,28 +247,30 @@ function ($response) { } /** - * Operation addEmployeeDependentAsyncWithHttpInfo + * Operation createEmployeeDependentAsyncWithHttpInfo * * Create Employee Dependent * * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeDependent'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeDependent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeDependentAsyncWithHttpInfo($employee_dependent, string $contentType = self::CONTENT_TYPES['addEmployeeDependent'][0]) { - - $request = $this->addEmployeeDependentRequest($employee_dependent, $contentType); + public function createEmployeeDependentAsyncWithHttpInfo($employee_dependent, string $contentType = self::CONTENT_TYPES['createEmployeeDependent'][0]) { + $returnType = '\BhrSdk\Model\EmployeeDependentsResponse'; + $request = $this->createEmployeeDependentRequest($employee_dependent, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -258,21 +293,21 @@ function ($exception) { } /** - * Create request for operation 'addEmployeeDependent' + * Create request for operation 'createEmployeeDependent' * * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeDependent'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeDependent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEmployeeDependentRequest($employee_dependent, string $contentType = self::CONTENT_TYPES['addEmployeeDependent'][0]) { + public function createEmployeeDependentRequest($employee_dependent, string $contentType = self::CONTENT_TYPES['createEmployeeDependent'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_dependent' => $employee_dependent, ], - methodName: 'addEmployeeDependent' + methodName: 'createEmployeeDependent' ); $resourcePath = '/api/v1/employeedependents'; @@ -284,7 +319,7 @@ public function addEmployeeDependentRequest($employee_dependent, string $content $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -344,36 +379,38 @@ public function addEmployeeDependentRequest($employee_dependent, string $content } /** - * Operation getBenefitCoverages + * Operation getEmployeeDependent * - * Get Benefit Coverages + * Get Employee Dependent * + * @param int $id The numeric ID of the employee dependent to retrieve. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitCoverages'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeDependentsResponse */ - public function getBenefitCoverages($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getBenefitCoverages'][0]) { - list($response) = $this->getBenefitCoveragesWithHttpInfo($accept_header_parameter, $contentType); + public function getEmployeeDependent($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { + list($response) = $this->getEmployeeDependentWithHttpInfo($id, $accept_header_parameter, $contentType); return $response; } /** - * Operation getBenefitCoveragesWithHttpInfo + * Operation getEmployeeDependentWithHttpInfo * - * Get Benefit Coverages + * Get Employee Dependent * + * @param int $id The numeric ID of the employee dependent to retrieve. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitCoverages'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeDependentsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getBenefitCoveragesWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getBenefitCoverages'][0]) { - $request = $this->getBenefitCoveragesRequest($accept_header_parameter, $contentType); + public function getEmployeeDependentWithHttpInfo($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { + $request = $this->getEmployeeDependentRequest($id, $accept_header_parameter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -381,26 +418,49 @@ public function getBenefitCoveragesWithHttpInfo($accept_header_parameter = null, $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeDependentsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeDependentsResponse', $request, $response, ); } /** - * Operation getBenefitCoveragesAsync + * Operation getEmployeeDependentAsync * - * Get Benefit Coverages + * Get Employee Dependent * + * @param int $id The numeric ID of the employee dependent to retrieve. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitCoverages'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBenefitCoveragesAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getBenefitCoverages'][0]) { - return $this->getBenefitCoveragesAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function getEmployeeDependentAsync($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { + return $this->getEmployeeDependentAsyncWithHttpInfo($id, $accept_header_parameter, $contentType) ->then( function ($response) { return $response[0]; @@ -409,28 +469,31 @@ function ($response) { } /** - * Operation getBenefitCoveragesAsyncWithHttpInfo + * Operation getEmployeeDependentAsyncWithHttpInfo * - * Get Benefit Coverages + * Get Employee Dependent * + * @param int $id The numeric ID of the employee dependent to retrieve. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitCoverages'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBenefitCoveragesAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getBenefitCoverages'][0]) { - - $request = $this->getBenefitCoveragesRequest($accept_header_parameter, $contentType); + public function getEmployeeDependentAsyncWithHttpInfo($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { + $returnType = '\BhrSdk\Model\EmployeeDependentsResponse'; + $request = $this->getEmployeeDependentRequest($id, $accept_header_parameter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -453,17 +516,640 @@ function ($exception) { } /** - * Create request for operation 'getBenefitCoverages' + * Create request for operation 'getEmployeeDependent' + * + * @param int $id The numeric ID of the employee dependent to retrieve. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEmployeeDependentRequest($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'getEmployeeDependent' + ); + + $resourcePath = '/api/v1/employeedependents/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/xml', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBenefitCoverages + * + * List Benefit Coverages + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitCoverages'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\BenefitCoveragesResponse + */ + public function listBenefitCoverages($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listBenefitCoverages'][0]) { + list($response) = $this->listBenefitCoveragesWithHttpInfo($accept_header_parameter, $contentType); + return $response; + } + + /** + * Operation listBenefitCoveragesWithHttpInfo + * + * List Benefit Coverages + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitCoverages'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\BenefitCoveragesResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBenefitCoveragesWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listBenefitCoverages'][0]) { + $request = $this->listBenefitCoveragesRequest($accept_header_parameter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BenefitCoveragesResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BenefitCoveragesResponse', + $request, + $response, + ); + } + + /** + * Operation listBenefitCoveragesAsync + * + * List Benefit Coverages + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitCoverages'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBenefitCoveragesAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listBenefitCoverages'][0]) { + return $this->listBenefitCoveragesAsyncWithHttpInfo($accept_header_parameter, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBenefitCoveragesAsyncWithHttpInfo + * + * List Benefit Coverages * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitCoverages'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitCoverages'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBenefitCoveragesAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listBenefitCoverages'][0]) { + $returnType = '\BhrSdk\Model\BenefitCoveragesResponse'; + $request = $this->listBenefitCoveragesRequest($accept_header_parameter, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBenefitCoverages' + * + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitCoverages'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBenefitCoveragesRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listBenefitCoverages'][0]) { + + $resourcePath = '/api/v1/benefitcoverages'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/xml', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBenefitDeductionTypes + * + * List Benefit Deduction Types + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitDeductionTypes'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\BenefitDeductionType[] + */ + public function listBenefitDeductionTypes(string $contentType = self::CONTENT_TYPES['listBenefitDeductionTypes'][0]) { + list($response) = $this->listBenefitDeductionTypesWithHttpInfo($contentType); + return $response; + } + + /** + * Operation listBenefitDeductionTypesWithHttpInfo + * + * List Benefit Deduction Types + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitDeductionTypes'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\BenefitDeductionType[], HTTP status code, HTTP response headers (array of strings) + */ + public function listBenefitDeductionTypesWithHttpInfo(string $contentType = self::CONTENT_TYPES['listBenefitDeductionTypes'][0]) { + $request = $this->listBenefitDeductionTypesRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BenefitDeductionType[]', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BenefitDeductionType[]', + $request, + $response, + ); + } + + /** + * Operation listBenefitDeductionTypesAsync + * + * List Benefit Deduction Types + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitDeductionTypes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBenefitDeductionTypesAsync(string $contentType = self::CONTENT_TYPES['listBenefitDeductionTypes'][0]) { + return $this->listBenefitDeductionTypesAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBenefitDeductionTypesAsyncWithHttpInfo + * + * List Benefit Deduction Types + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitDeductionTypes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBenefitDeductionTypesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listBenefitDeductionTypes'][0]) { + $returnType = '\BhrSdk\Model\BenefitDeductionType[]'; + $request = $this->listBenefitDeductionTypesRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBenefitDeductionTypes' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBenefitDeductionTypes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBenefitDeductionTypesRequest(string $contentType = self::CONTENT_TYPES['listBenefitDeductionTypes'][0]) { + + $resourcePath = '/api/v1/benefits/settings/deduction_types/all'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listCompanyBenefits + * + * List Company Benefits + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompanyBenefits'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyBenefitsListResponse + */ + public function listCompanyBenefits(string $contentType = self::CONTENT_TYPES['listCompanyBenefits'][0]) { + list($response) = $this->listCompanyBenefitsWithHttpInfo($contentType); + return $response; + } + + /** + * Operation listCompanyBenefitsWithHttpInfo + * + * List Company Benefits + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompanyBenefits'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyBenefitsListResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listCompanyBenefitsWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompanyBenefits'][0]) { + $request = $this->listCompanyBenefitsRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyBenefitsListResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyBenefitsListResponse', + $request, + $response, + ); + } + + /** + * Operation listCompanyBenefitsAsync + * + * List Company Benefits + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompanyBenefits'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompanyBenefitsAsync(string $contentType = self::CONTENT_TYPES['listCompanyBenefits'][0]) { + return $this->listCompanyBenefitsAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCompanyBenefitsAsyncWithHttpInfo + * + * List Company Benefits + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompanyBenefits'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompanyBenefitsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompanyBenefits'][0]) { + $returnType = '\BhrSdk\Model\CompanyBenefitsListResponse'; + $request = $this->listCompanyBenefitsRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listCompanyBenefits' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompanyBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getBenefitCoveragesRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getBenefitCoverages'][0]) { + public function listCompanyBenefitsRequest(string $contentType = self::CONTENT_TYPES['listCompanyBenefits'][0]) { - $resourcePath = '/api/v1/benefitcoverages'; + $resourcePath = '/api/v1/benefit/company_benefit'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -471,13 +1157,8 @@ public function getBenefitCoveragesRequest($accept_header_parameter = null, stri $httpBody = ''; $multipart = false; - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); - } - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -527,34 +1208,36 @@ public function getBenefitCoveragesRequest($accept_header_parameter = null, stri } /** - * Operation getBenefitDeductionTypes + * Operation listEmployeeBenefits * - * Get Benefit Deduction Types + * List Employee Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitDeductionTypes'] to see the possible values for this operation + * @param \BhrSdk\Model\EmployeeBenefitFilters $employee_benefit_filters Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBenefits'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeBenefitsListResponse */ - public function getBenefitDeductionTypes(string $contentType = self::CONTENT_TYPES['getBenefitDeductionTypes'][0]) { - list($response) = $this->getBenefitDeductionTypesWithHttpInfo($contentType); + public function listEmployeeBenefits($employee_benefit_filters, string $contentType = self::CONTENT_TYPES['listEmployeeBenefits'][0]) { + list($response) = $this->listEmployeeBenefitsWithHttpInfo($employee_benefit_filters, $contentType); return $response; } /** - * Operation getBenefitDeductionTypesWithHttpInfo + * Operation listEmployeeBenefitsWithHttpInfo * - * Get Benefit Deduction Types + * List Employee Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitDeductionTypes'] to see the possible values for this operation + * @param \BhrSdk\Model\EmployeeBenefitFilters $employee_benefit_filters Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBenefits'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeBenefitsListResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getBenefitDeductionTypesWithHttpInfo(string $contentType = self::CONTENT_TYPES['getBenefitDeductionTypes'][0]) { - $request = $this->getBenefitDeductionTypesRequest($contentType); + public function listEmployeeBenefitsWithHttpInfo($employee_benefit_filters, string $contentType = self::CONTENT_TYPES['listEmployeeBenefits'][0]) { + $request = $this->listEmployeeBenefitsRequest($employee_benefit_filters, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -562,25 +1245,48 @@ public function getBenefitDeductionTypesWithHttpInfo(string $contentType = self: $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeBenefitsListResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeBenefitsListResponse', $request, $response, ); } /** - * Operation getBenefitDeductionTypesAsync + * Operation listEmployeeBenefitsAsync * - * Get Benefit Deduction Types + * List Employee Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitDeductionTypes'] to see the possible values for this operation + * @param \BhrSdk\Model\EmployeeBenefitFilters $employee_benefit_filters Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBenefitDeductionTypesAsync(string $contentType = self::CONTENT_TYPES['getBenefitDeductionTypes'][0]) { - return $this->getBenefitDeductionTypesAsyncWithHttpInfo($contentType) + public function listEmployeeBenefitsAsync($employee_benefit_filters, string $contentType = self::CONTENT_TYPES['listEmployeeBenefits'][0]) { + return $this->listEmployeeBenefitsAsyncWithHttpInfo($employee_benefit_filters, $contentType) ->then( function ($response) { return $response[0]; @@ -589,27 +1295,30 @@ function ($response) { } /** - * Operation getBenefitDeductionTypesAsyncWithHttpInfo + * Operation listEmployeeBenefitsAsyncWithHttpInfo * - * Get Benefit Deduction Types + * List Employee Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitDeductionTypes'] to see the possible values for this operation + * @param \BhrSdk\Model\EmployeeBenefitFilters $employee_benefit_filters Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBenefitDeductionTypesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getBenefitDeductionTypes'][0]) { - - $request = $this->getBenefitDeductionTypesRequest($contentType); + public function listEmployeeBenefitsAsyncWithHttpInfo($employee_benefit_filters, string $contentType = self::CONTENT_TYPES['listEmployeeBenefits'][0]) { + $returnType = '\BhrSdk\Model\EmployeeBenefitsListResponse'; + $request = $this->listEmployeeBenefitsRequest($employee_benefit_filters, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -632,16 +1341,24 @@ function ($exception) { } /** - * Create request for operation 'getBenefitDeductionTypes' + * Create request for operation 'listEmployeeBenefits' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBenefitDeductionTypes'] to see the possible values for this operation + * @param \BhrSdk\Model\EmployeeBenefitFilters $employee_benefit_filters Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getBenefitDeductionTypesRequest(string $contentType = self::CONTENT_TYPES['getBenefitDeductionTypes'][0]) { + public function listEmployeeBenefitsRequest($employee_benefit_filters, string $contentType = self::CONTENT_TYPES['listEmployeeBenefits'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_benefit_filters' => $employee_benefit_filters, + ], + methodName: 'listEmployeeBenefits' + ); - $resourcePath = '/api/v1/benefits/settings/deduction_types/all'; + $resourcePath = '/api/v1/benefit/employee_benefit'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -655,6 +1372,16 @@ public function getBenefitDeductionTypesRequest(string $contentType = self::CONT $multipart ); + // for model (json/xml) + if (isset($employee_benefit_filters)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employee_benefit_filters)); + } else { + $httpBody = is_array($employee_benefit_filters) ? json_encode($employee_benefit_filters) : $employee_benefit_filters; + } + } + // Authentication methods // Basic authentication @@ -700,38 +1427,38 @@ public function getBenefitDeductionTypesRequest(string $contentType = self::CONT } /** - * Operation getEmployeeDependent + * Operation listEmployeeDependents * - * Get Employee Dependent + * List Employee Dependents * - * @param string $id {id} is the employee dependent ID. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * @param int|null $employeeid The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeDependents'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeDependentsResponse */ - public function getEmployeeDependent($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { - list($response) = $this->getEmployeeDependentWithHttpInfo($id, $accept_header_parameter, $contentType); + public function listEmployeeDependents($accept_header_parameter = null, $employeeid = null, string $contentType = self::CONTENT_TYPES['listEmployeeDependents'][0]) { + list($response) = $this->listEmployeeDependentsWithHttpInfo($accept_header_parameter, $employeeid, $contentType); return $response; } /** - * Operation getEmployeeDependentWithHttpInfo + * Operation listEmployeeDependentsWithHttpInfo * - * Get Employee Dependent + * List Employee Dependents * - * @param string $id {id} is the employee dependent ID. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * @param int|null $employeeid The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeDependents'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeDependentsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeDependentWithHttpInfo($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { - $request = $this->getEmployeeDependentRequest($id, $accept_header_parameter, $contentType); + public function listEmployeeDependentsWithHttpInfo($accept_header_parameter = null, $employeeid = null, string $contentType = self::CONTENT_TYPES['listEmployeeDependents'][0]) { + $request = $this->listEmployeeDependentsRequest($accept_header_parameter, $employeeid, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -739,27 +1466,49 @@ public function getEmployeeDependentWithHttpInfo($id, $accept_header_parameter = $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeDependentsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeDependentsResponse', $request, $response, ); } /** - * Operation getEmployeeDependentAsync + * Operation listEmployeeDependentsAsync * - * Get Employee Dependent + * List Employee Dependents * - * @param string $id {id} is the employee dependent ID. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * @param int|null $employeeid The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeDependents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeDependentAsync($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { - return $this->getEmployeeDependentAsyncWithHttpInfo($id, $accept_header_parameter, $contentType) + public function listEmployeeDependentsAsync($accept_header_parameter = null, $employeeid = null, string $contentType = self::CONTENT_TYPES['listEmployeeDependents'][0]) { + return $this->listEmployeeDependentsAsyncWithHttpInfo($accept_header_parameter, $employeeid, $contentType) ->then( function ($response) { return $response[0]; @@ -768,29 +1517,31 @@ function ($response) { } /** - * Operation getEmployeeDependentAsyncWithHttpInfo + * Operation listEmployeeDependentsAsyncWithHttpInfo * - * Get Employee Dependent + * List Employee Dependents * - * @param string $id {id} is the employee dependent ID. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * @param int|null $employeeid The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeDependents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeDependentAsyncWithHttpInfo($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { - - $request = $this->getEmployeeDependentRequest($id, $accept_header_parameter, $contentType); + public function listEmployeeDependentsAsyncWithHttpInfo($accept_header_parameter = null, $employeeid = null, string $contentType = self::CONTENT_TYPES['listEmployeeDependents'][0]) { + $returnType = '\BhrSdk\Model\EmployeeDependentsResponse'; + $request = $this->listEmployeeDependentsRequest($accept_header_parameter, $employeeid, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -813,25 +1564,18 @@ function ($exception) { } /** - * Create request for operation 'getEmployeeDependent' + * Create request for operation 'listEmployeeDependents' * - * @param string $id {id} is the employee dependent ID. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependent'] to see the possible values for this operation + * @param int|null $employeeid The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeDependents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeDependentRequest($id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependent'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'id' => $id, - ], - methodName: 'getEmployeeDependent' - ); + public function listEmployeeDependentsRequest($accept_header_parameter = null, $employeeid = null, string $contentType = self::CONTENT_TYPES['listEmployeeDependents'][0]) { - $resourcePath = '/api/v1/employeedependents/{id}'; + $resourcePath = '/api/v1/employeedependents'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -839,20 +1583,27 @@ public function getEmployeeDependentRequest($id, $accept_header_parameter = null $httpBody = ''; $multipart = false; + $parameters = [ + 'employeeid' => ['value' => $employeeid, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // header params if ($accept_header_parameter !== null) { $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue((string) $id), - $resourcePath - ); - } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/xml', ], $contentType, @@ -904,38 +1655,34 @@ public function getEmployeeDependentRequest($id, $accept_header_parameter = null } /** - * Operation getEmployeeDependents + * Operation listMemberBenefitEvents * - * Get Employee Dependents + * List Member Benefit Events * - * @param string $employeeid {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefitEvents'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\MemberBenefitEventsResponse */ - public function getEmployeeDependents($employeeid, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependents'][0]) { - list($response) = $this->getEmployeeDependentsWithHttpInfo($employeeid, $accept_header_parameter, $contentType); + public function listMemberBenefitEvents(string $contentType = self::CONTENT_TYPES['listMemberBenefitEvents'][0]) { + list($response) = $this->listMemberBenefitEventsWithHttpInfo($contentType); return $response; } /** - * Operation getEmployeeDependentsWithHttpInfo + * Operation listMemberBenefitEventsWithHttpInfo * - * Get Employee Dependents + * List Member Benefit Events * - * @param string $employeeid {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefitEvents'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\MemberBenefitEventsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeDependentsWithHttpInfo($employeeid, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependents'][0]) { - $request = $this->getEmployeeDependentsRequest($employeeid, $accept_header_parameter, $contentType); + public function listMemberBenefitEventsWithHttpInfo(string $contentType = self::CONTENT_TYPES['listMemberBenefitEvents'][0]) { + $request = $this->listMemberBenefitEventsRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -943,27 +1690,47 @@ public function getEmployeeDependentsWithHttpInfo($employeeid, $accept_header_pa $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MemberBenefitEventsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\MemberBenefitEventsResponse', $request, $response, ); } /** - * Operation getEmployeeDependentsAsync + * Operation listMemberBenefitEventsAsync * - * Get Employee Dependents + * List Member Benefit Events * - * @param string $employeeid {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefitEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeDependentsAsync($employeeid, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependents'][0]) { - return $this->getEmployeeDependentsAsyncWithHttpInfo($employeeid, $accept_header_parameter, $contentType) + public function listMemberBenefitEventsAsync(string $contentType = self::CONTENT_TYPES['listMemberBenefitEvents'][0]) { + return $this->listMemberBenefitEventsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -972,29 +1739,29 @@ function ($response) { } /** - * Operation getEmployeeDependentsAsyncWithHttpInfo + * Operation listMemberBenefitEventsAsyncWithHttpInfo * - * Get Employee Dependents + * List Member Benefit Events * - * @param string $employeeid {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefitEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeDependentsAsyncWithHttpInfo($employeeid, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependents'][0]) { - - $request = $this->getEmployeeDependentsRequest($employeeid, $accept_header_parameter, $contentType); + public function listMemberBenefitEventsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listMemberBenefitEvents'][0]) { + $returnType = '\BhrSdk\Model\MemberBenefitEventsResponse'; + $request = $this->listMemberBenefitEventsRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1017,25 +1784,16 @@ function ($exception) { } /** - * Create request for operation 'getEmployeeDependents' + * Create request for operation 'listMemberBenefitEvents' * - * @param string $employeeid {employeeid} is the employee ID. Supplying this ID limits the response to the specific employee. (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeDependents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefitEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeDependentsRequest($employeeid, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeDependents'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'employeeid' => $employeeid, - ], - methodName: 'getEmployeeDependents' - ); + public function listMemberBenefitEventsRequest(string $contentType = self::CONTENT_TYPES['listMemberBenefitEvents'][0]) { - $resourcePath = '/api/v1/employeedependents'; + $resourcePath = '/api/v1/benefit/member_benefit'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1043,29 +1801,8 @@ public function getEmployeeDependentsRequest($employeeid, $accept_header_paramet $httpBody = ''; $multipart = false; - $parameters = [ - 'employeeid' => ['value' => $employeeid, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } - } - - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); - } - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -1115,34 +1852,40 @@ public function getEmployeeDependentsRequest($employeeid, $accept_header_paramet } /** - * Operation getMemberBenefit + * Operation listMemberBenefits * - * Get Member Benefit Events + * List Member Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMemberBenefit'] to see the possible values for this operation + * @param string $calendar_year The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + * @param string|null $page The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. (optional, default to '1') + * @param string|null $page_size The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. (optional, default to '25') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefits'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\MemberBenefitEvent[] + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponse|\BhrSdk\Model\MemberBenefitsGetValidationErrorResponse|\BhrSdk\Model\MemberBenefitsGetPermissionDeniedResponse */ - public function getMemberBenefit(string $contentType = self::CONTENT_TYPES['getMemberBenefit'][0]) { - list($response) = $this->getMemberBenefitWithHttpInfo($contentType); + public function listMemberBenefits($calendar_year, $page = '1', $page_size = '25', string $contentType = self::CONTENT_TYPES['listMemberBenefits'][0]) { + list($response) = $this->listMemberBenefitsWithHttpInfo($calendar_year, $page, $page_size, $contentType); return $response; } /** - * Operation getMemberBenefitWithHttpInfo + * Operation listMemberBenefitsWithHttpInfo * - * Get Member Benefit Events + * List Member Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMemberBenefit'] to see the possible values for this operation + * @param string $calendar_year The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + * @param string|null $page The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. (optional, default to '1') + * @param string|null $page_size The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. (optional, default to '25') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefits'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\MemberBenefitEvent[], HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\MemberBenefitsGetSuccessResponse|\BhrSdk\Model\MemberBenefitsGetValidationErrorResponse|\BhrSdk\Model\MemberBenefitsGetPermissionDeniedResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getMemberBenefitWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMemberBenefit'][0]) { - $request = $this->getMemberBenefitRequest($contentType); + public function listMemberBenefitsWithHttpInfo($calendar_year, $page = '1', $page_size = '25', string $contentType = self::CONTENT_TYPES['listMemberBenefits'][0]) { + $request = $this->listMemberBenefitsRequest($calendar_year, $page, $page_size, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1153,7 +1896,19 @@ public function getMemberBenefitWithHttpInfo(string $contentType = self::CONTENT switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\MemberBenefitEvent[]', + '\BhrSdk\Model\MemberBenefitsGetSuccessResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MemberBenefitsGetValidationErrorResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\MemberBenefitsGetPermissionDeniedResponse', $request, $response, ); @@ -1173,24 +1928,27 @@ public function getMemberBenefitWithHttpInfo(string $contentType = self::CONTENT } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\MemberBenefitEvent[]', + '\BhrSdk\Model\MemberBenefitsGetSuccessResponse', $request, $response, ); } /** - * Operation getMemberBenefitAsync + * Operation listMemberBenefitsAsync * - * Get Member Benefit Events + * List Member Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMemberBenefit'] to see the possible values for this operation + * @param string $calendar_year The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + * @param string|null $page The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. (optional, default to '1') + * @param string|null $page_size The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. (optional, default to '25') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getMemberBenefitAsync(string $contentType = self::CONTENT_TYPES['getMemberBenefit'][0]) { - return $this->getMemberBenefitAsyncWithHttpInfo($contentType) + public function listMemberBenefitsAsync($calendar_year, $page = '1', $page_size = '25', string $contentType = self::CONTENT_TYPES['listMemberBenefits'][0]) { + return $this->listMemberBenefitsAsyncWithHttpInfo($calendar_year, $page, $page_size, $contentType) ->then( function ($response) { return $response[0]; @@ -1199,18 +1957,21 @@ function ($response) { } /** - * Operation getMemberBenefitAsyncWithHttpInfo + * Operation listMemberBenefitsAsyncWithHttpInfo * - * Get Member Benefit Events + * List Member Benefits * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMemberBenefit'] to see the possible values for this operation + * @param string $calendar_year The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + * @param string|null $page The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. (optional, default to '1') + * @param string|null $page_size The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. (optional, default to '25') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getMemberBenefitAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMemberBenefit'][0]) { - $returnType = '\BhrSdk\Model\MemberBenefitEvent[]'; - $request = $this->getMemberBenefitRequest($contentType); + public function listMemberBenefitsAsyncWithHttpInfo($calendar_year, $page = '1', $page_size = '25', string $contentType = self::CONTENT_TYPES['listMemberBenefits'][0]) { + $returnType = '\BhrSdk\Model\MemberBenefitsGetSuccessResponse'; + $request = $this->listMemberBenefitsRequest($calendar_year, $page, $page_size, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1244,16 +2005,30 @@ function ($exception) { } /** - * Create request for operation 'getMemberBenefit' + * Create request for operation 'listMemberBenefits' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMemberBenefit'] to see the possible values for this operation + * @param string $calendar_year The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + * @param string|null $page The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. (optional, default to '1') + * @param string|null $page_size The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. (optional, default to '25') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMemberBenefits'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getMemberBenefitRequest(string $contentType = self::CONTENT_TYPES['getMemberBenefit'][0]) { + public function listMemberBenefitsRequest($calendar_year, $page = '1', $page_size = '25', string $contentType = self::CONTENT_TYPES['listMemberBenefits'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'calendar_year' => $calendar_year, + ], + methodName: 'listMemberBenefits' + ); - $resourcePath = '/api/v1/benefit/member_benefit'; + if (!preg_match("/^\\d{4}$/", $calendar_year)) { + throw new \InvalidArgumentException("invalid value for \"calendar_year\" when calling BenefitsApi.listMemberBenefits, must conform to the pattern /^\\d{4}$/."); + } + + $resourcePath = '/api/v1/benefits/member-benefits'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1261,6 +2036,24 @@ public function getMemberBenefitRequest(string $contentType = self::CONTENT_TYPE $httpBody = ''; $multipart = false; + $parameters = [ + 'calendarYear' => ['value' => $calendar_year, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -1316,13 +2109,13 @@ public function getMemberBenefitRequest(string $contentType = self::CONTENT_TYPE * * Update Employee Dependent * - * @param string $id {id} is the employee dependent ID. (required) + * @param int $id The numeric ID of the employee dependent to update. (required) * @param \BhrSdk\Model\EmployeeDependent $employee_dependent employee_dependent (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeDependentsResponse */ public function updateEmployeeDependent($id, $employee_dependent, string $contentType = self::CONTENT_TYPES['updateEmployeeDependent'][0]) { list($response) = $this->updateEmployeeDependentWithHttpInfo($id, $employee_dependent, $contentType); @@ -1334,13 +2127,13 @@ public function updateEmployeeDependent($id, $employee_dependent, string $conten * * Update Employee Dependent * - * @param string $id {id} is the employee dependent ID. (required) + * @param int $id The numeric ID of the employee dependent to update. (required) * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeDependent'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeDependentsResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateEmployeeDependentWithHttpInfo($id, $employee_dependent, string $contentType = self::CONTENT_TYPES['updateEmployeeDependent'][0]) { $request = $this->updateEmployeeDependentRequest($id, $employee_dependent, $contentType); @@ -1351,8 +2144,30 @@ public function updateEmployeeDependentWithHttpInfo($id, $employee_dependent, st $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeDependentsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeDependentsResponse', $request, $response, ); @@ -1363,7 +2178,7 @@ public function updateEmployeeDependentWithHttpInfo($id, $employee_dependent, st * * Update Employee Dependent * - * @param string $id {id} is the employee dependent ID. (required) + * @param int $id The numeric ID of the employee dependent to update. (required) * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeDependent'] to see the possible values for this operation * @@ -1384,7 +2199,7 @@ function ($response) { * * Update Employee Dependent * - * @param string $id {id} is the employee dependent ID. (required) + * @param int $id The numeric ID of the employee dependent to update. (required) * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeDependent'] to see the possible values for this operation * @@ -1392,17 +2207,19 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function updateEmployeeDependentAsyncWithHttpInfo($id, $employee_dependent, string $contentType = self::CONTENT_TYPES['updateEmployeeDependent'][0]) { - + $returnType = '\BhrSdk\Model\EmployeeDependentsResponse'; $request = $this->updateEmployeeDependentRequest($id, $employee_dependent, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1427,7 +2244,7 @@ function ($exception) { /** * Create request for operation 'updateEmployeeDependent' * - * @param string $id {id} is the employee dependent ID. (required) + * @param int $id The numeric ID of the employee dependent to update. (required) * @param \BhrSdk\Model\EmployeeDependent $employee_dependent (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeDependent'] to see the possible values for this operation * @@ -1462,7 +2279,7 @@ public function updateEmployeeDependentRequest($id, $employee_dependent, string } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); diff --git a/lib/Api/CompanyApi.php b/lib/Api/CompanyApi.php new file mode 100644 index 00000000..828e99a3 --- /dev/null +++ b/lib/Api/CompanyApi.php @@ -0,0 +1,376 @@ +<?php +declare(strict_types=1); +/** + * CompanyApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * CompanyApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompanyApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'putCompanyIndustryCodes' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation putCompanyIndustryCodes + * + * Update Company Industry Codes + * + * @param \BhrSdk\Model\PutCompanyIndustryCodesRequest $put_company_industry_codes_request put_company_industry_codes_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyIndustryCodes'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\UpdateCompanyIndustryCodesResponse|\BhrSdk\Model\UpdateCompanyIndustryCodes400Response|\BhrSdk\Model\UpdateCompanyIndustryCodes403Response|\BhrSdk\Model\UpdateCompanyIndustryCodes404Response|\BhrSdk\Model\UpdateCompanyIndustryCodes500Response + */ + public function putCompanyIndustryCodes($put_company_industry_codes_request, string $contentType = self::CONTENT_TYPES['putCompanyIndustryCodes'][0]) { + list($response) = $this->putCompanyIndustryCodesWithHttpInfo($put_company_industry_codes_request, $contentType); + return $response; + } + + /** + * Operation putCompanyIndustryCodesWithHttpInfo + * + * Update Company Industry Codes + * + * @param \BhrSdk\Model\PutCompanyIndustryCodesRequest $put_company_industry_codes_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyIndustryCodes'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\UpdateCompanyIndustryCodesResponse|\BhrSdk\Model\UpdateCompanyIndustryCodes400Response|\BhrSdk\Model\UpdateCompanyIndustryCodes403Response|\BhrSdk\Model\UpdateCompanyIndustryCodes404Response|\BhrSdk\Model\UpdateCompanyIndustryCodes500Response, HTTP status code, HTTP response headers (array of strings) + */ + public function putCompanyIndustryCodesWithHttpInfo($put_company_industry_codes_request, string $contentType = self::CONTENT_TYPES['putCompanyIndustryCodes'][0]) { + $request = $this->putCompanyIndustryCodesRequest($put_company_industry_codes_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodesResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodes400Response', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodes403Response', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodes404Response', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodes500Response', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyIndustryCodesResponse', + $request, + $response, + ); + } + + /** + * Operation putCompanyIndustryCodesAsync + * + * Update Company Industry Codes + * + * @param \BhrSdk\Model\PutCompanyIndustryCodesRequest $put_company_industry_codes_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyIndustryCodes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putCompanyIndustryCodesAsync($put_company_industry_codes_request, string $contentType = self::CONTENT_TYPES['putCompanyIndustryCodes'][0]) { + return $this->putCompanyIndustryCodesAsyncWithHttpInfo($put_company_industry_codes_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation putCompanyIndustryCodesAsyncWithHttpInfo + * + * Update Company Industry Codes + * + * @param \BhrSdk\Model\PutCompanyIndustryCodesRequest $put_company_industry_codes_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyIndustryCodes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putCompanyIndustryCodesAsyncWithHttpInfo($put_company_industry_codes_request, string $contentType = self::CONTENT_TYPES['putCompanyIndustryCodes'][0]) { + $returnType = '\BhrSdk\Model\UpdateCompanyIndustryCodesResponse'; + $request = $this->putCompanyIndustryCodesRequest($put_company_industry_codes_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'putCompanyIndustryCodes' + * + * @param \BhrSdk\Model\PutCompanyIndustryCodesRequest $put_company_industry_codes_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyIndustryCodes'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function putCompanyIndustryCodesRequest($put_company_industry_codes_request, string $contentType = self::CONTENT_TYPES['putCompanyIndustryCodes'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'put_company_industry_codes_request' => $put_company_industry_codes_request, + ], + methodName: 'putCompanyIndustryCodes' + ); + + $resourcePath = '/api/v1/company-profile-data/industry-codes'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($put_company_industry_codes_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_company_industry_codes_request)); + } else { + $httpBody = is_array($put_company_industry_codes_request) ? json_encode($put_company_industry_codes_request) : $put_company_industry_codes_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/CompanyFilesApi.php b/lib/Api/CompanyFilesApi.php index 2382d2ca..4df2b10e 100644 --- a/lib/Api/CompanyFilesApi.php +++ b/lib/Api/CompanyFilesApi.php @@ -79,8 +79,9 @@ class CompanyFilesApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addCompanyFileCategory' => [ + 'createCompanyFileCategory' => [ 'application/json', + 'application/xml', ], 'deleteCompanyFile' => [ 'application/json', @@ -95,7 +96,7 @@ class CompanyFilesApi { 'application/json', ], 'uploadCompanyFile' => [ - 'application/json', + 'multipart/form-data', ], ]; @@ -146,36 +147,36 @@ public function getConfig() { } /** - * Operation addCompanyFileCategory + * Operation createCompanyFileCategory * * Create Company File Category * * @param string[] $request_body request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addCompanyFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompanyFileCategory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function addCompanyFileCategory($request_body, string $contentType = self::CONTENT_TYPES['addCompanyFileCategory'][0]) { - list($response) = $this->addCompanyFileCategoryWithHttpInfo($request_body, $contentType); + public function createCompanyFileCategory($request_body, string $contentType = self::CONTENT_TYPES['createCompanyFileCategory'][0]) { + list($response) = $this->createCompanyFileCategoryWithHttpInfo($request_body, $contentType); return $response; } /** - * Operation addCompanyFileCategoryWithHttpInfo + * Operation createCompanyFileCategoryWithHttpInfo * * Create Company File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addCompanyFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompanyFileCategory'] to see the possible values for this operation * * @throws \BhrSdk\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 addCompanyFileCategoryWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['addCompanyFileCategory'][0]) { - $request = $this->addCompanyFileCategoryRequest($request_body, $contentType); + public function createCompanyFileCategoryWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['createCompanyFileCategory'][0]) { + $request = $this->createCompanyFileCategoryRequest($request_body, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -191,18 +192,18 @@ public function addCompanyFileCategoryWithHttpInfo($request_body, string $conten } /** - * Operation addCompanyFileCategoryAsync + * Operation createCompanyFileCategoryAsync * * Create Company File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addCompanyFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompanyFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addCompanyFileCategoryAsync($request_body, string $contentType = self::CONTENT_TYPES['addCompanyFileCategory'][0]) { - return $this->addCompanyFileCategoryAsyncWithHttpInfo($request_body, $contentType) + public function createCompanyFileCategoryAsync($request_body, string $contentType = self::CONTENT_TYPES['createCompanyFileCategory'][0]) { + return $this->createCompanyFileCategoryAsyncWithHttpInfo($request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -211,19 +212,19 @@ function ($response) { } /** - * Operation addCompanyFileCategoryAsyncWithHttpInfo + * Operation createCompanyFileCategoryAsyncWithHttpInfo * * Create Company File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addCompanyFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompanyFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addCompanyFileCategoryAsyncWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['addCompanyFileCategory'][0]) { + public function createCompanyFileCategoryAsyncWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['createCompanyFileCategory'][0]) { - $request = $this->addCompanyFileCategoryRequest($request_body, $contentType); + $request = $this->createCompanyFileCategoryRequest($request_body, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -255,21 +256,21 @@ function ($exception) { } /** - * Create request for operation 'addCompanyFileCategory' + * Create request for operation 'createCompanyFileCategory' * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addCompanyFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompanyFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addCompanyFileCategoryRequest($request_body, string $contentType = self::CONTENT_TYPES['addCompanyFileCategory'][0]) { + public function createCompanyFileCategoryRequest($request_body, string $contentType = self::CONTENT_TYPES['createCompanyFileCategory'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'request_body' => $request_body, ], - methodName: 'addCompanyFileCategory' + methodName: 'createCompanyFileCategory' ); $resourcePath = '/api/v1/files/categories'; @@ -281,7 +282,7 @@ public function addCompanyFileCategoryRequest($request_body, string $contentType $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -345,7 +346,7 @@ public function addCompanyFileCategoryRequest($request_body, string $contentType * * Delete Company File * - * @param string $file_id {fileId} is the ID of the company file being deleted. (required) + * @param int $file_id The ID of the company file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -362,7 +363,7 @@ public function deleteCompanyFile($file_id, string $contentType = self::CONTENT_ * * Delete Company File * - * @param string $file_id {fileId} is the ID of the company file being deleted. (required) + * @param int $file_id The ID of the company file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -390,7 +391,7 @@ public function deleteCompanyFileWithHttpInfo($file_id, string $contentType = se * * Delete Company File * - * @param string $file_id {fileId} is the ID of the company file being deleted. (required) + * @param int $file_id The ID of the company file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -410,7 +411,7 @@ function ($response) { * * Delete Company File * - * @param string $file_id {fileId} is the ID of the company file being deleted. (required) + * @param int $file_id The ID of the company file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -452,7 +453,7 @@ function ($exception) { /** * Create request for operation 'deleteCompanyFile' * - * @param string $file_id {fileId} is the ID of the company file being deleted. (required) + * @param int $file_id The ID of the company file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -485,7 +486,7 @@ public function deleteCompanyFileRequest($file_id, string $contentType = self::C } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -539,7 +540,7 @@ public function deleteCompanyFileRequest($file_id, string $contentType = self::C * * Get Company File * - * @param string $file_id {fileId} is the ID of the company file being retrieved. (required) + * @param int $file_id The ID of the company file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -556,7 +557,7 @@ public function getCompanyFile($file_id, string $contentType = self::CONTENT_TYP * * Get Company File * - * @param string $file_id {fileId} is the ID of the company file being retrieved. (required) + * @param int $file_id The ID of the company file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -584,7 +585,7 @@ public function getCompanyFileWithHttpInfo($file_id, string $contentType = self: * * Get Company File * - * @param string $file_id {fileId} is the ID of the company file being retrieved. (required) + * @param int $file_id The ID of the company file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -604,7 +605,7 @@ function ($response) { * * Get Company File * - * @param string $file_id {fileId} is the ID of the company file being retrieved. (required) + * @param int $file_id The ID of the company file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -646,7 +647,7 @@ function ($exception) { /** * Create request for operation 'getCompanyFile' * - * @param string $file_id {fileId} is the ID of the company file being retrieved. (required) + * @param int $file_id The ID of the company file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -679,7 +680,7 @@ public function getCompanyFileRequest($file_id, string $contentType = self::CONT } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/octet-stream', ], $contentType, $multipart ); @@ -737,7 +738,7 @@ public function getCompanyFileRequest($file_id, string $contentType = self::CONT * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\CompanyFilesResponse */ public function listCompanyFiles(string $contentType = self::CONTENT_TYPES['listCompanyFiles'][0]) { list($response) = $this->listCompanyFilesWithHttpInfo($contentType); @@ -753,7 +754,7 @@ public function listCompanyFiles(string $contentType = self::CONTENT_TYPES['list * * @throws \BhrSdk\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 \BhrSdk\Model\CompanyFilesResponse, HTTP status code, HTTP response headers (array of strings) */ public function listCompanyFilesWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompanyFiles'][0]) { $request = $this->listCompanyFilesRequest($contentType); @@ -764,8 +765,30 @@ public function listCompanyFilesWithHttpInfo(string $contentType = self::CONTENT $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyFilesResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\CompanyFilesResponse', $request, $response, ); @@ -801,17 +824,19 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function listCompanyFilesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompanyFiles'][0]) { - + $returnType = '\BhrSdk\Model\CompanyFilesResponse'; $request = $this->listCompanyFilesRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -852,7 +877,7 @@ public function listCompanyFilesRequest(string $contentType = self::CONTENT_TYPE $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -906,7 +931,7 @@ public function listCompanyFilesRequest(string $contentType = self::CONTENT_TYPE * * Update Company File * - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $file_id The ID of the company file to update. (required) * @param \BhrSdk\Model\CompanyFileUpdate $company_file_update company_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompanyFile'] to see the possible values for this operation * @@ -924,7 +949,7 @@ public function updateCompanyFile($file_id, $company_file_update, string $conten * * Update Company File * - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $file_id The ID of the company file to update. (required) * @param \BhrSdk\Model\CompanyFileUpdate $company_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompanyFile'] to see the possible values for this operation * @@ -953,7 +978,7 @@ public function updateCompanyFileWithHttpInfo($file_id, $company_file_update, st * * Update Company File * - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $file_id The ID of the company file to update. (required) * @param \BhrSdk\Model\CompanyFileUpdate $company_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompanyFile'] to see the possible values for this operation * @@ -974,7 +999,7 @@ function ($response) { * * Update Company File * - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $file_id The ID of the company file to update. (required) * @param \BhrSdk\Model\CompanyFileUpdate $company_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompanyFile'] to see the possible values for this operation * @@ -1017,7 +1042,7 @@ function ($exception) { /** * Create request for operation 'updateCompanyFile' * - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $file_id The ID of the company file to update. (required) * @param \BhrSdk\Model\CompanyFileUpdate $company_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompanyFile'] to see the possible values for this operation * @@ -1052,7 +1077,7 @@ public function updateCompanyFileRequest($file_id, $company_file_update, string } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -1116,14 +1141,18 @@ public function updateCompanyFileRequest($file_id, $company_file_update, string * * Upload Company File * + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the file category (section) to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function uploadCompanyFile(string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { - list($response) = $this->uploadCompanyFileWithHttpInfo($contentType); + public function uploadCompanyFile($file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + list($response) = $this->uploadCompanyFileWithHttpInfo($file_name, $category, $file, $share, $contentType); return $response; } @@ -1132,14 +1161,18 @@ public function uploadCompanyFile(string $contentType = self::CONTENT_TYPES['upl * * Upload Company File * + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the file category (section) to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadCompanyFile'] to see the possible values for this operation * * @throws \BhrSdk\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 uploadCompanyFileWithHttpInfo(string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { - $request = $this->uploadCompanyFileRequest($contentType); + public function uploadCompanyFileWithHttpInfo($file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + $request = $this->uploadCompanyFileRequest($file_name, $category, $file, $share, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1159,13 +1192,17 @@ public function uploadCompanyFileWithHttpInfo(string $contentType = self::CONTEN * * Upload Company File * + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the file category (section) to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadCompanyFileAsync(string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { - return $this->uploadCompanyFileAsyncWithHttpInfo($contentType) + public function uploadCompanyFileAsync($file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + return $this->uploadCompanyFileAsyncWithHttpInfo($file_name, $category, $file, $share, $contentType) ->then( function ($response) { return $response[0]; @@ -1178,14 +1215,18 @@ function ($response) { * * Upload Company File * + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the file category (section) to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadCompanyFileAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + public function uploadCompanyFileAsyncWithHttpInfo($file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { - $request = $this->uploadCompanyFileRequest($contentType); + $request = $this->uploadCompanyFileRequest($file_name, $category, $file, $share, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1219,27 +1260,78 @@ function ($exception) { /** * Create request for operation 'uploadCompanyFile' * + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the file category (section) to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadCompanyFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function uploadCompanyFileRequest(string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + public function uploadCompanyFileRequest($file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadCompanyFile'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'file_name' => $file_name, + 'category' => $category, + 'file' => $file, + ], + methodName: 'uploadCompanyFile' + ); $resourcePath = '/api/v1/files'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); - + $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'fileName' => $file_name, + 'category' => $category, + 'share' => $share, + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + + $multipart = true; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); + if (count($formParams) > 0) { + /* @phpstan-ignore-next-line */ + 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); + } + } + // Authentication methods // Basic authentication diff --git a/lib/Api/CompanyProfileApi.php b/lib/Api/CompanyProfileApi.php new file mode 100644 index 00000000..4b26b908 --- /dev/null +++ b/lib/Api/CompanyProfileApi.php @@ -0,0 +1,809 @@ +<?php +declare(strict_types=1); +/** + * CompanyProfileApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * CompanyProfileApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompanyProfileApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'getCompanyProfileIntegrations' => [ + 'application/json', + ], + 'patchCompanyProfileCompanyInformation' => [ + 'application/merge-patch+json', + ], + 'putCompanyProfileDisplayName' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation getCompanyProfileIntegrations + * + * Get Company Profile Integrations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyProfileIntegrations'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyProfileIntegrations + */ + public function getCompanyProfileIntegrations(string $contentType = self::CONTENT_TYPES['getCompanyProfileIntegrations'][0]) { + list($response) = $this->getCompanyProfileIntegrationsWithHttpInfo($contentType); + return $response; + } + + /** + * Operation getCompanyProfileIntegrationsWithHttpInfo + * + * Get Company Profile Integrations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyProfileIntegrations'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyProfileIntegrations, HTTP status code, HTTP response headers (array of strings) + */ + public function getCompanyProfileIntegrationsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCompanyProfileIntegrations'][0]) { + $request = $this->getCompanyProfileIntegrationsRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyProfileIntegrations', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyProfileIntegrations', + $request, + $response, + ); + } + + /** + * Operation getCompanyProfileIntegrationsAsync + * + * Get Company Profile Integrations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyProfileIntegrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCompanyProfileIntegrationsAsync(string $contentType = self::CONTENT_TYPES['getCompanyProfileIntegrations'][0]) { + return $this->getCompanyProfileIntegrationsAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCompanyProfileIntegrationsAsyncWithHttpInfo + * + * Get Company Profile Integrations + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyProfileIntegrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCompanyProfileIntegrationsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getCompanyProfileIntegrations'][0]) { + $returnType = '\BhrSdk\Model\CompanyProfileIntegrations'; + $request = $this->getCompanyProfileIntegrationsRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getCompanyProfileIntegrations' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyProfileIntegrations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCompanyProfileIntegrationsRequest(string $contentType = self::CONTENT_TYPES['getCompanyProfileIntegrations'][0]) { + + $resourcePath = '/api/v1/company-profile-integrations'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation patchCompanyProfileCompanyInformation + * + * Update company information (phone, address, legal name) + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest $patch_company_profile_company_information_request patch_company_profile_company_information_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompanyProfileData|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function patchCompanyProfileCompanyInformation($patch_company_profile_company_information_request, string $contentType = self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'][0]) { + list($response) = $this->patchCompanyProfileCompanyInformationWithHttpInfo($patch_company_profile_company_information_request, $contentType); + return $response; + } + + /** + * Operation patchCompanyProfileCompanyInformationWithHttpInfo + * + * Update company information (phone, address, legal name) + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest $patch_company_profile_company_information_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompanyProfileData|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function patchCompanyProfileCompanyInformationWithHttpInfo($patch_company_profile_company_information_request, string $contentType = self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'][0]) { + $request = $this->patchCompanyProfileCompanyInformationRequest($patch_company_profile_company_information_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyProfileData', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompanyProfileData', + $request, + $response, + ); + } + + /** + * Operation patchCompanyProfileCompanyInformationAsync + * + * Update company information (phone, address, legal name) + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest $patch_company_profile_company_information_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function patchCompanyProfileCompanyInformationAsync($patch_company_profile_company_information_request, string $contentType = self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'][0]) { + return $this->patchCompanyProfileCompanyInformationAsyncWithHttpInfo($patch_company_profile_company_information_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation patchCompanyProfileCompanyInformationAsyncWithHttpInfo + * + * Update company information (phone, address, legal name) + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest $patch_company_profile_company_information_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function patchCompanyProfileCompanyInformationAsyncWithHttpInfo($patch_company_profile_company_information_request, string $contentType = self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'][0]) { + $returnType = '\BhrSdk\Model\CompanyProfileData'; + $request = $this->patchCompanyProfileCompanyInformationRequest($patch_company_profile_company_information_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'patchCompanyProfileCompanyInformation' + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequest $patch_company_profile_company_information_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function patchCompanyProfileCompanyInformationRequest($patch_company_profile_company_information_request, string $contentType = self::CONTENT_TYPES['patchCompanyProfileCompanyInformation'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'patch_company_profile_company_information_request' => $patch_company_profile_company_information_request, + ], + methodName: 'patchCompanyProfileCompanyInformation' + ); + + $resourcePath = '/api/v1/company-profile-data/company-information'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($patch_company_profile_company_information_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($patch_company_profile_company_information_request)); + } else { + $httpBody = is_array($patch_company_profile_company_information_request) ? json_encode($patch_company_profile_company_information_request) : $patch_company_profile_company_information_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PATCH', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation putCompanyProfileDisplayName + * + * Update company display name + * + * @param \BhrSdk\Model\PutCompanyProfileDisplayNameRequest|null $put_company_profile_display_name_request put_company_profile_display_name_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyProfileDisplayName'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\UpdateCompanyNameSuccessResponse|\BhrSdk\Model\UpdateCompanyNameBadRequestResponse|\BhrSdk\Model\UpdateCompanyNameForbiddenResponse|\BhrSdk\Model\UpdateCompanyNameInternalErrorResponse + */ + public function putCompanyProfileDisplayName($put_company_profile_display_name_request = null, string $contentType = self::CONTENT_TYPES['putCompanyProfileDisplayName'][0]) { + list($response) = $this->putCompanyProfileDisplayNameWithHttpInfo($put_company_profile_display_name_request, $contentType); + return $response; + } + + /** + * Operation putCompanyProfileDisplayNameWithHttpInfo + * + * Update company display name + * + * @param \BhrSdk\Model\PutCompanyProfileDisplayNameRequest|null $put_company_profile_display_name_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyProfileDisplayName'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\UpdateCompanyNameSuccessResponse|\BhrSdk\Model\UpdateCompanyNameBadRequestResponse|\BhrSdk\Model\UpdateCompanyNameForbiddenResponse|\BhrSdk\Model\UpdateCompanyNameInternalErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function putCompanyProfileDisplayNameWithHttpInfo($put_company_profile_display_name_request = null, string $contentType = self::CONTENT_TYPES['putCompanyProfileDisplayName'][0]) { + $request = $this->putCompanyProfileDisplayNameRequest($put_company_profile_display_name_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyNameSuccessResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyNameBadRequestResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyNameForbiddenResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyNameInternalErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompanyNameSuccessResponse', + $request, + $response, + ); + } + + /** + * Operation putCompanyProfileDisplayNameAsync + * + * Update company display name + * + * @param \BhrSdk\Model\PutCompanyProfileDisplayNameRequest|null $put_company_profile_display_name_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyProfileDisplayName'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putCompanyProfileDisplayNameAsync($put_company_profile_display_name_request = null, string $contentType = self::CONTENT_TYPES['putCompanyProfileDisplayName'][0]) { + return $this->putCompanyProfileDisplayNameAsyncWithHttpInfo($put_company_profile_display_name_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation putCompanyProfileDisplayNameAsyncWithHttpInfo + * + * Update company display name + * + * @param \BhrSdk\Model\PutCompanyProfileDisplayNameRequest|null $put_company_profile_display_name_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyProfileDisplayName'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putCompanyProfileDisplayNameAsyncWithHttpInfo($put_company_profile_display_name_request = null, string $contentType = self::CONTENT_TYPES['putCompanyProfileDisplayName'][0]) { + $returnType = '\BhrSdk\Model\UpdateCompanyNameSuccessResponse'; + $request = $this->putCompanyProfileDisplayNameRequest($put_company_profile_display_name_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'putCompanyProfileDisplayName' + * + * @param \BhrSdk\Model\PutCompanyProfileDisplayNameRequest|null $put_company_profile_display_name_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putCompanyProfileDisplayName'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function putCompanyProfileDisplayNameRequest($put_company_profile_display_name_request = null, string $contentType = self::CONTENT_TYPES['putCompanyProfileDisplayName'][0]) { + + $resourcePath = '/api/v1/company-profile-data/display-name'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($put_company_profile_display_name_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_company_profile_display_name_request)); + } else { + $httpBody = is_array($put_company_profile_display_name_request) ? json_encode($put_company_profile_display_name_request) : $put_company_profile_display_name_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/CompensationApi.php b/lib/Api/CompensationApi.php new file mode 100644 index 00000000..8181f3ae --- /dev/null +++ b/lib/Api/CompensationApi.php @@ -0,0 +1,752 @@ +<?php +declare(strict_types=1); +/** + * CompensationApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * CompensationApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'c5880b509783cd9d7fce9ddf5d6af1be' => [ + 'application/json', + ], + 'call9f398e2652ea47a6dc5121ce5184222a' => [ + 'application/json', + ], + 'db49fb29f9f04d59afad7c01ce860418' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation c5880b509783cd9d7fce9ddf5d6af1be + * + * Update company equity settings + * + * @param \BhrSdk\Model\CompensationEquitySettingsUpdateRequest $compensation_equity_settings_update_request compensation_equity_settings_update_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationEquitySettingsResponse + */ + public function c5880b509783cd9d7fce9ddf5d6af1be($compensation_equity_settings_update_request, string $contentType = self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'][0]) { + list($response) = $this->c5880b509783cd9d7fce9ddf5d6af1beWithHttpInfo($compensation_equity_settings_update_request, $contentType); + return $response; + } + + /** + * Operation c5880b509783cd9d7fce9ddf5d6af1beWithHttpInfo + * + * Update company equity settings + * + * @param \BhrSdk\Model\CompensationEquitySettingsUpdateRequest $compensation_equity_settings_update_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationEquitySettingsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function c5880b509783cd9d7fce9ddf5d6af1beWithHttpInfo($compensation_equity_settings_update_request, string $contentType = self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'][0]) { + $request = $this->c5880b509783cd9d7fce9ddf5d6af1beRequest($compensation_equity_settings_update_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationEquitySettingsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationEquitySettingsResponse', + $request, + $response, + ); + } + + /** + * Operation c5880b509783cd9d7fce9ddf5d6af1beAsync + * + * Update company equity settings + * + * @param \BhrSdk\Model\CompensationEquitySettingsUpdateRequest $compensation_equity_settings_update_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c5880b509783cd9d7fce9ddf5d6af1beAsync($compensation_equity_settings_update_request, string $contentType = self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'][0]) { + return $this->c5880b509783cd9d7fce9ddf5d6af1beAsyncWithHttpInfo($compensation_equity_settings_update_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation c5880b509783cd9d7fce9ddf5d6af1beAsyncWithHttpInfo + * + * Update company equity settings + * + * @param \BhrSdk\Model\CompensationEquitySettingsUpdateRequest $compensation_equity_settings_update_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c5880b509783cd9d7fce9ddf5d6af1beAsyncWithHttpInfo($compensation_equity_settings_update_request, string $contentType = self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'][0]) { + $returnType = '\BhrSdk\Model\CompensationEquitySettingsResponse'; + $request = $this->c5880b509783cd9d7fce9ddf5d6af1beRequest($compensation_equity_settings_update_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'c5880b509783cd9d7fce9ddf5d6af1be' + * + * @param \BhrSdk\Model\CompensationEquitySettingsUpdateRequest $compensation_equity_settings_update_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function c5880b509783cd9d7fce9ddf5d6af1beRequest($compensation_equity_settings_update_request, string $contentType = self::CONTENT_TYPES['c5880b509783cd9d7fce9ddf5d6af1be'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'compensation_equity_settings_update_request' => $compensation_equity_settings_update_request, + ], + methodName: 'c5880b509783cd9d7fce9ddf5d6af1be' + ); + + $resourcePath = '/api/v1/compensation/equity/settings'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($compensation_equity_settings_update_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($compensation_equity_settings_update_request)); + } else { + $httpBody = is_array($compensation_equity_settings_update_request) ? json_encode($compensation_equity_settings_update_request) : $compensation_equity_settings_update_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call9f398e2652ea47a6dc5121ce5184222a + * + * List available compensation tools + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationToolsResponse + */ + public function call9f398e2652ea47a6dc5121ce5184222a(string $contentType = self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'][0]) { + list($response) = $this->call9f398e2652ea47a6dc5121ce5184222aWithHttpInfo($contentType); + return $response; + } + + /** + * Operation call9f398e2652ea47a6dc5121ce5184222aWithHttpInfo + * + * List available compensation tools + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationToolsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call9f398e2652ea47a6dc5121ce5184222aWithHttpInfo(string $contentType = self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'][0]) { + $request = $this->call9f398e2652ea47a6dc5121ce5184222aRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationToolsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationToolsResponse', + $request, + $response, + ); + } + + /** + * Operation call9f398e2652ea47a6dc5121ce5184222aAsync + * + * List available compensation tools + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call9f398e2652ea47a6dc5121ce5184222aAsync(string $contentType = self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'][0]) { + return $this->call9f398e2652ea47a6dc5121ce5184222aAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call9f398e2652ea47a6dc5121ce5184222aAsyncWithHttpInfo + * + * List available compensation tools + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call9f398e2652ea47a6dc5121ce5184222aAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'][0]) { + $returnType = '\BhrSdk\Model\CompensationToolsResponse'; + $request = $this->call9f398e2652ea47a6dc5121ce5184222aRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call9f398e2652ea47a6dc5121ce5184222a' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call9f398e2652ea47a6dc5121ce5184222aRequest(string $contentType = self::CONTENT_TYPES['call9f398e2652ea47a6dc5121ce5184222a'][0]) { + + $resourcePath = '/api/v1/compensation/tools'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation db49fb29f9f04d59afad7c01ce860418 + * + * Get company equity settings + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationEquitySettingsResponse + */ + public function db49fb29f9f04d59afad7c01ce860418(string $contentType = self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'][0]) { + list($response) = $this->db49fb29f9f04d59afad7c01ce860418WithHttpInfo($contentType); + return $response; + } + + /** + * Operation db49fb29f9f04d59afad7c01ce860418WithHttpInfo + * + * Get company equity settings + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationEquitySettingsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function db49fb29f9f04d59afad7c01ce860418WithHttpInfo(string $contentType = self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'][0]) { + $request = $this->db49fb29f9f04d59afad7c01ce860418Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationEquitySettingsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationEquitySettingsResponse', + $request, + $response, + ); + } + + /** + * Operation db49fb29f9f04d59afad7c01ce860418Async + * + * Get company equity settings + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function db49fb29f9f04d59afad7c01ce860418Async(string $contentType = self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'][0]) { + return $this->db49fb29f9f04d59afad7c01ce860418AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation db49fb29f9f04d59afad7c01ce860418AsyncWithHttpInfo + * + * Get company equity settings + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function db49fb29f9f04d59afad7c01ce860418AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'][0]) { + $returnType = '\BhrSdk\Model\CompensationEquitySettingsResponse'; + $request = $this->db49fb29f9f04d59afad7c01ce860418Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'db49fb29f9f04d59afad7c01ce860418' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function db49fb29f9f04d59afad7c01ce860418Request(string $contentType = self::CONTENT_TYPES['db49fb29f9f04d59afad7c01ce860418'][0]) { + + $resourcePath = '/api/v1/compensation/equity/settings'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/CompensationBenchmarkingApi.php b/lib/Api/CompensationBenchmarkingApi.php new file mode 100644 index 00000000..1aa50cc0 --- /dev/null +++ b/lib/Api/CompensationBenchmarkingApi.php @@ -0,0 +1,2703 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkingApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * CompensationBenchmarkingApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationBenchmarkingApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'createCompensationBenchmark' => [ + 'application/json', + ], + 'createCompensationBenchmarkSource' => [ + 'application/json', + ], + 'deleteCompensationBenchmark' => [ + 'application/json', + ], + 'deleteCompensationBenchmarkSource' => [ + 'application/json', + ], + 'exportCompensationBenchmarkDetails' => [ + 'application/json', + ], + 'getCompensationBenchmarkDetails' => [ + 'application/json', + ], + 'importCompensationBenchmarks' => [ + 'multipart/form-data', + ], + 'listCompensationBenchmarkSources' => [ + 'application/json', + ], + 'listCompensationBenchmarks' => [ + 'application/json', + ], + 'updateCompensationBenchmark' => [ + 'application/json', + ], + 'updateCompensationBenchmarkSources' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation createCompensationBenchmark + * + * Create Compensation Benchmark + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkRequest|null $create_compensation_benchmark_request create_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CreatedCompensationBenchmark|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createCompensationBenchmark($create_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmark'][0]) { + list($response) = $this->createCompensationBenchmarkWithHttpInfo($create_compensation_benchmark_request, $contentType); + return $response; + } + + /** + * Operation createCompensationBenchmarkWithHttpInfo + * + * Create Compensation Benchmark + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkRequest|null $create_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CreatedCompensationBenchmark|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createCompensationBenchmarkWithHttpInfo($create_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmark'][0]) { + $request = $this->createCompensationBenchmarkRequest($create_compensation_benchmark_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreatedCompensationBenchmark', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreatedCompensationBenchmark', + $request, + $response, + ); + } + + /** + * Operation createCompensationBenchmarkAsync + * + * Create Compensation Benchmark + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkRequest|null $create_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCompensationBenchmarkAsync($create_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmark'][0]) { + return $this->createCompensationBenchmarkAsyncWithHttpInfo($create_compensation_benchmark_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCompensationBenchmarkAsyncWithHttpInfo + * + * Create Compensation Benchmark + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkRequest|null $create_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCompensationBenchmarkAsyncWithHttpInfo($create_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmark'][0]) { + $returnType = '\BhrSdk\Model\CreatedCompensationBenchmark'; + $request = $this->createCompensationBenchmarkRequest($create_compensation_benchmark_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createCompensationBenchmark' + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkRequest|null $create_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createCompensationBenchmarkRequest($create_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmark'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_compensation_benchmark_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_compensation_benchmark_request)); + } else { + $httpBody = is_array($create_compensation_benchmark_request) ? json_encode($create_compensation_benchmark_request) : $create_compensation_benchmark_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createCompensationBenchmarkSource + * + * Create Compensation Benchmark Source + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest|null $create_compensation_benchmark_source_request create_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CreatedCompensationBenchmarkSource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createCompensationBenchmarkSource($create_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmarkSource'][0]) { + list($response) = $this->createCompensationBenchmarkSourceWithHttpInfo($create_compensation_benchmark_source_request, $contentType); + return $response; + } + + /** + * Operation createCompensationBenchmarkSourceWithHttpInfo + * + * Create Compensation Benchmark Source + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest|null $create_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CreatedCompensationBenchmarkSource|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createCompensationBenchmarkSourceWithHttpInfo($create_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmarkSource'][0]) { + $request = $this->createCompensationBenchmarkSourceRequest($create_compensation_benchmark_source_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreatedCompensationBenchmarkSource', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreatedCompensationBenchmarkSource', + $request, + $response, + ); + } + + /** + * Operation createCompensationBenchmarkSourceAsync + * + * Create Compensation Benchmark Source + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest|null $create_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCompensationBenchmarkSourceAsync($create_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmarkSource'][0]) { + return $this->createCompensationBenchmarkSourceAsyncWithHttpInfo($create_compensation_benchmark_source_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCompensationBenchmarkSourceAsyncWithHttpInfo + * + * Create Compensation Benchmark Source + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest|null $create_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createCompensationBenchmarkSourceAsyncWithHttpInfo($create_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmarkSource'][0]) { + $returnType = '\BhrSdk\Model\CreatedCompensationBenchmarkSource'; + $request = $this->createCompensationBenchmarkSourceRequest($create_compensation_benchmark_source_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createCompensationBenchmarkSource' + * + * @param \BhrSdk\Model\CreateCompensationBenchmarkSourceRequest|null $create_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createCompensationBenchmarkSourceRequest($create_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['createCompensationBenchmarkSource'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks/sources'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_compensation_benchmark_source_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_compensation_benchmark_source_request)); + } else { + $httpBody = is_array($create_compensation_benchmark_source_request) ? json_encode($create_compensation_benchmark_source_request) : $create_compensation_benchmark_source_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteCompensationBenchmark + * + * Delete Compensation Benchmark + * + * @param int $id Integer ID of the compensation benchmark to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return string|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function deleteCompensationBenchmark($id, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmark'][0]) { + list($response) = $this->deleteCompensationBenchmarkWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteCompensationBenchmarkWithHttpInfo + * + * Delete Compensation Benchmark + * + * @param int $id Integer ID of the compensation benchmark to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of string|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteCompensationBenchmarkWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmark'][0]) { + $request = $this->deleteCompensationBenchmarkRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); + } + + /** + * Operation deleteCompensationBenchmarkAsync + * + * Delete Compensation Benchmark + * + * @param int $id Integer ID of the compensation benchmark to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteCompensationBenchmarkAsync($id, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmark'][0]) { + return $this->deleteCompensationBenchmarkAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteCompensationBenchmarkAsyncWithHttpInfo + * + * Delete Compensation Benchmark + * + * @param int $id Integer ID of the compensation benchmark to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteCompensationBenchmarkAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmark'][0]) { + $returnType = 'string'; + $request = $this->deleteCompensationBenchmarkRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'deleteCompensationBenchmark' + * + * @param int $id Integer ID of the compensation benchmark to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteCompensationBenchmarkRequest($id, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmark'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteCompensationBenchmark' + ); + + $resourcePath = '/api/v1/compensation/benchmarks/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteCompensationBenchmarkSource + * + * Delete Compensation Benchmark Source + * + * @param \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest|null $delete_compensation_benchmark_source_request delete_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function deleteCompensationBenchmarkSource($delete_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmarkSource'][0]) { + list($response) = $this->deleteCompensationBenchmarkSourceWithHttpInfo($delete_compensation_benchmark_source_request, $contentType); + return $response; + } + + /** + * Operation deleteCompensationBenchmarkSourceWithHttpInfo + * + * Delete Compensation Benchmark Source + * + * @param \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest|null $delete_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteCompensationBenchmarkSourceWithHttpInfo($delete_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmarkSource'][0]) { + $request = $this->deleteCompensationBenchmarkSourceRequest($delete_compensation_benchmark_source_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse', + $request, + $response, + ); + } + + /** + * Operation deleteCompensationBenchmarkSourceAsync + * + * Delete Compensation Benchmark Source + * + * @param \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest|null $delete_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteCompensationBenchmarkSourceAsync($delete_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmarkSource'][0]) { + return $this->deleteCompensationBenchmarkSourceAsyncWithHttpInfo($delete_compensation_benchmark_source_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteCompensationBenchmarkSourceAsyncWithHttpInfo + * + * Delete Compensation Benchmark Source + * + * @param \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest|null $delete_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteCompensationBenchmarkSourceAsyncWithHttpInfo($delete_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmarkSource'][0]) { + $returnType = '\BhrSdk\Model\DeleteCompensationBenchmarkSourceResponse'; + $request = $this->deleteCompensationBenchmarkSourceRequest($delete_compensation_benchmark_source_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'deleteCompensationBenchmarkSource' + * + * @param \BhrSdk\Model\DeleteCompensationBenchmarkSourceRequest|null $delete_compensation_benchmark_source_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteCompensationBenchmarkSource'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteCompensationBenchmarkSourceRequest($delete_compensation_benchmark_source_request = null, string $contentType = self::CONTENT_TYPES['deleteCompensationBenchmarkSource'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks/sources'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($delete_compensation_benchmark_source_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($delete_compensation_benchmark_source_request)); + } else { + $httpBody = is_array($delete_compensation_benchmark_source_request) ? json_encode($delete_compensation_benchmark_source_request) : $delete_compensation_benchmark_source_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation exportCompensationBenchmarkDetails + * + * Export Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to export benchmark details for. (required) + * @param string|null $location_id Optional job location ID to restrict the export to one location. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['exportCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return string|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function exportCompensationBenchmarkDetails($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['exportCompensationBenchmarkDetails'][0]) { + list($response) = $this->exportCompensationBenchmarkDetailsWithHttpInfo($job_id, $location_id, $contentType); + return $response; + } + + /** + * Operation exportCompensationBenchmarkDetailsWithHttpInfo + * + * Export Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to export benchmark details for. (required) + * @param string|null $location_id Optional job location ID to restrict the export to one location. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['exportCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of string|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function exportCompensationBenchmarkDetailsWithHttpInfo($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['exportCompensationBenchmarkDetails'][0]) { + $request = $this->exportCompensationBenchmarkDetailsRequest($job_id, $location_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); + } + + /** + * Operation exportCompensationBenchmarkDetailsAsync + * + * Export Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to export benchmark details for. (required) + * @param string|null $location_id Optional job location ID to restrict the export to one location. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['exportCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportCompensationBenchmarkDetailsAsync($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['exportCompensationBenchmarkDetails'][0]) { + return $this->exportCompensationBenchmarkDetailsAsyncWithHttpInfo($job_id, $location_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportCompensationBenchmarkDetailsAsyncWithHttpInfo + * + * Export Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to export benchmark details for. (required) + * @param string|null $location_id Optional job location ID to restrict the export to one location. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['exportCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportCompensationBenchmarkDetailsAsyncWithHttpInfo($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['exportCompensationBenchmarkDetails'][0]) { + $returnType = 'string'; + $request = $this->exportCompensationBenchmarkDetailsRequest($job_id, $location_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'exportCompensationBenchmarkDetails' + * + * @param string $job_id ID of the company job title to export benchmark details for. (required) + * @param string|null $location_id Optional job location ID to restrict the export to one location. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['exportCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function exportCompensationBenchmarkDetailsRequest($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['exportCompensationBenchmarkDetails'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'job_id' => $job_id, + ], + methodName: 'exportCompensationBenchmarkDetails' + ); + + $resourcePath = '/api/v1/compensation/benchmarks/details/export'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'jobId' => ['value' => $job_id, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'locationId' => ['value' => $location_id, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['text/csv', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getCompensationBenchmarkDetails + * + * Get Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to fetch benchmark details for. (required) + * @param string|null $location_id Optional job location ID. When omitted, results aggregate across all locations for the job. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationBenchmarkDetails|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getCompensationBenchmarkDetails($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['getCompensationBenchmarkDetails'][0]) { + list($response) = $this->getCompensationBenchmarkDetailsWithHttpInfo($job_id, $location_id, $contentType); + return $response; + } + + /** + * Operation getCompensationBenchmarkDetailsWithHttpInfo + * + * Get Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to fetch benchmark details for. (required) + * @param string|null $location_id Optional job location ID. When omitted, results aggregate across all locations for the job. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationBenchmarkDetails|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getCompensationBenchmarkDetailsWithHttpInfo($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['getCompensationBenchmarkDetails'][0]) { + $request = $this->getCompensationBenchmarkDetailsRequest($job_id, $location_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarkDetails', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarkDetails', + $request, + $response, + ); + } + + /** + * Operation getCompensationBenchmarkDetailsAsync + * + * Get Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to fetch benchmark details for. (required) + * @param string|null $location_id Optional job location ID. When omitted, results aggregate across all locations for the job. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCompensationBenchmarkDetailsAsync($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['getCompensationBenchmarkDetails'][0]) { + return $this->getCompensationBenchmarkDetailsAsyncWithHttpInfo($job_id, $location_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCompensationBenchmarkDetailsAsyncWithHttpInfo + * + * Get Compensation Benchmark Details + * + * @param string $job_id ID of the company job title to fetch benchmark details for. (required) + * @param string|null $location_id Optional job location ID. When omitted, results aggregate across all locations for the job. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCompensationBenchmarkDetailsAsyncWithHttpInfo($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['getCompensationBenchmarkDetails'][0]) { + $returnType = '\BhrSdk\Model\CompensationBenchmarkDetails'; + $request = $this->getCompensationBenchmarkDetailsRequest($job_id, $location_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getCompensationBenchmarkDetails' + * + * @param string $job_id ID of the company job title to fetch benchmark details for. (required) + * @param string|null $location_id Optional job location ID. When omitted, results aggregate across all locations for the job. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompensationBenchmarkDetails'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCompensationBenchmarkDetailsRequest($job_id, $location_id = null, string $contentType = self::CONTENT_TYPES['getCompensationBenchmarkDetails'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'job_id' => $job_id, + ], + methodName: 'getCompensationBenchmarkDetails' + ); + + $resourcePath = '/api/v1/compensation/benchmarks/details'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'jobId' => ['value' => $job_id, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'locationId' => ['value' => $location_id, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation importCompensationBenchmarks + * + * Import Compensation Benchmarks From CSV + * + * @param \SplFileObject $file CSV file to import. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['importCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ImportCompensationBenchmarksResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function importCompensationBenchmarks($file, string $contentType = self::CONTENT_TYPES['importCompensationBenchmarks'][0]) { + list($response) = $this->importCompensationBenchmarksWithHttpInfo($file, $contentType); + return $response; + } + + /** + * Operation importCompensationBenchmarksWithHttpInfo + * + * Import Compensation Benchmarks From CSV + * + * @param \SplFileObject $file CSV file to import. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['importCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ImportCompensationBenchmarksResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function importCompensationBenchmarksWithHttpInfo($file, string $contentType = self::CONTENT_TYPES['importCompensationBenchmarks'][0]) { + $request = $this->importCompensationBenchmarksRequest($file, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ImportCompensationBenchmarksResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ImportCompensationBenchmarksResponse', + $request, + $response, + ); + } + + /** + * Operation importCompensationBenchmarksAsync + * + * Import Compensation Benchmarks From CSV + * + * @param \SplFileObject $file CSV file to import. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['importCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCompensationBenchmarksAsync($file, string $contentType = self::CONTENT_TYPES['importCompensationBenchmarks'][0]) { + return $this->importCompensationBenchmarksAsyncWithHttpInfo($file, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importCompensationBenchmarksAsyncWithHttpInfo + * + * Import Compensation Benchmarks From CSV + * + * @param \SplFileObject $file CSV file to import. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['importCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCompensationBenchmarksAsyncWithHttpInfo($file, string $contentType = self::CONTENT_TYPES['importCompensationBenchmarks'][0]) { + $returnType = '\BhrSdk\Model\ImportCompensationBenchmarksResponse'; + $request = $this->importCompensationBenchmarksRequest($file, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'importCompensationBenchmarks' + * + * @param \SplFileObject $file CSV file to import. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['importCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importCompensationBenchmarksRequest($file, string $contentType = self::CONTENT_TYPES['importCompensationBenchmarks'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'file' => $file, + ], + methodName: 'importCompensationBenchmarks' + ); + + $resourcePath = '/api/v1/compensation/benchmarks/import'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + + $multipart = true; + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + if (count($formParams) > 0) { + /* @phpstan-ignore-next-line */ + 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); + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listCompensationBenchmarkSources + * + * List Compensation Benchmark Sources + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationBenchmarkSource[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listCompensationBenchmarkSources(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarkSources'][0]) { + list($response) = $this->listCompensationBenchmarkSourcesWithHttpInfo($contentType); + return $response; + } + + /** + * Operation listCompensationBenchmarkSourcesWithHttpInfo + * + * List Compensation Benchmark Sources + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationBenchmarkSource[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listCompensationBenchmarkSourcesWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarkSources'][0]) { + $request = $this->listCompensationBenchmarkSourcesRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarkSource[]', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarkSource[]', + $request, + $response, + ); + } + + /** + * Operation listCompensationBenchmarkSourcesAsync + * + * List Compensation Benchmark Sources + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompensationBenchmarkSourcesAsync(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarkSources'][0]) { + return $this->listCompensationBenchmarkSourcesAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCompensationBenchmarkSourcesAsyncWithHttpInfo + * + * List Compensation Benchmark Sources + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompensationBenchmarkSourcesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarkSources'][0]) { + $returnType = '\BhrSdk\Model\CompensationBenchmarkSource[]'; + $request = $this->listCompensationBenchmarkSourcesRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listCompensationBenchmarkSources' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listCompensationBenchmarkSourcesRequest(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarkSources'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks/sources'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listCompensationBenchmarks + * + * List Compensation Benchmarks + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationBenchmarksList|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listCompensationBenchmarks(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarks'][0]) { + list($response) = $this->listCompensationBenchmarksWithHttpInfo($contentType); + return $response; + } + + /** + * Operation listCompensationBenchmarksWithHttpInfo + * + * List Compensation Benchmarks + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationBenchmarksList|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listCompensationBenchmarksWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarks'][0]) { + $request = $this->listCompensationBenchmarksRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarksList', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationBenchmarksList', + $request, + $response, + ); + } + + /** + * Operation listCompensationBenchmarksAsync + * + * List Compensation Benchmarks + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompensationBenchmarksAsync(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarks'][0]) { + return $this->listCompensationBenchmarksAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCompensationBenchmarksAsyncWithHttpInfo + * + * List Compensation Benchmarks + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCompensationBenchmarksAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarks'][0]) { + $returnType = '\BhrSdk\Model\CompensationBenchmarksList'; + $request = $this->listCompensationBenchmarksRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listCompensationBenchmarks' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listCompensationBenchmarks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listCompensationBenchmarksRequest(string $contentType = self::CONTENT_TYPES['listCompensationBenchmarks'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateCompensationBenchmark + * + * Update Compensation Benchmark + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkRequest|null $update_compensation_benchmark_request update_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\UpdatedCompensationBenchmark|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function updateCompensationBenchmark($update_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmark'][0]) { + list($response) = $this->updateCompensationBenchmarkWithHttpInfo($update_compensation_benchmark_request, $contentType); + return $response; + } + + /** + * Operation updateCompensationBenchmarkWithHttpInfo + * + * Update Compensation Benchmark + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkRequest|null $update_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmark'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\UpdatedCompensationBenchmark|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCompensationBenchmarkWithHttpInfo($update_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmark'][0]) { + $request = $this->updateCompensationBenchmarkRequest($update_compensation_benchmark_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdatedCompensationBenchmark', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdatedCompensationBenchmark', + $request, + $response, + ); + } + + /** + * Operation updateCompensationBenchmarkAsync + * + * Update Compensation Benchmark + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkRequest|null $update_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCompensationBenchmarkAsync($update_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmark'][0]) { + return $this->updateCompensationBenchmarkAsyncWithHttpInfo($update_compensation_benchmark_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCompensationBenchmarkAsyncWithHttpInfo + * + * Update Compensation Benchmark + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkRequest|null $update_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCompensationBenchmarkAsyncWithHttpInfo($update_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmark'][0]) { + $returnType = '\BhrSdk\Model\UpdatedCompensationBenchmark'; + $request = $this->updateCompensationBenchmarkRequest($update_compensation_benchmark_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateCompensationBenchmark' + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkRequest|null $update_compensation_benchmark_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmark'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateCompensationBenchmarkRequest($update_compensation_benchmark_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmark'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_compensation_benchmark_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_compensation_benchmark_request)); + } else { + $httpBody = is_array($update_compensation_benchmark_request) ? json_encode($update_compensation_benchmark_request) : $update_compensation_benchmark_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateCompensationBenchmarkSources + * + * Update Compensation Benchmark Sources + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest|null $update_compensation_benchmark_sources_request update_compensation_benchmark_sources_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function updateCompensationBenchmarkSources($update_compensation_benchmark_sources_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmarkSources'][0]) { + list($response) = $this->updateCompensationBenchmarkSourcesWithHttpInfo($update_compensation_benchmark_sources_request, $contentType); + return $response; + } + + /** + * Operation updateCompensationBenchmarkSourcesWithHttpInfo + * + * Update Compensation Benchmark Sources + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest|null $update_compensation_benchmark_sources_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCompensationBenchmarkSourcesWithHttpInfo($update_compensation_benchmark_sources_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmarkSources'][0]) { + $request = $this->updateCompensationBenchmarkSourcesRequest($update_compensation_benchmark_sources_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse', + $request, + $response, + ); + } + + /** + * Operation updateCompensationBenchmarkSourcesAsync + * + * Update Compensation Benchmark Sources + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest|null $update_compensation_benchmark_sources_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCompensationBenchmarkSourcesAsync($update_compensation_benchmark_sources_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmarkSources'][0]) { + return $this->updateCompensationBenchmarkSourcesAsyncWithHttpInfo($update_compensation_benchmark_sources_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCompensationBenchmarkSourcesAsyncWithHttpInfo + * + * Update Compensation Benchmark Sources + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest|null $update_compensation_benchmark_sources_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateCompensationBenchmarkSourcesAsyncWithHttpInfo($update_compensation_benchmark_sources_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmarkSources'][0]) { + $returnType = '\BhrSdk\Model\UpdateCompensationBenchmarkSourcesResponse'; + $request = $this->updateCompensationBenchmarkSourcesRequest($update_compensation_benchmark_sources_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateCompensationBenchmarkSources' + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourcesRequest|null $update_compensation_benchmark_sources_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateCompensationBenchmarkSources'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateCompensationBenchmarkSourcesRequest($update_compensation_benchmark_sources_request = null, string $contentType = self::CONTENT_TYPES['updateCompensationBenchmarkSources'][0]) { + + $resourcePath = '/api/v1/compensation/benchmarks/sources'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_compensation_benchmark_sources_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_compensation_benchmark_sources_request)); + } else { + $httpBody = is_array($update_compensation_benchmark_sources_request) ? json_encode($update_compensation_benchmark_sources_request) : $update_compensation_benchmark_sources_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/CompensationPlanningApi.php b/lib/Api/CompensationPlanningApi.php new file mode 100644 index 00000000..4a635fed --- /dev/null +++ b/lib/Api/CompensationPlanningApi.php @@ -0,0 +1,6628 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * CompensationPlanningApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationPlanningApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'a05b6d5f564f805d688ff2c1e37c3990' => [ + 'application/json', + ], + 'a6b8da1348a3151fe95adc03aaf64447' => [ + 'application/json', + ], + 'b1e467e0eef72350eec61fcfeaf4e19d' => [ + 'application/json', + ], + 'b3c51254de6918637a971fe4af382a53' => [ + 'application/json', + ], + 'b65f246186b41a9783a9397c11c703b4' => [ + 'application/json', + ], + 'c79f9c5950f983e59d2626faa30c00a1' => [ + 'application/json', + ], + 'c7c32ed5278ac67e2e518bf7484a75dc' => [ + 'application/json', + ], + 'call100b0cf8c5207b35697ff10370fd5fe1' => [ + 'application/json', + ], + 'call1d1fc0f164cb51973a0206b8e2fb2d2d' => [ + 'application/json', + ], + 'call1d64402ee192568adbd5e3179a91e6e2' => [ + 'application/json', + ], + 'call22ad75be25455279e2987c80851af5fc' => [ + 'application/json', + ], + 'call329acecaa6df729733d0752aa9f6b204' => [ + 'application/json', + ], + 'call3958585c861325ea7a2cd30a8c74f042' => [ + 'application/json', + ], + 'call3a19f07aa737dc826ba43b9a1c1cd257' => [ + 'application/json', + ], + 'call4e886b18264480611f380805301c49c4' => [ + 'application/json', + ], + 'call593d5bff120edf2a218a92022a682728' => [ + 'application/json', + ], + 'call5c2b55158b0950b1e9211655666645b6' => [ + 'application/json', + ], + 'call5c4aab35a34f5760ec044104b5232bf5' => [ + 'application/json', + ], + 'call7efceaee2c010f88244dd01ee81e6e7b' => [ + 'application/json', + ], + 'call89a5068111ec499135c7d6e9a53d5a30' => [ + 'application/json', + ], + 'call9bc279d788f6e86b4cd8b2e0d3de91b1' => [ + 'application/json', + ], + 'cf87b8e09a001b6fb81dfce6c20ab9e3' => [ + 'application/json', + ], + 'd6987e300672a00c7cfe59afebb64156' => [ + 'application/json', + ], + 'dacd313af2106213fc4696175941ce65' => [ + 'application/json', + ], + 'e2ac4e1535f296cb8901f209e04caa83' => [ + 'application/json', + ], + 'ef7619b0ee4c8dc079aaea870cfbe81b' => [ + 'application/json', + ], + 'f3883a522dadbe9e11b34f8b656e3adb' => [ + 'application/json', + ], + 'f4b431363af6573af46750f32632e88b' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation a05b6d5f564f805d688ff2c1e37c3990 + * + * Send recommendations to next stage + * + * @param int $id id (required) + * @param \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request $a05b6d5f564f805d688ff2c1e37c3990_request a05b6d5f564f805d688ff2c1e37c3990_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SendRecommendationsResponse + */ + public function a05b6d5f564f805d688ff2c1e37c3990($id, $a05b6d5f564f805d688ff2c1e37c3990_request, string $contentType = self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'][0]) { + list($response) = $this->a05b6d5f564f805d688ff2c1e37c3990WithHttpInfo($id, $a05b6d5f564f805d688ff2c1e37c3990_request, $contentType); + return $response; + } + + /** + * Operation a05b6d5f564f805d688ff2c1e37c3990WithHttpInfo + * + * Send recommendations to next stage + * + * @param int $id (required) + * @param \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request $a05b6d5f564f805d688ff2c1e37c3990_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SendRecommendationsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function a05b6d5f564f805d688ff2c1e37c3990WithHttpInfo($id, $a05b6d5f564f805d688ff2c1e37c3990_request, string $contentType = self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'][0]) { + $request = $this->a05b6d5f564f805d688ff2c1e37c3990Request($id, $a05b6d5f564f805d688ff2c1e37c3990_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SendRecommendationsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SendRecommendationsResponse', + $request, + $response, + ); + } + + /** + * Operation a05b6d5f564f805d688ff2c1e37c3990Async + * + * Send recommendations to next stage + * + * @param int $id (required) + * @param \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request $a05b6d5f564f805d688ff2c1e37c3990_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a05b6d5f564f805d688ff2c1e37c3990Async($id, $a05b6d5f564f805d688ff2c1e37c3990_request, string $contentType = self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'][0]) { + return $this->a05b6d5f564f805d688ff2c1e37c3990AsyncWithHttpInfo($id, $a05b6d5f564f805d688ff2c1e37c3990_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation a05b6d5f564f805d688ff2c1e37c3990AsyncWithHttpInfo + * + * Send recommendations to next stage + * + * @param int $id (required) + * @param \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request $a05b6d5f564f805d688ff2c1e37c3990_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a05b6d5f564f805d688ff2c1e37c3990AsyncWithHttpInfo($id, $a05b6d5f564f805d688ff2c1e37c3990_request, string $contentType = self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'][0]) { + $returnType = '\BhrSdk\Model\SendRecommendationsResponse'; + $request = $this->a05b6d5f564f805d688ff2c1e37c3990Request($id, $a05b6d5f564f805d688ff2c1e37c3990_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'a05b6d5f564f805d688ff2c1e37c3990' + * + * @param int $id (required) + * @param \BhrSdk\Model\A05b6d5f564f805d688ff2c1e37c3990Request $a05b6d5f564f805d688ff2c1e37c3990_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function a05b6d5f564f805d688ff2c1e37c3990Request($id, $a05b6d5f564f805d688ff2c1e37c3990_request, string $contentType = self::CONTENT_TYPES['a05b6d5f564f805d688ff2c1e37c3990'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'a05b6d5f564f805d688ff2c1e37c3990_request' => $a05b6d5f564f805d688ff2c1e37c3990_request, + ], + methodName: 'a05b6d5f564f805d688ff2c1e37c3990' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/recommendations/send'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($a05b6d5f564f805d688ff2c1e37c3990_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($a05b6d5f564f805d688ff2c1e37c3990_request)); + } else { + $httpBody = is_array($a05b6d5f564f805d688ff2c1e37c3990_request) ? json_encode($a05b6d5f564f805d688ff2c1e37c3990_request) : $a05b6d5f564f805d688ff2c1e37c3990_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation a6b8da1348a3151fe95adc03aaf64447 + * + * List employees in compensation planning cycle + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function a6b8da1348a3151fe95adc03aaf64447($id, string $contentType = self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'][0]) { + list($response) = $this->a6b8da1348a3151fe95adc03aaf64447WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation a6b8da1348a3151fe95adc03aaf64447WithHttpInfo + * + * List employees in compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function a6b8da1348a3151fe95adc03aaf64447WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'][0]) { + $request = $this->a6b8da1348a3151fe95adc03aaf64447Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation a6b8da1348a3151fe95adc03aaf64447Async + * + * List employees in compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a6b8da1348a3151fe95adc03aaf64447Async($id, string $contentType = self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'][0]) { + return $this->a6b8da1348a3151fe95adc03aaf64447AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation a6b8da1348a3151fe95adc03aaf64447AsyncWithHttpInfo + * + * List employees in compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function a6b8da1348a3151fe95adc03aaf64447AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->a6b8da1348a3151fe95adc03aaf64447Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'a6b8da1348a3151fe95adc03aaf64447' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function a6b8da1348a3151fe95adc03aaf64447Request($id, string $contentType = self::CONTENT_TYPES['a6b8da1348a3151fe95adc03aaf64447'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'a6b8da1348a3151fe95adc03aaf64447' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/employees'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation b1e467e0eef72350eec61fcfeaf4e19d + * + * Remove from approval flow + * + * @param int $id id (required) + * @param string $employee_id employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function b1e467e0eef72350eec61fcfeaf4e19d($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'][0]) { + list($response) = $this->b1e467e0eef72350eec61fcfeaf4e19dWithHttpInfo($id, $employee_id, $group_by, $contentType); + return $response; + } + + /** + * Operation b1e467e0eef72350eec61fcfeaf4e19dWithHttpInfo + * + * Remove from approval flow + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function b1e467e0eef72350eec61fcfeaf4e19dWithHttpInfo($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'][0]) { + $request = $this->b1e467e0eef72350eec61fcfeaf4e19dRequest($id, $employee_id, $group_by, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation b1e467e0eef72350eec61fcfeaf4e19dAsync + * + * Remove from approval flow + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b1e467e0eef72350eec61fcfeaf4e19dAsync($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'][0]) { + return $this->b1e467e0eef72350eec61fcfeaf4e19dAsyncWithHttpInfo($id, $employee_id, $group_by, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation b1e467e0eef72350eec61fcfeaf4e19dAsyncWithHttpInfo + * + * Remove from approval flow + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b1e467e0eef72350eec61fcfeaf4e19dAsyncWithHttpInfo($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->b1e467e0eef72350eec61fcfeaf4e19dRequest($id, $employee_id, $group_by, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'b1e467e0eef72350eec61fcfeaf4e19d' + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function b1e467e0eef72350eec61fcfeaf4e19dRequest($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['b1e467e0eef72350eec61fcfeaf4e19d'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'employee_id' => $employee_id, + ], + methodName: 'b1e467e0eef72350eec61fcfeaf4e19d' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'groupBy' => ['value' => $group_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation b3c51254de6918637a971fe4af382a53 + * + * List compensation planning cycle admins + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationPlanningCycleAdminsResponse + */ + public function b3c51254de6918637a971fe4af382a53($id, string $contentType = self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'][0]) { + list($response) = $this->b3c51254de6918637a971fe4af382a53WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation b3c51254de6918637a971fe4af382a53WithHttpInfo + * + * List compensation planning cycle admins + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationPlanningCycleAdminsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function b3c51254de6918637a971fe4af382a53WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'][0]) { + $request = $this->b3c51254de6918637a971fe4af382a53Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationPlanningCycleAdminsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationPlanningCycleAdminsResponse', + $request, + $response, + ); + } + + /** + * Operation b3c51254de6918637a971fe4af382a53Async + * + * List compensation planning cycle admins + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b3c51254de6918637a971fe4af382a53Async($id, string $contentType = self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'][0]) { + return $this->b3c51254de6918637a971fe4af382a53AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation b3c51254de6918637a971fe4af382a53AsyncWithHttpInfo + * + * List compensation planning cycle admins + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b3c51254de6918637a971fe4af382a53AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'][0]) { + $returnType = '\BhrSdk\Model\CompensationPlanningCycleAdminsResponse'; + $request = $this->b3c51254de6918637a971fe4af382a53Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'b3c51254de6918637a971fe4af382a53' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function b3c51254de6918637a971fe4af382a53Request($id, string $contentType = self::CONTENT_TYPES['b3c51254de6918637a971fe4af382a53'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'b3c51254de6918637a971fe4af382a53' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/admins'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation b65f246186b41a9783a9397c11c703b4 + * + * List compensation planning cycles + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function b65f246186b41a9783a9397c11c703b4(string $contentType = self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'][0]) { + list($response) = $this->b65f246186b41a9783a9397c11c703b4WithHttpInfo($contentType); + return $response; + } + + /** + * Operation b65f246186b41a9783a9397c11c703b4WithHttpInfo + * + * List compensation planning cycles + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function b65f246186b41a9783a9397c11c703b4WithHttpInfo(string $contentType = self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'][0]) { + $request = $this->b65f246186b41a9783a9397c11c703b4Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation b65f246186b41a9783a9397c11c703b4Async + * + * List compensation planning cycles + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b65f246186b41a9783a9397c11c703b4Async(string $contentType = self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'][0]) { + return $this->b65f246186b41a9783a9397c11c703b4AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation b65f246186b41a9783a9397c11c703b4AsyncWithHttpInfo + * + * List compensation planning cycles + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function b65f246186b41a9783a9397c11c703b4AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->b65f246186b41a9783a9397c11c703b4Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'b65f246186b41a9783a9397c11c703b4' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function b65f246186b41a9783a9397c11c703b4Request(string $contentType = self::CONTENT_TYPES['b65f246186b41a9783a9397c11c703b4'][0]) { + + $resourcePath = '/api/v1/compensation/planning_cycles'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation c79f9c5950f983e59d2626faa30c00a1 + * + * Save change comm template + * + * @param int $id id (required) + * @param \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request $c79f9c5950f983e59d2626faa30c00a1_request c79f9c5950f983e59d2626faa30c00a1_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SaveChangeCommTemplateResponse + */ + public function c79f9c5950f983e59d2626faa30c00a1($id, $c79f9c5950f983e59d2626faa30c00a1_request, string $contentType = self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'][0]) { + list($response) = $this->c79f9c5950f983e59d2626faa30c00a1WithHttpInfo($id, $c79f9c5950f983e59d2626faa30c00a1_request, $contentType); + return $response; + } + + /** + * Operation c79f9c5950f983e59d2626faa30c00a1WithHttpInfo + * + * Save change comm template + * + * @param int $id (required) + * @param \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request $c79f9c5950f983e59d2626faa30c00a1_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SaveChangeCommTemplateResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function c79f9c5950f983e59d2626faa30c00a1WithHttpInfo($id, $c79f9c5950f983e59d2626faa30c00a1_request, string $contentType = self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'][0]) { + $request = $this->c79f9c5950f983e59d2626faa30c00a1Request($id, $c79f9c5950f983e59d2626faa30c00a1_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SaveChangeCommTemplateResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SaveChangeCommTemplateResponse', + $request, + $response, + ); + } + + /** + * Operation c79f9c5950f983e59d2626faa30c00a1Async + * + * Save change comm template + * + * @param int $id (required) + * @param \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request $c79f9c5950f983e59d2626faa30c00a1_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c79f9c5950f983e59d2626faa30c00a1Async($id, $c79f9c5950f983e59d2626faa30c00a1_request, string $contentType = self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'][0]) { + return $this->c79f9c5950f983e59d2626faa30c00a1AsyncWithHttpInfo($id, $c79f9c5950f983e59d2626faa30c00a1_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation c79f9c5950f983e59d2626faa30c00a1AsyncWithHttpInfo + * + * Save change comm template + * + * @param int $id (required) + * @param \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request $c79f9c5950f983e59d2626faa30c00a1_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c79f9c5950f983e59d2626faa30c00a1AsyncWithHttpInfo($id, $c79f9c5950f983e59d2626faa30c00a1_request, string $contentType = self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'][0]) { + $returnType = '\BhrSdk\Model\SaveChangeCommTemplateResponse'; + $request = $this->c79f9c5950f983e59d2626faa30c00a1Request($id, $c79f9c5950f983e59d2626faa30c00a1_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'c79f9c5950f983e59d2626faa30c00a1' + * + * @param int $id (required) + * @param \BhrSdk\Model\C79f9c5950f983e59d2626faa30c00a1Request $c79f9c5950f983e59d2626faa30c00a1_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function c79f9c5950f983e59d2626faa30c00a1Request($id, $c79f9c5950f983e59d2626faa30c00a1_request, string $contentType = self::CONTENT_TYPES['c79f9c5950f983e59d2626faa30c00a1'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'c79f9c5950f983e59d2626faa30c00a1_request' => $c79f9c5950f983e59d2626faa30c00a1_request, + ], + methodName: 'c79f9c5950f983e59d2626faa30c00a1' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/change_comm/template'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($c79f9c5950f983e59d2626faa30c00a1_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($c79f9c5950f983e59d2626faa30c00a1_request)); + } else { + $httpBody = is_array($c79f9c5950f983e59d2626faa30c00a1_request) ? json_encode($c79f9c5950f983e59d2626faa30c00a1_request) : $c79f9c5950f983e59d2626faa30c00a1_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation c7c32ed5278ac67e2e518bf7484a75dc + * + * Add cycle admins + * + * @param int $id id (required) + * @param \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest $c7c32ed5278ac67e2e518bf7484a75dc_request c7c32ed5278ac67e2e518bf7484a75dc_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\AddCycleAdminsResponse + */ + public function c7c32ed5278ac67e2e518bf7484a75dc($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, string $contentType = self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'][0]) { + list($response) = $this->c7c32ed5278ac67e2e518bf7484a75dcWithHttpInfo($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, $contentType); + return $response; + } + + /** + * Operation c7c32ed5278ac67e2e518bf7484a75dcWithHttpInfo + * + * Add cycle admins + * + * @param int $id (required) + * @param \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest $c7c32ed5278ac67e2e518bf7484a75dc_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\AddCycleAdminsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function c7c32ed5278ac67e2e518bf7484a75dcWithHttpInfo($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, string $contentType = self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'][0]) { + $request = $this->c7c32ed5278ac67e2e518bf7484a75dcRequest($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AddCycleAdminsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AddCycleAdminsResponse', + $request, + $response, + ); + } + + /** + * Operation c7c32ed5278ac67e2e518bf7484a75dcAsync + * + * Add cycle admins + * + * @param int $id (required) + * @param \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest $c7c32ed5278ac67e2e518bf7484a75dc_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c7c32ed5278ac67e2e518bf7484a75dcAsync($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, string $contentType = self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'][0]) { + return $this->c7c32ed5278ac67e2e518bf7484a75dcAsyncWithHttpInfo($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation c7c32ed5278ac67e2e518bf7484a75dcAsyncWithHttpInfo + * + * Add cycle admins + * + * @param int $id (required) + * @param \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest $c7c32ed5278ac67e2e518bf7484a75dc_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function c7c32ed5278ac67e2e518bf7484a75dcAsyncWithHttpInfo($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, string $contentType = self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'][0]) { + $returnType = '\BhrSdk\Model\AddCycleAdminsResponse'; + $request = $this->c7c32ed5278ac67e2e518bf7484a75dcRequest($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'c7c32ed5278ac67e2e518bf7484a75dc' + * + * @param int $id (required) + * @param \BhrSdk\Model\C7c32ed5278ac67e2e518bf7484a75dcRequest $c7c32ed5278ac67e2e518bf7484a75dc_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function c7c32ed5278ac67e2e518bf7484a75dcRequest($id, $c7c32ed5278ac67e2e518bf7484a75dc_request, string $contentType = self::CONTENT_TYPES['c7c32ed5278ac67e2e518bf7484a75dc'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'c7c32ed5278ac67e2e518bf7484a75dc_request' => $c7c32ed5278ac67e2e518bf7484a75dc_request, + ], + methodName: 'c7c32ed5278ac67e2e518bf7484a75dc' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/admins'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($c7c32ed5278ac67e2e518bf7484a75dc_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($c7c32ed5278ac67e2e518bf7484a75dc_request)); + } else { + $httpBody = is_array($c7c32ed5278ac67e2e518bf7484a75dc_request) ? json_encode($c7c32ed5278ac67e2e518bf7484a75dc_request) : $c7c32ed5278ac67e2e518bf7484a75dc_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call100b0cf8c5207b35697ff10370fd5fe1 + * + * Update compensation planning cycle + * + * @param int $id id (required) + * @param \BhrSdk\Model\DetailsAndCurrencyRequestDataObject $details_and_currency_request_data_object Cycle details and currency settings to update (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function call100b0cf8c5207b35697ff10370fd5fe1($id, $details_and_currency_request_data_object, string $contentType = self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'][0]) { + list($response) = $this->call100b0cf8c5207b35697ff10370fd5fe1WithHttpInfo($id, $details_and_currency_request_data_object, $contentType); + return $response; + } + + /** + * Operation call100b0cf8c5207b35697ff10370fd5fe1WithHttpInfo + * + * Update compensation planning cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\DetailsAndCurrencyRequestDataObject $details_and_currency_request_data_object Cycle details and currency settings to update (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call100b0cf8c5207b35697ff10370fd5fe1WithHttpInfo($id, $details_and_currency_request_data_object, string $contentType = self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'][0]) { + $request = $this->call100b0cf8c5207b35697ff10370fd5fe1Request($id, $details_and_currency_request_data_object, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call100b0cf8c5207b35697ff10370fd5fe1Async + * + * Update compensation planning cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\DetailsAndCurrencyRequestDataObject $details_and_currency_request_data_object Cycle details and currency settings to update (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call100b0cf8c5207b35697ff10370fd5fe1Async($id, $details_and_currency_request_data_object, string $contentType = self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'][0]) { + return $this->call100b0cf8c5207b35697ff10370fd5fe1AsyncWithHttpInfo($id, $details_and_currency_request_data_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call100b0cf8c5207b35697ff10370fd5fe1AsyncWithHttpInfo + * + * Update compensation planning cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\DetailsAndCurrencyRequestDataObject $details_and_currency_request_data_object Cycle details and currency settings to update (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call100b0cf8c5207b35697ff10370fd5fe1AsyncWithHttpInfo($id, $details_and_currency_request_data_object, string $contentType = self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call100b0cf8c5207b35697ff10370fd5fe1Request($id, $details_and_currency_request_data_object, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call100b0cf8c5207b35697ff10370fd5fe1' + * + * @param int $id (required) + * @param \BhrSdk\Model\DetailsAndCurrencyRequestDataObject $details_and_currency_request_data_object Cycle details and currency settings to update (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call100b0cf8c5207b35697ff10370fd5fe1Request($id, $details_and_currency_request_data_object, string $contentType = self::CONTENT_TYPES['call100b0cf8c5207b35697ff10370fd5fe1'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'details_and_currency_request_data_object' => $details_and_currency_request_data_object, + ], + methodName: 'call100b0cf8c5207b35697ff10370fd5fe1' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($details_and_currency_request_data_object)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($details_and_currency_request_data_object)); + } else { + $httpBody = is_array($details_and_currency_request_data_object) ? json_encode($details_and_currency_request_data_object) : $details_and_currency_request_data_object; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call1d1fc0f164cb51973a0206b8e2fb2d2d + * + * Import budget breakdown + * + * @param int $id id (required) + * @param \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest $_1d1fc0f164cb51973a0206b8e2fb2d2d_request Budget breakdown import data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\BudgetBreakdownImportResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function call1d1fc0f164cb51973a0206b8e2fb2d2d($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, string $contentType = self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'][0]) { + list($response) = $this->call1d1fc0f164cb51973a0206b8e2fb2d2dWithHttpInfo($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, $contentType); + return $response; + } + + /** + * Operation call1d1fc0f164cb51973a0206b8e2fb2d2dWithHttpInfo + * + * Import budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest $_1d1fc0f164cb51973a0206b8e2fb2d2d_request Budget breakdown import data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\BudgetBreakdownImportResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call1d1fc0f164cb51973a0206b8e2fb2d2dWithHttpInfo($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, string $contentType = self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'][0]) { + $request = $this->call1d1fc0f164cb51973a0206b8e2fb2d2dRequest($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BudgetBreakdownImportResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BudgetBreakdownImportResponse', + $request, + $response, + ); + } + + /** + * Operation call1d1fc0f164cb51973a0206b8e2fb2d2dAsync + * + * Import budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest $_1d1fc0f164cb51973a0206b8e2fb2d2d_request Budget breakdown import data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1d1fc0f164cb51973a0206b8e2fb2d2dAsync($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, string $contentType = self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'][0]) { + return $this->call1d1fc0f164cb51973a0206b8e2fb2d2dAsyncWithHttpInfo($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call1d1fc0f164cb51973a0206b8e2fb2d2dAsyncWithHttpInfo + * + * Import budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest $_1d1fc0f164cb51973a0206b8e2fb2d2d_request Budget breakdown import data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1d1fc0f164cb51973a0206b8e2fb2d2dAsyncWithHttpInfo($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, string $contentType = self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'][0]) { + $returnType = '\BhrSdk\Model\BudgetBreakdownImportResponse'; + $request = $this->call1d1fc0f164cb51973a0206b8e2fb2d2dRequest($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call1d1fc0f164cb51973a0206b8e2fb2d2d' + * + * @param int $id (required) + * @param \BhrSdk\Model\_1d1fc0f164cb51973a0206b8e2fb2d2dRequest $_1d1fc0f164cb51973a0206b8e2fb2d2d_request Budget breakdown import data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call1d1fc0f164cb51973a0206b8e2fb2d2dRequest($id, $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, string $contentType = self::CONTENT_TYPES['call1d1fc0f164cb51973a0206b8e2fb2d2d'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + '_1d1fc0f164cb51973a0206b8e2fb2d2d_request' => $_1d1fc0f164cb51973a0206b8e2fb2d2d_request, + ], + methodName: 'call1d1fc0f164cb51973a0206b8e2fb2d2d' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/budgets/import'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($_1d1fc0f164cb51973a0206b8e2fb2d2d_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($_1d1fc0f164cb51973a0206b8e2fb2d2d_request)); + } else { + $httpBody = is_array($_1d1fc0f164cb51973a0206b8e2fb2d2d_request) ? json_encode($_1d1fc0f164cb51973a0206b8e2fb2d2d_request) : $_1d1fc0f164cb51973a0206b8e2fb2d2d_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call1d64402ee192568adbd5e3179a91e6e2 + * + * Save budget breakdown + * + * @param int $id id (required) + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] $_1d64402ee192568adbd5e3179a91e6e2_request_inner Budget breakdown data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function call1d64402ee192568adbd5e3179a91e6e2($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, string $contentType = self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'][0]) { + list($response) = $this->call1d64402ee192568adbd5e3179a91e6e2WithHttpInfo($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, $contentType); + return $response; + } + + /** + * Operation call1d64402ee192568adbd5e3179a91e6e2WithHttpInfo + * + * Save budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] $_1d64402ee192568adbd5e3179a91e6e2_request_inner Budget breakdown data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'] to see the possible values for this operation + * + * @throws \BhrSdk\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 call1d64402ee192568adbd5e3179a91e6e2WithHttpInfo($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, string $contentType = self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'][0]) { + $request = $this->call1d64402ee192568adbd5e3179a91e6e2Request($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation call1d64402ee192568adbd5e3179a91e6e2Async + * + * Save budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] $_1d64402ee192568adbd5e3179a91e6e2_request_inner Budget breakdown data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1d64402ee192568adbd5e3179a91e6e2Async($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, string $contentType = self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'][0]) { + return $this->call1d64402ee192568adbd5e3179a91e6e2AsyncWithHttpInfo($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call1d64402ee192568adbd5e3179a91e6e2AsyncWithHttpInfo + * + * Save budget breakdown + * + * @param int $id (required) + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] $_1d64402ee192568adbd5e3179a91e6e2_request_inner Budget breakdown data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1d64402ee192568adbd5e3179a91e6e2AsyncWithHttpInfo($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, string $contentType = self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'][0]) { + + $request = $this->call1d64402ee192568adbd5e3179a91e6e2Request($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'call1d64402ee192568adbd5e3179a91e6e2' + * + * @param int $id (required) + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInner[] $_1d64402ee192568adbd5e3179a91e6e2_request_inner Budget breakdown data (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call1d64402ee192568adbd5e3179a91e6e2Request($id, $_1d64402ee192568adbd5e3179a91e6e2_request_inner, string $contentType = self::CONTENT_TYPES['call1d64402ee192568adbd5e3179a91e6e2'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + '_1d64402ee192568adbd5e3179a91e6e2_request_inner' => $_1d64402ee192568adbd5e3179a91e6e2_request_inner, + ], + methodName: 'call1d64402ee192568adbd5e3179a91e6e2' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/budgets/breakdown'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($_1d64402ee192568adbd5e3179a91e6e2_request_inner)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($_1d64402ee192568adbd5e3179a91e6e2_request_inner)); + } else { + $httpBody = is_array($_1d64402ee192568adbd5e3179a91e6e2_request_inner) ? json_encode($_1d64402ee192568adbd5e3179a91e6e2_request_inner) : $_1d64402ee192568adbd5e3179a91e6e2_request_inner; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call22ad75be25455279e2987c80851af5fc + * + * Delete compensation planning cycle + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function call22ad75be25455279e2987c80851af5fc($id, string $contentType = self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'][0]) { + list($response) = $this->call22ad75be25455279e2987c80851af5fcWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call22ad75be25455279e2987c80851af5fcWithHttpInfo + * + * Delete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'] to see the possible values for this operation + * + * @throws \BhrSdk\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 call22ad75be25455279e2987c80851af5fcWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'][0]) { + $request = $this->call22ad75be25455279e2987c80851af5fcRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation call22ad75be25455279e2987c80851af5fcAsync + * + * Delete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call22ad75be25455279e2987c80851af5fcAsync($id, string $contentType = self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'][0]) { + return $this->call22ad75be25455279e2987c80851af5fcAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call22ad75be25455279e2987c80851af5fcAsyncWithHttpInfo + * + * Delete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call22ad75be25455279e2987c80851af5fcAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'][0]) { + + $request = $this->call22ad75be25455279e2987c80851af5fcRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'call22ad75be25455279e2987c80851af5fc' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call22ad75be25455279e2987c80851af5fcRequest($id, string $contentType = self::CONTENT_TYPES['call22ad75be25455279e2987c80851af5fc'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call22ad75be25455279e2987c80851af5fc' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call329acecaa6df729733d0752aa9f6b204 + * + * Get compensation planning cycle worksheet + * + * @param int $id id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call329acecaa6df729733d0752aa9f6b204($id, $type = null, string $contentType = self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'][0]) { + list($response) = $this->call329acecaa6df729733d0752aa9f6b204WithHttpInfo($id, $type, $contentType); + return $response; + } + + /** + * Operation call329acecaa6df729733d0752aa9f6b204WithHttpInfo + * + * Get compensation planning cycle worksheet + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call329acecaa6df729733d0752aa9f6b204WithHttpInfo($id, $type = null, string $contentType = self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'][0]) { + $request = $this->call329acecaa6df729733d0752aa9f6b204Request($id, $type, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call329acecaa6df729733d0752aa9f6b204Async + * + * Get compensation planning cycle worksheet + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call329acecaa6df729733d0752aa9f6b204Async($id, $type = null, string $contentType = self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'][0]) { + return $this->call329acecaa6df729733d0752aa9f6b204AsyncWithHttpInfo($id, $type, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call329acecaa6df729733d0752aa9f6b204AsyncWithHttpInfo + * + * Get compensation planning cycle worksheet + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call329acecaa6df729733d0752aa9f6b204AsyncWithHttpInfo($id, $type = null, string $contentType = self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call329acecaa6df729733d0752aa9f6b204Request($id, $type, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call329acecaa6df729733d0752aa9f6b204' + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call329acecaa6df729733d0752aa9f6b204Request($id, $type = null, string $contentType = self::CONTENT_TYPES['call329acecaa6df729733d0752aa9f6b204'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call329acecaa6df729733d0752aa9f6b204' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/worksheet'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'type' => ['value' => $type, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call3958585c861325ea7a2cd30a8c74f042 + * + * Add employees to cycle + * + * @param int $id id (required) + * @param \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request $_3958585c861325ea7a2cd30a8c74f042_request Employee IDs to add (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function call3958585c861325ea7a2cd30a8c74f042($id, $_3958585c861325ea7a2cd30a8c74f042_request, string $contentType = self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'][0]) { + list($response) = $this->call3958585c861325ea7a2cd30a8c74f042WithHttpInfo($id, $_3958585c861325ea7a2cd30a8c74f042_request, $contentType); + return $response; + } + + /** + * Operation call3958585c861325ea7a2cd30a8c74f042WithHttpInfo + * + * Add employees to cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request $_3958585c861325ea7a2cd30a8c74f042_request Employee IDs to add (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'] to see the possible values for this operation + * + * @throws \BhrSdk\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 call3958585c861325ea7a2cd30a8c74f042WithHttpInfo($id, $_3958585c861325ea7a2cd30a8c74f042_request, string $contentType = self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'][0]) { + $request = $this->call3958585c861325ea7a2cd30a8c74f042Request($id, $_3958585c861325ea7a2cd30a8c74f042_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation call3958585c861325ea7a2cd30a8c74f042Async + * + * Add employees to cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request $_3958585c861325ea7a2cd30a8c74f042_request Employee IDs to add (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call3958585c861325ea7a2cd30a8c74f042Async($id, $_3958585c861325ea7a2cd30a8c74f042_request, string $contentType = self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'][0]) { + return $this->call3958585c861325ea7a2cd30a8c74f042AsyncWithHttpInfo($id, $_3958585c861325ea7a2cd30a8c74f042_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call3958585c861325ea7a2cd30a8c74f042AsyncWithHttpInfo + * + * Add employees to cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request $_3958585c861325ea7a2cd30a8c74f042_request Employee IDs to add (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call3958585c861325ea7a2cd30a8c74f042AsyncWithHttpInfo($id, $_3958585c861325ea7a2cd30a8c74f042_request, string $contentType = self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'][0]) { + + $request = $this->call3958585c861325ea7a2cd30a8c74f042Request($id, $_3958585c861325ea7a2cd30a8c74f042_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'call3958585c861325ea7a2cd30a8c74f042' + * + * @param int $id (required) + * @param \BhrSdk\Model\_3958585c861325ea7a2cd30a8c74f042Request $_3958585c861325ea7a2cd30a8c74f042_request Employee IDs to add (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call3958585c861325ea7a2cd30a8c74f042Request($id, $_3958585c861325ea7a2cd30a8c74f042_request, string $contentType = self::CONTENT_TYPES['call3958585c861325ea7a2cd30a8c74f042'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + '_3958585c861325ea7a2cd30a8c74f042_request' => $_3958585c861325ea7a2cd30a8c74f042_request, + ], + methodName: 'call3958585c861325ea7a2cd30a8c74f042' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/employees'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($_3958585c861325ea7a2cd30a8c74f042_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($_3958585c861325ea7a2cd30a8c74f042_request)); + } else { + $httpBody = is_array($_3958585c861325ea7a2cd30a8c74f042_request) ? json_encode($_3958585c861325ea7a2cd30a8c74f042_request) : $_3958585c861325ea7a2cd30a8c74f042_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call3a19f07aa737dc826ba43b9a1c1cd257 + * + * Launch compensation planning cycle + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function call3a19f07aa737dc826ba43b9a1c1cd257($id, string $contentType = self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'][0]) { + list($response) = $this->call3a19f07aa737dc826ba43b9a1c1cd257WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call3a19f07aa737dc826ba43b9a1c1cd257WithHttpInfo + * + * Launch compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'] to see the possible values for this operation + * + * @throws \BhrSdk\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 call3a19f07aa737dc826ba43b9a1c1cd257WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'][0]) { + $request = $this->call3a19f07aa737dc826ba43b9a1c1cd257Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation call3a19f07aa737dc826ba43b9a1c1cd257Async + * + * Launch compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call3a19f07aa737dc826ba43b9a1c1cd257Async($id, string $contentType = self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'][0]) { + return $this->call3a19f07aa737dc826ba43b9a1c1cd257AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call3a19f07aa737dc826ba43b9a1c1cd257AsyncWithHttpInfo + * + * Launch compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call3a19f07aa737dc826ba43b9a1c1cd257AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'][0]) { + + $request = $this->call3a19f07aa737dc826ba43b9a1c1cd257Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'call3a19f07aa737dc826ba43b9a1c1cd257' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call3a19f07aa737dc826ba43b9a1c1cd257Request($id, string $contentType = self::CONTENT_TYPES['call3a19f07aa737dc826ba43b9a1c1cd257'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call3a19f07aa737dc826ba43b9a1c1cd257' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/launch'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call4e886b18264480611f380805301c49c4 + * + * Get compensation planning approval flows + * + * @param int $id id (required) + * @param string|null $group_by Optional grouping for flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call4e886b18264480611f380805301c49c4($id, $group_by = null, string $contentType = self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'][0]) { + list($response) = $this->call4e886b18264480611f380805301c49c4WithHttpInfo($id, $group_by, $contentType); + return $response; + } + + /** + * Operation call4e886b18264480611f380805301c49c4WithHttpInfo + * + * Get compensation planning approval flows + * + * @param int $id (required) + * @param string|null $group_by Optional grouping for flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call4e886b18264480611f380805301c49c4WithHttpInfo($id, $group_by = null, string $contentType = self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'][0]) { + $request = $this->call4e886b18264480611f380805301c49c4Request($id, $group_by, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call4e886b18264480611f380805301c49c4Async + * + * Get compensation planning approval flows + * + * @param int $id (required) + * @param string|null $group_by Optional grouping for flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call4e886b18264480611f380805301c49c4Async($id, $group_by = null, string $contentType = self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'][0]) { + return $this->call4e886b18264480611f380805301c49c4AsyncWithHttpInfo($id, $group_by, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call4e886b18264480611f380805301c49c4AsyncWithHttpInfo + * + * Get compensation planning approval flows + * + * @param int $id (required) + * @param string|null $group_by Optional grouping for flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call4e886b18264480611f380805301c49c4AsyncWithHttpInfo($id, $group_by = null, string $contentType = self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call4e886b18264480611f380805301c49c4Request($id, $group_by, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call4e886b18264480611f380805301c49c4' + * + * @param int $id (required) + * @param string|null $group_by Optional grouping for flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call4e886b18264480611f380805301c49c4Request($id, $group_by = null, string $contentType = self::CONTENT_TYPES['call4e886b18264480611f380805301c49c4'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call4e886b18264480611f380805301c49c4' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/approvals'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'groupBy' => ['value' => $group_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call593d5bff120edf2a218a92022a682728 + * + * Export compensation planning cycle worksheet to CSV + * + * @param int $id id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \SplFileObject + */ + public function call593d5bff120edf2a218a92022a682728($id, $type = null, string $contentType = self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'][0]) { + list($response) = $this->call593d5bff120edf2a218a92022a682728WithHttpInfo($id, $type, $contentType); + return $response; + } + + /** + * Operation call593d5bff120edf2a218a92022a682728WithHttpInfo + * + * Export compensation planning cycle worksheet to CSV + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + */ + public function call593d5bff120edf2a218a92022a682728WithHttpInfo($id, $type = null, string $contentType = self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'][0]) { + $request = $this->call593d5bff120edf2a218a92022a682728Request($id, $type, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\SplFileObject', + $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 ApiHelper::handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } + + /** + * Operation call593d5bff120edf2a218a92022a682728Async + * + * Export compensation planning cycle worksheet to CSV + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call593d5bff120edf2a218a92022a682728Async($id, $type = null, string $contentType = self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'][0]) { + return $this->call593d5bff120edf2a218a92022a682728AsyncWithHttpInfo($id, $type, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call593d5bff120edf2a218a92022a682728AsyncWithHttpInfo + * + * Export compensation planning cycle worksheet to CSV + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call593d5bff120edf2a218a92022a682728AsyncWithHttpInfo($id, $type = null, string $contentType = self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'][0]) { + $returnType = '\SplFileObject'; + $request = $this->call593d5bff120edf2a218a92022a682728Request($id, $type, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call593d5bff120edf2a218a92022a682728' + * + * @param int $id (required) + * @param string|null $type Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call593d5bff120edf2a218a92022a682728Request($id, $type = null, string $contentType = self::CONTENT_TYPES['call593d5bff120edf2a218a92022a682728'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call593d5bff120edf2a218a92022a682728' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/worksheet/export'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'type' => ['value' => $type, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['text/csv', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call5c2b55158b0950b1e9211655666645b6 + * + * Get compensation planning cycle details + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call5c2b55158b0950b1e9211655666645b6($id, string $contentType = self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'][0]) { + list($response) = $this->call5c2b55158b0950b1e9211655666645b6WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call5c2b55158b0950b1e9211655666645b6WithHttpInfo + * + * Get compensation planning cycle details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call5c2b55158b0950b1e9211655666645b6WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'][0]) { + $request = $this->call5c2b55158b0950b1e9211655666645b6Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call5c2b55158b0950b1e9211655666645b6Async + * + * Get compensation planning cycle details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call5c2b55158b0950b1e9211655666645b6Async($id, string $contentType = self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'][0]) { + return $this->call5c2b55158b0950b1e9211655666645b6AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call5c2b55158b0950b1e9211655666645b6AsyncWithHttpInfo + * + * Get compensation planning cycle details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call5c2b55158b0950b1e9211655666645b6AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call5c2b55158b0950b1e9211655666645b6Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call5c2b55158b0950b1e9211655666645b6' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call5c2b55158b0950b1e9211655666645b6Request($id, string $contentType = self::CONTENT_TYPES['call5c2b55158b0950b1e9211655666645b6'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call5c2b55158b0950b1e9211655666645b6' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call5c4aab35a34f5760ec044104b5232bf5 + * + * Set final approver + * + * @param int $id id (required) + * @param string $employee_id employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call5c4aab35a34f5760ec044104b5232bf5($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'][0]) { + list($response) = $this->call5c4aab35a34f5760ec044104b5232bf5WithHttpInfo($id, $employee_id, $group_by, $contentType); + return $response; + } + + /** + * Operation call5c4aab35a34f5760ec044104b5232bf5WithHttpInfo + * + * Set final approver + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call5c4aab35a34f5760ec044104b5232bf5WithHttpInfo($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'][0]) { + $request = $this->call5c4aab35a34f5760ec044104b5232bf5Request($id, $employee_id, $group_by, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call5c4aab35a34f5760ec044104b5232bf5Async + * + * Set final approver + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call5c4aab35a34f5760ec044104b5232bf5Async($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'][0]) { + return $this->call5c4aab35a34f5760ec044104b5232bf5AsyncWithHttpInfo($id, $employee_id, $group_by, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call5c4aab35a34f5760ec044104b5232bf5AsyncWithHttpInfo + * + * Set final approver + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call5c4aab35a34f5760ec044104b5232bf5AsyncWithHttpInfo($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call5c4aab35a34f5760ec044104b5232bf5Request($id, $employee_id, $group_by, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call5c4aab35a34f5760ec044104b5232bf5' + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call5c4aab35a34f5760ec044104b5232bf5Request($id, $employee_id, $group_by = null, string $contentType = self::CONTENT_TYPES['call5c4aab35a34f5760ec044104b5232bf5'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'employee_id' => $employee_id, + ], + methodName: 'call5c4aab35a34f5760ec044104b5232bf5' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId}'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'groupBy' => ['value' => $group_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call7efceaee2c010f88244dd01ee81e6e7b + * + * Get compensation planning cycle budgets + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call7efceaee2c010f88244dd01ee81e6e7b($id, string $contentType = self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'][0]) { + list($response) = $this->call7efceaee2c010f88244dd01ee81e6e7bWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call7efceaee2c010f88244dd01ee81e6e7bWithHttpInfo + * + * Get compensation planning cycle budgets + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call7efceaee2c010f88244dd01ee81e6e7bWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'][0]) { + $request = $this->call7efceaee2c010f88244dd01ee81e6e7bRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call7efceaee2c010f88244dd01ee81e6e7bAsync + * + * Get compensation planning cycle budgets + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call7efceaee2c010f88244dd01ee81e6e7bAsync($id, string $contentType = self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'][0]) { + return $this->call7efceaee2c010f88244dd01ee81e6e7bAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call7efceaee2c010f88244dd01ee81e6e7bAsyncWithHttpInfo + * + * Get compensation planning cycle budgets + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call7efceaee2c010f88244dd01ee81e6e7bAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call7efceaee2c010f88244dd01ee81e6e7bRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call7efceaee2c010f88244dd01ee81e6e7b' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call7efceaee2c010f88244dd01ee81e6e7bRequest($id, string $contentType = self::CONTENT_TYPES['call7efceaee2c010f88244dd01ee81e6e7b'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call7efceaee2c010f88244dd01ee81e6e7b' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/budgets'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call89a5068111ec499135c7d6e9a53d5a30 + * + * Remove employees from cycle + * + * @param int $id id (required) + * @param \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request $_89a5068111ec499135c7d6e9a53d5a30_request Employee IDs to remove (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function call89a5068111ec499135c7d6e9a53d5a30($id, $_89a5068111ec499135c7d6e9a53d5a30_request, string $contentType = self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'][0]) { + list($response) = $this->call89a5068111ec499135c7d6e9a53d5a30WithHttpInfo($id, $_89a5068111ec499135c7d6e9a53d5a30_request, $contentType); + return $response; + } + + /** + * Operation call89a5068111ec499135c7d6e9a53d5a30WithHttpInfo + * + * Remove employees from cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request $_89a5068111ec499135c7d6e9a53d5a30_request Employee IDs to remove (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'] to see the possible values for this operation + * + * @throws \BhrSdk\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 call89a5068111ec499135c7d6e9a53d5a30WithHttpInfo($id, $_89a5068111ec499135c7d6e9a53d5a30_request, string $contentType = self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'][0]) { + $request = $this->call89a5068111ec499135c7d6e9a53d5a30Request($id, $_89a5068111ec499135c7d6e9a53d5a30_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation call89a5068111ec499135c7d6e9a53d5a30Async + * + * Remove employees from cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request $_89a5068111ec499135c7d6e9a53d5a30_request Employee IDs to remove (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call89a5068111ec499135c7d6e9a53d5a30Async($id, $_89a5068111ec499135c7d6e9a53d5a30_request, string $contentType = self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'][0]) { + return $this->call89a5068111ec499135c7d6e9a53d5a30AsyncWithHttpInfo($id, $_89a5068111ec499135c7d6e9a53d5a30_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call89a5068111ec499135c7d6e9a53d5a30AsyncWithHttpInfo + * + * Remove employees from cycle + * + * @param int $id (required) + * @param \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request $_89a5068111ec499135c7d6e9a53d5a30_request Employee IDs to remove (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call89a5068111ec499135c7d6e9a53d5a30AsyncWithHttpInfo($id, $_89a5068111ec499135c7d6e9a53d5a30_request, string $contentType = self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'][0]) { + + $request = $this->call89a5068111ec499135c7d6e9a53d5a30Request($id, $_89a5068111ec499135c7d6e9a53d5a30_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'call89a5068111ec499135c7d6e9a53d5a30' + * + * @param int $id (required) + * @param \BhrSdk\Model\_89a5068111ec499135c7d6e9a53d5a30Request $_89a5068111ec499135c7d6e9a53d5a30_request Employee IDs to remove (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call89a5068111ec499135c7d6e9a53d5a30Request($id, $_89a5068111ec499135c7d6e9a53d5a30_request, string $contentType = self::CONTENT_TYPES['call89a5068111ec499135c7d6e9a53d5a30'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + '_89a5068111ec499135c7d6e9a53d5a30_request' => $_89a5068111ec499135c7d6e9a53d5a30_request, + ], + methodName: 'call89a5068111ec499135c7d6e9a53d5a30' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/employees'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($_89a5068111ec499135c7d6e9a53d5a30_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($_89a5068111ec499135c7d6e9a53d5a30_request)); + } else { + $httpBody = is_array($_89a5068111ec499135c7d6e9a53d5a30_request) ? json_encode($_89a5068111ec499135c7d6e9a53d5a30_request) : $_89a5068111ec499135c7d6e9a53d5a30_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call9bc279d788f6e86b4cd8b2e0d3de91b1 + * + * Get compensation planning cycle summary + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function call9bc279d788f6e86b4cd8b2e0d3de91b1($id, string $contentType = self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'][0]) { + list($response) = $this->call9bc279d788f6e86b4cd8b2e0d3de91b1WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call9bc279d788f6e86b4cd8b2e0d3de91b1WithHttpInfo + * + * Get compensation planning cycle summary + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function call9bc279d788f6e86b4cd8b2e0d3de91b1WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'][0]) { + $request = $this->call9bc279d788f6e86b4cd8b2e0d3de91b1Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation call9bc279d788f6e86b4cd8b2e0d3de91b1Async + * + * Get compensation planning cycle summary + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call9bc279d788f6e86b4cd8b2e0d3de91b1Async($id, string $contentType = self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'][0]) { + return $this->call9bc279d788f6e86b4cd8b2e0d3de91b1AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call9bc279d788f6e86b4cd8b2e0d3de91b1AsyncWithHttpInfo + * + * Get compensation planning cycle summary + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call9bc279d788f6e86b4cd8b2e0d3de91b1AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->call9bc279d788f6e86b4cd8b2e0d3de91b1Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call9bc279d788f6e86b4cd8b2e0d3de91b1' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call9bc279d788f6e86b4cd8b2e0d3de91b1Request($id, string $contentType = self::CONTENT_TYPES['call9bc279d788f6e86b4cd8b2e0d3de91b1'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call9bc279d788f6e86b4cd8b2e0d3de91b1' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/summary'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation cf87b8e09a001b6fb81dfce6c20ab9e3 + * + * Update approval flow + * + * @param int $id id (required) + * @param string $template_id template_id (required) + * @param \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request $cf87b8e09a001b6fb81dfce6c20ab9e3_request cf87b8e09a001b6fb81dfce6c20ab9e3_request (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function cf87b8e09a001b6fb81dfce6c20ab9e3($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by = null, string $contentType = self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'][0]) { + list($response) = $this->cf87b8e09a001b6fb81dfce6c20ab9e3WithHttpInfo($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by, $contentType); + return $response; + } + + /** + * Operation cf87b8e09a001b6fb81dfce6c20ab9e3WithHttpInfo + * + * Update approval flow + * + * @param int $id (required) + * @param string $template_id (required) + * @param \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request $cf87b8e09a001b6fb81dfce6c20ab9e3_request (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function cf87b8e09a001b6fb81dfce6c20ab9e3WithHttpInfo($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by = null, string $contentType = self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'][0]) { + $request = $this->cf87b8e09a001b6fb81dfce6c20ab9e3Request($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation cf87b8e09a001b6fb81dfce6c20ab9e3Async + * + * Update approval flow + * + * @param int $id (required) + * @param string $template_id (required) + * @param \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request $cf87b8e09a001b6fb81dfce6c20ab9e3_request (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function cf87b8e09a001b6fb81dfce6c20ab9e3Async($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by = null, string $contentType = self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'][0]) { + return $this->cf87b8e09a001b6fb81dfce6c20ab9e3AsyncWithHttpInfo($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation cf87b8e09a001b6fb81dfce6c20ab9e3AsyncWithHttpInfo + * + * Update approval flow + * + * @param int $id (required) + * @param string $template_id (required) + * @param \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request $cf87b8e09a001b6fb81dfce6c20ab9e3_request (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function cf87b8e09a001b6fb81dfce6c20ab9e3AsyncWithHttpInfo($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by = null, string $contentType = self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->cf87b8e09a001b6fb81dfce6c20ab9e3Request($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'cf87b8e09a001b6fb81dfce6c20ab9e3' + * + * @param int $id (required) + * @param string $template_id (required) + * @param \BhrSdk\Model\Cf87b8e09a001b6fb81dfce6c20ab9e3Request $cf87b8e09a001b6fb81dfce6c20ab9e3_request (required) + * @param string|null $group_by Optional grouping for returned flows (e.g. department) (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function cf87b8e09a001b6fb81dfce6c20ab9e3Request($id, $template_id, $cf87b8e09a001b6fb81dfce6c20ab9e3_request, $group_by = null, string $contentType = self::CONTENT_TYPES['cf87b8e09a001b6fb81dfce6c20ab9e3'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'template_id' => $template_id, + 'cf87b8e09a001b6fb81dfce6c20ab9e3_request' => $cf87b8e09a001b6fb81dfce6c20ab9e3_request, + ], + methodName: 'cf87b8e09a001b6fb81dfce6c20ab9e3' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/approvals/{templateId}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'groupBy' => ['value' => $group_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + // path params + if ($template_id !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue((string) $template_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($cf87b8e09a001b6fb81dfce6c20ab9e3_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($cf87b8e09a001b6fb81dfce6c20ab9e3_request)); + } else { + $httpBody = is_array($cf87b8e09a001b6fb81dfce6c20ab9e3_request) ? json_encode($cf87b8e09a001b6fb81dfce6c20ab9e3_request) : $cf87b8e09a001b6fb81dfce6c20ab9e3_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation d6987e300672a00c7cfe59afebb64156 + * + * Get change communication letter details + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function d6987e300672a00c7cfe59afebb64156($id, string $contentType = self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'][0]) { + list($response) = $this->d6987e300672a00c7cfe59afebb64156WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation d6987e300672a00c7cfe59afebb64156WithHttpInfo + * + * Get change communication letter details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function d6987e300672a00c7cfe59afebb64156WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'][0]) { + $request = $this->d6987e300672a00c7cfe59afebb64156Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation d6987e300672a00c7cfe59afebb64156Async + * + * Get change communication letter details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function d6987e300672a00c7cfe59afebb64156Async($id, string $contentType = self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'][0]) { + return $this->d6987e300672a00c7cfe59afebb64156AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation d6987e300672a00c7cfe59afebb64156AsyncWithHttpInfo + * + * Get change communication letter details + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function d6987e300672a00c7cfe59afebb64156AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->d6987e300672a00c7cfe59afebb64156Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'd6987e300672a00c7cfe59afebb64156' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function d6987e300672a00c7cfe59afebb64156Request($id, string $contentType = self::CONTENT_TYPES['d6987e300672a00c7cfe59afebb64156'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'd6987e300672a00c7cfe59afebb64156' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/change_comm'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation dacd313af2106213fc4696175941ce65 + * + * Save budget guidelines + * + * @param int $id id (required) + * @param \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request $dacd313af2106213fc4696175941ce65_request Budget guideline settings (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\BudgetGuidelinesView|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function dacd313af2106213fc4696175941ce65($id, $dacd313af2106213fc4696175941ce65_request, string $contentType = self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'][0]) { + list($response) = $this->dacd313af2106213fc4696175941ce65WithHttpInfo($id, $dacd313af2106213fc4696175941ce65_request, $contentType); + return $response; + } + + /** + * Operation dacd313af2106213fc4696175941ce65WithHttpInfo + * + * Save budget guidelines + * + * @param int $id (required) + * @param \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request $dacd313af2106213fc4696175941ce65_request Budget guideline settings (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\BudgetGuidelinesView|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function dacd313af2106213fc4696175941ce65WithHttpInfo($id, $dacd313af2106213fc4696175941ce65_request, string $contentType = self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'][0]) { + $request = $this->dacd313af2106213fc4696175941ce65Request($id, $dacd313af2106213fc4696175941ce65_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BudgetGuidelinesView', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\BudgetGuidelinesView', + $request, + $response, + ); + } + + /** + * Operation dacd313af2106213fc4696175941ce65Async + * + * Save budget guidelines + * + * @param int $id (required) + * @param \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request $dacd313af2106213fc4696175941ce65_request Budget guideline settings (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dacd313af2106213fc4696175941ce65Async($id, $dacd313af2106213fc4696175941ce65_request, string $contentType = self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'][0]) { + return $this->dacd313af2106213fc4696175941ce65AsyncWithHttpInfo($id, $dacd313af2106213fc4696175941ce65_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation dacd313af2106213fc4696175941ce65AsyncWithHttpInfo + * + * Save budget guidelines + * + * @param int $id (required) + * @param \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request $dacd313af2106213fc4696175941ce65_request Budget guideline settings (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dacd313af2106213fc4696175941ce65AsyncWithHttpInfo($id, $dacd313af2106213fc4696175941ce65_request, string $contentType = self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'][0]) { + $returnType = '\BhrSdk\Model\BudgetGuidelinesView'; + $request = $this->dacd313af2106213fc4696175941ce65Request($id, $dacd313af2106213fc4696175941ce65_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'dacd313af2106213fc4696175941ce65' + * + * @param int $id (required) + * @param \BhrSdk\Model\Dacd313af2106213fc4696175941ce65Request $dacd313af2106213fc4696175941ce65_request Budget guideline settings (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function dacd313af2106213fc4696175941ce65Request($id, $dacd313af2106213fc4696175941ce65_request, string $contentType = self::CONTENT_TYPES['dacd313af2106213fc4696175941ce65'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'dacd313af2106213fc4696175941ce65_request' => $dacd313af2106213fc4696175941ce65_request, + ], + methodName: 'dacd313af2106213fc4696175941ce65' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/budgets/guidelines'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($dacd313af2106213fc4696175941ce65_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($dacd313af2106213fc4696175941ce65_request)); + } else { + $httpBody = is_array($dacd313af2106213fc4696175941ce65_request) ? json_encode($dacd313af2106213fc4696175941ce65_request) : $dacd313af2106213fc4696175941ce65_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation e2ac4e1535f296cb8901f209e04caa83 + * + * Create compensation planning cycle + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function e2ac4e1535f296cb8901f209e04caa83(string $contentType = self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'][0]) { + list($response) = $this->e2ac4e1535f296cb8901f209e04caa83WithHttpInfo($contentType); + return $response; + } + + /** + * Operation e2ac4e1535f296cb8901f209e04caa83WithHttpInfo + * + * Create compensation planning cycle + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function e2ac4e1535f296cb8901f209e04caa83WithHttpInfo(string $contentType = self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'][0]) { + $request = $this->e2ac4e1535f296cb8901f209e04caa83Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation e2ac4e1535f296cb8901f209e04caa83Async + * + * Create compensation planning cycle + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function e2ac4e1535f296cb8901f209e04caa83Async(string $contentType = self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'][0]) { + return $this->e2ac4e1535f296cb8901f209e04caa83AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation e2ac4e1535f296cb8901f209e04caa83AsyncWithHttpInfo + * + * Create compensation planning cycle + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function e2ac4e1535f296cb8901f209e04caa83AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->e2ac4e1535f296cb8901f209e04caa83Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'e2ac4e1535f296cb8901f209e04caa83' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function e2ac4e1535f296cb8901f209e04caa83Request(string $contentType = self::CONTENT_TYPES['e2ac4e1535f296cb8901f209e04caa83'][0]) { + + $resourcePath = '/api/v1/compensation/planning_cycles'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation ef7619b0ee4c8dc079aaea870cfbe81b + * + * Remove cycle admin + * + * @param int $id id (required) + * @param string $employee_id employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\RemoveCycleAdminSelfResponse + */ + public function ef7619b0ee4c8dc079aaea870cfbe81b($id, $employee_id, string $contentType = self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'][0]) { + list($response) = $this->ef7619b0ee4c8dc079aaea870cfbe81bWithHttpInfo($id, $employee_id, $contentType); + return $response; + } + + /** + * Operation ef7619b0ee4c8dc079aaea870cfbe81bWithHttpInfo + * + * Remove cycle admin + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\RemoveCycleAdminSelfResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function ef7619b0ee4c8dc079aaea870cfbe81bWithHttpInfo($id, $employee_id, string $contentType = self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'][0]) { + $request = $this->ef7619b0ee4c8dc079aaea870cfbe81bRequest($id, $employee_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\RemoveCycleAdminSelfResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\RemoveCycleAdminSelfResponse', + $request, + $response, + ); + } + + /** + * Operation ef7619b0ee4c8dc079aaea870cfbe81bAsync + * + * Remove cycle admin + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ef7619b0ee4c8dc079aaea870cfbe81bAsync($id, $employee_id, string $contentType = self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'][0]) { + return $this->ef7619b0ee4c8dc079aaea870cfbe81bAsyncWithHttpInfo($id, $employee_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation ef7619b0ee4c8dc079aaea870cfbe81bAsyncWithHttpInfo + * + * Remove cycle admin + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ef7619b0ee4c8dc079aaea870cfbe81bAsyncWithHttpInfo($id, $employee_id, string $contentType = self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'][0]) { + $returnType = '\BhrSdk\Model\RemoveCycleAdminSelfResponse'; + $request = $this->ef7619b0ee4c8dc079aaea870cfbe81bRequest($id, $employee_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'ef7619b0ee4c8dc079aaea870cfbe81b' + * + * @param int $id (required) + * @param string $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function ef7619b0ee4c8dc079aaea870cfbe81bRequest($id, $employee_id, string $contentType = self::CONTENT_TYPES['ef7619b0ee4c8dc079aaea870cfbe81b'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'employee_id' => $employee_id, + ], + methodName: 'ef7619b0ee4c8dc079aaea870cfbe81b' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/admins/{employeeId}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation f3883a522dadbe9e11b34f8b656e3adb + * + * Save recommendations + * + * @param int $id id (required) + * @param \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest $f3883a522dadbe9e11b34f8b656e3adb_request f3883a522dadbe9e11b34f8b656e3adb_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array<string,mixed> + */ + public function f3883a522dadbe9e11b34f8b656e3adb($id, $f3883a522dadbe9e11b34f8b656e3adb_request, string $contentType = self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'][0]) { + list($response) = $this->f3883a522dadbe9e11b34f8b656e3adbWithHttpInfo($id, $f3883a522dadbe9e11b34f8b656e3adb_request, $contentType); + return $response; + } + + /** + * Operation f3883a522dadbe9e11b34f8b656e3adbWithHttpInfo + * + * Save recommendations + * + * @param int $id (required) + * @param \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest $f3883a522dadbe9e11b34f8b656e3adb_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of array<string,mixed>, HTTP status code, HTTP response headers (array of strings) + */ + public function f3883a522dadbe9e11b34f8b656e3adbWithHttpInfo($id, $f3883a522dadbe9e11b34f8b656e3adb_request, string $contentType = self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'][0]) { + $request = $this->f3883a522dadbe9e11b34f8b656e3adbRequest($id, $f3883a522dadbe9e11b34f8b656e3adb_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'array<string,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 ApiHelper::handleResponseWithDataType( + 'array<string,mixed>', + $request, + $response, + ); + } + + /** + * Operation f3883a522dadbe9e11b34f8b656e3adbAsync + * + * Save recommendations + * + * @param int $id (required) + * @param \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest $f3883a522dadbe9e11b34f8b656e3adb_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f3883a522dadbe9e11b34f8b656e3adbAsync($id, $f3883a522dadbe9e11b34f8b656e3adb_request, string $contentType = self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'][0]) { + return $this->f3883a522dadbe9e11b34f8b656e3adbAsyncWithHttpInfo($id, $f3883a522dadbe9e11b34f8b656e3adb_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation f3883a522dadbe9e11b34f8b656e3adbAsyncWithHttpInfo + * + * Save recommendations + * + * @param int $id (required) + * @param \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest $f3883a522dadbe9e11b34f8b656e3adb_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f3883a522dadbe9e11b34f8b656e3adbAsyncWithHttpInfo($id, $f3883a522dadbe9e11b34f8b656e3adb_request, string $contentType = self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'][0]) { + $returnType = 'array<string,mixed>'; + $request = $this->f3883a522dadbe9e11b34f8b656e3adbRequest($id, $f3883a522dadbe9e11b34f8b656e3adb_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'f3883a522dadbe9e11b34f8b656e3adb' + * + * @param int $id (required) + * @param \BhrSdk\Model\F3883a522dadbe9e11b34f8b656e3adbRequest $f3883a522dadbe9e11b34f8b656e3adb_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function f3883a522dadbe9e11b34f8b656e3adbRequest($id, $f3883a522dadbe9e11b34f8b656e3adb_request, string $contentType = self::CONTENT_TYPES['f3883a522dadbe9e11b34f8b656e3adb'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'f3883a522dadbe9e11b34f8b656e3adb_request' => $f3883a522dadbe9e11b34f8b656e3adb_request, + ], + methodName: 'f3883a522dadbe9e11b34f8b656e3adb' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/recommendations'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($f3883a522dadbe9e11b34f8b656e3adb_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($f3883a522dadbe9e11b34f8b656e3adb_request)); + } else { + $httpBody = is_array($f3883a522dadbe9e11b34f8b656e3adb_request) ? json_encode($f3883a522dadbe9e11b34f8b656e3adb_request) : $f3883a522dadbe9e11b34f8b656e3adb_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation f4b431363af6573af46750f32632e88b + * + * Complete compensation planning cycle + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\CompensationPlanningCycleCompleteResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function f4b431363af6573af46750f32632e88b($id, string $contentType = self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'][0]) { + list($response) = $this->f4b431363af6573af46750f32632e88bWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation f4b431363af6573af46750f32632e88bWithHttpInfo + * + * Complete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\CompensationPlanningCycleCompleteResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function f4b431363af6573af46750f32632e88bWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'][0]) { + $request = $this->f4b431363af6573af46750f32632e88bRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationPlanningCycleCompleteResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CompensationPlanningCycleCompleteResponse', + $request, + $response, + ); + } + + /** + * Operation f4b431363af6573af46750f32632e88bAsync + * + * Complete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f4b431363af6573af46750f32632e88bAsync($id, string $contentType = self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'][0]) { + return $this->f4b431363af6573af46750f32632e88bAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation f4b431363af6573af46750f32632e88bAsyncWithHttpInfo + * + * Complete compensation planning cycle + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f4b431363af6573af46750f32632e88bAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'][0]) { + $returnType = '\BhrSdk\Model\CompensationPlanningCycleCompleteResponse'; + $request = $this->f4b431363af6573af46750f32632e88bRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'f4b431363af6573af46750f32632e88b' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function f4b431363af6573af46750f32632e88bRequest($id, string $contentType = self::CONTENT_TYPES['f4b431363af6573af46750f32632e88b'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'f4b431363af6573af46750f32632e88b' + ); + + $resourcePath = '/api/v1/compensation/planning_cycles/{id}/complete'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/CustomReportsApi.php b/lib/Api/CustomReportsApi.php index 1c5d257a..a9c0f187 100644 --- a/lib/Api/CustomReportsApi.php +++ b/lib/Api/CustomReportsApi.php @@ -79,7 +79,7 @@ class CustomReportsApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'getByReportId' => [ + 'getReportById' => [ 'application/json', ], 'listReports' => [ @@ -134,36 +134,40 @@ public function getConfig() { } /** - * Operation getByReportId + * Operation getReportById * * Get Report by ID * - * @param int $report_id report_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getByReportId'] to see the possible values for this operation + * @param int $report_id The numeric ID of the saved custom report to execute. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getReportById'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\EmployeeResponse + * @return \BhrSdk\Model\EmployeeResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse */ - public function getByReportId($report_id, string $contentType = self::CONTENT_TYPES['getByReportId'][0]) { - list($response) = $this->getByReportIdWithHttpInfo($report_id, $contentType); + public function getReportById($report_id, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getReportById'][0]) { + list($response) = $this->getReportByIdWithHttpInfo($report_id, $page, $page_size, $contentType); return $response; } /** - * Operation getByReportIdWithHttpInfo + * Operation getReportByIdWithHttpInfo * * Get Report by ID * - * @param int $report_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getByReportId'] to see the possible values for this operation + * @param int $report_id The numeric ID of the saved custom report to execute. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getReportById'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\EmployeeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\EmployeeResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getByReportIdWithHttpInfo($report_id, string $contentType = self::CONTENT_TYPES['getByReportId'][0]) { - $request = $this->getByReportIdRequest($report_id, $contentType); + public function getReportByIdWithHttpInfo($report_id, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getReportById'][0]) { + $request = $this->getReportByIdRequest($report_id, $page, $page_size, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -178,6 +182,30 @@ public function getByReportIdWithHttpInfo($report_id, string $contentType = self $request, $response, ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -201,18 +229,20 @@ public function getByReportIdWithHttpInfo($report_id, string $contentType = self } /** - * Operation getByReportIdAsync + * Operation getReportByIdAsync * * Get Report by ID * - * @param int $report_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getByReportId'] to see the possible values for this operation + * @param int $report_id The numeric ID of the saved custom report to execute. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getReportById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByReportIdAsync($report_id, string $contentType = self::CONTENT_TYPES['getByReportId'][0]) { - return $this->getByReportIdAsyncWithHttpInfo($report_id, $contentType) + public function getReportByIdAsync($report_id, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getReportById'][0]) { + return $this->getReportByIdAsyncWithHttpInfo($report_id, $page, $page_size, $contentType) ->then( function ($response) { return $response[0]; @@ -221,19 +251,21 @@ function ($response) { } /** - * Operation getByReportIdAsyncWithHttpInfo + * Operation getReportByIdAsyncWithHttpInfo * * Get Report by ID * - * @param int $report_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getByReportId'] to see the possible values for this operation + * @param int $report_id The numeric ID of the saved custom report to execute. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getReportById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByReportIdAsyncWithHttpInfo($report_id, string $contentType = self::CONTENT_TYPES['getByReportId'][0]) { + public function getReportByIdAsyncWithHttpInfo($report_id, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getReportById'][0]) { $returnType = '\BhrSdk\Model\EmployeeResponse'; - $request = $this->getByReportIdRequest($report_id, $contentType); + $request = $this->getReportByIdRequest($report_id, $page, $page_size, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -267,23 +299,36 @@ function ($exception) { } /** - * Create request for operation 'getByReportId' + * Create request for operation 'getReportById' * - * @param int $report_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getByReportId'] to see the possible values for this operation + * @param int $report_id The numeric ID of the saved custom report to execute. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getReportById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByReportIdRequest($report_id, string $contentType = self::CONTENT_TYPES['getByReportId'][0]) { + public function getReportByIdRequest($report_id, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getReportById'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'report_id' => $report_id, ], - methodName: 'getByReportId' + methodName: 'getReportById' ); + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling CustomReportsApi.getReportById, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling CustomReportsApi.getReportById, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling CustomReportsApi.getReportById, must be bigger than or equal to 1.'); + } + $resourcePath = '/api/v1/custom-reports/{reportId}'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); @@ -292,6 +337,23 @@ public function getByReportIdRequest($report_id, string $contentType = self::CON $httpBody = ''; $multipart = false; + $parameters = [ + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page_size' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($report_id !== null) { $resourcePath = str_replace( @@ -354,17 +416,17 @@ public function getByReportIdRequest($report_id, string $contentType = self::CON /** * Operation listReports * - * Get Reports + * List Reports * - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listReports'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\ReportsResponse + * @return \BhrSdk\Model\ReportsResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse */ - public function listReports($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + public function listReports($page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['listReports'][0]) { list($response) = $this->listReportsWithHttpInfo($page, $page_size, $contentType); return $response; } @@ -372,17 +434,17 @@ public function listReports($page = null, $page_size = null, string $contentType /** * Operation listReportsWithHttpInfo * - * Get Reports + * List Reports * - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listReports'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\ReportsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\ReportsResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ - public function listReportsWithHttpInfo($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + public function listReportsWithHttpInfo($page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['listReports'][0]) { $request = $this->listReportsRequest($page, $page_size, $contentType); $options = ApiHelper::createHttpClientOption($this->config); @@ -398,6 +460,18 @@ public function listReportsWithHttpInfo($page = null, $page_size = null, string $request, $response, ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -423,16 +497,16 @@ public function listReportsWithHttpInfo($page = null, $page_size = null, string /** * Operation listReportsAsync * - * Get Reports + * List Reports * - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listReports'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listReportsAsync($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + public function listReportsAsync($page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['listReports'][0]) { return $this->listReportsAsyncWithHttpInfo($page, $page_size, $contentType) ->then( function ($response) { @@ -444,16 +518,16 @@ function ($response) { /** * Operation listReportsAsyncWithHttpInfo * - * Get Reports + * List Reports * - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listReports'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listReportsAsyncWithHttpInfo($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + public function listReportsAsyncWithHttpInfo($page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['listReports'][0]) { $returnType = '\BhrSdk\Model\ReportsResponse'; $request = $this->listReportsRequest($page, $page_size, $contentType); @@ -491,15 +565,26 @@ function ($exception) { /** * Create request for operation 'listReports' * - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listReports'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listReportsRequest($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + public function listReportsRequest($page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['listReports'][0]) { + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling CustomReportsApi.listReports, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling CustomReportsApi.listReports, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling CustomReportsApi.listReports, must be bigger than or equal to 1.'); + } + $resourcePath = '/api/v1/custom-reports'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); diff --git a/lib/Api/DatasetsApi.php b/lib/Api/DatasetsApi.php index afbea9e1..63ece9be 100644 --- a/lib/Api/DatasetsApi.php +++ b/lib/Api/DatasetsApi.php @@ -79,16 +79,28 @@ class DatasetsApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'getDataFromDataset' => [ + 'getDataFromDatasetV1' => [ 'application/json', ], - 'getDatasets' => [ + 'getDataFromDatasetV2' => [ 'application/json', ], - 'getFieldOptions' => [ + 'getFieldOptionsV1' => [ 'application/json', ], - 'getFieldsFromDataset' => [ + 'getFieldOptionsV12' => [ + 'application/json', + ], + 'getFieldsFromDatasetV1' => [ + 'application/json', + ], + 'getFieldsFromDatasetV12' => [ + 'application/json', + ], + 'listDatasetsV1' => [ + 'application/json', + ], + 'listDatasetsV12' => [ 'application/json', ], ]; @@ -140,38 +152,44 @@ public function getConfig() { } /** - * Operation getDataFromDataset + * Operation getDataFromDatasetV1 * - * Get Data from Dataset + * Get Data from Dataset (v1) * - * @param string $dataset_name The name of the dataset you want data from (required) + * @param string $dataset_name The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) * @param \BhrSdk\Model\DataRequest $data_request data_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDataset'] to see the possible values for this operation + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\EmployeeResponse + * @deprecated */ - public function getDataFromDataset($dataset_name, $data_request, string $contentType = self::CONTENT_TYPES['getDataFromDataset'][0]) { - list($response) = $this->getDataFromDatasetWithHttpInfo($dataset_name, $data_request, $contentType); + public function getDataFromDatasetV1($dataset_name, $data_request, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV1'][0]) { + list($response) = $this->getDataFromDatasetV1WithHttpInfo($dataset_name, $data_request, $page, $page_size, $contentType); return $response; } /** - * Operation getDataFromDatasetWithHttpInfo + * Operation getDataFromDatasetV1WithHttpInfo * - * Get Data from Dataset + * Get Data from Dataset (v1) * - * @param string $dataset_name The name of the dataset you want data from (required) + * @param string $dataset_name The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) * @param \BhrSdk\Model\DataRequest $data_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDataset'] to see the possible values for this operation + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\EmployeeResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getDataFromDatasetWithHttpInfo($dataset_name, $data_request, string $contentType = self::CONTENT_TYPES['getDataFromDataset'][0]) { - $request = $this->getDataFromDatasetRequest($dataset_name, $data_request, $contentType); + public function getDataFromDatasetV1WithHttpInfo($dataset_name, $data_request, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV1'][0]) { + $request = $this->getDataFromDatasetV1Request($dataset_name, $data_request, $page, $page_size, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -209,19 +227,22 @@ public function getDataFromDatasetWithHttpInfo($dataset_name, $data_request, str } /** - * Operation getDataFromDatasetAsync + * Operation getDataFromDatasetV1Async * - * Get Data from Dataset + * Get Data from Dataset (v1) * - * @param string $dataset_name The name of the dataset you want data from (required) + * @param string $dataset_name The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) * @param \BhrSdk\Model\DataRequest $data_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDataset'] to see the possible values for this operation + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getDataFromDatasetAsync($dataset_name, $data_request, string $contentType = self::CONTENT_TYPES['getDataFromDataset'][0]) { - return $this->getDataFromDatasetAsyncWithHttpInfo($dataset_name, $data_request, $contentType) + public function getDataFromDatasetV1Async($dataset_name, $data_request, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV1'][0]) { + return $this->getDataFromDatasetV1AsyncWithHttpInfo($dataset_name, $data_request, $page, $page_size, $contentType) ->then( function ($response) { return $response[0]; @@ -230,20 +251,23 @@ function ($response) { } /** - * Operation getDataFromDatasetAsyncWithHttpInfo + * Operation getDataFromDatasetV1AsyncWithHttpInfo * - * Get Data from Dataset + * Get Data from Dataset (v1) * - * @param string $dataset_name The name of the dataset you want data from (required) + * @param string $dataset_name The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) * @param \BhrSdk\Model\DataRequest $data_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDataset'] to see the possible values for this operation + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getDataFromDatasetAsyncWithHttpInfo($dataset_name, $data_request, string $contentType = self::CONTENT_TYPES['getDataFromDataset'][0]) { + public function getDataFromDatasetV1AsyncWithHttpInfo($dataset_name, $data_request, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV1'][0]) { $returnType = '\BhrSdk\Model\EmployeeResponse'; - $request = $this->getDataFromDatasetRequest($dataset_name, $data_request, $contentType); + $request = $this->getDataFromDatasetV1Request($dataset_name, $data_request, $page, $page_size, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -277,25 +301,39 @@ function ($exception) { } /** - * Create request for operation 'getDataFromDataset' + * Create request for operation 'getDataFromDatasetV1' * - * @param string $dataset_name The name of the dataset you want data from (required) + * @param string $dataset_name The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) * @param \BhrSdk\Model\DataRequest $data_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDataset'] to see the possible values for this operation + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getDataFromDatasetRequest($dataset_name, $data_request, string $contentType = self::CONTENT_TYPES['getDataFromDataset'][0]) { + public function getDataFromDatasetV1Request($dataset_name, $data_request, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV1'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'dataset_name' => $dataset_name, 'data_request' => $data_request, ], - methodName: 'getDataFromDataset' + methodName: 'getDataFromDatasetV1' ); + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling DatasetsApi.getDataFromDatasetV1, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getDataFromDatasetV1, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getDataFromDatasetV1, must be bigger than or equal to 1.'); + } + $resourcePath = '/api/v1/datasets/{datasetName}'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); @@ -304,6 +342,23 @@ public function getDataFromDatasetRequest($dataset_name, $data_request, string $ $httpBody = ''; $multipart = false; + $parameters = [ + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page_size' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($dataset_name !== null) { $resourcePath = str_replace( @@ -374,34 +429,38 @@ public function getDataFromDatasetRequest($dataset_name, $data_request, string $ } /** - * Operation getDatasets + * Operation getDataFromDatasetV2 * - * Get Datasets + * Get Data from Dataset (v2) * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDatasets'] to see the possible values for this operation + * @param string $dataset_name Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + * @param \BhrSdk\Model\GetDataFromDatasetV2Request $get_data_from_dataset_v2_request Request parameters for dataset data retrieval (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV2'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\DatasetResponse + * @return \BhrSdk\Model\DatasetDataResponseV2|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getDatasets(string $contentType = self::CONTENT_TYPES['getDatasets'][0]) { - list($response) = $this->getDatasetsWithHttpInfo($contentType); + public function getDataFromDatasetV2($dataset_name, $get_data_from_dataset_v2_request, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV2'][0]) { + list($response) = $this->getDataFromDatasetV2WithHttpInfo($dataset_name, $get_data_from_dataset_v2_request, $contentType); return $response; } /** - * Operation getDatasetsWithHttpInfo + * Operation getDataFromDatasetV2WithHttpInfo * - * Get Datasets + * Get Data from Dataset (v2) * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDatasets'] to see the possible values for this operation + * @param string $dataset_name Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + * @param \BhrSdk\Model\GetDataFromDatasetV2Request $get_data_from_dataset_v2_request Request parameters for dataset data retrieval (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV2'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\DatasetResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\DatasetDataResponseV2|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getDatasetsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getDatasets'][0]) { - $request = $this->getDatasetsRequest($contentType); + public function getDataFromDatasetV2WithHttpInfo($dataset_name, $get_data_from_dataset_v2_request, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV2'][0]) { + $request = $this->getDataFromDatasetV2Request($dataset_name, $get_data_from_dataset_v2_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -412,7 +471,43 @@ public function getDatasetsWithHttpInfo(string $contentType = self::CONTENT_TYPE switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\DatasetResponse', + '\BhrSdk\Model\DatasetDataResponseV2', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 413: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -432,24 +527,26 @@ public function getDatasetsWithHttpInfo(string $contentType = self::CONTENT_TYPE } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\DatasetResponse', + '\BhrSdk\Model\DatasetDataResponseV2', $request, $response, ); } /** - * Operation getDatasetsAsync + * Operation getDataFromDatasetV2Async * - * Get Datasets + * Get Data from Dataset (v2) * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDatasets'] to see the possible values for this operation + * @param string $dataset_name Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + * @param \BhrSdk\Model\GetDataFromDatasetV2Request $get_data_from_dataset_v2_request Request parameters for dataset data retrieval (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV2'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDatasetsAsync(string $contentType = self::CONTENT_TYPES['getDatasets'][0]) { - return $this->getDatasetsAsyncWithHttpInfo($contentType) + public function getDataFromDatasetV2Async($dataset_name, $get_data_from_dataset_v2_request, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV2'][0]) { + return $this->getDataFromDatasetV2AsyncWithHttpInfo($dataset_name, $get_data_from_dataset_v2_request, $contentType) ->then( function ($response) { return $response[0]; @@ -458,18 +555,20 @@ function ($response) { } /** - * Operation getDatasetsAsyncWithHttpInfo + * Operation getDataFromDatasetV2AsyncWithHttpInfo * - * Get Datasets + * Get Data from Dataset (v2) * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDatasets'] to see the possible values for this operation + * @param string $dataset_name Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + * @param \BhrSdk\Model\GetDataFromDatasetV2Request $get_data_from_dataset_v2_request Request parameters for dataset data retrieval (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV2'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDatasetsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getDatasets'][0]) { - $returnType = '\BhrSdk\Model\DatasetResponse'; - $request = $this->getDatasetsRequest($contentType); + public function getDataFromDatasetV2AsyncWithHttpInfo($dataset_name, $get_data_from_dataset_v2_request, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV2'][0]) { + $returnType = '\BhrSdk\Model\DatasetDataResponseV2'; + $request = $this->getDataFromDatasetV2Request($dataset_name, $get_data_from_dataset_v2_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -503,29 +602,58 @@ function ($exception) { } /** - * Create request for operation 'getDatasets' + * Create request for operation 'getDataFromDatasetV2' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDatasets'] to see the possible values for this operation + * @param string $dataset_name Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + * @param \BhrSdk\Model\GetDataFromDatasetV2Request $get_data_from_dataset_v2_request Request parameters for dataset data retrieval (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getDataFromDatasetV2'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDatasetsRequest(string $contentType = self::CONTENT_TYPES['getDatasets'][0]) { + public function getDataFromDatasetV2Request($dataset_name, $get_data_from_dataset_v2_request, string $contentType = self::CONTENT_TYPES['getDataFromDatasetV2'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'dataset_name' => $dataset_name, + 'get_data_from_dataset_v2_request' => $get_data_from_dataset_v2_request, + ], + methodName: 'getDataFromDatasetV2' + ); - $resourcePath = '/api/v1/datasets'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v2/datasets/{datasetName}/data'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // path params + if ($dataset_name !== null) { + $resourcePath = str_replace( + '{' . 'datasetName' . '}', + ObjectSerializer::toPathValue((string) $dataset_name), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/problem+json', ], $contentType, $multipart ); + // for model (json/xml) + if (isset($get_data_from_dataset_v2_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_data_from_dataset_v2_request)); + } else { + $httpBody = is_array($get_data_from_dataset_v2_request) ? json_encode($get_data_from_dataset_v2_request) : $get_data_from_dataset_v2_request; + } + } + // Authentication methods // Basic authentication @@ -563,7 +691,7 @@ public function getDatasetsRequest(string $contentType = self::CONTENT_TYPES['ge $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -571,38 +699,40 @@ public function getDatasetsRequest(string $contentType = self::CONTENT_TYPES['ge } /** - * Operation getFieldOptions + * Operation getFieldOptionsV1 * - * Get Field Options + * Get Field Options (v1) * - * @param string $dataset_name The name of the dataset you want to see field options for (required) + * @param string $dataset_name The name of the dataset to retrieve field options for. (required) * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema field_options_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptions'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\FieldOptionsTransformer[]|\BhrSdk\Model\InternalServerError|\BhrSdk\Model\Forbidden + * @return array<string,\BhrSdk\Model\FieldOptionsTransformer[]>|\BhrSdk\Model\BadRequestV1|\BhrSdk\Model\ForbiddenV1 + * @deprecated */ - public function getFieldOptions($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptions'][0]) { - list($response) = $this->getFieldOptionsWithHttpInfo($dataset_name, $field_options_request_schema, $contentType); + public function getFieldOptionsV1($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV1'][0]) { + list($response) = $this->getFieldOptionsV1WithHttpInfo($dataset_name, $field_options_request_schema, $contentType); return $response; } /** - * Operation getFieldOptionsWithHttpInfo + * Operation getFieldOptionsV1WithHttpInfo * - * Get Field Options + * Get Field Options (v1) * - * @param string $dataset_name The name of the dataset you want to see field options for (required) + * @param string $dataset_name The name of the dataset to retrieve field options for. (required) * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptions'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\FieldOptionsTransformer[]|\BhrSdk\Model\InternalServerError|\BhrSdk\Model\Forbidden, HTTP status code, HTTP response headers (array of strings) + * @return array of array<string,\BhrSdk\Model\FieldOptionsTransformer[]>|\BhrSdk\Model\BadRequestV1|\BhrSdk\Model\ForbiddenV1, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getFieldOptionsWithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptions'][0]) { - $request = $this->getFieldOptionsRequest($dataset_name, $field_options_request_schema, $contentType); + public function getFieldOptionsV1WithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV1'][0]) { + $request = $this->getFieldOptionsV1Request($dataset_name, $field_options_request_schema, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -613,19 +743,19 @@ public function getFieldOptionsWithHttpInfo($dataset_name, $field_options_reques switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\FieldOptionsTransformer[]', + 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>', $request, $response, ); - case 500: + case 400: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\InternalServerError', + '\BhrSdk\Model\BadRequestV1', $request, $response, ); case 403: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Forbidden', + '\BhrSdk\Model\ForbiddenV1', $request, $response, ); @@ -645,26 +775,27 @@ public function getFieldOptionsWithHttpInfo($dataset_name, $field_options_reques } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\FieldOptionsTransformer[]', + 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>', $request, $response, ); } /** - * Operation getFieldOptionsAsync + * Operation getFieldOptionsV1Async * - * Get Field Options + * Get Field Options (v1) * - * @param string $dataset_name The name of the dataset you want to see field options for (required) + * @param string $dataset_name The name of the dataset to retrieve field options for. (required) * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptions'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getFieldOptionsAsync($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptions'][0]) { - return $this->getFieldOptionsAsyncWithHttpInfo($dataset_name, $field_options_request_schema, $contentType) + public function getFieldOptionsV1Async($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV1'][0]) { + return $this->getFieldOptionsV1AsyncWithHttpInfo($dataset_name, $field_options_request_schema, $contentType) ->then( function ($response) { return $response[0]; @@ -673,20 +804,21 @@ function ($response) { } /** - * Operation getFieldOptionsAsyncWithHttpInfo + * Operation getFieldOptionsV1AsyncWithHttpInfo * - * Get Field Options + * Get Field Options (v1) * - * @param string $dataset_name The name of the dataset you want to see field options for (required) + * @param string $dataset_name The name of the dataset to retrieve field options for. (required) * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptions'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getFieldOptionsAsyncWithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptions'][0]) { - $returnType = '\BhrSdk\Model\FieldOptionsTransformer[]'; - $request = $this->getFieldOptionsRequest($dataset_name, $field_options_request_schema, $contentType); + public function getFieldOptionsV1AsyncWithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV1'][0]) { + $returnType = 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>'; + $request = $this->getFieldOptionsV1Request($dataset_name, $field_options_request_schema, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -720,23 +852,24 @@ function ($exception) { } /** - * Create request for operation 'getFieldOptions' + * Create request for operation 'getFieldOptionsV1' * - * @param string $dataset_name The name of the dataset you want to see field options for (required) + * @param string $dataset_name The name of the dataset to retrieve field options for. (required) * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptions'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getFieldOptionsRequest($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptions'][0]) { + public function getFieldOptionsV1Request($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV1'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'dataset_name' => $dataset_name, 'field_options_request_schema' => $field_options_request_schema, ], - methodName: 'getFieldOptions' + methodName: 'getFieldOptionsV1' ); $resourcePath = '/api/v1/datasets/{datasetName}/field-options'; @@ -817,40 +950,38 @@ public function getFieldOptionsRequest($dataset_name, $field_options_request_sch } /** - * Operation getFieldsFromDataset + * Operation getFieldOptionsV12 * - * Get Fields from Dataset + * Get Field Options (v1.2) * - * @param string $dataset_name The name of the dataset you want to see fields for (required) - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDataset'] to see the possible values for this operation + * @param string $dataset_name The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) + * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema field_options_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV12'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\DatasetFieldsResponse + * @return array<string,\BhrSdk\Model\FieldOptionsTransformer[]>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getFieldsFromDataset($dataset_name, $page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['getFieldsFromDataset'][0]) { - list($response) = $this->getFieldsFromDatasetWithHttpInfo($dataset_name, $page, $page_size, $contentType); + public function getFieldOptionsV12($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV12'][0]) { + list($response) = $this->getFieldOptionsV12WithHttpInfo($dataset_name, $field_options_request_schema, $contentType); return $response; } /** - * Operation getFieldsFromDatasetWithHttpInfo + * Operation getFieldOptionsV12WithHttpInfo * - * Get Fields from Dataset + * Get Field Options (v1.2) * - * @param string $dataset_name The name of the dataset you want to see fields for (required) - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDataset'] to see the possible values for this operation + * @param string $dataset_name The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) + * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV12'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\DatasetFieldsResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of array<string,\BhrSdk\Model\FieldOptionsTransformer[]>|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getFieldsFromDatasetWithHttpInfo($dataset_name, $page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['getFieldsFromDataset'][0]) { - $request = $this->getFieldsFromDatasetRequest($dataset_name, $page, $page_size, $contentType); + public function getFieldOptionsV12WithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV12'][0]) { + $request = $this->getFieldOptionsV12Request($dataset_name, $field_options_request_schema, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -861,7 +992,19 @@ public function getFieldsFromDatasetWithHttpInfo($dataset_name, $page = null, $p switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\DatasetFieldsResponse', + 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -881,27 +1024,26 @@ public function getFieldsFromDatasetWithHttpInfo($dataset_name, $page = null, $p } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\DatasetFieldsResponse', + 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>', $request, $response, ); } /** - * Operation getFieldsFromDatasetAsync + * Operation getFieldOptionsV12Async * - * Get Fields from Dataset + * Get Field Options (v1.2) * - * @param string $dataset_name The name of the dataset you want to see fields for (required) - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDataset'] to see the possible values for this operation + * @param string $dataset_name The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) + * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFieldsFromDatasetAsync($dataset_name, $page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['getFieldsFromDataset'][0]) { - return $this->getFieldsFromDatasetAsyncWithHttpInfo($dataset_name, $page, $page_size, $contentType) + public function getFieldOptionsV12Async($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV12'][0]) { + return $this->getFieldOptionsV12AsyncWithHttpInfo($dataset_name, $field_options_request_schema, $contentType) ->then( function ($response) { return $response[0]; @@ -910,21 +1052,20 @@ function ($response) { } /** - * Operation getFieldsFromDatasetAsyncWithHttpInfo + * Operation getFieldOptionsV12AsyncWithHttpInfo * - * Get Fields from Dataset + * Get Field Options (v1.2) * - * @param string $dataset_name The name of the dataset you want to see fields for (required) - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDataset'] to see the possible values for this operation + * @param string $dataset_name The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) + * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFieldsFromDatasetAsyncWithHttpInfo($dataset_name, $page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['getFieldsFromDataset'][0]) { - $returnType = '\BhrSdk\Model\DatasetFieldsResponse'; - $request = $this->getFieldsFromDatasetRequest($dataset_name, $page, $page_size, $contentType); + public function getFieldOptionsV12AsyncWithHttpInfo($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV12'][0]) { + $returnType = 'array<string,\BhrSdk\Model\FieldOptionsTransformer[]>'; + $request = $this->getFieldOptionsV12Request($dataset_name, $field_options_request_schema, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -958,50 +1099,33 @@ function ($exception) { } /** - * Create request for operation 'getFieldsFromDataset' + * Create request for operation 'getFieldOptionsV12' * - * @param string $dataset_name The name of the dataset you want to see fields for (required) - * @param int|null $page The page number to retrieve (optional) - * @param int|null $page_size The number of records to retrieve per page. Default is 500 and the Max is 1000 (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDataset'] to see the possible values for this operation + * @param string $dataset_name The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) + * @param \BhrSdk\Model\FieldOptionsRequestSchema $field_options_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldOptionsV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFieldsFromDatasetRequest($dataset_name, $page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['getFieldsFromDataset'][0]) { + public function getFieldOptionsV12Request($dataset_name, $field_options_request_schema, string $contentType = self::CONTENT_TYPES['getFieldOptionsV12'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'dataset_name' => $dataset_name, + 'field_options_request_schema' => $field_options_request_schema, ], - methodName: 'getFieldsFromDataset' + methodName: 'getFieldOptionsV12' ); - $resourcePath = '/api/v1/datasets/{datasetName}/fields'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1_2/datasets/{datasetName}/field-options'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - $parameters = [ - 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], - 'page_size' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } - } - // path params if ($dataset_name !== null) { $resourcePath = str_replace( @@ -1012,7 +1136,963 @@ public function getFieldsFromDatasetRequest($dataset_name, $page = null, $page_s } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($field_options_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($field_options_request_schema)); + } else { + $httpBody = is_array($field_options_request_schema) ? json_encode($field_options_request_schema) : $field_options_request_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getFieldsFromDatasetV1 + * + * Get Fields from Dataset (v1) + * + * @param string $dataset_name The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\DatasetFieldsResponse + * @deprecated + */ + public function getFieldsFromDatasetV1($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV1'][0]) { + list($response) = $this->getFieldsFromDatasetV1WithHttpInfo($dataset_name, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation getFieldsFromDatasetV1WithHttpInfo + * + * Get Fields from Dataset (v1) + * + * @param string $dataset_name The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\DatasetFieldsResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated + */ + public function getFieldsFromDatasetV1WithHttpInfo($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV1'][0]) { + $request = $this->getFieldsFromDatasetV1Request($dataset_name, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetFieldsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetFieldsResponse', + $request, + $response, + ); + } + + /** + * Operation getFieldsFromDatasetV1Async + * + * Get Fields from Dataset (v1) + * + * @param string $dataset_name The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated + */ + public function getFieldsFromDatasetV1Async($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV1'][0]) { + return $this->getFieldsFromDatasetV1AsyncWithHttpInfo($dataset_name, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFieldsFromDatasetV1AsyncWithHttpInfo + * + * Get Fields from Dataset (v1) + * + * @param string $dataset_name The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated + */ + public function getFieldsFromDatasetV1AsyncWithHttpInfo($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV1'][0]) { + $returnType = '\BhrSdk\Model\DatasetFieldsResponse'; + $request = $this->getFieldsFromDatasetV1Request($dataset_name, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getFieldsFromDatasetV1' + * + * @param string $dataset_name The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + * @deprecated + */ + public function getFieldsFromDatasetV1Request($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV1'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'dataset_name' => $dataset_name, + ], + methodName: 'getFieldsFromDatasetV1' + ); + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling DatasetsApi.getFieldsFromDatasetV1, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getFieldsFromDatasetV1, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getFieldsFromDatasetV1, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/datasets/{datasetName}/fields'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page_size' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($dataset_name !== null) { + $resourcePath = str_replace( + '{' . 'datasetName' . '}', + ObjectSerializer::toPathValue((string) $dataset_name), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getFieldsFromDatasetV12 + * + * Get Fields from Dataset (v1.2) + * + * @param string $dataset_name The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV12'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\DatasetFieldsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getFieldsFromDatasetV12($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV12'][0]) { + list($response) = $this->getFieldsFromDatasetV12WithHttpInfo($dataset_name, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation getFieldsFromDatasetV12WithHttpInfo + * + * Get Fields from Dataset (v1.2) + * + * @param string $dataset_name The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV12'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\DatasetFieldsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getFieldsFromDatasetV12WithHttpInfo($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV12'][0]) { + $request = $this->getFieldsFromDatasetV12Request($dataset_name, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetFieldsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetFieldsResponse', + $request, + $response, + ); + } + + /** + * Operation getFieldsFromDatasetV12Async + * + * Get Fields from Dataset (v1.2) + * + * @param string $dataset_name The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFieldsFromDatasetV12Async($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV12'][0]) { + return $this->getFieldsFromDatasetV12AsyncWithHttpInfo($dataset_name, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getFieldsFromDatasetV12AsyncWithHttpInfo + * + * Get Fields from Dataset (v1.2) + * + * @param string $dataset_name The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getFieldsFromDatasetV12AsyncWithHttpInfo($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV12'][0]) { + $returnType = '\BhrSdk\Model\DatasetFieldsResponse'; + $request = $this->getFieldsFromDatasetV12Request($dataset_name, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getFieldsFromDatasetV12' + * + * @param string $dataset_name The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) + * @param int|null $page The page number to retrieve. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of records to retrieve per page. Defaults to 500. Maximum is 1000. (optional, default to 500) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getFieldsFromDatasetV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getFieldsFromDatasetV12Request($dataset_name, $page = 1, $page_size = 500, string $contentType = self::CONTENT_TYPES['getFieldsFromDatasetV12'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'dataset_name' => $dataset_name, + ], + methodName: 'getFieldsFromDatasetV12' + ); + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling DatasetsApi.getFieldsFromDatasetV12, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getFieldsFromDatasetV12, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling DatasetsApi.getFieldsFromDatasetV12, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1_2/datasets/{datasetName}/fields'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page_size' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($dataset_name !== null) { + $resourcePath = str_replace( + '{' . 'datasetName' . '}', + ObjectSerializer::toPathValue((string) $dataset_name), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listDatasetsV1 + * + * List Datasets (v1) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\DatasetResponseV1 + * @deprecated + */ + public function listDatasetsV1(string $contentType = self::CONTENT_TYPES['listDatasetsV1'][0]) { + list($response) = $this->listDatasetsV1WithHttpInfo($contentType); + return $response; + } + + /** + * Operation listDatasetsV1WithHttpInfo + * + * List Datasets (v1) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\DatasetResponseV1, HTTP status code, HTTP response headers (array of strings) + * @deprecated + */ + public function listDatasetsV1WithHttpInfo(string $contentType = self::CONTENT_TYPES['listDatasetsV1'][0]) { + $request = $this->listDatasetsV1Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetResponseV1', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetResponseV1', + $request, + $response, + ); + } + + /** + * Operation listDatasetsV1Async + * + * List Datasets (v1) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated + */ + public function listDatasetsV1Async(string $contentType = self::CONTENT_TYPES['listDatasetsV1'][0]) { + return $this->listDatasetsV1AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listDatasetsV1AsyncWithHttpInfo + * + * List Datasets (v1) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated + */ + public function listDatasetsV1AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listDatasetsV1'][0]) { + $returnType = '\BhrSdk\Model\DatasetResponseV1'; + $request = $this->listDatasetsV1Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listDatasetsV1' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + * @deprecated + */ + public function listDatasetsV1Request(string $contentType = self::CONTENT_TYPES['listDatasetsV1'][0]) { + + $resourcePath = '/api/v1/datasets'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listDatasetsV12 + * + * List Datasets (v1.2) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV12'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\DatasetsResponseV12|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listDatasetsV12(string $contentType = self::CONTENT_TYPES['listDatasetsV12'][0]) { + list($response) = $this->listDatasetsV12WithHttpInfo($contentType); + return $response; + } + + /** + * Operation listDatasetsV12WithHttpInfo + * + * List Datasets (v1.2) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV12'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\DatasetsResponseV12|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listDatasetsV12WithHttpInfo(string $contentType = self::CONTENT_TYPES['listDatasetsV12'][0]) { + $request = $this->listDatasetsV12Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetsResponseV12', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\DatasetsResponseV12', + $request, + $response, + ); + } + + /** + * Operation listDatasetsV12Async + * + * List Datasets (v1.2) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listDatasetsV12Async(string $contentType = self::CONTENT_TYPES['listDatasetsV12'][0]) { + return $this->listDatasetsV12AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listDatasetsV12AsyncWithHttpInfo + * + * List Datasets (v1.2) + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listDatasetsV12AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listDatasetsV12'][0]) { + $returnType = '\BhrSdk\Model\DatasetsResponseV12'; + $request = $this->listDatasetsV12Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listDatasetsV12' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listDatasetsV12'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listDatasetsV12Request(string $contentType = self::CONTENT_TYPES['listDatasetsV12'][0]) { + + $resourcePath = '/api/v1_2/datasets'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], $contentType, $multipart ); diff --git a/lib/Api/EmployeeFilesApi.php b/lib/Api/EmployeeFilesApi.php index 94005991..2da08189 100644 --- a/lib/Api/EmployeeFilesApi.php +++ b/lib/Api/EmployeeFilesApi.php @@ -79,8 +79,9 @@ class EmployeeFilesApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addEmployeeFileCategory' => [ + 'createEmployeeFileCategory' => [ 'application/json', + 'application/xml', ], 'deleteEmployeeFile' => [ 'application/json', @@ -93,9 +94,10 @@ class EmployeeFilesApi { ], 'updateEmployeeFile' => [ 'application/json', + 'application/xml', ], 'uploadEmployeeFile' => [ - 'application/json', + 'multipart/form-data', ], ]; @@ -146,36 +148,36 @@ public function getConfig() { } /** - * Operation addEmployeeFileCategory + * Operation createEmployeeFileCategory * * Create Employee File Category * * @param string[] $request_body request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeFileCategory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function addEmployeeFileCategory($request_body, string $contentType = self::CONTENT_TYPES['addEmployeeFileCategory'][0]) { - list($response) = $this->addEmployeeFileCategoryWithHttpInfo($request_body, $contentType); + public function createEmployeeFileCategory($request_body, string $contentType = self::CONTENT_TYPES['createEmployeeFileCategory'][0]) { + list($response) = $this->createEmployeeFileCategoryWithHttpInfo($request_body, $contentType); return $response; } /** - * Operation addEmployeeFileCategoryWithHttpInfo + * Operation createEmployeeFileCategoryWithHttpInfo * * Create Employee File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeFileCategory'] to see the possible values for this operation * * @throws \BhrSdk\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 addEmployeeFileCategoryWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['addEmployeeFileCategory'][0]) { - $request = $this->addEmployeeFileCategoryRequest($request_body, $contentType); + public function createEmployeeFileCategoryWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['createEmployeeFileCategory'][0]) { + $request = $this->createEmployeeFileCategoryRequest($request_body, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -191,18 +193,18 @@ public function addEmployeeFileCategoryWithHttpInfo($request_body, string $conte } /** - * Operation addEmployeeFileCategoryAsync + * Operation createEmployeeFileCategoryAsync * * Create Employee File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeFileCategoryAsync($request_body, string $contentType = self::CONTENT_TYPES['addEmployeeFileCategory'][0]) { - return $this->addEmployeeFileCategoryAsyncWithHttpInfo($request_body, $contentType) + public function createEmployeeFileCategoryAsync($request_body, string $contentType = self::CONTENT_TYPES['createEmployeeFileCategory'][0]) { + return $this->createEmployeeFileCategoryAsyncWithHttpInfo($request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -211,19 +213,19 @@ function ($response) { } /** - * Operation addEmployeeFileCategoryAsyncWithHttpInfo + * Operation createEmployeeFileCategoryAsyncWithHttpInfo * * Create Employee File Category * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeFileCategoryAsyncWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['addEmployeeFileCategory'][0]) { + public function createEmployeeFileCategoryAsyncWithHttpInfo($request_body, string $contentType = self::CONTENT_TYPES['createEmployeeFileCategory'][0]) { - $request = $this->addEmployeeFileCategoryRequest($request_body, $contentType); + $request = $this->createEmployeeFileCategoryRequest($request_body, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -255,21 +257,21 @@ function ($exception) { } /** - * Create request for operation 'addEmployeeFileCategory' + * Create request for operation 'createEmployeeFileCategory' * * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeFileCategory'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeFileCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEmployeeFileCategoryRequest($request_body, string $contentType = self::CONTENT_TYPES['addEmployeeFileCategory'][0]) { + public function createEmployeeFileCategoryRequest($request_body, string $contentType = self::CONTENT_TYPES['createEmployeeFileCategory'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'request_body' => $request_body, ], - methodName: 'addEmployeeFileCategory' + methodName: 'createEmployeeFileCategory' ); $resourcePath = '/api/v1/employees/files/categories'; @@ -281,7 +283,7 @@ public function addEmployeeFileCategoryRequest($request_body, string $contentTyp $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -345,8 +347,8 @@ public function addEmployeeFileCategoryRequest($request_body, string $contentTyp * * Delete Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being deleted. (required) + * @param int $id The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -363,8 +365,8 @@ public function deleteEmployeeFile($id, $file_id, string $contentType = self::CO * * Delete Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being deleted. (required) + * @param int $id The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -392,8 +394,8 @@ public function deleteEmployeeFileWithHttpInfo($id, $file_id, string $contentTyp * * Delete Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being deleted. (required) + * @param int $id The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -413,8 +415,8 @@ function ($response) { * * Delete Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being deleted. (required) + * @param int $id The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -456,8 +458,8 @@ function ($exception) { /** * Create request for operation 'deleteEmployeeFile' * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being deleted. (required) + * @param int $id The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -499,7 +501,7 @@ public function deleteEmployeeFileRequest($id, $file_id, string $contentType = s } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -553,13 +555,13 @@ public function deleteEmployeeFileRequest($id, $file_id, string $contentType = s * * Get Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being retrieved. (required) + * @param int $id The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \SplFileObject */ public function getEmployeeFile($id, $file_id, string $contentType = self::CONTENT_TYPES['getEmployeeFile'][0]) { list($response) = $this->getEmployeeFileWithHttpInfo($id, $file_id, $contentType); @@ -571,13 +573,13 @@ public function getEmployeeFile($id, $file_id, string $contentType = self::CONTE * * Get Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being retrieved. (required) + * @param int $id The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\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 \SplFileObject, HTTP status code, HTTP response headers (array of strings) */ public function getEmployeeFileWithHttpInfo($id, $file_id, string $contentType = self::CONTENT_TYPES['getEmployeeFile'][0]) { $request = $this->getEmployeeFileRequest($id, $file_id, $contentType); @@ -588,8 +590,30 @@ public function getEmployeeFileWithHttpInfo($id, $file_id, string $contentType = $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\SplFileObject', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\SplFileObject', $request, $response, ); @@ -600,8 +624,8 @@ public function getEmployeeFileWithHttpInfo($id, $file_id, string $contentType = * * Get Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being retrieved. (required) + * @param int $id The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -621,25 +645,27 @@ function ($response) { * * Get Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being retrieved. (required) + * @param int $id The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function getEmployeeFileAsyncWithHttpInfo($id, $file_id, string $contentType = self::CONTENT_TYPES['getEmployeeFile'][0]) { - + $returnType = '\SplFileObject'; $request = $this->getEmployeeFileRequest($id, $file_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -664,8 +690,8 @@ function ($exception) { /** * Create request for operation 'getEmployeeFile' * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being retrieved. (required) + * @param int $id The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (required) + * @param int $file_id The ID of the employee file to download. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -707,7 +733,7 @@ public function getEmployeeFileRequest($id, $file_id, string $contentType = self } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/octet-stream', ], $contentType, $multipart ); @@ -759,34 +785,36 @@ public function getEmployeeFileRequest($id, $file_id, string $contentType = self /** * Operation listEmployeeFiles * - * Get Employee Files and Categories + * List Employee Files * - * @param string $id Employee ID is required and needs to be a valid employee ID. (required) + * @param int $id The ID of the employee whose files are being listed. (required) + * @param string|null $accept Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. (optional, default to 'application/xml') * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeFiles'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\JsonEmployeeFiles */ - public function listEmployeeFiles($id, string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { - list($response) = $this->listEmployeeFilesWithHttpInfo($id, $contentType); + public function listEmployeeFiles($id, $accept = 'application/xml', string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { + list($response) = $this->listEmployeeFilesWithHttpInfo($id, $accept, $contentType); return $response; } /** * Operation listEmployeeFilesWithHttpInfo * - * Get Employee Files and Categories + * List Employee Files * - * @param string $id Employee ID is required and needs to be a valid employee ID. (required) + * @param int $id The ID of the employee whose files are being listed. (required) + * @param string|null $accept Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. (optional, default to 'application/xml') * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeFiles'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\JsonEmployeeFiles, HTTP status code, HTTP response headers (array of strings) */ - public function listEmployeeFilesWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { - $request = $this->listEmployeeFilesRequest($id, $contentType); + public function listEmployeeFilesWithHttpInfo($id, $accept = 'application/xml', string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { + $request = $this->listEmployeeFilesRequest($id, $accept, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -794,8 +822,30 @@ public function listEmployeeFilesWithHttpInfo($id, string $contentType = self::C $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\JsonEmployeeFiles', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\JsonEmployeeFiles', $request, $response, ); @@ -804,16 +854,17 @@ public function listEmployeeFilesWithHttpInfo($id, string $contentType = self::C /** * Operation listEmployeeFilesAsync * - * Get Employee Files and Categories + * List Employee Files * - * @param string $id Employee ID is required and needs to be a valid employee ID. (required) + * @param int $id The ID of the employee whose files are being listed. (required) + * @param string|null $accept Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. (optional, default to 'application/xml') * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listEmployeeFilesAsync($id, string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { - return $this->listEmployeeFilesAsyncWithHttpInfo($id, $contentType) + public function listEmployeeFilesAsync($id, $accept = 'application/xml', string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { + return $this->listEmployeeFilesAsyncWithHttpInfo($id, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -824,26 +875,29 @@ function ($response) { /** * Operation listEmployeeFilesAsyncWithHttpInfo * - * Get Employee Files and Categories + * List Employee Files * - * @param string $id Employee ID is required and needs to be a valid employee ID. (required) + * @param int $id The ID of the employee whose files are being listed. (required) + * @param string|null $accept Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. (optional, default to 'application/xml') * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listEmployeeFilesAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { - - $request = $this->listEmployeeFilesRequest($id, $contentType); + public function listEmployeeFilesAsyncWithHttpInfo($id, $accept = 'application/xml', string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { + $returnType = '\BhrSdk\Model\JsonEmployeeFiles'; + $request = $this->listEmployeeFilesRequest($id, $accept, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -868,13 +922,14 @@ function ($exception) { /** * Create request for operation 'listEmployeeFiles' * - * @param string $id Employee ID is required and needs to be a valid employee ID. (required) + * @param int $id The ID of the employee whose files are being listed. (required) + * @param string|null $accept Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. (optional, default to 'application/xml') * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeFiles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listEmployeeFilesRequest($id, string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { + public function listEmployeeFilesRequest($id, $accept = 'application/xml', string $contentType = self::CONTENT_TYPES['listEmployeeFiles'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -891,6 +946,11 @@ public function listEmployeeFilesRequest($id, string $contentType = self::CONTEN $httpBody = ''; $multipart = false; + // header params + if ($accept !== null) { + $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); + } + // path params if ($id !== null) { $resourcePath = str_replace( @@ -901,7 +961,7 @@ public function listEmployeeFilesRequest($id, string $contentType = self::CONTEN } $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -955,8 +1015,8 @@ public function listEmployeeFilesRequest($id, string $contentType = self::CONTEN * * Update Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $id The ID of the employee whose file is being updated. (required) + * @param int $file_id The ID of the employee file to update. (required) * @param \BhrSdk\Model\EmployeeFileUpdate $employee_file_update employee_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeFile'] to see the possible values for this operation * @@ -974,8 +1034,8 @@ public function updateEmployeeFile($id, $file_id, $employee_file_update, string * * Update Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $id The ID of the employee whose file is being updated. (required) + * @param int $file_id The ID of the employee file to update. (required) * @param \BhrSdk\Model\EmployeeFileUpdate $employee_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeFile'] to see the possible values for this operation * @@ -1004,8 +1064,8 @@ public function updateEmployeeFileWithHttpInfo($id, $file_id, $employee_file_upd * * Update Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $id The ID of the employee whose file is being updated. (required) + * @param int $file_id The ID of the employee file to update. (required) * @param \BhrSdk\Model\EmployeeFileUpdate $employee_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeFile'] to see the possible values for this operation * @@ -1026,8 +1086,8 @@ function ($response) { * * Update Employee File * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $id The ID of the employee whose file is being updated. (required) + * @param int $file_id The ID of the employee file to update. (required) * @param \BhrSdk\Model\EmployeeFileUpdate $employee_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeFile'] to see the possible values for this operation * @@ -1070,8 +1130,8 @@ function ($exception) { /** * Create request for operation 'updateEmployeeFile' * - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param string $file_id {fileId} is the ID of the employee file being updated. (required) + * @param int $id The ID of the employee whose file is being updated. (required) + * @param int $file_id The ID of the employee file to update. (required) * @param \BhrSdk\Model\EmployeeFileUpdate $employee_file_update (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeFile'] to see the possible values for this operation * @@ -1115,7 +1175,7 @@ public function updateEmployeeFileRequest($id, $file_id, $employee_file_update, } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -1180,14 +1240,18 @@ public function updateEmployeeFileRequest($id, $file_id, $employee_file_update, * Upload Employee File * * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the employee file section to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function uploadEmployeeFile($id, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { - list($response) = $this->uploadEmployeeFileWithHttpInfo($id, $contentType); + public function uploadEmployeeFile($id, $file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { + list($response) = $this->uploadEmployeeFileWithHttpInfo($id, $file_name, $category, $file, $share, $contentType); return $response; } @@ -1197,14 +1261,18 @@ public function uploadEmployeeFile($id, string $contentType = self::CONTENT_TYPE * Upload Employee File * * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the employee file section to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeeFile'] to see the possible values for this operation * * @throws \BhrSdk\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 uploadEmployeeFileWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { - $request = $this->uploadEmployeeFileRequest($id, $contentType); + public function uploadEmployeeFileWithHttpInfo($id, $file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { + $request = $this->uploadEmployeeFileRequest($id, $file_name, $category, $file, $share, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1225,13 +1293,17 @@ public function uploadEmployeeFileWithHttpInfo($id, string $contentType = self:: * Upload Employee File * * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the employee file section to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadEmployeeFileAsync($id, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { - return $this->uploadEmployeeFileAsyncWithHttpInfo($id, $contentType) + public function uploadEmployeeFileAsync($id, $file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { + return $this->uploadEmployeeFileAsyncWithHttpInfo($id, $file_name, $category, $file, $share, $contentType) ->then( function ($response) { return $response[0]; @@ -1245,14 +1317,18 @@ function ($response) { * Upload Employee File * * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the employee file section to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadEmployeeFileAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { + public function uploadEmployeeFileAsyncWithHttpInfo($id, $file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { - $request = $this->uploadEmployeeFileRequest($id, $contentType); + $request = $this->uploadEmployeeFileRequest($id, $file_name, $category, $file, $share, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1287,23 +1363,30 @@ function ($exception) { * Create request for operation 'uploadEmployeeFile' * * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + * @param string $file_name The display name for the uploaded file. (required) + * @param int $category The ID of the employee file section to upload the file into. (required) + * @param \SplFileObject $file The file to upload. (required) + * @param string|null $share Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeeFile'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function uploadEmployeeFileRequest($id, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { + public function uploadEmployeeFileRequest($id, $file_name, $category, $file, $share = null, string $contentType = self::CONTENT_TYPES['uploadEmployeeFile'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, + 'file_name' => $file_name, + 'category' => $category, + 'file' => $file, ], methodName: 'uploadEmployeeFile' ); $resourcePath = '/api/v1/employees/{id}/files'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); - + $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1318,12 +1401,50 @@ public function uploadEmployeeFileRequest($id, string $contentType = self::CONTE ); } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'fileName' => $file_name, + 'category' => $category, + 'share' => $share, + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + + $multipart = true; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); + if (count($formParams) > 0) { + /* @phpstan-ignore-next-line */ + 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); + } + } + // Authentication methods // Basic authentication diff --git a/lib/Api/EmployeeVerificationApi.php b/lib/Api/EmployeeVerificationApi.php new file mode 100644 index 00000000..64d0a13a --- /dev/null +++ b/lib/Api/EmployeeVerificationApi.php @@ -0,0 +1,1303 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * EmployeeVerificationApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class EmployeeVerificationApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'getEmployeeVerificationIntegration' => [ + 'application/json', + ], + 'listEmployeeVerificationsByEmployee' => [ + 'application/json', + ], + 'sendEmployeeVerificationLifecycleEmailByUser' => [ + 'application/json', + ], + 'updateEmployeeVerification' => [ + 'application/json', + ], + 'updateEmployeeVerificationIntegration' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation getEmployeeVerificationIntegration + * + * Get employee verification integration status + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeVerificationIntegrationResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function getEmployeeVerificationIntegration(string $contentType = self::CONTENT_TYPES['getEmployeeVerificationIntegration'][0]) { + list($response) = $this->getEmployeeVerificationIntegrationWithHttpInfo($contentType); + return $response; + } + + /** + * Operation getEmployeeVerificationIntegrationWithHttpInfo + * + * Get employee verification integration status + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeVerificationIntegrationResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getEmployeeVerificationIntegrationWithHttpInfo(string $contentType = self::CONTENT_TYPES['getEmployeeVerificationIntegration'][0]) { + $request = $this->getEmployeeVerificationIntegrationRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationIntegrationResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationIntegrationResponse', + $request, + $response, + ); + } + + /** + * Operation getEmployeeVerificationIntegrationAsync + * + * Get employee verification integration status + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmployeeVerificationIntegrationAsync(string $contentType = self::CONTENT_TYPES['getEmployeeVerificationIntegration'][0]) { + return $this->getEmployeeVerificationIntegrationAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmployeeVerificationIntegrationAsyncWithHttpInfo + * + * Get employee verification integration status + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getEmployeeVerificationIntegrationAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getEmployeeVerificationIntegration'][0]) { + $returnType = '\BhrSdk\Model\EmployeeVerificationIntegrationResponse'; + $request = $this->getEmployeeVerificationIntegrationRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getEmployeeVerificationIntegration' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEmployeeVerificationIntegrationRequest(string $contentType = self::CONTENT_TYPES['getEmployeeVerificationIntegration'][0]) { + + $resourcePath = '/api/v1/employee-verifications/integration'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listEmployeeVerificationsByEmployee + * + * List employee verification records for an employee + * + * @param int $employee_id Company employee id whose verification history is returned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeVerificationsListResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function listEmployeeVerificationsByEmployee($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'][0]) { + list($response) = $this->listEmployeeVerificationsByEmployeeWithHttpInfo($employee_id, $contentType); + return $response; + } + + /** + * Operation listEmployeeVerificationsByEmployeeWithHttpInfo + * + * List employee verification records for an employee + * + * @param int $employee_id Company employee id whose verification history is returned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeVerificationsListResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listEmployeeVerificationsByEmployeeWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'][0]) { + $request = $this->listEmployeeVerificationsByEmployeeRequest($employee_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationsListResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationsListResponse', + $request, + $response, + ); + } + + /** + * Operation listEmployeeVerificationsByEmployeeAsync + * + * List employee verification records for an employee + * + * @param int $employee_id Company employee id whose verification history is returned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeVerificationsByEmployeeAsync($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'][0]) { + return $this->listEmployeeVerificationsByEmployeeAsyncWithHttpInfo($employee_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listEmployeeVerificationsByEmployeeAsyncWithHttpInfo + * + * List employee verification records for an employee + * + * @param int $employee_id Company employee id whose verification history is returned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeVerificationsByEmployeeAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'][0]) { + $returnType = '\BhrSdk\Model\EmployeeVerificationsListResponse'; + $request = $this->listEmployeeVerificationsByEmployeeRequest($employee_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listEmployeeVerificationsByEmployee' + * + * @param int $employee_id Company employee id whose verification history is returned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listEmployeeVerificationsByEmployeeRequest($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeVerificationsByEmployee'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'listEmployeeVerificationsByEmployee' + ); + + $resourcePath = '/api/v1/employee-verifications/employees/{employeeId}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation sendEmployeeVerificationLifecycleEmailByUser + * + * Send employee verification lifecycle email by user and email type + * + * @param int $user_id Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + * @param \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest $send_employee_verification_lifecycle_email_by_user_request send_employee_verification_lifecycle_email_by_user_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse + */ + public function sendEmployeeVerificationLifecycleEmailByUser($user_id, $send_employee_verification_lifecycle_email_by_user_request, string $contentType = self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'][0]) { + list($response) = $this->sendEmployeeVerificationLifecycleEmailByUserWithHttpInfo($user_id, $send_employee_verification_lifecycle_email_by_user_request, $contentType); + return $response; + } + + /** + * Operation sendEmployeeVerificationLifecycleEmailByUserWithHttpInfo + * + * Send employee verification lifecycle email by user and email type + * + * @param int $user_id Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + * @param \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest $send_employee_verification_lifecycle_email_by_user_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function sendEmployeeVerificationLifecycleEmailByUserWithHttpInfo($user_id, $send_employee_verification_lifecycle_email_by_user_request, string $contentType = self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'][0]) { + $request = $this->sendEmployeeVerificationLifecycleEmailByUserRequest($user_id, $send_employee_verification_lifecycle_email_by_user_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse', + $request, + $response, + ); + } + + /** + * Operation sendEmployeeVerificationLifecycleEmailByUserAsync + * + * Send employee verification lifecycle email by user and email type + * + * @param int $user_id Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + * @param \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest $send_employee_verification_lifecycle_email_by_user_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendEmployeeVerificationLifecycleEmailByUserAsync($user_id, $send_employee_verification_lifecycle_email_by_user_request, string $contentType = self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'][0]) { + return $this->sendEmployeeVerificationLifecycleEmailByUserAsyncWithHttpInfo($user_id, $send_employee_verification_lifecycle_email_by_user_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendEmployeeVerificationLifecycleEmailByUserAsyncWithHttpInfo + * + * Send employee verification lifecycle email by user and email type + * + * @param int $user_id Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + * @param \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest $send_employee_verification_lifecycle_email_by_user_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendEmployeeVerificationLifecycleEmailByUserAsyncWithHttpInfo($user_id, $send_employee_verification_lifecycle_email_by_user_request, string $contentType = self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'][0]) { + $returnType = '\BhrSdk\Model\EmployeeVerificationLifecycleEmailAcceptedResponse'; + $request = $this->sendEmployeeVerificationLifecycleEmailByUserRequest($user_id, $send_employee_verification_lifecycle_email_by_user_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'sendEmployeeVerificationLifecycleEmailByUser' + * + * @param int $user_id Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + * @param \BhrSdk\Model\SendEmployeeVerificationLifecycleEmailByUserRequest $send_employee_verification_lifecycle_email_by_user_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function sendEmployeeVerificationLifecycleEmailByUserRequest($user_id, $send_employee_verification_lifecycle_email_by_user_request, string $contentType = self::CONTENT_TYPES['sendEmployeeVerificationLifecycleEmailByUser'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'user_id' => $user_id, + 'send_employee_verification_lifecycle_email_by_user_request' => $send_employee_verification_lifecycle_email_by_user_request, + ], + methodName: 'sendEmployeeVerificationLifecycleEmailByUser' + ); + + $resourcePath = '/api/v1/employee-verifications/users/{userId}/send-email'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($user_id !== null) { + $resourcePath = str_replace( + '{' . 'userId' . '}', + ObjectSerializer::toPathValue((string) $user_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($send_employee_verification_lifecycle_email_by_user_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($send_employee_verification_lifecycle_email_by_user_request)); + } else { + $httpBody = is_array($send_employee_verification_lifecycle_email_by_user_request) ? json_encode($send_employee_verification_lifecycle_email_by_user_request) : $send_employee_verification_lifecycle_email_by_user_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateEmployeeVerification + * + * Update an employee verification record + * + * @param int $employee_id Company employee id that owns the verification row. (required) + * @param int $verification_id Identifier of the verification record to update. (required) + * @param \BhrSdk\Model\UpdateEmployeeVerificationRequest $update_employee_verification_request Fields to update on the verification record. At least one field must be supplied. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerification'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeVerificationUpdateResponse + */ + public function updateEmployeeVerification($employee_id, $verification_id, $update_employee_verification_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerification'][0]) { + list($response) = $this->updateEmployeeVerificationWithHttpInfo($employee_id, $verification_id, $update_employee_verification_request, $contentType); + return $response; + } + + /** + * Operation updateEmployeeVerificationWithHttpInfo + * + * Update an employee verification record + * + * @param int $employee_id Company employee id that owns the verification row. (required) + * @param int $verification_id Identifier of the verification record to update. (required) + * @param \BhrSdk\Model\UpdateEmployeeVerificationRequest $update_employee_verification_request Fields to update on the verification record. At least one field must be supplied. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerification'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeVerificationUpdateResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateEmployeeVerificationWithHttpInfo($employee_id, $verification_id, $update_employee_verification_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerification'][0]) { + $request = $this->updateEmployeeVerificationRequest($employee_id, $verification_id, $update_employee_verification_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationUpdateResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationUpdateResponse', + $request, + $response, + ); + } + + /** + * Operation updateEmployeeVerificationAsync + * + * Update an employee verification record + * + * @param int $employee_id Company employee id that owns the verification row. (required) + * @param int $verification_id Identifier of the verification record to update. (required) + * @param \BhrSdk\Model\UpdateEmployeeVerificationRequest $update_employee_verification_request Fields to update on the verification record. At least one field must be supplied. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerification'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmployeeVerificationAsync($employee_id, $verification_id, $update_employee_verification_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerification'][0]) { + return $this->updateEmployeeVerificationAsyncWithHttpInfo($employee_id, $verification_id, $update_employee_verification_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateEmployeeVerificationAsyncWithHttpInfo + * + * Update an employee verification record + * + * @param int $employee_id Company employee id that owns the verification row. (required) + * @param int $verification_id Identifier of the verification record to update. (required) + * @param \BhrSdk\Model\UpdateEmployeeVerificationRequest $update_employee_verification_request Fields to update on the verification record. At least one field must be supplied. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerification'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmployeeVerificationAsyncWithHttpInfo($employee_id, $verification_id, $update_employee_verification_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerification'][0]) { + $returnType = '\BhrSdk\Model\EmployeeVerificationUpdateResponse'; + $request = $this->updateEmployeeVerificationRequest($employee_id, $verification_id, $update_employee_verification_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateEmployeeVerification' + * + * @param int $employee_id Company employee id that owns the verification row. (required) + * @param int $verification_id Identifier of the verification record to update. (required) + * @param \BhrSdk\Model\UpdateEmployeeVerificationRequest $update_employee_verification_request Fields to update on the verification record. At least one field must be supplied. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerification'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateEmployeeVerificationRequest($employee_id, $verification_id, $update_employee_verification_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerification'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + 'verification_id' => $verification_id, + 'update_employee_verification_request' => $update_employee_verification_request, + ], + methodName: 'updateEmployeeVerification' + ); + + $resourcePath = '/api/v1/employee-verifications/employees/{employeeId}/{verificationId}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + // path params + if ($verification_id !== null) { + $resourcePath = str_replace( + '{' . 'verificationId' . '}', + ObjectSerializer::toPathValue((string) $verification_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_employee_verification_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_employee_verification_request)); + } else { + $httpBody = is_array($update_employee_verification_request) ? json_encode($update_employee_verification_request) : $update_employee_verification_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateEmployeeVerificationIntegration + * + * Enable or disable the employee verification integration + * + * @param \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest $update_employee_verification_integration_request update_employee_verification_integration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeVerificationIntegrationResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function updateEmployeeVerificationIntegration($update_employee_verification_integration_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerificationIntegration'][0]) { + list($response) = $this->updateEmployeeVerificationIntegrationWithHttpInfo($update_employee_verification_integration_request, $contentType); + return $response; + } + + /** + * Operation updateEmployeeVerificationIntegrationWithHttpInfo + * + * Enable or disable the employee verification integration + * + * @param \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest $update_employee_verification_integration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeVerificationIntegrationResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateEmployeeVerificationIntegrationWithHttpInfo($update_employee_verification_integration_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerificationIntegration'][0]) { + $request = $this->updateEmployeeVerificationIntegrationRequest($update_employee_verification_integration_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationIntegrationResponse', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeVerificationIntegrationResponse', + $request, + $response, + ); + } + + /** + * Operation updateEmployeeVerificationIntegrationAsync + * + * Enable or disable the employee verification integration + * + * @param \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest $update_employee_verification_integration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmployeeVerificationIntegrationAsync($update_employee_verification_integration_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerificationIntegration'][0]) { + return $this->updateEmployeeVerificationIntegrationAsyncWithHttpInfo($update_employee_verification_integration_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateEmployeeVerificationIntegrationAsyncWithHttpInfo + * + * Enable or disable the employee verification integration + * + * @param \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest $update_employee_verification_integration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateEmployeeVerificationIntegrationAsyncWithHttpInfo($update_employee_verification_integration_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerificationIntegration'][0]) { + $returnType = '\BhrSdk\Model\EmployeeVerificationIntegrationResponse'; + $request = $this->updateEmployeeVerificationIntegrationRequest($update_employee_verification_integration_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateEmployeeVerificationIntegration' + * + * @param \BhrSdk\Model\UpdateEmployeeVerificationIntegrationRequest $update_employee_verification_integration_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeVerificationIntegration'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateEmployeeVerificationIntegrationRequest($update_employee_verification_integration_request, string $contentType = self::CONTENT_TYPES['updateEmployeeVerificationIntegration'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'update_employee_verification_integration_request' => $update_employee_verification_integration_request, + ], + methodName: 'updateEmployeeVerificationIntegration' + ); + + $resourcePath = '/api/v1/employee-verifications/integration'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_employee_verification_integration_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_employee_verification_integration_request)); + } else { + $httpBody = is_array($update_employee_verification_integration_request) ? json_encode($update_employee_verification_integration_request) : $update_employee_verification_integration_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/EmployeesApi.php b/lib/Api/EmployeesApi.php index f9723bea..2fa50512 100644 --- a/lib/Api/EmployeesApi.php +++ b/lib/Api/EmployeesApi.php @@ -79,7 +79,12 @@ class EmployeesApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addEmployee' => [ + 'createEmployee' => [ + 'application/json', + 'application/xml', + 'text/xml', + ], + 'deleteEmployee' => [ 'application/json', ], 'getCompanyInformation' => [ @@ -91,11 +96,13 @@ class EmployeesApi { 'getEmployeesDirectory' => [ 'application/json', ], - 'getEmployeesList' => [ + 'listEmployees' => [ 'application/json', ], 'updateEmployee' => [ 'application/json', + 'application/xml', + 'text/xml', ], ]; @@ -146,36 +153,36 @@ public function getConfig() { } /** - * Operation addEmployee + * Operation createEmployee * * Create Employee * * @param \BhrSdk\Model\PostNewEmployee $post_new_employee post_new_employee (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployee'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployee'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GetEmployeeResponse */ - public function addEmployee($post_new_employee, string $contentType = self::CONTENT_TYPES['addEmployee'][0]) { - list($response) = $this->addEmployeeWithHttpInfo($post_new_employee, $contentType); + public function createEmployee($post_new_employee, string $contentType = self::CONTENT_TYPES['createEmployee'][0]) { + list($response) = $this->createEmployeeWithHttpInfo($post_new_employee, $contentType); return $response; } /** - * Operation addEmployeeWithHttpInfo + * Operation createEmployeeWithHttpInfo * * Create Employee * * @param \BhrSdk\Model\PostNewEmployee $post_new_employee (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployee'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployee'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GetEmployeeResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addEmployeeWithHttpInfo($post_new_employee, string $contentType = self::CONTENT_TYPES['addEmployee'][0]) { - $request = $this->addEmployeeRequest($post_new_employee, $contentType); + public function createEmployeeWithHttpInfo($post_new_employee, string $contentType = self::CONTENT_TYPES['createEmployee'][0]) { + $request = $this->createEmployeeRequest($post_new_employee, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -183,26 +190,48 @@ public function addEmployeeWithHttpInfo($post_new_employee, string $contentType $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GetEmployeeResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GetEmployeeResponse', $request, $response, ); } /** - * Operation addEmployeeAsync + * Operation createEmployeeAsync * * Create Employee * * @param \BhrSdk\Model\PostNewEmployee $post_new_employee (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployee'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeAsync($post_new_employee, string $contentType = self::CONTENT_TYPES['addEmployee'][0]) { - return $this->addEmployeeAsyncWithHttpInfo($post_new_employee, $contentType) + public function createEmployeeAsync($post_new_employee, string $contentType = self::CONTENT_TYPES['createEmployee'][0]) { + return $this->createEmployeeAsyncWithHttpInfo($post_new_employee, $contentType) ->then( function ($response) { return $response[0]; @@ -211,28 +240,30 @@ function ($response) { } /** - * Operation addEmployeeAsyncWithHttpInfo + * Operation createEmployeeAsyncWithHttpInfo * * Create Employee * * @param \BhrSdk\Model\PostNewEmployee $post_new_employee (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployee'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeAsyncWithHttpInfo($post_new_employee, string $contentType = self::CONTENT_TYPES['addEmployee'][0]) { - - $request = $this->addEmployeeRequest($post_new_employee, $contentType); + public function createEmployeeAsyncWithHttpInfo($post_new_employee, string $contentType = self::CONTENT_TYPES['createEmployee'][0]) { + $returnType = '\BhrSdk\Model\GetEmployeeResponse'; + $request = $this->createEmployeeRequest($post_new_employee, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -255,21 +286,21 @@ function ($exception) { } /** - * Create request for operation 'addEmployee' + * Create request for operation 'createEmployee' * * @param \BhrSdk\Model\PostNewEmployee $post_new_employee (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployee'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEmployeeRequest($post_new_employee, string $contentType = self::CONTENT_TYPES['addEmployee'][0]) { + public function createEmployeeRequest($post_new_employee, string $contentType = self::CONTENT_TYPES['createEmployee'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'post_new_employee' => $post_new_employee, ], - methodName: 'addEmployee' + methodName: 'createEmployee' ); $resourcePath = '/api/v1/employees'; @@ -340,6 +371,200 @@ public function addEmployeeRequest($post_new_employee, string $contentType = sel ); } + /** + * Operation deleteEmployee + * + * Delete employee + * + * @param int $id ID of the employee to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployee'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteEmployee($id, string $contentType = self::CONTENT_TYPES['deleteEmployee'][0]) { + list($response) = $this->deleteEmployeeWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteEmployeeWithHttpInfo + * + * Delete employee + * + * @param int $id ID of the employee to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployee'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteEmployeeWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteEmployee'][0]) { + $request = $this->deleteEmployeeRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteEmployeeAsync + * + * Delete employee + * + * @param int $id ID of the employee to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteEmployeeAsync($id, string $contentType = self::CONTENT_TYPES['deleteEmployee'][0]) { + return $this->deleteEmployeeAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteEmployeeAsyncWithHttpInfo + * + * Delete employee + * + * @param int $id ID of the employee to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteEmployeeAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteEmployee'][0]) { + + $request = $this->deleteEmployeeRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteEmployee' + * + * @param int $id ID of the employee to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployee'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteEmployeeRequest($id, string $contentType = self::CONTENT_TYPES['deleteEmployee'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteEmployee' + ); + + $resourcePath = '/api/v1/employees/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + /** * Operation getCompanyInformation * @@ -542,18 +767,18 @@ public function getCompanyInformationRequest(string $contentType = self::CONTENT * * Get Employee * - * @param string $fields {fields} is a comma separated list of values taken from the official list of field names. (required) - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param string $id The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. (required) + * @param string|null $fields Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. (optional) + * @param bool|null $only_current When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. (optional, default to true) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployee'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\Employee + * @return \BhrSdk\Model\GetEmployeeResponse */ - public function getEmployee($fields, $id, $only_current = false, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { - list($response) = $this->getEmployeeWithHttpInfo($fields, $id, $only_current, $accept_header_parameter, $contentType); + public function getEmployee($id, $fields = null, $only_current = true, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { + list($response) = $this->getEmployeeWithHttpInfo($id, $fields, $only_current, $accept_header_parameter, $contentType); return $response; } @@ -562,18 +787,18 @@ public function getEmployee($fields, $id, $only_current = false, $accept_header_ * * Get Employee * - * @param string $fields {fields} is a comma separated list of values taken from the official list of field names. (required) - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param string $id The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. (required) + * @param string|null $fields Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. (optional) + * @param bool|null $only_current When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. (optional, default to true) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployee'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\Employee, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GetEmployeeResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeWithHttpInfo($fields, $id, $only_current = false, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { - $request = $this->getEmployeeRequest($fields, $id, $only_current, $accept_header_parameter, $contentType); + public function getEmployeeWithHttpInfo($id, $fields = null, $only_current = true, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { + $request = $this->getEmployeeRequest($id, $fields, $only_current, $accept_header_parameter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -584,7 +809,7 @@ public function getEmployeeWithHttpInfo($fields, $id, $only_current = false, $ac switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Employee', + '\BhrSdk\Model\GetEmployeeResponse', $request, $response, ); @@ -604,7 +829,7 @@ public function getEmployeeWithHttpInfo($fields, $id, $only_current = false, $ac } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Employee', + '\BhrSdk\Model\GetEmployeeResponse', $request, $response, ); @@ -615,17 +840,17 @@ public function getEmployeeWithHttpInfo($fields, $id, $only_current = false, $ac * * Get Employee * - * @param string $fields {fields} is a comma separated list of values taken from the official list of field names. (required) - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param string $id The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. (required) + * @param string|null $fields Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. (optional) + * @param bool|null $only_current When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. (optional, default to true) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeAsync($fields, $id, $only_current = false, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { - return $this->getEmployeeAsyncWithHttpInfo($fields, $id, $only_current, $accept_header_parameter, $contentType) + public function getEmployeeAsync($id, $fields = null, $only_current = true, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { + return $this->getEmployeeAsyncWithHttpInfo($id, $fields, $only_current, $accept_header_parameter, $contentType) ->then( function ($response) { return $response[0]; @@ -638,18 +863,18 @@ function ($response) { * * Get Employee * - * @param string $fields {fields} is a comma separated list of values taken from the official list of field names. (required) - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param string $id The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. (required) + * @param string|null $fields Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. (optional) + * @param bool|null $only_current When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. (optional, default to true) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeAsyncWithHttpInfo($fields, $id, $only_current = false, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { - $returnType = '\BhrSdk\Model\Employee'; - $request = $this->getEmployeeRequest($fields, $id, $only_current, $accept_header_parameter, $contentType); + public function getEmployeeAsyncWithHttpInfo($id, $fields = null, $only_current = true, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { + $returnType = '\BhrSdk\Model\GetEmployeeResponse'; + $request = $this->getEmployeeRequest($id, $fields, $only_current, $accept_header_parameter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -685,20 +910,19 @@ function ($exception) { /** * Create request for operation 'getEmployee' * - * @param string $fields {fields} is a comma separated list of values taken from the official list of field names. (required) - * @param string $id {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param string $id The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel. (required) + * @param string|null $fields Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. (optional) + * @param bool|null $only_current When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. (optional, default to true) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployee'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeRequest($fields, $id, $only_current = false, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { + public function getEmployeeRequest($id, $fields = null, $only_current = true, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployee'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'fields' => $fields, 'id' => $id, ], methodName: 'getEmployee' @@ -713,7 +937,7 @@ public function getEmployeeRequest($fields, $id, $only_current = false, $accept_ $multipart = false; $parameters = [ - 'fields' => ['value' => $fields, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'fields' => ['value' => $fields, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'onlyCurrent' => ['value' => $only_current, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], ]; @@ -796,34 +1020,36 @@ public function getEmployeeRequest($fields, $id, $only_current = false, $accept_ /** * Operation getEmployeesDirectory * - * Get Employee Directory + * Get Employees Directory * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param bool|null $only_current When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesDirectory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\JsonDirectoryEmployee + * @return \BhrSdk\Model\EmployeesDirectoryJsonResponse */ - public function getEmployeesDirectory($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { - list($response) = $this->getEmployeesDirectoryWithHttpInfo($accept_header_parameter, $contentType); + public function getEmployeesDirectory($accept_header_parameter = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { + list($response) = $this->getEmployeesDirectoryWithHttpInfo($accept_header_parameter, $only_current, $contentType); return $response; } /** * Operation getEmployeesDirectoryWithHttpInfo * - * Get Employee Directory + * Get Employees Directory * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param bool|null $only_current When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesDirectory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\JsonDirectoryEmployee, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\EmployeesDirectoryJsonResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeesDirectoryWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { - $request = $this->getEmployeesDirectoryRequest($accept_header_parameter, $contentType); + public function getEmployeesDirectoryWithHttpInfo($accept_header_parameter = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { + $request = $this->getEmployeesDirectoryRequest($accept_header_parameter, $only_current, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -834,7 +1060,7 @@ public function getEmployeesDirectoryWithHttpInfo($accept_header_parameter = nul switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\JsonDirectoryEmployee', + '\BhrSdk\Model\EmployeesDirectoryJsonResponse', $request, $response, ); @@ -854,7 +1080,7 @@ public function getEmployeesDirectoryWithHttpInfo($accept_header_parameter = nul } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\JsonDirectoryEmployee', + '\BhrSdk\Model\EmployeesDirectoryJsonResponse', $request, $response, ); @@ -863,16 +1089,17 @@ public function getEmployeesDirectoryWithHttpInfo($accept_header_parameter = nul /** * Operation getEmployeesDirectoryAsync * - * Get Employee Directory + * Get Employees Directory * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param bool|null $only_current When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesDirectory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeesDirectoryAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { - return $this->getEmployeesDirectoryAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function getEmployeesDirectoryAsync($accept_header_parameter = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { + return $this->getEmployeesDirectoryAsyncWithHttpInfo($accept_header_parameter, $only_current, $contentType) ->then( function ($response) { return $response[0]; @@ -883,17 +1110,18 @@ function ($response) { /** * Operation getEmployeesDirectoryAsyncWithHttpInfo * - * Get Employee Directory + * Get Employees Directory * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param bool|null $only_current When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesDirectory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeesDirectoryAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { - $returnType = '\BhrSdk\Model\JsonDirectoryEmployee'; - $request = $this->getEmployeesDirectoryRequest($accept_header_parameter, $contentType); + public function getEmployeesDirectoryAsyncWithHttpInfo($accept_header_parameter = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { + $returnType = '\BhrSdk\Model\EmployeesDirectoryJsonResponse'; + $request = $this->getEmployeesDirectoryRequest($accept_header_parameter, $only_current, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -930,12 +1158,13 @@ function ($exception) { * Create request for operation 'getEmployeesDirectory' * * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param bool|null $only_current When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesDirectory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeesDirectoryRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { + public function getEmployeesDirectoryRequest($accept_header_parameter = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getEmployeesDirectory'][0]) { $resourcePath = '/api/v1/employees/directory'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); @@ -945,6 +1174,22 @@ public function getEmployeesDirectoryRequest($accept_header_parameter = null, st $httpBody = ''; $multipart = false; + $parameters = [ + 'onlyCurrent' => ['value' => $only_current, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // header params if ($accept_header_parameter !== null) { $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); @@ -1001,40 +1246,42 @@ public function getEmployeesDirectoryRequest($accept_header_parameter = null, st } /** - * Operation getEmployeesList + * Operation listEmployees * - * Get Employees + * List Employees * - * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. (optional) - * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. (optional) - * @param \BhrSdk\Model\CursorPaginationQueryObject|null $page Cursor-based pagination parameters (`limit`, `after`, `before`). (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesList'] to see the possible values for this operation + * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. (optional) + * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. (optional) + * @param \BhrSdk\Model\EmployeeOptionalField[]|null $fields Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. (optional) + * @param \BhrSdk\Model\EmployeeCursorPaginationQueryObject|null $page Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployees'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GetEmployeesResponseObject|\BhrSdk\Model\InvalidRequest + * @return \BhrSdk\Model\GetEmployeesResponseObject|\BhrSdk\Model\EmployeeStringCodeErrorResponseV1 */ - public function getEmployeesList($filter = null, $sort = null, $page = null, string $contentType = self::CONTENT_TYPES['getEmployeesList'][0]) { - list($response) = $this->getEmployeesListWithHttpInfo($filter, $sort, $page, $contentType); + public function listEmployees($filter = null, $sort = null, $fields = null, $page = null, string $contentType = self::CONTENT_TYPES['listEmployees'][0]) { + list($response) = $this->listEmployeesWithHttpInfo($filter, $sort, $fields, $page, $contentType); return $response; } /** - * Operation getEmployeesListWithHttpInfo + * Operation listEmployeesWithHttpInfo * - * Get Employees + * List Employees * - * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. (optional) - * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. (optional) - * @param \BhrSdk\Model\CursorPaginationQueryObject|null $page Cursor-based pagination parameters (`limit`, `after`, `before`). (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesList'] to see the possible values for this operation + * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. (optional) + * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. (optional) + * @param \BhrSdk\Model\EmployeeOptionalField[]|null $fields Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. (optional) + * @param \BhrSdk\Model\EmployeeCursorPaginationQueryObject|null $page Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployees'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GetEmployeesResponseObject|\BhrSdk\Model\InvalidRequest, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GetEmployeesResponseObject|\BhrSdk\Model\EmployeeStringCodeErrorResponseV1, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeesListWithHttpInfo($filter = null, $sort = null, $page = null, string $contentType = self::CONTENT_TYPES['getEmployeesList'][0]) { - $request = $this->getEmployeesListRequest($filter, $sort, $page, $contentType); + public function listEmployeesWithHttpInfo($filter = null, $sort = null, $fields = null, $page = null, string $contentType = self::CONTENT_TYPES['listEmployees'][0]) { + $request = $this->listEmployeesRequest($filter, $sort, $fields, $page, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1051,7 +1298,7 @@ public function getEmployeesListWithHttpInfo($filter = null, $sort = null, $page ); case 400: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\InvalidRequest', + '\BhrSdk\Model\EmployeeStringCodeErrorResponseV1', $request, $response, ); @@ -1078,20 +1325,21 @@ public function getEmployeesListWithHttpInfo($filter = null, $sort = null, $page } /** - * Operation getEmployeesListAsync + * Operation listEmployeesAsync * - * Get Employees + * List Employees * - * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. (optional) - * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. (optional) - * @param \BhrSdk\Model\CursorPaginationQueryObject|null $page Cursor-based pagination parameters (`limit`, `after`, `before`). (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesList'] to see the possible values for this operation + * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. (optional) + * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. (optional) + * @param \BhrSdk\Model\EmployeeOptionalField[]|null $fields Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. (optional) + * @param \BhrSdk\Model\EmployeeCursorPaginationQueryObject|null $page Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployees'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeesListAsync($filter = null, $sort = null, $page = null, string $contentType = self::CONTENT_TYPES['getEmployeesList'][0]) { - return $this->getEmployeesListAsyncWithHttpInfo($filter, $sort, $page, $contentType) + public function listEmployeesAsync($filter = null, $sort = null, $fields = null, $page = null, string $contentType = self::CONTENT_TYPES['listEmployees'][0]) { + return $this->listEmployeesAsyncWithHttpInfo($filter, $sort, $fields, $page, $contentType) ->then( function ($response) { return $response[0]; @@ -1100,21 +1348,22 @@ function ($response) { } /** - * Operation getEmployeesListAsyncWithHttpInfo + * Operation listEmployeesAsyncWithHttpInfo * - * Get Employees + * List Employees * - * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. (optional) - * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. (optional) - * @param \BhrSdk\Model\CursorPaginationQueryObject|null $page Cursor-based pagination parameters (`limit`, `after`, `before`). (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesList'] to see the possible values for this operation + * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. (optional) + * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. (optional) + * @param \BhrSdk\Model\EmployeeOptionalField[]|null $fields Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. (optional) + * @param \BhrSdk\Model\EmployeeCursorPaginationQueryObject|null $page Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployees'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeesListAsyncWithHttpInfo($filter = null, $sort = null, $page = null, string $contentType = self::CONTENT_TYPES['getEmployeesList'][0]) { + public function listEmployeesAsyncWithHttpInfo($filter = null, $sort = null, $fields = null, $page = null, string $contentType = self::CONTENT_TYPES['listEmployees'][0]) { $returnType = '\BhrSdk\Model\GetEmployeesResponseObject'; - $request = $this->getEmployeesListRequest($filter, $sort, $page, $contentType); + $request = $this->listEmployeesRequest($filter, $sort, $fields, $page, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1148,17 +1397,18 @@ function ($exception) { } /** - * Create request for operation 'getEmployeesList' + * Create request for operation 'listEmployees' * - * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. (optional) - * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. (optional) - * @param \BhrSdk\Model\CursorPaginationQueryObject|null $page Cursor-based pagination parameters (`limit`, `after`, `before`). (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeesList'] to see the possible values for this operation + * @param \BhrSdk\Model\GetEmployeesFilterRequestObject|null $filter Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. (optional) + * @param string|null $sort Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. (optional) + * @param \BhrSdk\Model\EmployeeOptionalField[]|null $fields Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. (optional) + * @param \BhrSdk\Model\EmployeeCursorPaginationQueryObject|null $page Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployees'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeesListRequest($filter = null, $sort = null, $page = null, string $contentType = self::CONTENT_TYPES['getEmployeesList'][0]) { + public function listEmployeesRequest($filter = null, $sort = null, $fields = null, $page = null, string $contentType = self::CONTENT_TYPES['listEmployees'][0]) { $resourcePath = '/api/v1/employees'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); @@ -1171,6 +1421,7 @@ public function getEmployeesListRequest($filter = null, $sort = null, $page = nu $parameters = [ 'filter' => ['value' => $filter, 'type' => 'object', 'required' => false, 'style' => 'deepObject', 'explode' => true], 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'fields' => ['value' => $fields, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => false], 'page' => ['value' => $page, 'type' => 'object', 'required' => false, 'style' => 'deepObject', 'explode' => true], ]; @@ -1241,13 +1492,13 @@ public function getEmployeesListRequest($filter = null, $sort = null, $page = nu * * Update Employee * - * @param string $id {id} is an employee ID. (required) + * @param string $id The employee ID. (required) * @param \BhrSdk\Model\Employee $employee employee (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployee'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GetEmployeeResponse */ public function updateEmployee($id, $employee, string $contentType = self::CONTENT_TYPES['updateEmployee'][0]) { list($response) = $this->updateEmployeeWithHttpInfo($id, $employee, $contentType); @@ -1259,13 +1510,13 @@ public function updateEmployee($id, $employee, string $contentType = self::CONTE * * Update Employee * - * @param string $id {id} is an employee ID. (required) + * @param string $id The employee ID. (required) * @param \BhrSdk\Model\Employee $employee (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployee'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GetEmployeeResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateEmployeeWithHttpInfo($id, $employee, string $contentType = self::CONTENT_TYPES['updateEmployee'][0]) { $request = $this->updateEmployeeRequest($id, $employee, $contentType); @@ -1276,8 +1527,30 @@ public function updateEmployeeWithHttpInfo($id, $employee, string $contentType = $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GetEmployeeResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GetEmployeeResponse', $request, $response, ); @@ -1288,7 +1561,7 @@ public function updateEmployeeWithHttpInfo($id, $employee, string $contentType = * * Update Employee * - * @param string $id {id} is an employee ID. (required) + * @param string $id The employee ID. (required) * @param \BhrSdk\Model\Employee $employee (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployee'] to see the possible values for this operation * @@ -1309,7 +1582,7 @@ function ($response) { * * Update Employee * - * @param string $id {id} is an employee ID. (required) + * @param string $id The employee ID. (required) * @param \BhrSdk\Model\Employee $employee (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployee'] to see the possible values for this operation * @@ -1317,17 +1590,19 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function updateEmployeeAsyncWithHttpInfo($id, $employee, string $contentType = self::CONTENT_TYPES['updateEmployee'][0]) { - + $returnType = '\BhrSdk\Model\GetEmployeeResponse'; $request = $this->updateEmployeeRequest($id, $employee, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1352,7 +1627,7 @@ function ($exception) { /** * Create request for operation 'updateEmployee' * - * @param string $id {id} is an employee ID. (required) + * @param string $id The employee ID. (required) * @param \BhrSdk\Model\Employee $employee (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployee'] to see the possible values for this operation * @@ -1387,7 +1662,7 @@ public function updateEmployeeRequest($id, $employee, string $contentType = self } $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + ['application/json', ], $contentType, $multipart ); diff --git a/lib/Api/GoalsApi.php b/lib/Api/GoalsApi.php index 5ceed111..80577e1a 100644 --- a/lib/Api/GoalsApi.php +++ b/lib/Api/GoalsApi.php @@ -79,22 +79,28 @@ class GoalsApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ + 'closeGoal' => [ + 'application/json', + ], + 'createGoal' => [ + 'application/json', + ], + 'createGoalComment' => [ + 'application/json', + ], 'deleteGoal' => [ 'application/json', ], 'deleteGoalComment' => [ 'application/json', ], - 'getCanCreateGoal' => [ + 'getAlignableGoalOptions' => [ 'application/json', ], 'getGoalAggregate' => [ 'application/json', ], - 'getGoalComments' => [ - 'application/json', - ], - 'getGoals' => [ + 'getGoalCreationPermission' => [ 'application/json', ], 'getGoalsAggregateV1' => [ @@ -105,9 +111,6 @@ class GoalsApi { ], 'getGoalsAggregateV12' => [ 'application/json', - ], - 'getGoalsAlignmentOptions' => [ - 'application/json', ], 'getGoalsFiltersV1' => [ 'application/json', @@ -118,37 +121,34 @@ class GoalsApi { 'getGoalsFiltersV12' => [ 'application/json', ], - 'getGoalsShareOptions' => [ - 'application/json', - ], - 'postCloseGoal' => [ + 'listGoalComments' => [ 'application/json', ], - 'postGoal' => [ + 'listGoalShareOptions' => [ 'application/json', ], - 'postGoalComment' => [ + 'listGoals' => [ 'application/json', ], - 'postReopenGoal' => [ + 'reopenGoal' => [ 'application/json', ], - 'putGoalComment' => [ + 'updateGoalComment' => [ 'application/json', ], - 'putGoalMilestoneProgress' => [ + 'updateGoalMilestoneProgress' => [ 'application/json', ], - 'putGoalProgress' => [ + 'updateGoalProgress' => [ 'application/json', ], - 'putGoalSharedWith' => [ + 'updateGoalSharing' => [ 'application/json', ], - 'putGoalV1' => [ + 'updateGoalV1' => [ 'application/json', ], - 'putGoalV11' => [ + 'updateGoalV11' => [ 'application/json', ], ]; @@ -200,38 +200,40 @@ public function getConfig() { } /** - * Operation deleteGoal + * Operation closeGoal * - * Delete Goal + * Close Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation + * @param \BhrSdk\Model\CloseGoalRequest|null $close_goal_request An optional comment to record when closing the goal. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['closeGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalResponse */ - public function deleteGoal($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { - list($response) = $this->deleteGoalWithHttpInfo($employee_id, $goal_id, $contentType); + public function closeGoal($employee_id, $goal_id, $close_goal_request = null, string $contentType = self::CONTENT_TYPES['closeGoal'][0]) { + list($response) = $this->closeGoalWithHttpInfo($employee_id, $goal_id, $close_goal_request, $contentType); return $response; } /** - * Operation deleteGoalWithHttpInfo + * Operation closeGoalWithHttpInfo * - * Delete Goal + * Close Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation + * @param \BhrSdk\Model\CloseGoalRequest|null $close_goal_request An optional comment to record when closing the goal. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['closeGoal'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteGoalWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { - $request = $this->deleteGoalRequest($employee_id, $goal_id, $contentType); + public function closeGoalWithHttpInfo($employee_id, $goal_id, $close_goal_request = null, string $contentType = self::CONTENT_TYPES['closeGoal'][0]) { + $request = $this->closeGoalRequest($employee_id, $goal_id, $close_goal_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -239,27 +241,50 @@ public function deleteGoalWithHttpInfo($employee_id, $goal_id, string $contentTy $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalResponse', $request, $response, ); } /** - * Operation deleteGoalAsync + * Operation closeGoalAsync * - * Delete Goal + * Close Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation + * @param \BhrSdk\Model\CloseGoalRequest|null $close_goal_request An optional comment to record when closing the goal. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['closeGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteGoalAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { - return $this->deleteGoalAsyncWithHttpInfo($employee_id, $goal_id, $contentType) + public function closeGoalAsync($employee_id, $goal_id, $close_goal_request = null, string $contentType = self::CONTENT_TYPES['closeGoal'][0]) { + return $this->closeGoalAsyncWithHttpInfo($employee_id, $goal_id, $close_goal_request, $contentType) ->then( function ($response) { return $response[0]; @@ -268,29 +293,32 @@ function ($response) { } /** - * Operation deleteGoalAsyncWithHttpInfo + * Operation closeGoalAsyncWithHttpInfo * - * Delete Goal + * Close Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation + * @param \BhrSdk\Model\CloseGoalRequest|null $close_goal_request An optional comment to record when closing the goal. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['closeGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteGoalAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { - - $request = $this->deleteGoalRequest($employee_id, $goal_id, $contentType); + public function closeGoalAsyncWithHttpInfo($employee_id, $goal_id, $close_goal_request = null, string $contentType = self::CONTENT_TYPES['closeGoal'][0]) { + $returnType = '\BhrSdk\Model\GoalResponse'; + $request = $this->closeGoalRequest($employee_id, $goal_id, $close_goal_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -313,27 +341,28 @@ function ($exception) { } /** - * Create request for operation 'deleteGoal' + * Create request for operation 'closeGoal' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation + * @param \BhrSdk\Model\CloseGoalRequest|null $close_goal_request An optional comment to record when closing the goal. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['closeGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteGoalRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { + public function closeGoalRequest($employee_id, $goal_id, $close_goal_request = null, string $contentType = self::CONTENT_TYPES['closeGoal'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, ], - methodName: 'deleteGoal' + methodName: 'closeGoal' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}'; - $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/close'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -363,6 +392,16 @@ public function deleteGoalRequest($employee_id, $goal_id, string $contentType = $multipart ); + // for model (json/xml) + if (isset($close_goal_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($close_goal_request)); + } else { + $httpBody = is_array($close_goal_request) ? json_encode($close_goal_request) : $close_goal_request; + } + } + // Authentication methods // Basic authentication @@ -400,7 +439,7 @@ public function deleteGoalRequest($employee_id, $goal_id, string $contentType = $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -408,40 +447,38 @@ public function deleteGoalRequest($employee_id, $goal_id, string $contentType = } /** - * Operation deleteGoalComment + * Operation createGoal * - * Delete Goal Comment + * Create Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateGoalRequest $create_goal_request create_goal_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails */ - public function deleteGoalComment($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { - list($response) = $this->deleteGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $contentType); + public function createGoal($employee_id, $create_goal_request, string $contentType = self::CONTENT_TYPES['createGoal'][0]) { + list($response) = $this->createGoalWithHttpInfo($employee_id, $create_goal_request, $contentType); return $response; } /** - * Operation deleteGoalCommentWithHttpInfo + * Operation createGoalWithHttpInfo * - * Delete Goal Comment + * Create Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateGoalRequest $create_goal_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoal'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) */ - public function deleteGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { - $request = $this->deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, $contentType); + public function createGoalWithHttpInfo($employee_id, $create_goal_request, string $contentType = self::CONTENT_TYPES['createGoal'][0]) { + $request = $this->createGoalRequest($employee_id, $create_goal_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -449,28 +486,49 @@ public function deleteGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_i $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TransformedApiEmployeeGoalDetails', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TransformedApiEmployeeGoalDetails', $request, $response, ); } /** - * Operation deleteGoalCommentAsync + * Operation createGoalAsync * - * Delete Goal Comment + * Create Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateGoalRequest $create_goal_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteGoalCommentAsync($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { - return $this->deleteGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $contentType) + public function createGoalAsync($employee_id, $create_goal_request, string $contentType = self::CONTENT_TYPES['createGoal'][0]) { + return $this->createGoalAsyncWithHttpInfo($employee_id, $create_goal_request, $contentType) ->then( function ($response) { return $response[0]; @@ -479,30 +537,31 @@ function ($response) { } /** - * Operation deleteGoalCommentAsyncWithHttpInfo + * Operation createGoalAsyncWithHttpInfo * - * Delete Goal Comment + * Create Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateGoalRequest $create_goal_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { - - $request = $this->deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, $contentType); + public function createGoalAsyncWithHttpInfo($employee_id, $create_goal_request, string $contentType = self::CONTENT_TYPES['createGoal'][0]) { + $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; + $request = $this->createGoalRequest($employee_id, $create_goal_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -525,29 +584,27 @@ function ($exception) { } /** - * Create request for operation 'deleteGoalComment' + * Create request for operation 'createGoal' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateGoalRequest $create_goal_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { + public function createGoalRequest($employee_id, $create_goal_request, string $contentType = self::CONTENT_TYPES['createGoal'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'goal_id' => $goal_id, - 'comment_id' => $comment_id, + 'create_goal_request' => $create_goal_request, ], - methodName: 'deleteGoalComment' + methodName: 'createGoal' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}'; - $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -562,22 +619,6 @@ public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, st $resourcePath ); } - // path params - if ($goal_id !== null) { - $resourcePath = str_replace( - '{' . 'goalId' . '}', - ObjectSerializer::toPathValue((string) $goal_id), - $resourcePath - ); - } - // path params - if ($comment_id !== null) { - $resourcePath = str_replace( - '{' . 'commentId' . '}', - ObjectSerializer::toPathValue((string) $comment_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -585,6 +626,16 @@ public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, st $multipart ); + // for model (json/xml) + if (isset($create_goal_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_goal_request)); + } else { + $httpBody = is_array($create_goal_request) ? json_encode($create_goal_request) : $create_goal_request; + } + } + // Authentication methods // Basic authentication @@ -622,7 +673,7 @@ public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, st $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -630,36 +681,40 @@ public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, st } /** - * Operation getCanCreateGoal + * Operation createGoalComment * - * Check Goal Creation Permission + * Create Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCanCreateGoal'] to see the possible values for this operation + * @param string $goal_id goalId is the goal ID for the specified employee. (required) + * @param \BhrSdk\Model\CreateGoalCommentRequest $create_goal_comment_request create_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalCommentResponse */ - public function getCanCreateGoal($employee_id, string $contentType = self::CONTENT_TYPES['getCanCreateGoal'][0]) { - list($response) = $this->getCanCreateGoalWithHttpInfo($employee_id, $contentType); + public function createGoalComment($employee_id, $goal_id, $create_goal_comment_request, string $contentType = self::CONTENT_TYPES['createGoalComment'][0]) { + list($response) = $this->createGoalCommentWithHttpInfo($employee_id, $goal_id, $create_goal_comment_request, $contentType); return $response; } /** - * Operation getCanCreateGoalWithHttpInfo + * Operation createGoalCommentWithHttpInfo * - * Check Goal Creation Permission + * Create Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCanCreateGoal'] to see the possible values for this operation + * @param string $goal_id goalId is the goal ID for the specified employee. (required) + * @param \BhrSdk\Model\CreateGoalCommentRequest $create_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalCommentResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getCanCreateGoalWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getCanCreateGoal'][0]) { - $request = $this->getCanCreateGoalRequest($employee_id, $contentType); + public function createGoalCommentWithHttpInfo($employee_id, $goal_id, $create_goal_comment_request, string $contentType = self::CONTENT_TYPES['createGoalComment'][0]) { + $request = $this->createGoalCommentRequest($employee_id, $goal_id, $create_goal_comment_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -667,26 +722,50 @@ public function getCanCreateGoalWithHttpInfo($employee_id, string $contentType = $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalCommentResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalCommentResponse', $request, $response, ); } /** - * Operation getCanCreateGoalAsync + * Operation createGoalCommentAsync * - * Check Goal Creation Permission + * Create Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCanCreateGoal'] to see the possible values for this operation + * @param string $goal_id goalId is the goal ID for the specified employee. (required) + * @param \BhrSdk\Model\CreateGoalCommentRequest $create_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCanCreateGoalAsync($employee_id, string $contentType = self::CONTENT_TYPES['getCanCreateGoal'][0]) { - return $this->getCanCreateGoalAsyncWithHttpInfo($employee_id, $contentType) + public function createGoalCommentAsync($employee_id, $goal_id, $create_goal_comment_request, string $contentType = self::CONTENT_TYPES['createGoalComment'][0]) { + return $this->createGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $create_goal_comment_request, $contentType) ->then( function ($response) { return $response[0]; @@ -695,28 +774,32 @@ function ($response) { } /** - * Operation getCanCreateGoalAsyncWithHttpInfo + * Operation createGoalCommentAsyncWithHttpInfo * - * Check Goal Creation Permission + * Create Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCanCreateGoal'] to see the possible values for this operation + * @param string $goal_id goalId is the goal ID for the specified employee. (required) + * @param \BhrSdk\Model\CreateGoalCommentRequest $create_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCanCreateGoalAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getCanCreateGoal'][0]) { - - $request = $this->getCanCreateGoalRequest($employee_id, $contentType); + public function createGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $create_goal_comment_request, string $contentType = self::CONTENT_TYPES['createGoalComment'][0]) { + $returnType = '\BhrSdk\Model\GoalCommentResponse'; + $request = $this->createGoalCommentRequest($employee_id, $goal_id, $create_goal_comment_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -739,25 +822,29 @@ function ($exception) { } /** - * Create request for operation 'getCanCreateGoal' + * Create request for operation 'createGoalComment' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCanCreateGoal'] to see the possible values for this operation + * @param string $goal_id goalId is the goal ID for the specified employee. (required) + * @param \BhrSdk\Model\CreateGoalCommentRequest $create_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCanCreateGoalRequest($employee_id, string $contentType = self::CONTENT_TYPES['getCanCreateGoal'][0]) { + public function createGoalCommentRequest($employee_id, $goal_id, $create_goal_comment_request, string $contentType = self::CONTENT_TYPES['createGoalComment'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, + 'goal_id' => $goal_id, + 'create_goal_comment_request' => $create_goal_comment_request, ], - methodName: 'getCanCreateGoal' + methodName: 'createGoalComment' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/canCreateGoals'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -772,6 +859,14 @@ public function getCanCreateGoalRequest($employee_id, string $contentType = self $resourcePath ); } + // path params + if ($goal_id !== null) { + $resourcePath = str_replace( + '{' . 'goalId' . '}', + ObjectSerializer::toPathValue((string) $goal_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -779,6 +874,16 @@ public function getCanCreateGoalRequest($employee_id, string $contentType = self $multipart ); + // for model (json/xml) + if (isset($create_goal_comment_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_goal_comment_request)); + } else { + $httpBody = is_array($create_goal_comment_request) ? json_encode($create_goal_comment_request) : $create_goal_comment_request; + } + } + // Authentication methods // Basic authentication @@ -816,7 +921,7 @@ public function getCanCreateGoalRequest($employee_id, string $contentType = self $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -824,38 +929,38 @@ public function getCanCreateGoalRequest($employee_id, string $contentType = self } /** - * Operation getGoalAggregate + * Operation deleteGoal * - * Get Goal Aggregate + * Delete Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation + * @param string $goal_id The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalAggregate + * @return mixed */ - public function getGoalAggregate($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { - list($response) = $this->getGoalAggregateWithHttpInfo($employee_id, $goal_id, $contentType); + public function deleteGoal($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { + list($response) = $this->deleteGoalWithHttpInfo($employee_id, $goal_id, $contentType); return $response; } /** - * Operation getGoalAggregateWithHttpInfo + * Operation deleteGoalWithHttpInfo * - * Get Goal Aggregate + * Delete Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation + * @param string $goal_id The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalAggregate, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalAggregateWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { - $request = $this->getGoalAggregateRequest($employee_id, $goal_id, $contentType); + public function deleteGoalWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { + $request = $this->deleteGoalRequest($employee_id, $goal_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -863,49 +968,27 @@ public function getGoalAggregateWithHttpInfo($employee_id, $goal_id, string $con $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalAggregate', - $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 ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalAggregate', + 'object', // or 'mixed' or any other generic type $request, $response, ); } /** - * Operation getGoalAggregateAsync + * Operation deleteGoalAsync * - * Get Goal Aggregate + * Delete Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation + * @param string $goal_id The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalAggregateAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { - return $this->getGoalAggregateAsyncWithHttpInfo($employee_id, $goal_id, $contentType) + public function deleteGoalAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { + return $this->deleteGoalAsyncWithHttpInfo($employee_id, $goal_id, $contentType) ->then( function ($response) { return $response[0]; @@ -914,31 +997,29 @@ function ($response) { } /** - * Operation getGoalAggregateAsyncWithHttpInfo + * Operation deleteGoalAsyncWithHttpInfo * - * Get Goal Aggregate + * Delete Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation + * @param string $goal_id The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalAggregateAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { - $returnType = '\BhrSdk\Model\GoalAggregate'; - $request = $this->getGoalAggregateRequest($employee_id, $goal_id, $contentType); + public function deleteGoalAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { + + $request = $this->deleteGoalRequest($employee_id, $goal_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) use ($returnType) { + function ($response) { $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } + $content = json_decode($content); return [ - ObjectSerializer::deserialize($content, $returnType, []), + ObjectSerializer::deserialize($content, 'object', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -961,27 +1042,27 @@ function ($exception) { } /** - * Create request for operation 'getGoalAggregate' + * Create request for operation 'deleteGoal' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation + * @param string $goal_id The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGoalAggregateRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { + public function deleteGoalRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['deleteGoal'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, ], - methodName: 'getGoalAggregate' + methodName: 'deleteGoal' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -1006,7 +1087,7 @@ public function getGoalAggregateRequest($employee_id, $goal_id, string $contentT } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -1048,7 +1129,7 @@ public function getGoalAggregateRequest($employee_id, $goal_id, string $contentT $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1056,38 +1137,40 @@ public function getGoalAggregateRequest($employee_id, $goal_id, string $contentT } /** - * Operation getGoalComments + * Operation deleteGoalComment * - * Get Goal Comments + * Delete Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalComments'] to see the possible values for this operation + * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function getGoalComments($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalComments'][0]) { - list($response) = $this->getGoalCommentsWithHttpInfo($employee_id, $goal_id, $contentType); + public function deleteGoalComment($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { + list($response) = $this->deleteGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $contentType); return $response; } /** - * Operation getGoalCommentsWithHttpInfo + * Operation deleteGoalCommentWithHttpInfo * - * Get Goal Comments + * Delete Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalComments'] to see the possible values for this operation + * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\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 getGoalCommentsWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalComments'][0]) { - $request = $this->getGoalCommentsRequest($employee_id, $goal_id, $contentType); + public function deleteGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { + $request = $this->deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1103,19 +1186,20 @@ public function getGoalCommentsWithHttpInfo($employee_id, $goal_id, string $cont } /** - * Operation getGoalCommentsAsync + * Operation deleteGoalCommentAsync * - * Get Goal Comments + * Delete Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalComments'] to see the possible values for this operation + * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalCommentsAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalComments'][0]) { - return $this->getGoalCommentsAsyncWithHttpInfo($employee_id, $goal_id, $contentType) + public function deleteGoalCommentAsync($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { + return $this->deleteGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1124,20 +1208,21 @@ function ($response) { } /** - * Operation getGoalCommentsAsyncWithHttpInfo + * Operation deleteGoalCommentAsyncWithHttpInfo * - * Get Goal Comments + * Delete Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalComments'] to see the possible values for this operation + * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalCommentsAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalComments'][0]) { + public function deleteGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { - $request = $this->getGoalCommentsRequest($employee_id, $goal_id, $contentType); + $request = $this->deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1169,27 +1254,29 @@ function ($exception) { } /** - * Create request for operation 'getGoalComments' + * Create request for operation 'deleteGoalComment' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalComments'] to see the possible values for this operation + * @param string $comment_id commentId is the ID of a specific comment for the specified goal. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGoalCommentsRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalComments'][0]) { + public function deleteGoalCommentRequest($employee_id, $goal_id, $comment_id, string $contentType = self::CONTENT_TYPES['deleteGoalComment'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, + 'comment_id' => $comment_id, ], - methodName: 'getGoalComments' + methodName: 'deleteGoalComment' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -1212,6 +1299,14 @@ public function getGoalCommentsRequest($employee_id, $goal_id, string $contentTy $resourcePath ); } + // path params + if ($comment_id !== null) { + $resourcePath = str_replace( + '{' . 'commentId' . '}', + ObjectSerializer::toPathValue((string) $comment_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1256,7 +1351,7 @@ public function getGoalCommentsRequest($employee_id, $goal_id, string $contentTy $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1264,38 +1359,38 @@ public function getGoalCommentsRequest($employee_id, $goal_id, string $contentTy } /** - * Operation getGoals + * Operation getAlignableGoalOptions * - * Get Goals + * Get Alignable Goal Options * - * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string|null $filter A filter that can be applied to only show the goals that are in a certain state. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoals'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) + * @param int|null $goal_id Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAlignableGoalOptions'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalsList + * @return \BhrSdk\Model\AlignmentOptionsResponse */ - public function getGoals($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoals'][0]) { - list($response) = $this->getGoalsWithHttpInfo($employee_id, $filter, $contentType); + public function getAlignableGoalOptions($employee_id, $goal_id = null, string $contentType = self::CONTENT_TYPES['getAlignableGoalOptions'][0]) { + list($response) = $this->getAlignableGoalOptionsWithHttpInfo($employee_id, $goal_id, $contentType); return $response; } /** - * Operation getGoalsWithHttpInfo + * Operation getAlignableGoalOptionsWithHttpInfo * - * Get Goals + * Get Alignable Goal Options * - * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string|null $filter A filter that can be applied to only show the goals that are in a certain state. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoals'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) + * @param int|null $goal_id Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAlignableGoalOptions'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalsList, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\AlignmentOptionsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalsWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoals'][0]) { - $request = $this->getGoalsRequest($employee_id, $filter, $contentType); + public function getAlignableGoalOptionsWithHttpInfo($employee_id, $goal_id = null, string $contentType = self::CONTENT_TYPES['getAlignableGoalOptions'][0]) { + $request = $this->getAlignableGoalOptionsRequest($employee_id, $goal_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1306,7 +1401,7 @@ public function getGoalsWithHttpInfo($employee_id, $filter = null, string $conte switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsList', + '\BhrSdk\Model\AlignmentOptionsResponse', $request, $response, ); @@ -1326,26 +1421,26 @@ public function getGoalsWithHttpInfo($employee_id, $filter = null, string $conte } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsList', + '\BhrSdk\Model\AlignmentOptionsResponse', $request, $response, ); } /** - * Operation getGoalsAsync + * Operation getAlignableGoalOptionsAsync * - * Get Goals + * Get Alignable Goal Options * - * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string|null $filter A filter that can be applied to only show the goals that are in a certain state. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoals'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) + * @param int|null $goal_id Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAlignableGoalOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalsAsync($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoals'][0]) { - return $this->getGoalsAsyncWithHttpInfo($employee_id, $filter, $contentType) + public function getAlignableGoalOptionsAsync($employee_id, $goal_id = null, string $contentType = self::CONTENT_TYPES['getAlignableGoalOptions'][0]) { + return $this->getAlignableGoalOptionsAsyncWithHttpInfo($employee_id, $goal_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1354,20 +1449,20 @@ function ($response) { } /** - * Operation getGoalsAsyncWithHttpInfo + * Operation getAlignableGoalOptionsAsyncWithHttpInfo * - * Get Goals + * Get Alignable Goal Options * - * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string|null $filter A filter that can be applied to only show the goals that are in a certain state. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoals'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) + * @param int|null $goal_id Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAlignableGoalOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalsAsyncWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoals'][0]) { - $returnType = '\BhrSdk\Model\GoalsList'; - $request = $this->getGoalsRequest($employee_id, $filter, $contentType); + public function getAlignableGoalOptionsAsyncWithHttpInfo($employee_id, $goal_id = null, string $contentType = self::CONTENT_TYPES['getAlignableGoalOptions'][0]) { + $returnType = '\BhrSdk\Model\AlignmentOptionsResponse'; + $request = $this->getAlignableGoalOptionsRequest($employee_id, $goal_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1401,25 +1496,25 @@ function ($exception) { } /** - * Create request for operation 'getGoals' + * Create request for operation 'getAlignableGoalOptions' * - * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string|null $filter A filter that can be applied to only show the goals that are in a certain state. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoals'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) + * @param int|null $goal_id Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAlignableGoalOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGoalsRequest($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoals'][0]) { + public function getAlignableGoalOptionsRequest($employee_id, $goal_id = null, string $contentType = self::CONTENT_TYPES['getAlignableGoalOptions'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoals' + methodName: 'getAlignableGoalOptions' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals'; + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/alignmentOptions'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1428,7 +1523,7 @@ public function getGoalsRequest($employee_id, $filter = null, string $contentTyp $multipart = false; $parameters = [ - 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'goalId' => ['value' => $goal_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], ]; // Process parameters and build query values directly @@ -1503,38 +1598,38 @@ public function getGoalsRequest($employee_id, $filter = null, string $contentTyp } /** - * Operation getGoalsAggregateV1 + * Operation getGoalAggregate * - * Get Goals Aggregate + * Get Goal Aggregate * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalsAggregateV1 - * @deprecated + * @return \BhrSdk\Model\GoalAggregate */ - public function getGoalsAggregateV1($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { - list($response) = $this->getGoalsAggregateV1WithHttpInfo($employee_id, $contentType); + public function getGoalAggregate($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { + list($response) = $this->getGoalAggregateWithHttpInfo($employee_id, $goal_id, $contentType); return $response; } /** - * Operation getGoalsAggregateV1WithHttpInfo + * Operation getGoalAggregateWithHttpInfo * - * Get Goals Aggregate + * Get Goal Aggregate * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalsAggregateV1, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \BhrSdk\Model\GoalAggregate, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalsAggregateV1WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { - $request = $this->getGoalsAggregateV1Request($employee_id, $contentType); + public function getGoalAggregateWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { + $request = $this->getGoalAggregateRequest($employee_id, $goal_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1545,7 +1640,7 @@ public function getGoalsAggregateV1WithHttpInfo($employee_id, string $contentTyp switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV1', + '\BhrSdk\Model\GoalAggregate', $request, $response, ); @@ -1565,26 +1660,26 @@ public function getGoalsAggregateV1WithHttpInfo($employee_id, string $contentTyp } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV1', + '\BhrSdk\Model\GoalAggregate', $request, $response, ); } /** - * Operation getGoalsAggregateV1Async + * Operation getGoalAggregateAsync * - * Get Goals Aggregate + * Get Goal Aggregate * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsAggregateV1Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { - return $this->getGoalsAggregateV1AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalAggregateAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { + return $this->getGoalAggregateAsyncWithHttpInfo($employee_id, $goal_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1593,20 +1688,20 @@ function ($response) { } /** - * Operation getGoalsAggregateV1AsyncWithHttpInfo + * Operation getGoalAggregateAsyncWithHttpInfo * - * Get Goals Aggregate + * Get Goal Aggregate * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsAggregateV1AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { - $returnType = '\BhrSdk\Model\GoalsAggregateV1'; - $request = $this->getGoalsAggregateV1Request($employee_id, $contentType); + public function getGoalAggregateAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { + $returnType = '\BhrSdk\Model\GoalAggregate'; + $request = $this->getGoalAggregateRequest($employee_id, $goal_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1640,25 +1735,26 @@ function ($exception) { } /** - * Create request for operation 'getGoalsAggregateV1' + * Create request for operation 'getGoalAggregate' * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $goal_id goalId is the Goal ID used to generate the aggregate information. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalAggregate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getGoalsAggregateV1Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { + public function getGoalAggregateRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['getGoalAggregate'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, + 'goal_id' => $goal_id, ], - methodName: 'getGoalsAggregateV1' + methodName: 'getGoalAggregate' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/aggregate'; + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1674,6 +1770,14 @@ public function getGoalsAggregateV1Request($employee_id, string $contentType = s $resourcePath ); } + // path params + if ($goal_id !== null) { + $resourcePath = str_replace( + '{' . 'goalId' . '}', + ObjectSerializer::toPathValue((string) $goal_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1726,38 +1830,36 @@ public function getGoalsAggregateV1Request($employee_id, string $contentType = s } /** - * Operation getGoalsAggregateV11 + * Operation getGoalCreationPermission * - * Get Goals Aggregate v1.1 + * Get Goal Creation Permission * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalCreationPermission'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalsAggregateV11 - * @deprecated + * @return \BhrSdk\Model\CanCreateGoalsResponse */ - public function getGoalsAggregateV11($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { - list($response) = $this->getGoalsAggregateV11WithHttpInfo($employee_id, $contentType); + public function getGoalCreationPermission($employee_id, string $contentType = self::CONTENT_TYPES['getGoalCreationPermission'][0]) { + list($response) = $this->getGoalCreationPermissionWithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation getGoalsAggregateV11WithHttpInfo + * Operation getGoalCreationPermissionWithHttpInfo * - * Get Goals Aggregate v1.1 + * Get Goal Creation Permission * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalCreationPermission'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalsAggregateV11, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \BhrSdk\Model\CanCreateGoalsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalsAggregateV11WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { - $request = $this->getGoalsAggregateV11Request($employee_id, $contentType); + public function getGoalCreationPermissionWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalCreationPermission'][0]) { + $request = $this->getGoalCreationPermissionRequest($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1768,7 +1870,7 @@ public function getGoalsAggregateV11WithHttpInfo($employee_id, string $contentTy switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV11', + '\BhrSdk\Model\CanCreateGoalsResponse', $request, $response, ); @@ -1788,26 +1890,25 @@ public function getGoalsAggregateV11WithHttpInfo($employee_id, string $contentTy } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV11', + '\BhrSdk\Model\CanCreateGoalsResponse', $request, $response, ); } /** - * Operation getGoalsAggregateV11Async + * Operation getGoalCreationPermissionAsync * - * Get Goals Aggregate v1.1 + * Get Goal Creation Permission * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalCreationPermission'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsAggregateV11Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { - return $this->getGoalsAggregateV11AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalCreationPermissionAsync($employee_id, string $contentType = self::CONTENT_TYPES['getGoalCreationPermission'][0]) { + return $this->getGoalCreationPermissionAsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1816,20 +1917,19 @@ function ($response) { } /** - * Operation getGoalsAggregateV11AsyncWithHttpInfo + * Operation getGoalCreationPermissionAsyncWithHttpInfo * - * Get Goals Aggregate v1.1 + * Get Goal Creation Permission * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalCreationPermission'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsAggregateV11AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { - $returnType = '\BhrSdk\Model\GoalsAggregateV11'; - $request = $this->getGoalsAggregateV11Request($employee_id, $contentType); + public function getGoalCreationPermissionAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalCreationPermission'][0]) { + $returnType = '\BhrSdk\Model\CanCreateGoalsResponse'; + $request = $this->getGoalCreationPermissionRequest($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1863,25 +1963,24 @@ function ($exception) { } /** - * Create request for operation 'getGoalsAggregateV11' + * Create request for operation 'getGoalCreationPermission' * - * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalCreationPermission'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getGoalsAggregateV11Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { + public function getGoalCreationPermissionRequest($employee_id, string $contentType = self::CONTENT_TYPES['getGoalCreationPermission'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsAggregateV11' + methodName: 'getGoalCreationPermission' ); - $resourcePath = '/api/v1_1/performance/employees/{employeeId}/goals/aggregate'; + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/canCreateGoals'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -1949,36 +2048,40 @@ public function getGoalsAggregateV11Request($employee_id, string $contentType = } /** - * Operation getGoalsAggregateV12 + * Operation getGoalsAggregateV1 * - * Get Goals Aggregate v1.2 + * Get Goals Aggregate (v1) * - * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalsAggregateV12 + * @return \BhrSdk\Model\GoalsAggregateV1 + * @deprecated */ - public function getGoalsAggregateV12($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { - list($response) = $this->getGoalsAggregateV12WithHttpInfo($employee_id, $contentType); + public function getGoalsAggregateV1($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { + list($response) = $this->getGoalsAggregateV1WithHttpInfo($employee_id, $filter, $contentType); return $response; } /** - * Operation getGoalsAggregateV12WithHttpInfo + * Operation getGoalsAggregateV1WithHttpInfo * - * Get Goals Aggregate v1.2 + * Get Goals Aggregate (v1) * - * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalsAggregateV12, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GoalsAggregateV1, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getGoalsAggregateV12WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { - $request = $this->getGoalsAggregateV12Request($employee_id, $contentType); + public function getGoalsAggregateV1WithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { + $request = $this->getGoalsAggregateV1Request($employee_id, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1989,7 +2092,7 @@ public function getGoalsAggregateV12WithHttpInfo($employee_id, string $contentTy switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV12', + '\BhrSdk\Model\GoalsAggregateV1', $request, $response, ); @@ -2009,25 +2112,27 @@ public function getGoalsAggregateV12WithHttpInfo($employee_id, string $contentTy } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalsAggregateV12', + '\BhrSdk\Model\GoalsAggregateV1', $request, $response, ); } /** - * Operation getGoalsAggregateV12Async + * Operation getGoalsAggregateV1Async * - * Get Goals Aggregate v1.2 + * Get Goals Aggregate (v1) * - * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsAggregateV12Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { - return $this->getGoalsAggregateV12AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalsAggregateV1Async($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { + return $this->getGoalsAggregateV1AsyncWithHttpInfo($employee_id, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -2036,19 +2141,21 @@ function ($response) { } /** - * Operation getGoalsAggregateV12AsyncWithHttpInfo + * Operation getGoalsAggregateV1AsyncWithHttpInfo * - * Get Goals Aggregate v1.2 + * Get Goals Aggregate (v1) * - * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsAggregateV12AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { - $returnType = '\BhrSdk\Model\GoalsAggregateV12'; - $request = $this->getGoalsAggregateV12Request($employee_id, $contentType); + public function getGoalsAggregateV1AsyncWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { + $returnType = '\BhrSdk\Model\GoalsAggregateV1'; + $request = $this->getGoalsAggregateV1Request($employee_id, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -2082,24 +2189,26 @@ function ($exception) { } /** - * Create request for operation 'getGoalsAggregateV12' + * Create request for operation 'getGoalsAggregateV1' * - * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getGoalsAggregateV12Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { + public function getGoalsAggregateV1Request($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV1'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsAggregateV12' + methodName: 'getGoalsAggregateV1' ); - $resourcePath = '/api/v1_2/performance/employees/{employeeId}/goals/aggregate'; + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/aggregate'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2107,6 +2216,22 @@ public function getGoalsAggregateV12Request($employee_id, string $contentType = $httpBody = ''; $multipart = false; + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -2167,69 +2292,91 @@ public function getGoalsAggregateV12Request($employee_id, string $contentType = } /** - * Operation getGoalsAlignmentOptions + * Operation getGoalsAggregateV11 * - * Get Alignable Goal Options + * Get Goals Aggregate (v1.1) * - * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) - * @param int|null $goal_id Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. (optional) - * @param \BhrSdk\Model\GetGoalsAlignmentOptionsRequest|null $get_goals_alignment_options_request Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAlignmentOptions'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalsAggregateV11 + * @deprecated */ - public function getGoalsAlignmentOptions($employee_id, $goal_id = null, $get_goals_alignment_options_request = null, string $contentType = self::CONTENT_TYPES['getGoalsAlignmentOptions'][0]) { - list($response) = $this->getGoalsAlignmentOptionsWithHttpInfo($employee_id, $goal_id, $get_goals_alignment_options_request, $contentType); + public function getGoalsAggregateV11($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { + list($response) = $this->getGoalsAggregateV11WithHttpInfo($employee_id, $filter, $contentType); return $response; } /** - * Operation getGoalsAlignmentOptionsWithHttpInfo + * Operation getGoalsAggregateV11WithHttpInfo * - * Get Alignable Goal Options + * Get Goals Aggregate (v1.1) * - * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) - * @param int|null $goal_id Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. (optional) - * @param \BhrSdk\Model\GetGoalsAlignmentOptionsRequest|null $get_goals_alignment_options_request Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAlignmentOptions'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalsAggregateV11, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getGoalsAlignmentOptionsWithHttpInfo($employee_id, $goal_id = null, $get_goals_alignment_options_request = null, string $contentType = self::CONTENT_TYPES['getGoalsAlignmentOptions'][0]) { - $request = $this->getGoalsAlignmentOptionsRequest($employee_id, $goal_id, $get_goals_alignment_options_request, $contentType); + public function getGoalsAggregateV11WithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { + $request = $this->getGoalsAggregateV11Request($employee_id, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); - $statusCode = $response->getStatusCode(); + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalsAggregateV11', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalsAggregateV11', $request, $response, ); } /** - * Operation getGoalsAlignmentOptionsAsync + * Operation getGoalsAggregateV11Async * - * Get Alignable Goal Options + * Get Goals Aggregate (v1.1) * - * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) - * @param int|null $goal_id Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. (optional) - * @param \BhrSdk\Model\GetGoalsAlignmentOptionsRequest|null $get_goals_alignment_options_request Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAlignmentOptions'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsAlignmentOptionsAsync($employee_id, $goal_id = null, $get_goals_alignment_options_request = null, string $contentType = self::CONTENT_TYPES['getGoalsAlignmentOptions'][0]) { - return $this->getGoalsAlignmentOptionsAsyncWithHttpInfo($employee_id, $goal_id, $get_goals_alignment_options_request, $contentType) + public function getGoalsAggregateV11Async($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { + return $this->getGoalsAggregateV11AsyncWithHttpInfo($employee_id, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -2238,30 +2385,32 @@ function ($response) { } /** - * Operation getGoalsAlignmentOptionsAsyncWithHttpInfo + * Operation getGoalsAggregateV11AsyncWithHttpInfo * - * Get Alignable Goal Options + * Get Goals Aggregate (v1.1) * - * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) - * @param int|null $goal_id Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. (optional) - * @param \BhrSdk\Model\GetGoalsAlignmentOptionsRequest|null $get_goals_alignment_options_request Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAlignmentOptions'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsAlignmentOptionsAsyncWithHttpInfo($employee_id, $goal_id = null, $get_goals_alignment_options_request = null, string $contentType = self::CONTENT_TYPES['getGoalsAlignmentOptions'][0]) { - - $request = $this->getGoalsAlignmentOptionsRequest($employee_id, $goal_id, $get_goals_alignment_options_request, $contentType); + public function getGoalsAggregateV11AsyncWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { + $returnType = '\BhrSdk\Model\GoalsAggregateV11'; + $request = $this->getGoalsAggregateV11Request($employee_id, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2284,26 +2433,26 @@ function ($exception) { } /** - * Create request for operation 'getGoalsAlignmentOptions' + * Create request for operation 'getGoalsAggregateV11' * - * @param string $employee_id employeeId is the employee ID to get alignable goal options for. (required) - * @param int|null $goal_id Optional. The goal ID to get alignment options for. Can be provided as a query parameter or in the request body. (optional) - * @param \BhrSdk\Model\GetGoalsAlignmentOptionsRequest|null $get_goals_alignment_options_request Optional. Provide goalId to get alignment options including the option currently aligned with this goal. If omitted, response will be alignment options belonging to the API user. Note: goalId can also be provided as a query parameter. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAlignmentOptions'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getGoalsAlignmentOptionsRequest($employee_id, $goal_id = null, $get_goals_alignment_options_request = null, string $contentType = self::CONTENT_TYPES['getGoalsAlignmentOptions'][0]) { + public function getGoalsAggregateV11Request($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsAlignmentOptions' + methodName: 'getGoalsAggregateV11' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/alignmentOptions'; + $resourcePath = '/api/v1_1/performance/employees/{employeeId}/goals/aggregate'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2312,7 +2461,7 @@ public function getGoalsAlignmentOptionsRequest($employee_id, $goal_id = null, $ $multipart = false; $parameters = [ - 'goalId' => ['value' => $goal_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], ]; // Process parameters and build query values directly @@ -2342,16 +2491,6 @@ public function getGoalsAlignmentOptionsRequest($employee_id, $goal_id = null, $ $multipart ); - // for model (json/xml) - if (isset($get_goals_alignment_options_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_goals_alignment_options_request)); - } else { - $httpBody = is_array($get_goals_alignment_options_request) ? json_encode($get_goals_alignment_options_request) : $get_goals_alignment_options_request; - } - } - // Authentication methods // Basic authentication @@ -2397,38 +2536,38 @@ public function getGoalsAlignmentOptionsRequest($employee_id, $goal_id = null, $ } /** - * Operation getGoalsFiltersV1 + * Operation getGoalsAggregateV12 * - * Get Goal Filters + * Get Goals Aggregate (v1.2) * - * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalFiltersV1 - * @deprecated + * @return \BhrSdk\Model\GoalsAggregateV12 */ - public function getGoalsFiltersV1($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { - list($response) = $this->getGoalsFiltersV1WithHttpInfo($employee_id, $contentType); + public function getGoalsAggregateV12($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { + list($response) = $this->getGoalsAggregateV12WithHttpInfo($employee_id, $filter, $contentType); return $response; } /** - * Operation getGoalsFiltersV1WithHttpInfo + * Operation getGoalsAggregateV12WithHttpInfo * - * Get Goal Filters + * Get Goals Aggregate (v1.2) * - * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalFiltersV1, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \BhrSdk\Model\GoalsAggregateV12, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalsFiltersV1WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { - $request = $this->getGoalsFiltersV1Request($employee_id, $contentType); + public function getGoalsAggregateV12WithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { + $request = $this->getGoalsAggregateV12Request($employee_id, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2439,7 +2578,7 @@ public function getGoalsFiltersV1WithHttpInfo($employee_id, string $contentType switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalFiltersV1', + '\BhrSdk\Model\GoalsAggregateV12', $request, $response, ); @@ -2459,26 +2598,26 @@ public function getGoalsFiltersV1WithHttpInfo($employee_id, string $contentType } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalFiltersV1', + '\BhrSdk\Model\GoalsAggregateV12', $request, $response, ); } /** - * Operation getGoalsFiltersV1Async + * Operation getGoalsAggregateV12Async * - * Get Goal Filters + * Get Goals Aggregate (v1.2) * - * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsFiltersV1Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { - return $this->getGoalsFiltersV1AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalsAggregateV12Async($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { + return $this->getGoalsAggregateV12AsyncWithHttpInfo($employee_id, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -2487,20 +2626,20 @@ function ($response) { } /** - * Operation getGoalsFiltersV1AsyncWithHttpInfo + * Operation getGoalsAggregateV12AsyncWithHttpInfo * - * Get Goal Filters + * Get Goals Aggregate (v1.2) * - * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getGoalsFiltersV1AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { - $returnType = '\BhrSdk\Model\GoalFiltersV1'; - $request = $this->getGoalsFiltersV1Request($employee_id, $contentType); + public function getGoalsAggregateV12AsyncWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { + $returnType = '\BhrSdk\Model\GoalsAggregateV12'; + $request = $this->getGoalsAggregateV12Request($employee_id, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -2534,25 +2673,25 @@ function ($exception) { } /** - * Create request for operation 'getGoalsFiltersV1' + * Create request for operation 'getGoalsAggregateV12' * - * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID used to generate the aggregate information. (required) + * @param string|null $filter Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsAggregateV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getGoalsFiltersV1Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { + public function getGoalsAggregateV12Request($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['getGoalsAggregateV12'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsFiltersV1' + methodName: 'getGoalsAggregateV12' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/filters'; + $resourcePath = '/api/v1_2/performance/employees/{employeeId}/goals/aggregate'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2560,6 +2699,22 @@ public function getGoalsFiltersV1Request($employee_id, string $contentType = sel $httpBody = ''; $multipart = false; + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -2620,38 +2775,38 @@ public function getGoalsFiltersV1Request($employee_id, string $contentType = sel } /** - * Operation getGoalsFiltersV11 + * Operation getGoalsFiltersV1 * - * Get Goal Filters v1.1 + * Get Goal Filters (v1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\GoalFiltersV11 + * @return \BhrSdk\Model\GoalFiltersV1 * @deprecated */ - public function getGoalsFiltersV11($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { - list($response) = $this->getGoalsFiltersV11WithHttpInfo($employee_id, $contentType); + public function getGoalsFiltersV1($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { + list($response) = $this->getGoalsFiltersV1WithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation getGoalsFiltersV11WithHttpInfo + * Operation getGoalsFiltersV1WithHttpInfo * - * Get Goal Filters v1.1 + * Get Goal Filters (v1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\GoalFiltersV11, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GoalFiltersV1, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function getGoalsFiltersV11WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { - $request = $this->getGoalsFiltersV11Request($employee_id, $contentType); + public function getGoalsFiltersV1WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { + $request = $this->getGoalsFiltersV1Request($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2662,7 +2817,7 @@ public function getGoalsFiltersV11WithHttpInfo($employee_id, string $contentType switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalFiltersV11', + '\BhrSdk\Model\GoalFiltersV1', $request, $response, ); @@ -2682,26 +2837,26 @@ public function getGoalsFiltersV11WithHttpInfo($employee_id, string $contentType } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\GoalFiltersV11', + '\BhrSdk\Model\GoalFiltersV1', $request, $response, ); } /** - * Operation getGoalsFiltersV11Async + * Operation getGoalsFiltersV1Async * - * Get Goal Filters v1.1 + * Get Goal Filters (v1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getGoalsFiltersV11Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { - return $this->getGoalsFiltersV11AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalsFiltersV1Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { + return $this->getGoalsFiltersV1AsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2710,20 +2865,20 @@ function ($response) { } /** - * Operation getGoalsFiltersV11AsyncWithHttpInfo + * Operation getGoalsFiltersV1AsyncWithHttpInfo * - * Get Goal Filters v1.1 + * Get Goal Filters (v1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getGoalsFiltersV11AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { - $returnType = '\BhrSdk\Model\GoalFiltersV11'; - $request = $this->getGoalsFiltersV11Request($employee_id, $contentType); + public function getGoalsFiltersV1AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { + $returnType = '\BhrSdk\Model\GoalFiltersV1'; + $request = $this->getGoalsFiltersV1Request($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -2757,25 +2912,25 @@ function ($exception) { } /** - * Create request for operation 'getGoalsFiltersV11' + * Create request for operation 'getGoalsFiltersV1' * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function getGoalsFiltersV11Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { + public function getGoalsFiltersV1Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV1'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsFiltersV11' + methodName: 'getGoalsFiltersV1' ); - $resourcePath = '/api/v1_1/performance/employees/{employeeId}/goals/filters'; + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/filters'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2843,36 +2998,38 @@ public function getGoalsFiltersV11Request($employee_id, string $contentType = se } /** - * Operation getGoalsFiltersV12 + * Operation getGoalsFiltersV11 * - * Get Goal Status Counts v1.2 + * Get Goal Filters (v1.1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\GoalFiltersV11 + * @deprecated */ - public function getGoalsFiltersV12($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { - list($response) = $this->getGoalsFiltersV12WithHttpInfo($employee_id, $contentType); + public function getGoalsFiltersV11($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { + list($response) = $this->getGoalsFiltersV11WithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation getGoalsFiltersV12WithHttpInfo + * Operation getGoalsFiltersV11WithHttpInfo * - * Get Goal Status Counts v1.2 + * Get Goal Filters (v1.1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\GoalFiltersV11, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getGoalsFiltersV12WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { - $request = $this->getGoalsFiltersV12Request($employee_id, $contentType); + public function getGoalsFiltersV11WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { + $request = $this->getGoalsFiltersV11Request($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2910,18 +3067,19 @@ public function getGoalsFiltersV12WithHttpInfo($employee_id, string $contentType } /** - * Operation getGoalsFiltersV12Async + * Operation getGoalsFiltersV11Async * - * Get Goal Status Counts v1.2 + * Get Goal Filters (v1.1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsFiltersV12Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { - return $this->getGoalsFiltersV12AsyncWithHttpInfo($employee_id, $contentType) + public function getGoalsFiltersV11Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { + return $this->getGoalsFiltersV11AsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2930,19 +3088,20 @@ function ($response) { } /** - * Operation getGoalsFiltersV12AsyncWithHttpInfo + * Operation getGoalsFiltersV11AsyncWithHttpInfo * - * Get Goal Status Counts v1.2 + * Get Goal Filters (v1.1) * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getGoalsFiltersV12AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + public function getGoalsFiltersV11AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { $returnType = '\BhrSdk\Model\GoalFiltersV11'; - $request = $this->getGoalsFiltersV12Request($employee_id, $contentType); + $request = $this->getGoalsFiltersV11Request($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -2976,24 +3135,25 @@ function ($exception) { } /** - * Create request for operation 'getGoalsFiltersV12' + * Create request for operation 'getGoalsFiltersV11' * * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getGoalsFiltersV12Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + public function getGoalsFiltersV11Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsFiltersV12' + methodName: 'getGoalsFiltersV11' ); - $resourcePath = '/api/v1_2/performance/employees/{employeeId}/goals/filters'; + $resourcePath = '/api/v1_1/performance/employees/{employeeId}/goals/filters'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -3061,40 +3221,36 @@ public function getGoalsFiltersV12Request($employee_id, string $contentType = se } /** - * Operation getGoalsShareOptions + * Operation getGoalsFiltersV12 * - * Get Available Goal Sharing Options + * Get Goal Filters (v1.2) * - * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) - * @param string|null $search The search term used to filter employees returned. Will search name, employee ID and email. (optional) - * @param string|null $limit Limit will restrict results to specified number. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsShareOptions'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalFiltersV11 */ - public function getGoalsShareOptions($employee_id, $search = null, $limit = null, string $contentType = self::CONTENT_TYPES['getGoalsShareOptions'][0]) { - list($response) = $this->getGoalsShareOptionsWithHttpInfo($employee_id, $search, $limit, $contentType); + public function getGoalsFiltersV12($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + list($response) = $this->getGoalsFiltersV12WithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation getGoalsShareOptionsWithHttpInfo + * Operation getGoalsFiltersV12WithHttpInfo * - * Get Available Goal Sharing Options + * Get Goal Filters (v1.2) * - * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) - * @param string|null $search The search term used to filter employees returned. Will search name, employee ID and email. (optional) - * @param string|null $limit Limit will restrict results to specified number. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsShareOptions'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalFiltersV11, HTTP status code, HTTP response headers (array of strings) */ - public function getGoalsShareOptionsWithHttpInfo($employee_id, $search = null, $limit = null, string $contentType = self::CONTENT_TYPES['getGoalsShareOptions'][0]) { - $request = $this->getGoalsShareOptionsRequest($employee_id, $search, $limit, $contentType); + public function getGoalsFiltersV12WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + $request = $this->getGoalsFiltersV12Request($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -3102,28 +3258,48 @@ public function getGoalsShareOptionsWithHttpInfo($employee_id, $search = null, $ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalFiltersV11', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalFiltersV11', $request, $response, ); } /** - * Operation getGoalsShareOptionsAsync + * Operation getGoalsFiltersV12Async * - * Get Available Goal Sharing Options + * Get Goal Filters (v1.2) * - * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) - * @param string|null $search The search term used to filter employees returned. Will search name, employee ID and email. (optional) - * @param string|null $limit Limit will restrict results to specified number. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsShareOptions'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalsShareOptionsAsync($employee_id, $search = null, $limit = null, string $contentType = self::CONTENT_TYPES['getGoalsShareOptions'][0]) { - return $this->getGoalsShareOptionsAsyncWithHttpInfo($employee_id, $search, $limit, $contentType) + public function getGoalsFiltersV12Async($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + return $this->getGoalsFiltersV12AsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -3132,30 +3308,30 @@ function ($response) { } /** - * Operation getGoalsShareOptionsAsyncWithHttpInfo + * Operation getGoalsFiltersV12AsyncWithHttpInfo * - * Get Available Goal Sharing Options + * Get Goal Filters (v1.2) * - * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) - * @param string|null $search The search term used to filter employees returned. Will search name, employee ID and email. (optional) - * @param string|null $limit Limit will restrict results to specified number. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsShareOptions'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGoalsShareOptionsAsyncWithHttpInfo($employee_id, $search = null, $limit = null, string $contentType = self::CONTENT_TYPES['getGoalsShareOptions'][0]) { - - $request = $this->getGoalsShareOptionsRequest($employee_id, $search, $limit, $contentType); + public function getGoalsFiltersV12AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { + $returnType = '\BhrSdk\Model\GoalFiltersV11'; + $request = $this->getGoalsFiltersV12Request($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -3178,26 +3354,24 @@ function ($exception) { } /** - * Create request for operation 'getGoalsShareOptions' + * Create request for operation 'getGoalsFiltersV12' * - * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) - * @param string|null $search The search term used to filter employees returned. Will search name, employee ID and email. (optional) - * @param string|null $limit Limit will restrict results to specified number. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsShareOptions'] to see the possible values for this operation + * @param int $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getGoalsFiltersV12'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGoalsShareOptionsRequest($employee_id, $search = null, $limit = null, string $contentType = self::CONTENT_TYPES['getGoalsShareOptions'][0]) { + public function getGoalsFiltersV12Request($employee_id, string $contentType = self::CONTENT_TYPES['getGoalsFiltersV12'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, ], - methodName: 'getGoalsShareOptions' + methodName: 'getGoalsFiltersV12' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/shareOptions'; + $resourcePath = '/api/v1_2/performance/employees/{employeeId}/goals/filters'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -3205,23 +3379,6 @@ public function getGoalsShareOptionsRequest($employee_id, $search = null, $limit $httpBody = ''; $multipart = false; - $parameters = [ - 'search' => ['value' => $search, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - 'limit' => ['value' => $limit, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } - } - // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -3282,40 +3439,38 @@ public function getGoalsShareOptionsRequest($employee_id, $search = null, $limit } /** - * Operation postCloseGoal + * Operation listGoalComments * - * Close Goal + * List Goal Comments * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string|null $body Comment field is optional. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postCloseGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalComments'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TransformedApiGoal + * @return \BhrSdk\Model\GoalCommentsResponse */ - public function postCloseGoal($employee_id, $goal_id, $body = null, string $contentType = self::CONTENT_TYPES['postCloseGoal'][0]) { - list($response) = $this->postCloseGoalWithHttpInfo($employee_id, $goal_id, $body, $contentType); + public function listGoalComments($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['listGoalComments'][0]) { + list($response) = $this->listGoalCommentsWithHttpInfo($employee_id, $goal_id, $contentType); return $response; } /** - * Operation postCloseGoalWithHttpInfo + * Operation listGoalCommentsWithHttpInfo * - * Close Goal + * List Goal Comments * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string|null $body Comment field is optional. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postCloseGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalComments'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TransformedApiGoal, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GoalCommentsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function postCloseGoalWithHttpInfo($employee_id, $goal_id, $body = null, string $contentType = self::CONTENT_TYPES['postCloseGoal'][0]) { - $request = $this->postCloseGoalRequest($employee_id, $goal_id, $body, $contentType); + public function listGoalCommentsWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['listGoalComments'][0]) { + $request = $this->listGoalCommentsRequest($employee_id, $goal_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -3324,9 +3479,9 @@ public function postCloseGoalWithHttpInfo($employee_id, $goal_id, $body = null, $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: + case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalCommentsResponse', $request, $response, ); @@ -3346,27 +3501,26 @@ public function postCloseGoalWithHttpInfo($employee_id, $goal_id, $body = null, } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalCommentsResponse', $request, $response, ); } /** - * Operation postCloseGoalAsync + * Operation listGoalCommentsAsync * - * Close Goal + * List Goal Comments * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string|null $body Comment field is optional. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postCloseGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalComments'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCloseGoalAsync($employee_id, $goal_id, $body = null, string $contentType = self::CONTENT_TYPES['postCloseGoal'][0]) { - return $this->postCloseGoalAsyncWithHttpInfo($employee_id, $goal_id, $body, $contentType) + public function listGoalCommentsAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['listGoalComments'][0]) { + return $this->listGoalCommentsAsyncWithHttpInfo($employee_id, $goal_id, $contentType) ->then( function ($response) { return $response[0]; @@ -3375,21 +3529,20 @@ function ($response) { } /** - * Operation postCloseGoalAsyncWithHttpInfo + * Operation listGoalCommentsAsyncWithHttpInfo * - * Close Goal + * List Goal Comments * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string|null $body Comment field is optional. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postCloseGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalComments'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCloseGoalAsyncWithHttpInfo($employee_id, $goal_id, $body = null, string $contentType = self::CONTENT_TYPES['postCloseGoal'][0]) { - $returnType = '\BhrSdk\Model\TransformedApiGoal'; - $request = $this->postCloseGoalRequest($employee_id, $goal_id, $body, $contentType); + public function listGoalCommentsAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['listGoalComments'][0]) { + $returnType = '\BhrSdk\Model\GoalCommentsResponse'; + $request = $this->listGoalCommentsRequest($employee_id, $goal_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -3423,28 +3576,27 @@ function ($exception) { } /** - * Create request for operation 'postCloseGoal' + * Create request for operation 'listGoalComments' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string|null $body Comment field is optional. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postCloseGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalComments'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postCloseGoalRequest($employee_id, $goal_id, $body = null, string $contentType = self::CONTENT_TYPES['postCloseGoal'][0]) { + public function listGoalCommentsRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['listGoalComments'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, ], - methodName: 'postCloseGoal' + methodName: 'listGoalComments' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/close'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -3474,16 +3626,6 @@ public function postCloseGoalRequest($employee_id, $goal_id, $body = null, strin $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 = is_array($body) ? json_encode($body) : $body; - } - } - // Authentication methods // Basic authentication @@ -3521,7 +3663,7 @@ public function postCloseGoalRequest($employee_id, $goal_id, $body = null, strin $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -3529,38 +3671,40 @@ public function postCloseGoalRequest($employee_id, $goal_id, $body = null, strin } /** - * Operation postGoal + * Operation listGoalShareOptions * - * Create Goal + * List Goal Sharing Options * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param \BhrSdk\Model\PostGoalRequest $post_goal_request post_goal_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoal'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) + * @param string $search The search term used to filter employees returned. Will search name, employee ID and email. (required) + * @param int|null $limit Maximum number of employees to return. Defaults to 10, maximum 100. (optional, default to 10) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalShareOptions'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails + * @return \BhrSdk\Model\ShareOptionsResponse */ - public function postGoal($employee_id, $post_goal_request, string $contentType = self::CONTENT_TYPES['postGoal'][0]) { - list($response) = $this->postGoalWithHttpInfo($employee_id, $post_goal_request, $contentType); + public function listGoalShareOptions($employee_id, $search, $limit = 10, string $contentType = self::CONTENT_TYPES['listGoalShareOptions'][0]) { + list($response) = $this->listGoalShareOptionsWithHttpInfo($employee_id, $search, $limit, $contentType); return $response; } /** - * Operation postGoalWithHttpInfo + * Operation listGoalShareOptionsWithHttpInfo * - * Create Goal + * List Goal Sharing Options * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param \BhrSdk\Model\PostGoalRequest $post_goal_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoal'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) + * @param string $search The search term used to filter employees returned. Will search name, employee ID and email. (required) + * @param int|null $limit Maximum number of employees to return. Defaults to 10, maximum 100. (optional, default to 10) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalShareOptions'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\ShareOptionsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function postGoalWithHttpInfo($employee_id, $post_goal_request, string $contentType = self::CONTENT_TYPES['postGoal'][0]) { - $request = $this->postGoalRequest($employee_id, $post_goal_request, $contentType); + public function listGoalShareOptionsWithHttpInfo($employee_id, $search, $limit = 10, string $contentType = self::CONTENT_TYPES['listGoalShareOptions'][0]) { + $request = $this->listGoalShareOptionsRequest($employee_id, $search, $limit, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -3569,9 +3713,9 @@ public function postGoalWithHttpInfo($employee_id, $post_goal_request, string $c $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: + case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiEmployeeGoalDetails', + '\BhrSdk\Model\ShareOptionsResponse', $request, $response, ); @@ -3591,26 +3735,27 @@ public function postGoalWithHttpInfo($employee_id, $post_goal_request, string $c } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiEmployeeGoalDetails', + '\BhrSdk\Model\ShareOptionsResponse', $request, $response, ); } /** - * Operation postGoalAsync + * Operation listGoalShareOptionsAsync * - * Create Goal + * List Goal Sharing Options * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param \BhrSdk\Model\PostGoalRequest $post_goal_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoal'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) + * @param string $search The search term used to filter employees returned. Will search name, employee ID and email. (required) + * @param int|null $limit Maximum number of employees to return. Defaults to 10, maximum 100. (optional, default to 10) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalShareOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postGoalAsync($employee_id, $post_goal_request, string $contentType = self::CONTENT_TYPES['postGoal'][0]) { - return $this->postGoalAsyncWithHttpInfo($employee_id, $post_goal_request, $contentType) + public function listGoalShareOptionsAsync($employee_id, $search, $limit = 10, string $contentType = self::CONTENT_TYPES['listGoalShareOptions'][0]) { + return $this->listGoalShareOptionsAsyncWithHttpInfo($employee_id, $search, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -3619,20 +3764,21 @@ function ($response) { } /** - * Operation postGoalAsyncWithHttpInfo + * Operation listGoalShareOptionsAsyncWithHttpInfo * - * Create Goal + * List Goal Sharing Options * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param \BhrSdk\Model\PostGoalRequest $post_goal_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoal'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) + * @param string $search The search term used to filter employees returned. Will search name, employee ID and email. (required) + * @param int|null $limit Maximum number of employees to return. Defaults to 10, maximum 100. (optional, default to 10) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalShareOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postGoalAsyncWithHttpInfo($employee_id, $post_goal_request, string $contentType = self::CONTENT_TYPES['postGoal'][0]) { - $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; - $request = $this->postGoalRequest($employee_id, $post_goal_request, $contentType); + public function listGoalShareOptionsAsyncWithHttpInfo($employee_id, $search, $limit = 10, string $contentType = self::CONTENT_TYPES['listGoalShareOptions'][0]) { + $returnType = '\BhrSdk\Model\ShareOptionsResponse'; + $request = $this->listGoalShareOptionsRequest($employee_id, $search, $limit, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -3666,33 +3812,58 @@ function ($exception) { } /** - * Create request for operation 'postGoal' + * Create request for operation 'listGoalShareOptions' * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param \BhrSdk\Model\PostGoalRequest $post_goal_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoal'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to get sharing options for. (required) + * @param string $search The search term used to filter employees returned. Will search name, employee ID and email. (required) + * @param int|null $limit Maximum number of employees to return. Defaults to 10, maximum 100. (optional, default to 10) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoalShareOptions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postGoalRequest($employee_id, $post_goal_request, string $contentType = self::CONTENT_TYPES['postGoal'][0]) { + public function listGoalShareOptionsRequest($employee_id, $search, $limit = 10, string $contentType = self::CONTENT_TYPES['listGoalShareOptions'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'post_goal_request' => $post_goal_request, + 'search' => $search, ], - methodName: 'postGoal' + methodName: 'listGoalShareOptions' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling GoalsApi.listGoalShareOptions, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling GoalsApi.listGoalShareOptions, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/shareOptions'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + $parameters = [ + 'search' => ['value' => $search, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -3708,16 +3879,6 @@ public function postGoalRequest($employee_id, $post_goal_request, string $conten $multipart ); - // for model (json/xml) - if (isset($post_goal_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($post_goal_request)); - } else { - $httpBody = is_array($post_goal_request) ? json_encode($post_goal_request) : $post_goal_request; - } - } - // Authentication methods // Basic authentication @@ -3755,7 +3916,7 @@ public function postGoalRequest($employee_id, $post_goal_request, string $conten $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -3763,40 +3924,38 @@ public function postGoalRequest($employee_id, $post_goal_request, string $conten } /** - * Operation postGoalComment + * Operation listGoals * - * Create Goal Comment + * List Goals * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $body body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoalComment'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string|null $filter Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoals'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalsList */ - public function postGoalComment($employee_id, $goal_id, $body, string $contentType = self::CONTENT_TYPES['postGoalComment'][0]) { - list($response) = $this->postGoalCommentWithHttpInfo($employee_id, $goal_id, $body, $contentType); + public function listGoals($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['listGoals'][0]) { + list($response) = $this->listGoalsWithHttpInfo($employee_id, $filter, $contentType); return $response; } /** - * Operation postGoalCommentWithHttpInfo + * Operation listGoalsWithHttpInfo * - * Create Goal Comment + * List Goals * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoalComment'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string|null $filter Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoals'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalsList, HTTP status code, HTTP response headers (array of strings) */ - public function postGoalCommentWithHttpInfo($employee_id, $goal_id, $body, string $contentType = self::CONTENT_TYPES['postGoalComment'][0]) { - $request = $this->postGoalCommentRequest($employee_id, $goal_id, $body, $contentType); + public function listGoalsWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['listGoals'][0]) { + $request = $this->listGoalsRequest($employee_id, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -3804,28 +3963,49 @@ public function postGoalCommentWithHttpInfo($employee_id, $goal_id, $body, strin $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalsList', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalsList', $request, $response, ); } /** - * Operation postGoalCommentAsync + * Operation listGoalsAsync * - * Create Goal Comment + * List Goals * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoalComment'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string|null $filter Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoals'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postGoalCommentAsync($employee_id, $goal_id, $body, string $contentType = self::CONTENT_TYPES['postGoalComment'][0]) { - return $this->postGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $body, $contentType) + public function listGoalsAsync($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['listGoals'][0]) { + return $this->listGoalsAsyncWithHttpInfo($employee_id, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -3834,30 +4014,31 @@ function ($response) { } /** - * Operation postGoalCommentAsyncWithHttpInfo + * Operation listGoalsAsyncWithHttpInfo * - * Create Goal Comment + * List Goals * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoalComment'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string|null $filter Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoals'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $body, string $contentType = self::CONTENT_TYPES['postGoalComment'][0]) { - - $request = $this->postGoalCommentRequest($employee_id, $goal_id, $body, $contentType); + public function listGoalsAsyncWithHttpInfo($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['listGoals'][0]) { + $returnType = '\BhrSdk\Model\GoalsList'; + $request = $this->listGoalsRequest($employee_id, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -3880,35 +4061,48 @@ function ($exception) { } /** - * Create request for operation 'postGoalComment' + * Create request for operation 'listGoals' * - * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) - * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postGoalComment'] to see the possible values for this operation + * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) + * @param string|null $filter Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listGoals'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postGoalCommentRequest($employee_id, $goal_id, $body, string $contentType = self::CONTENT_TYPES['postGoalComment'][0]) { + public function listGoalsRequest($employee_id, $filter = null, string $contentType = self::CONTENT_TYPES['listGoals'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'goal_id' => $goal_id, - 'body' => $body, ], - methodName: 'postGoalComment' + methodName: 'listGoals' ); - $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $resourcePath = '/api/v1/performance/employees/{employeeId}/goals'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -3917,14 +4111,6 @@ public function postGoalCommentRequest($employee_id, $goal_id, $body, string $co $resourcePath ); } - // path params - if ($goal_id !== null) { - $resourcePath = str_replace( - '{' . 'goalId' . '}', - ObjectSerializer::toPathValue((string) $goal_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -3932,16 +4118,6 @@ public function postGoalCommentRequest($employee_id, $goal_id, $body, string $co $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 = is_array($body) ? json_encode($body) : $body; - } - } - // Authentication methods // Basic authentication @@ -3979,7 +4155,7 @@ public function postGoalCommentRequest($employee_id, $goal_id, $body, string $co $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -3987,38 +4163,38 @@ public function postGoalCommentRequest($employee_id, $goal_id, $body, string $co } /** - * Operation postReopenGoal + * Operation reopenGoal * * Reopen Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postReopenGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['reopenGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TransformedApiGoal + * @return \BhrSdk\Model\GoalResponse */ - public function postReopenGoal($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['postReopenGoal'][0]) { - list($response) = $this->postReopenGoalWithHttpInfo($employee_id, $goal_id, $contentType); + public function reopenGoal($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['reopenGoal'][0]) { + list($response) = $this->reopenGoalWithHttpInfo($employee_id, $goal_id, $contentType); return $response; } /** - * Operation postReopenGoalWithHttpInfo + * Operation reopenGoalWithHttpInfo * * Reopen Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postReopenGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['reopenGoal'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TransformedApiGoal, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GoalResponse, HTTP status code, HTTP response headers (array of strings) */ - public function postReopenGoalWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['postReopenGoal'][0]) { - $request = $this->postReopenGoalRequest($employee_id, $goal_id, $contentType); + public function reopenGoalWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['reopenGoal'][0]) { + $request = $this->reopenGoalRequest($employee_id, $goal_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -4029,7 +4205,7 @@ public function postReopenGoalWithHttpInfo($employee_id, $goal_id, string $conte switch($statusCode) { case 201: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalResponse', $request, $response, ); @@ -4049,26 +4225,26 @@ public function postReopenGoalWithHttpInfo($employee_id, $goal_id, string $conte } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalResponse', $request, $response, ); } /** - * Operation postReopenGoalAsync + * Operation reopenGoalAsync * * Reopen Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postReopenGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['reopenGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postReopenGoalAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['postReopenGoal'][0]) { - return $this->postReopenGoalAsyncWithHttpInfo($employee_id, $goal_id, $contentType) + public function reopenGoalAsync($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['reopenGoal'][0]) { + return $this->reopenGoalAsyncWithHttpInfo($employee_id, $goal_id, $contentType) ->then( function ($response) { return $response[0]; @@ -4077,20 +4253,20 @@ function ($response) { } /** - * Operation postReopenGoalAsyncWithHttpInfo + * Operation reopenGoalAsyncWithHttpInfo * * Reopen Goal * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postReopenGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['reopenGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postReopenGoalAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['postReopenGoal'][0]) { - $returnType = '\BhrSdk\Model\TransformedApiGoal'; - $request = $this->postReopenGoalRequest($employee_id, $goal_id, $contentType); + public function reopenGoalAsyncWithHttpInfo($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['reopenGoal'][0]) { + $returnType = '\BhrSdk\Model\GoalResponse'; + $request = $this->reopenGoalRequest($employee_id, $goal_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -4124,23 +4300,23 @@ function ($exception) { } /** - * Create request for operation 'postReopenGoal' + * Create request for operation 'reopenGoal' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postReopenGoal'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['reopenGoal'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postReopenGoalRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['postReopenGoal'][0]) { + public function reopenGoalRequest($employee_id, $goal_id, string $contentType = self::CONTENT_TYPES['reopenGoal'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, ], - methodName: 'postReopenGoal' + methodName: 'reopenGoal' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen'; @@ -4219,42 +4395,42 @@ public function postReopenGoalRequest($employee_id, $goal_id, string $contentTyp } /** - * Operation putGoalComment + * Operation updateGoalComment * * Update Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $comment_id commentId is the comment ID for the specified goal. (required) - * @param string $body body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalCommentRequest $update_goal_comment_request update_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GoalCommentResponse */ - public function putGoalComment($employee_id, $goal_id, $comment_id, $body, string $contentType = self::CONTENT_TYPES['putGoalComment'][0]) { - list($response) = $this->putGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $body, $contentType); + public function updateGoalComment($employee_id, $goal_id, $comment_id, $update_goal_comment_request, string $contentType = self::CONTENT_TYPES['updateGoalComment'][0]) { + list($response) = $this->updateGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $update_goal_comment_request, $contentType); return $response; } /** - * Operation putGoalCommentWithHttpInfo + * Operation updateGoalCommentWithHttpInfo * * Update Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $comment_id commentId is the comment ID for the specified goal. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalCommentRequest $update_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalComment'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GoalCommentResponse, HTTP status code, HTTP response headers (array of strings) */ - public function putGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $body, string $contentType = self::CONTENT_TYPES['putGoalComment'][0]) { - $request = $this->putGoalCommentRequest($employee_id, $goal_id, $comment_id, $body, $contentType); + public function updateGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $update_goal_comment_request, string $contentType = self::CONTENT_TYPES['updateGoalComment'][0]) { + $request = $this->updateGoalCommentRequest($employee_id, $goal_id, $comment_id, $update_goal_comment_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -4262,29 +4438,51 @@ public function putGoalCommentWithHttpInfo($employee_id, $goal_id, $comment_id, $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GoalCommentResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GoalCommentResponse', $request, $response, ); } /** - * Operation putGoalCommentAsync + * Operation updateGoalCommentAsync * * Update Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $comment_id commentId is the comment ID for the specified goal. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalCommentRequest $update_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalCommentAsync($employee_id, $goal_id, $comment_id, $body, string $contentType = self::CONTENT_TYPES['putGoalComment'][0]) { - return $this->putGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $body, $contentType) + public function updateGoalCommentAsync($employee_id, $goal_id, $comment_id, $update_goal_comment_request, string $contentType = self::CONTENT_TYPES['updateGoalComment'][0]) { + return $this->updateGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $update_goal_comment_request, $contentType) ->then( function ($response) { return $response[0]; @@ -4293,31 +4491,33 @@ function ($response) { } /** - * Operation putGoalCommentAsyncWithHttpInfo + * Operation updateGoalCommentAsyncWithHttpInfo * * Update Goal Comment * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $comment_id commentId is the comment ID for the specified goal. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalCommentRequest $update_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $body, string $contentType = self::CONTENT_TYPES['putGoalComment'][0]) { - - $request = $this->putGoalCommentRequest($employee_id, $goal_id, $comment_id, $body, $contentType); + public function updateGoalCommentAsyncWithHttpInfo($employee_id, $goal_id, $comment_id, $update_goal_comment_request, string $contentType = self::CONTENT_TYPES['updateGoalComment'][0]) { + $returnType = '\BhrSdk\Model\GoalCommentResponse'; + $request = $this->updateGoalCommentRequest($employee_id, $goal_id, $comment_id, $update_goal_comment_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -4340,27 +4540,27 @@ function ($exception) { } /** - * Create request for operation 'putGoalComment' + * Create request for operation 'updateGoalComment' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $comment_id commentId is the comment ID for the specified goal. (required) - * @param string $body (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalComment'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalCommentRequest $update_goal_comment_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalComment'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putGoalCommentRequest($employee_id, $goal_id, $comment_id, $body, string $contentType = self::CONTENT_TYPES['putGoalComment'][0]) { + public function updateGoalCommentRequest($employee_id, $goal_id, $comment_id, $update_goal_comment_request, string $contentType = self::CONTENT_TYPES['updateGoalComment'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, 'comment_id' => $comment_id, - 'body' => $body, + 'update_goal_comment_request' => $update_goal_comment_request, ], - methodName: 'putGoalComment' + methodName: 'updateGoalComment' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}'; @@ -4403,12 +4603,12 @@ public function putGoalCommentRequest($employee_id, $goal_id, $comment_id, $body ); // for model (json/xml) - if (isset($body)) { + if (isset($update_goal_comment_request)) { 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($update_goal_comment_request)); } else { - $httpBody = is_array($body) ? json_encode($body) : $body; + $httpBody = is_array($update_goal_comment_request) ? json_encode($update_goal_comment_request) : $update_goal_comment_request; } } @@ -4457,42 +4657,42 @@ public function putGoalCommentRequest($employee_id, $goal_id, $comment_id, $body } /** - * Operation putGoalMilestoneProgress + * Operation updateGoalMilestoneProgress * * Update Milestone Progress * * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $milestone_id milestoneId is the milestone ID for the specified goal. (required) - * @param \BhrSdk\Model\PutGoalMilestoneProgressRequest $put_goal_milestone_progress_request put_goal_milestone_progress_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalMilestoneProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalMilestoneProgressRequest $update_goal_milestone_progress_request update_goal_milestone_progress_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalMilestoneProgress'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails */ - public function putGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['putGoalMilestoneProgress'][0]) { - list($response) = $this->putGoalMilestoneProgressWithHttpInfo($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, $contentType); + public function updateGoalMilestoneProgress($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalMilestoneProgress'][0]) { + list($response) = $this->updateGoalMilestoneProgressWithHttpInfo($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, $contentType); return $response; } /** - * Operation putGoalMilestoneProgressWithHttpInfo + * Operation updateGoalMilestoneProgressWithHttpInfo * * Update Milestone Progress * * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $milestone_id milestoneId is the milestone ID for the specified goal. (required) - * @param \BhrSdk\Model\PutGoalMilestoneProgressRequest $put_goal_milestone_progress_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalMilestoneProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalMilestoneProgressRequest $update_goal_milestone_progress_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalMilestoneProgress'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) */ - public function putGoalMilestoneProgressWithHttpInfo($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['putGoalMilestoneProgress'][0]) { - $request = $this->putGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, $contentType); + public function updateGoalMilestoneProgressWithHttpInfo($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalMilestoneProgress'][0]) { + $request = $this->updateGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -4530,21 +4730,21 @@ public function putGoalMilestoneProgressWithHttpInfo($employee_id, $goal_id, $mi } /** - * Operation putGoalMilestoneProgressAsync + * Operation updateGoalMilestoneProgressAsync * * Update Milestone Progress * * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $milestone_id milestoneId is the milestone ID for the specified goal. (required) - * @param \BhrSdk\Model\PutGoalMilestoneProgressRequest $put_goal_milestone_progress_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalMilestoneProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalMilestoneProgressRequest $update_goal_milestone_progress_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalMilestoneProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalMilestoneProgressAsync($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['putGoalMilestoneProgress'][0]) { - return $this->putGoalMilestoneProgressAsyncWithHttpInfo($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, $contentType) + public function updateGoalMilestoneProgressAsync($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalMilestoneProgress'][0]) { + return $this->updateGoalMilestoneProgressAsyncWithHttpInfo($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, $contentType) ->then( function ($response) { return $response[0]; @@ -4553,22 +4753,22 @@ function ($response) { } /** - * Operation putGoalMilestoneProgressAsyncWithHttpInfo + * Operation updateGoalMilestoneProgressAsyncWithHttpInfo * * Update Milestone Progress * * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $milestone_id milestoneId is the milestone ID for the specified goal. (required) - * @param \BhrSdk\Model\PutGoalMilestoneProgressRequest $put_goal_milestone_progress_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalMilestoneProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalMilestoneProgressRequest $update_goal_milestone_progress_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalMilestoneProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalMilestoneProgressAsyncWithHttpInfo($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['putGoalMilestoneProgress'][0]) { + public function updateGoalMilestoneProgressAsyncWithHttpInfo($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalMilestoneProgress'][0]) { $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; - $request = $this->putGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, $contentType); + $request = $this->updateGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -4602,27 +4802,27 @@ function ($exception) { } /** - * Create request for operation 'putGoalMilestoneProgress' + * Create request for operation 'updateGoalMilestoneProgress' * * @param string $employee_id employeeId is the employee ID to whom the goals are assigned. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) * @param string $milestone_id milestoneId is the milestone ID for the specified goal. (required) - * @param \BhrSdk\Model\PutGoalMilestoneProgressRequest $put_goal_milestone_progress_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalMilestoneProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalMilestoneProgressRequest $update_goal_milestone_progress_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalMilestoneProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $put_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['putGoalMilestoneProgress'][0]) { + public function updateGoalMilestoneProgressRequest($employee_id, $goal_id, $milestone_id, $update_goal_milestone_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalMilestoneProgress'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, 'milestone_id' => $milestone_id, - 'put_goal_milestone_progress_request' => $put_goal_milestone_progress_request, + 'update_goal_milestone_progress_request' => $update_goal_milestone_progress_request, ], - methodName: 'putGoalMilestoneProgress' + methodName: 'updateGoalMilestoneProgress' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress'; @@ -4665,12 +4865,12 @@ public function putGoalMilestoneProgressRequest($employee_id, $goal_id, $milesto ); // for model (json/xml) - if (isset($put_goal_milestone_progress_request)) { + if (isset($update_goal_milestone_progress_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_goal_milestone_progress_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_goal_milestone_progress_request)); } else { - $httpBody = is_array($put_goal_milestone_progress_request) ? json_encode($put_goal_milestone_progress_request) : $put_goal_milestone_progress_request; + $httpBody = is_array($update_goal_milestone_progress_request) ? json_encode($update_goal_milestone_progress_request) : $update_goal_milestone_progress_request; } } @@ -4719,40 +4919,40 @@ public function putGoalMilestoneProgressRequest($employee_id, $goal_id, $milesto } /** - * Operation putGoalProgress + * Operation updateGoalProgress * * Update Goal Progress * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalProgressRequest $put_goal_progress_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalProgressRequest $update_goal_progress_request The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalProgress'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails */ - public function putGoalProgress($employee_id, $goal_id, $put_goal_progress_request, string $contentType = self::CONTENT_TYPES['putGoalProgress'][0]) { - list($response) = $this->putGoalProgressWithHttpInfo($employee_id, $goal_id, $put_goal_progress_request, $contentType); + public function updateGoalProgress($employee_id, $goal_id, $update_goal_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalProgress'][0]) { + list($response) = $this->updateGoalProgressWithHttpInfo($employee_id, $goal_id, $update_goal_progress_request, $contentType); return $response; } /** - * Operation putGoalProgressWithHttpInfo + * Operation updateGoalProgressWithHttpInfo * * Update Goal Progress * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalProgressRequest $put_goal_progress_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalProgressRequest $update_goal_progress_request The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalProgress'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) */ - public function putGoalProgressWithHttpInfo($employee_id, $goal_id, $put_goal_progress_request, string $contentType = self::CONTENT_TYPES['putGoalProgress'][0]) { - $request = $this->putGoalProgressRequest($employee_id, $goal_id, $put_goal_progress_request, $contentType); + public function updateGoalProgressWithHttpInfo($employee_id, $goal_id, $update_goal_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalProgress'][0]) { + $request = $this->updateGoalProgressRequest($employee_id, $goal_id, $update_goal_progress_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -4790,20 +4990,20 @@ public function putGoalProgressWithHttpInfo($employee_id, $goal_id, $put_goal_pr } /** - * Operation putGoalProgressAsync + * Operation updateGoalProgressAsync * * Update Goal Progress * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalProgressRequest $put_goal_progress_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalProgressRequest $update_goal_progress_request The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalProgressAsync($employee_id, $goal_id, $put_goal_progress_request, string $contentType = self::CONTENT_TYPES['putGoalProgress'][0]) { - return $this->putGoalProgressAsyncWithHttpInfo($employee_id, $goal_id, $put_goal_progress_request, $contentType) + public function updateGoalProgressAsync($employee_id, $goal_id, $update_goal_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalProgress'][0]) { + return $this->updateGoalProgressAsyncWithHttpInfo($employee_id, $goal_id, $update_goal_progress_request, $contentType) ->then( function ($response) { return $response[0]; @@ -4812,21 +5012,21 @@ function ($response) { } /** - * Operation putGoalProgressAsyncWithHttpInfo + * Operation updateGoalProgressAsyncWithHttpInfo * * Update Goal Progress * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalProgressRequest $put_goal_progress_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalProgressRequest $update_goal_progress_request The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalProgressAsyncWithHttpInfo($employee_id, $goal_id, $put_goal_progress_request, string $contentType = self::CONTENT_TYPES['putGoalProgress'][0]) { + public function updateGoalProgressAsyncWithHttpInfo($employee_id, $goal_id, $update_goal_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalProgress'][0]) { $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; - $request = $this->putGoalProgressRequest($employee_id, $goal_id, $put_goal_progress_request, $contentType); + $request = $this->updateGoalProgressRequest($employee_id, $goal_id, $update_goal_progress_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -4860,25 +5060,25 @@ function ($exception) { } /** - * Create request for operation 'putGoalProgress' + * Create request for operation 'updateGoalProgress' * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalProgressRequest $put_goal_progress_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalProgress'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalProgressRequest $update_goal_progress_request The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalProgress'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putGoalProgressRequest($employee_id, $goal_id, $put_goal_progress_request, string $contentType = self::CONTENT_TYPES['putGoalProgress'][0]) { + public function updateGoalProgressRequest($employee_id, $goal_id, $update_goal_progress_request, string $contentType = self::CONTENT_TYPES['updateGoalProgress'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, - 'put_goal_progress_request' => $put_goal_progress_request, + 'update_goal_progress_request' => $update_goal_progress_request, ], - methodName: 'putGoalProgress' + methodName: 'updateGoalProgress' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress'; @@ -4913,12 +5113,12 @@ public function putGoalProgressRequest($employee_id, $goal_id, $put_goal_progres ); // for model (json/xml) - if (isset($put_goal_progress_request)) { + if (isset($update_goal_progress_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_goal_progress_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_goal_progress_request)); } else { - $httpBody = is_array($put_goal_progress_request) ? json_encode($put_goal_progress_request) : $put_goal_progress_request; + $httpBody = is_array($update_goal_progress_request) ? json_encode($update_goal_progress_request) : $update_goal_progress_request; } } @@ -4967,40 +5167,40 @@ public function putGoalProgressRequest($employee_id, $goal_id, $put_goal_progres } /** - * Operation putGoalSharedWith + * Operation updateGoalSharing * * Update Goal Sharing * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalSharedWithRequest $put_goal_shared_with_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalSharedWith'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalSharingRequest $update_goal_sharing_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalSharing'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TransformedApiGoal + * @return \BhrSdk\Model\GoalResponse */ - public function putGoalSharedWith($employee_id, $goal_id, $put_goal_shared_with_request, string $contentType = self::CONTENT_TYPES['putGoalSharedWith'][0]) { - list($response) = $this->putGoalSharedWithWithHttpInfo($employee_id, $goal_id, $put_goal_shared_with_request, $contentType); + public function updateGoalSharing($employee_id, $goal_id, $update_goal_sharing_request, string $contentType = self::CONTENT_TYPES['updateGoalSharing'][0]) { + list($response) = $this->updateGoalSharingWithHttpInfo($employee_id, $goal_id, $update_goal_sharing_request, $contentType); return $response; } /** - * Operation putGoalSharedWithWithHttpInfo + * Operation updateGoalSharingWithHttpInfo * * Update Goal Sharing * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalSharedWithRequest $put_goal_shared_with_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalSharedWith'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalSharingRequest $update_goal_sharing_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalSharing'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TransformedApiGoal, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\GoalResponse, HTTP status code, HTTP response headers (array of strings) */ - public function putGoalSharedWithWithHttpInfo($employee_id, $goal_id, $put_goal_shared_with_request, string $contentType = self::CONTENT_TYPES['putGoalSharedWith'][0]) { - $request = $this->putGoalSharedWithRequest($employee_id, $goal_id, $put_goal_shared_with_request, $contentType); + public function updateGoalSharingWithHttpInfo($employee_id, $goal_id, $update_goal_sharing_request, string $contentType = self::CONTENT_TYPES['updateGoalSharing'][0]) { + $request = $this->updateGoalSharingRequest($employee_id, $goal_id, $update_goal_sharing_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -5011,7 +5211,7 @@ public function putGoalSharedWithWithHttpInfo($employee_id, $goal_id, $put_goal_ switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalResponse', $request, $response, ); @@ -5031,27 +5231,27 @@ public function putGoalSharedWithWithHttpInfo($employee_id, $goal_id, $put_goal_ } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TransformedApiGoal', + '\BhrSdk\Model\GoalResponse', $request, $response, ); } /** - * Operation putGoalSharedWithAsync + * Operation updateGoalSharingAsync * * Update Goal Sharing * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalSharedWithRequest $put_goal_shared_with_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalSharedWith'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalSharingRequest $update_goal_sharing_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalSharing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalSharedWithAsync($employee_id, $goal_id, $put_goal_shared_with_request, string $contentType = self::CONTENT_TYPES['putGoalSharedWith'][0]) { - return $this->putGoalSharedWithAsyncWithHttpInfo($employee_id, $goal_id, $put_goal_shared_with_request, $contentType) + public function updateGoalSharingAsync($employee_id, $goal_id, $update_goal_sharing_request, string $contentType = self::CONTENT_TYPES['updateGoalSharing'][0]) { + return $this->updateGoalSharingAsyncWithHttpInfo($employee_id, $goal_id, $update_goal_sharing_request, $contentType) ->then( function ($response) { return $response[0]; @@ -5060,21 +5260,21 @@ function ($response) { } /** - * Operation putGoalSharedWithAsyncWithHttpInfo + * Operation updateGoalSharingAsyncWithHttpInfo * * Update Goal Sharing * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalSharedWithRequest $put_goal_shared_with_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalSharedWith'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalSharingRequest $update_goal_sharing_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalSharing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalSharedWithAsyncWithHttpInfo($employee_id, $goal_id, $put_goal_shared_with_request, string $contentType = self::CONTENT_TYPES['putGoalSharedWith'][0]) { - $returnType = '\BhrSdk\Model\TransformedApiGoal'; - $request = $this->putGoalSharedWithRequest($employee_id, $goal_id, $put_goal_shared_with_request, $contentType); + public function updateGoalSharingAsyncWithHttpInfo($employee_id, $goal_id, $update_goal_sharing_request, string $contentType = self::CONTENT_TYPES['updateGoalSharing'][0]) { + $returnType = '\BhrSdk\Model\GoalResponse'; + $request = $this->updateGoalSharingRequest($employee_id, $goal_id, $update_goal_sharing_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -5108,25 +5308,25 @@ function ($exception) { } /** - * Create request for operation 'putGoalSharedWith' + * Create request for operation 'updateGoalSharing' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalSharedWithRequest $put_goal_shared_with_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalSharedWith'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalSharingRequest $update_goal_sharing_request Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalSharing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putGoalSharedWithRequest($employee_id, $goal_id, $put_goal_shared_with_request, string $contentType = self::CONTENT_TYPES['putGoalSharedWith'][0]) { + public function updateGoalSharingRequest($employee_id, $goal_id, $update_goal_sharing_request, string $contentType = self::CONTENT_TYPES['updateGoalSharing'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, - 'put_goal_shared_with_request' => $put_goal_shared_with_request, + 'update_goal_sharing_request' => $update_goal_sharing_request, ], - methodName: 'putGoalSharedWith' + methodName: 'updateGoalSharing' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith'; @@ -5161,12 +5361,12 @@ public function putGoalSharedWithRequest($employee_id, $goal_id, $put_goal_share ); // for model (json/xml) - if (isset($put_goal_shared_with_request)) { + if (isset($update_goal_sharing_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_goal_shared_with_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_goal_sharing_request)); } else { - $httpBody = is_array($put_goal_shared_with_request) ? json_encode($put_goal_shared_with_request) : $put_goal_shared_with_request; + $httpBody = is_array($update_goal_sharing_request) ? json_encode($update_goal_sharing_request) : $update_goal_sharing_request; } } @@ -5215,42 +5415,42 @@ public function putGoalSharedWithRequest($employee_id, $goal_id, $put_goal_share } /** - * Operation putGoalV1 + * Operation updateGoalV1 * - * Update Goal + * Update Goal (v1) * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\Goal $goal Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV1'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV1 $update_goal_v1 Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails * @deprecated */ - public function putGoalV1($employee_id, $goal_id, $goal, string $contentType = self::CONTENT_TYPES['putGoalV1'][0]) { - list($response) = $this->putGoalV1WithHttpInfo($employee_id, $goal_id, $goal, $contentType); + public function updateGoalV1($employee_id, $goal_id, $update_goal_v1, string $contentType = self::CONTENT_TYPES['updateGoalV1'][0]) { + list($response) = $this->updateGoalV1WithHttpInfo($employee_id, $goal_id, $update_goal_v1, $contentType); return $response; } /** - * Operation putGoalV1WithHttpInfo + * Operation updateGoalV1WithHttpInfo * - * Update Goal + * Update Goal (v1) * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\Goal $goal Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV1'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV1 $update_goal_v1 Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV1'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function putGoalV1WithHttpInfo($employee_id, $goal_id, $goal, string $contentType = self::CONTENT_TYPES['putGoalV1'][0]) { - $request = $this->putGoalV1Request($employee_id, $goal_id, $goal, $contentType); + public function updateGoalV1WithHttpInfo($employee_id, $goal_id, $update_goal_v1, string $contentType = self::CONTENT_TYPES['updateGoalV1'][0]) { + $request = $this->updateGoalV1Request($employee_id, $goal_id, $update_goal_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -5288,21 +5488,21 @@ public function putGoalV1WithHttpInfo($employee_id, $goal_id, $goal, string $con } /** - * Operation putGoalV1Async + * Operation updateGoalV1Async * - * Update Goal + * Update Goal (v1) * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\Goal $goal Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV1'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV1 $update_goal_v1 Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function putGoalV1Async($employee_id, $goal_id, $goal, string $contentType = self::CONTENT_TYPES['putGoalV1'][0]) { - return $this->putGoalV1AsyncWithHttpInfo($employee_id, $goal_id, $goal, $contentType) + public function updateGoalV1Async($employee_id, $goal_id, $update_goal_v1, string $contentType = self::CONTENT_TYPES['updateGoalV1'][0]) { + return $this->updateGoalV1AsyncWithHttpInfo($employee_id, $goal_id, $update_goal_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -5311,22 +5511,22 @@ function ($response) { } /** - * Operation putGoalV1AsyncWithHttpInfo + * Operation updateGoalV1AsyncWithHttpInfo * - * Update Goal + * Update Goal (v1) * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\Goal $goal Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV1'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV1 $update_goal_v1 Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function putGoalV1AsyncWithHttpInfo($employee_id, $goal_id, $goal, string $contentType = self::CONTENT_TYPES['putGoalV1'][0]) { + public function updateGoalV1AsyncWithHttpInfo($employee_id, $goal_id, $update_goal_v1, string $contentType = self::CONTENT_TYPES['updateGoalV1'][0]) { $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; - $request = $this->putGoalV1Request($employee_id, $goal_id, $goal, $contentType); + $request = $this->updateGoalV1Request($employee_id, $goal_id, $update_goal_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -5360,26 +5560,26 @@ function ($exception) { } /** - * Create request for operation 'putGoalV1' + * Create request for operation 'updateGoalV1' * * @param string $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param string $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\Goal $goal Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV1'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV1 $update_goal_v1 Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV1'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function putGoalV1Request($employee_id, $goal_id, $goal, string $contentType = self::CONTENT_TYPES['putGoalV1'][0]) { + public function updateGoalV1Request($employee_id, $goal_id, $update_goal_v1, string $contentType = self::CONTENT_TYPES['updateGoalV1'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, - 'goal' => $goal, + 'update_goal_v1' => $update_goal_v1, ], - methodName: 'putGoalV1' + methodName: 'updateGoalV1' ); $resourcePath = '/api/v1/performance/employees/{employeeId}/goals/{goalId}'; @@ -5414,12 +5614,12 @@ public function putGoalV1Request($employee_id, $goal_id, $goal, string $contentT ); // for model (json/xml) - if (isset($goal)) { + if (isset($update_goal_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($goal)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_goal_v1)); } else { - $httpBody = is_array($goal) ? json_encode($goal) : $goal; + $httpBody = is_array($update_goal_v1) ? json_encode($update_goal_v1) : $update_goal_v1; } } @@ -5468,40 +5668,40 @@ public function putGoalV1Request($employee_id, $goal_id, $goal, string $contentT } /** - * Operation putGoalV11 + * Operation updateGoalV11 * - * Update Goal v1.1 + * Update Goal (v1.1) * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalV11Request $put_goal_v11_request Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV11'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV11Request $update_goal_v11_request Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TransformedApiEmployeeGoalDetails */ - public function putGoalV11($employee_id, $goal_id, $put_goal_v11_request, string $contentType = self::CONTENT_TYPES['putGoalV11'][0]) { - list($response) = $this->putGoalV11WithHttpInfo($employee_id, $goal_id, $put_goal_v11_request, $contentType); + public function updateGoalV11($employee_id, $goal_id, $update_goal_v11_request, string $contentType = self::CONTENT_TYPES['updateGoalV11'][0]) { + list($response) = $this->updateGoalV11WithHttpInfo($employee_id, $goal_id, $update_goal_v11_request, $contentType); return $response; } /** - * Operation putGoalV11WithHttpInfo + * Operation updateGoalV11WithHttpInfo * - * Update Goal v1.1 + * Update Goal (v1.1) * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalV11Request $put_goal_v11_request Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV11'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV11Request $update_goal_v11_request Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TransformedApiEmployeeGoalDetails, HTTP status code, HTTP response headers (array of strings) */ - public function putGoalV11WithHttpInfo($employee_id, $goal_id, $put_goal_v11_request, string $contentType = self::CONTENT_TYPES['putGoalV11'][0]) { - $request = $this->putGoalV11Request($employee_id, $goal_id, $put_goal_v11_request, $contentType); + public function updateGoalV11WithHttpInfo($employee_id, $goal_id, $update_goal_v11_request, string $contentType = self::CONTENT_TYPES['updateGoalV11'][0]) { + $request = $this->updateGoalV11Request($employee_id, $goal_id, $update_goal_v11_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -5539,20 +5739,20 @@ public function putGoalV11WithHttpInfo($employee_id, $goal_id, $put_goal_v11_req } /** - * Operation putGoalV11Async + * Operation updateGoalV11Async * - * Update Goal v1.1 + * Update Goal (v1.1) * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalV11Request $put_goal_v11_request Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV11'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV11Request $update_goal_v11_request Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalV11Async($employee_id, $goal_id, $put_goal_v11_request, string $contentType = self::CONTENT_TYPES['putGoalV11'][0]) { - return $this->putGoalV11AsyncWithHttpInfo($employee_id, $goal_id, $put_goal_v11_request, $contentType) + public function updateGoalV11Async($employee_id, $goal_id, $update_goal_v11_request, string $contentType = self::CONTENT_TYPES['updateGoalV11'][0]) { + return $this->updateGoalV11AsyncWithHttpInfo($employee_id, $goal_id, $update_goal_v11_request, $contentType) ->then( function ($response) { return $response[0]; @@ -5561,21 +5761,21 @@ function ($response) { } /** - * Operation putGoalV11AsyncWithHttpInfo + * Operation updateGoalV11AsyncWithHttpInfo * - * Update Goal v1.1 + * Update Goal (v1.1) * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalV11Request $put_goal_v11_request Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV11'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV11Request $update_goal_v11_request Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putGoalV11AsyncWithHttpInfo($employee_id, $goal_id, $put_goal_v11_request, string $contentType = self::CONTENT_TYPES['putGoalV11'][0]) { + public function updateGoalV11AsyncWithHttpInfo($employee_id, $goal_id, $update_goal_v11_request, string $contentType = self::CONTENT_TYPES['updateGoalV11'][0]) { $returnType = '\BhrSdk\Model\TransformedApiEmployeeGoalDetails'; - $request = $this->putGoalV11Request($employee_id, $goal_id, $put_goal_v11_request, $contentType); + $request = $this->updateGoalV11Request($employee_id, $goal_id, $update_goal_v11_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -5609,25 +5809,25 @@ function ($exception) { } /** - * Create request for operation 'putGoalV11' + * Create request for operation 'updateGoalV11' * * @param int $employee_id employeeId is the employee ID with whom the goal is associated. (required) * @param int $goal_id goalId is the goal ID for the specified employee. (required) - * @param \BhrSdk\Model\PutGoalV11Request $put_goal_v11_request Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putGoalV11'] to see the possible values for this operation + * @param \BhrSdk\Model\UpdateGoalV11Request $update_goal_v11_request Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateGoalV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putGoalV11Request($employee_id, $goal_id, $put_goal_v11_request, string $contentType = self::CONTENT_TYPES['putGoalV11'][0]) { + public function updateGoalV11Request($employee_id, $goal_id, $update_goal_v11_request, string $contentType = self::CONTENT_TYPES['updateGoalV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'goal_id' => $goal_id, - 'put_goal_v11_request' => $put_goal_v11_request, + 'update_goal_v11_request' => $update_goal_v11_request, ], - methodName: 'putGoalV11' + methodName: 'updateGoalV11' ); $resourcePath = '/api/v1_1/performance/employees/{employeeId}/goals/{goalId}'; @@ -5662,12 +5862,12 @@ public function putGoalV11Request($employee_id, $goal_id, $put_goal_v11_request, ); // for model (json/xml) - if (isset($put_goal_v11_request)) { + if (isset($update_goal_v11_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($put_goal_v11_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_goal_v11_request)); } else { - $httpBody = is_array($put_goal_v11_request) ? json_encode($put_goal_v11_request) : $put_goal_v11_request; + $httpBody = is_array($update_goal_v11_request) ? json_encode($update_goal_v11_request) : $update_goal_v11_request; } } diff --git a/lib/Api/HoursApi.php b/lib/Api/HoursApi.php index 7e3cf8ea..53cac73d 100644 --- a/lib/Api/HoursApi.php +++ b/lib/Api/HoursApi.php @@ -79,19 +79,19 @@ class HoursApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addTimeTrackingBulk' => [ + 'createOrUpdateTimeTrackingHourRecords' => [ 'application/json', ], - 'addTimeTrackingHourRecord' => [ + 'createTimeTrackingHourRecord' => [ 'application/json', ], - 'deleteTimeTrackingById' => [ + 'deleteTimeTrackingHourRecord' => [ 'application/json', ], - 'editTimeTrackingRecord' => [ + 'getTimeTrackingRecord' => [ 'application/json', ], - 'getTimeTrackingRecord' => [ + 'updateTimeTrackingRecord' => [ 'application/json', ], ]; @@ -143,36 +143,36 @@ public function getConfig() { } /** - * Operation addTimeTrackingBulk + * Operation createOrUpdateTimeTrackingHourRecords * * Create or Update Hour Records * * @param \BhrSdk\Model\TimeTrackingRecord[] $time_tracking_record time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingBulk'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingBulkResponseSchema + * @return \BhrSdk\Model\TimeTrackingBulkResponseSchema|\BhrSdk\Model\ProblemDetailsResponse */ - public function addTimeTrackingBulk($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingBulk'][0]) { - list($response) = $this->addTimeTrackingBulkWithHttpInfo($time_tracking_record, $contentType); + public function createOrUpdateTimeTrackingHourRecords($time_tracking_record, string $contentType = self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'][0]) { + list($response) = $this->createOrUpdateTimeTrackingHourRecordsWithHttpInfo($time_tracking_record, $contentType); return $response; } /** - * Operation addTimeTrackingBulkWithHttpInfo + * Operation createOrUpdateTimeTrackingHourRecordsWithHttpInfo * * Create or Update Hour Records * * @param \BhrSdk\Model\TimeTrackingRecord[] $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingBulk'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingBulkResponseSchema, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingBulkResponseSchema|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addTimeTrackingBulkWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingBulk'][0]) { - $request = $this->addTimeTrackingBulkRequest($time_tracking_record, $contentType); + public function createOrUpdateTimeTrackingHourRecordsWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'][0]) { + $request = $this->createOrUpdateTimeTrackingHourRecordsRequest($time_tracking_record, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -187,6 +187,12 @@ public function addTimeTrackingBulkWithHttpInfo($time_tracking_record, string $c $request, $response, ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -210,18 +216,18 @@ public function addTimeTrackingBulkWithHttpInfo($time_tracking_record, string $c } /** - * Operation addTimeTrackingBulkAsync + * Operation createOrUpdateTimeTrackingHourRecordsAsync * * Create or Update Hour Records * * @param \BhrSdk\Model\TimeTrackingRecord[] $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingBulk'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimeTrackingBulkAsync($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingBulk'][0]) { - return $this->addTimeTrackingBulkAsyncWithHttpInfo($time_tracking_record, $contentType) + public function createOrUpdateTimeTrackingHourRecordsAsync($time_tracking_record, string $contentType = self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'][0]) { + return $this->createOrUpdateTimeTrackingHourRecordsAsyncWithHttpInfo($time_tracking_record, $contentType) ->then( function ($response) { return $response[0]; @@ -230,19 +236,19 @@ function ($response) { } /** - * Operation addTimeTrackingBulkAsyncWithHttpInfo + * Operation createOrUpdateTimeTrackingHourRecordsAsyncWithHttpInfo * * Create or Update Hour Records * * @param \BhrSdk\Model\TimeTrackingRecord[] $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingBulk'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimeTrackingBulkAsyncWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingBulk'][0]) { + public function createOrUpdateTimeTrackingHourRecordsAsyncWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'][0]) { $returnType = '\BhrSdk\Model\TimeTrackingBulkResponseSchema'; - $request = $this->addTimeTrackingBulkRequest($time_tracking_record, $contentType); + $request = $this->createOrUpdateTimeTrackingHourRecordsRequest($time_tracking_record, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -276,21 +282,21 @@ function ($exception) { } /** - * Create request for operation 'addTimeTrackingBulk' + * Create request for operation 'createOrUpdateTimeTrackingHourRecords' * * @param \BhrSdk\Model\TimeTrackingRecord[] $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingBulk'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTimeTrackingBulkRequest($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingBulk'][0]) { + public function createOrUpdateTimeTrackingHourRecordsRequest($time_tracking_record, string $contentType = self::CONTENT_TYPES['createOrUpdateTimeTrackingHourRecords'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'time_tracking_record' => $time_tracking_record, ], - methodName: 'addTimeTrackingBulk' + methodName: 'createOrUpdateTimeTrackingHourRecords' ); $resourcePath = '/api/v1/timetracking/record'; @@ -362,36 +368,36 @@ public function addTimeTrackingBulkRequest($time_tracking_record, string $conten } /** - * Operation addTimeTrackingHourRecord + * Operation createTimeTrackingHourRecord * * Create Hour Record * * @param \BhrSdk\Model\TimeTrackingRecord $time_tracking_record time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingHourRecord'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingIdResponseSchema|mixed + * @return \BhrSdk\Model\TimeTrackingIdResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function addTimeTrackingHourRecord($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingHourRecord'][0]) { - list($response) = $this->addTimeTrackingHourRecordWithHttpInfo($time_tracking_record, $contentType); + public function createTimeTrackingHourRecord($time_tracking_record, string $contentType = self::CONTENT_TYPES['createTimeTrackingHourRecord'][0]) { + list($response) = $this->createTimeTrackingHourRecordWithHttpInfo($time_tracking_record, $contentType); return $response; } /** - * Operation addTimeTrackingHourRecordWithHttpInfo + * Operation createTimeTrackingHourRecordWithHttpInfo * * Create Hour Record * * @param \BhrSdk\Model\TimeTrackingRecord $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingHourRecord'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingIdResponseSchema|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingIdResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addTimeTrackingHourRecordWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingHourRecord'][0]) { - $request = $this->addTimeTrackingHourRecordRequest($time_tracking_record, $contentType); + public function createTimeTrackingHourRecordWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['createTimeTrackingHourRecord'][0]) { + $request = $this->createTimeTrackingHourRecordRequest($time_tracking_record, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -408,7 +414,13 @@ public function addTimeTrackingHourRecordWithHttpInfo($time_tracking_record, str ); case 400: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -435,18 +447,18 @@ public function addTimeTrackingHourRecordWithHttpInfo($time_tracking_record, str } /** - * Operation addTimeTrackingHourRecordAsync + * Operation createTimeTrackingHourRecordAsync * * Create Hour Record * * @param \BhrSdk\Model\TimeTrackingRecord $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingHourRecord'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimeTrackingHourRecordAsync($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingHourRecord'][0]) { - return $this->addTimeTrackingHourRecordAsyncWithHttpInfo($time_tracking_record, $contentType) + public function createTimeTrackingHourRecordAsync($time_tracking_record, string $contentType = self::CONTENT_TYPES['createTimeTrackingHourRecord'][0]) { + return $this->createTimeTrackingHourRecordAsyncWithHttpInfo($time_tracking_record, $contentType) ->then( function ($response) { return $response[0]; @@ -455,19 +467,19 @@ function ($response) { } /** - * Operation addTimeTrackingHourRecordAsyncWithHttpInfo + * Operation createTimeTrackingHourRecordAsyncWithHttpInfo * * Create Hour Record * * @param \BhrSdk\Model\TimeTrackingRecord $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingHourRecord'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimeTrackingHourRecordAsyncWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingHourRecord'][0]) { + public function createTimeTrackingHourRecordAsyncWithHttpInfo($time_tracking_record, string $contentType = self::CONTENT_TYPES['createTimeTrackingHourRecord'][0]) { $returnType = '\BhrSdk\Model\TimeTrackingIdResponseSchema'; - $request = $this->addTimeTrackingHourRecordRequest($time_tracking_record, $contentType); + $request = $this->createTimeTrackingHourRecordRequest($time_tracking_record, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -501,21 +513,21 @@ function ($exception) { } /** - * Create request for operation 'addTimeTrackingHourRecord' + * Create request for operation 'createTimeTrackingHourRecord' * * @param \BhrSdk\Model\TimeTrackingRecord $time_tracking_record (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimeTrackingHourRecord'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTimeTrackingHourRecordRequest($time_tracking_record, string $contentType = self::CONTENT_TYPES['addTimeTrackingHourRecord'][0]) { + public function createTimeTrackingHourRecordRequest($time_tracking_record, string $contentType = self::CONTENT_TYPES['createTimeTrackingHourRecord'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'time_tracking_record' => $time_tracking_record, ], - methodName: 'addTimeTrackingHourRecord' + methodName: 'createTimeTrackingHourRecord' ); $resourcePath = '/api/v1/timetracking/add'; @@ -587,36 +599,36 @@ public function addTimeTrackingHourRecordRequest($time_tracking_record, string $ } /** - * Operation deleteTimeTrackingById + * Operation deleteTimeTrackingHourRecord * * Delete Hour Record * * @param string $id The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingDeleteResponseSchema|mixed + * @return \BhrSdk\Model\TimeTrackingDeleteResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function deleteTimeTrackingById($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingById'][0]) { - list($response) = $this->deleteTimeTrackingByIdWithHttpInfo($id, $contentType); + public function deleteTimeTrackingHourRecord($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingHourRecord'][0]) { + list($response) = $this->deleteTimeTrackingHourRecordWithHttpInfo($id, $contentType); return $response; } /** - * Operation deleteTimeTrackingByIdWithHttpInfo + * Operation deleteTimeTrackingHourRecordWithHttpInfo * * Delete Hour Record * * @param string $id The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingDeleteResponseSchema|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingDeleteResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTimeTrackingByIdWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingById'][0]) { - $request = $this->deleteTimeTrackingByIdRequest($id, $contentType); + public function deleteTimeTrackingHourRecordWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingHourRecord'][0]) { + $request = $this->deleteTimeTrackingHourRecordRequest($id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -625,7 +637,7 @@ public function deleteTimeTrackingByIdWithHttpInfo($id, string $contentType = se $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: + case 200: return ApiHelper::handleResponseWithDataType( '\BhrSdk\Model\TimeTrackingDeleteResponseSchema', $request, @@ -633,7 +645,13 @@ public function deleteTimeTrackingByIdWithHttpInfo($id, string $contentType = se ); case 400: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -660,18 +678,18 @@ public function deleteTimeTrackingByIdWithHttpInfo($id, string $contentType = se } /** - * Operation deleteTimeTrackingByIdAsync + * Operation deleteTimeTrackingHourRecordAsync * * Delete Hour Record * * @param string $id The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimeTrackingByIdAsync($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingById'][0]) { - return $this->deleteTimeTrackingByIdAsyncWithHttpInfo($id, $contentType) + public function deleteTimeTrackingHourRecordAsync($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingHourRecord'][0]) { + return $this->deleteTimeTrackingHourRecordAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -680,19 +698,19 @@ function ($response) { } /** - * Operation deleteTimeTrackingByIdAsyncWithHttpInfo + * Operation deleteTimeTrackingHourRecordAsyncWithHttpInfo * * Delete Hour Record * * @param string $id The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimeTrackingByIdAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingById'][0]) { + public function deleteTimeTrackingHourRecordAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingHourRecord'][0]) { $returnType = '\BhrSdk\Model\TimeTrackingDeleteResponseSchema'; - $request = $this->deleteTimeTrackingByIdRequest($id, $contentType); + $request = $this->deleteTimeTrackingHourRecordRequest($id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -726,21 +744,21 @@ function ($exception) { } /** - * Create request for operation 'deleteTimeTrackingById' + * Create request for operation 'deleteTimeTrackingHourRecord' * * @param string $id The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimeTrackingHourRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTimeTrackingByIdRequest($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingById'][0]) { + public function deleteTimeTrackingHourRecordRequest($id, string $contentType = self::CONTENT_TYPES['deleteTimeTrackingHourRecord'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, ], - methodName: 'deleteTimeTrackingById' + methodName: 'deleteTimeTrackingHourRecord' ); $resourcePath = '/api/v1/timetracking/delete/{id}'; @@ -811,36 +829,36 @@ public function deleteTimeTrackingByIdRequest($id, string $contentType = self::C } /** - * Operation editTimeTrackingRecord + * Operation getTimeTrackingRecord * - * Update Hour Record + * Get Time Tracking Record * - * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema adjust_time_tracking_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['editTimeTrackingRecord'] to see the possible values for this operation + * @param string $id The time tracking record ID used to originally create the record. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingIdResponseSchema|mixed + * @return \BhrSdk\Model\TimeTrackingRecordSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function editTimeTrackingRecord($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['editTimeTrackingRecord'][0]) { - list($response) = $this->editTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request_schema, $contentType); + public function getTimeTrackingRecord($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { + list($response) = $this->getTimeTrackingRecordWithHttpInfo($id, $contentType); return $response; } /** - * Operation editTimeTrackingRecordWithHttpInfo + * Operation getTimeTrackingRecordWithHttpInfo * - * Update Hour Record + * Get Time Tracking Record * - * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['editTimeTrackingRecord'] to see the possible values for this operation + * @param string $id The time tracking record ID used to originally create the record. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingIdResponseSchema|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingRecordSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function editTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['editTimeTrackingRecord'][0]) { - $request = $this->editTimeTrackingRecordRequest($adjust_time_tracking_request_schema, $contentType); + public function getTimeTrackingRecordWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { + $request = $this->getTimeTrackingRecordRequest($id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -849,15 +867,33 @@ public function editTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: + case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingIdResponseSchema', + '\BhrSdk\Model\TimeTrackingRecordSchema', $request, $response, ); case 400: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -877,25 +913,25 @@ public function editTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingIdResponseSchema', + '\BhrSdk\Model\TimeTrackingRecordSchema', $request, $response, ); } /** - * Operation editTimeTrackingRecordAsync + * Operation getTimeTrackingRecordAsync * - * Update Hour Record + * Get Time Tracking Record * - * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['editTimeTrackingRecord'] to see the possible values for this operation + * @param string $id The time tracking record ID used to originally create the record. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function editTimeTrackingRecordAsync($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['editTimeTrackingRecord'][0]) { - return $this->editTimeTrackingRecordAsyncWithHttpInfo($adjust_time_tracking_request_schema, $contentType) + public function getTimeTrackingRecordAsync($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { + return $this->getTimeTrackingRecordAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -904,19 +940,19 @@ function ($response) { } /** - * Operation editTimeTrackingRecordAsyncWithHttpInfo + * Operation getTimeTrackingRecordAsyncWithHttpInfo * - * Update Hour Record + * Get Time Tracking Record * - * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['editTimeTrackingRecord'] to see the possible values for this operation + * @param string $id The time tracking record ID used to originally create the record. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function editTimeTrackingRecordAsyncWithHttpInfo($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['editTimeTrackingRecord'][0]) { - $returnType = '\BhrSdk\Model\TimeTrackingIdResponseSchema'; - $request = $this->editTimeTrackingRecordRequest($adjust_time_tracking_request_schema, $contentType); + public function getTimeTrackingRecordAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingRecordSchema'; + $request = $this->getTimeTrackingRecordRequest($id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -950,47 +986,46 @@ function ($exception) { } /** - * Create request for operation 'editTimeTrackingRecord' + * Create request for operation 'getTimeTrackingRecord' * - * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['editTimeTrackingRecord'] to see the possible values for this operation + * @param string $id The time tracking record ID used to originally create the record. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function editTimeTrackingRecordRequest($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['editTimeTrackingRecord'][0]) { + public function getTimeTrackingRecordRequest($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'adjust_time_tracking_request_schema' => $adjust_time_tracking_request_schema, + 'id' => $id, ], - methodName: 'editTimeTrackingRecord' + methodName: 'getTimeTrackingRecord' ); - $resourcePath = '/api/v1/timetracking/adjust'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + $resourcePath = '/api/v1/timetracking/record/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, $multipart ); - // for model (json/xml) - if (isset($adjust_time_tracking_request_schema)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($adjust_time_tracking_request_schema)); - } else { - $httpBody = is_array($adjust_time_tracking_request_schema) ? json_encode($adjust_time_tracking_request_schema) : $adjust_time_tracking_request_schema; - } - } - // Authentication methods // Basic authentication @@ -1028,7 +1063,7 @@ public function editTimeTrackingRecordRequest($adjust_time_tracking_request_sche $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1036,36 +1071,36 @@ public function editTimeTrackingRecordRequest($adjust_time_tracking_request_sche } /** - * Operation getTimeTrackingRecord + * Operation updateTimeTrackingRecord * - * Get Hour Record + * Update Hour Record * - * @param string $id {id} is the time tracking ID used to originally create the record. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema adjust_time_tracking_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeTrackingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingRecordSchema|mixed + * @return \BhrSdk\Model\TimeTrackingIdResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getTimeTrackingRecord($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { - list($response) = $this->getTimeTrackingRecordWithHttpInfo($id, $contentType); + public function updateTimeTrackingRecord($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['updateTimeTrackingRecord'][0]) { + list($response) = $this->updateTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request_schema, $contentType); return $response; } /** - * Operation getTimeTrackingRecordWithHttpInfo + * Operation updateTimeTrackingRecordWithHttpInfo * - * Get Hour Record + * Update Hour Record * - * @param string $id {id} is the time tracking ID used to originally create the record. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeTrackingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingRecordSchema|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingIdResponseSchema|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getTimeTrackingRecordWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { - $request = $this->getTimeTrackingRecordRequest($id, $contentType); + public function updateTimeTrackingRecordWithHttpInfo($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['updateTimeTrackingRecord'][0]) { + $request = $this->updateTimeTrackingRecordRequest($adjust_time_tracking_request_schema, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1074,15 +1109,21 @@ public function getTimeTrackingRecordWithHttpInfo($id, string $contentType = sel $statusCode = $response->getStatusCode(); switch($statusCode) { - case 200: + case 201: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingRecordSchema', + '\BhrSdk\Model\TimeTrackingIdResponseSchema', $request, $response, ); case 400: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -1102,25 +1143,25 @@ public function getTimeTrackingRecordWithHttpInfo($id, string $contentType = sel } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingRecordSchema', + '\BhrSdk\Model\TimeTrackingIdResponseSchema', $request, $response, ); } /** - * Operation getTimeTrackingRecordAsync + * Operation updateTimeTrackingRecordAsync * - * Get Hour Record + * Update Hour Record * - * @param string $id {id} is the time tracking ID used to originally create the record. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeTrackingRecordAsync($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { - return $this->getTimeTrackingRecordAsyncWithHttpInfo($id, $contentType) + public function updateTimeTrackingRecordAsync($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['updateTimeTrackingRecord'][0]) { + return $this->updateTimeTrackingRecordAsyncWithHttpInfo($adjust_time_tracking_request_schema, $contentType) ->then( function ($response) { return $response[0]; @@ -1129,19 +1170,19 @@ function ($response) { } /** - * Operation getTimeTrackingRecordAsyncWithHttpInfo + * Operation updateTimeTrackingRecordAsyncWithHttpInfo * - * Get Hour Record + * Update Hour Record * - * @param string $id {id} is the time tracking ID used to originally create the record. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeTrackingRecordAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { - $returnType = '\BhrSdk\Model\TimeTrackingRecordSchema'; - $request = $this->getTimeTrackingRecordRequest($id, $contentType); + public function updateTimeTrackingRecordAsyncWithHttpInfo($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['updateTimeTrackingRecord'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingIdResponseSchema'; + $request = $this->updateTimeTrackingRecordRequest($adjust_time_tracking_request_schema, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1175,46 +1216,47 @@ function ($exception) { } /** - * Create request for operation 'getTimeTrackingRecord' + * Create request for operation 'updateTimeTrackingRecord' * - * @param string $id {id} is the time tracking ID used to originally create the record. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeTrackingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\AdjustTimeTrackingRequestSchema $adjust_time_tracking_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeTrackingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTimeTrackingRecordRequest($id, string $contentType = self::CONTENT_TYPES['getTimeTrackingRecord'][0]) { + public function updateTimeTrackingRecordRequest($adjust_time_tracking_request_schema, string $contentType = self::CONTENT_TYPES['updateTimeTrackingRecord'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'id' => $id, + 'adjust_time_tracking_request_schema' => $adjust_time_tracking_request_schema, ], - methodName: 'getTimeTrackingRecord' + methodName: 'updateTimeTrackingRecord' ); - $resourcePath = '/api/v1/timetracking/record/{id}'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/timetracking/adjust'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue((string) $id), - $resourcePath - ); - } - $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, $multipart ); + // for model (json/xml) + if (isset($adjust_time_tracking_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($adjust_time_tracking_request_schema)); + } else { + $httpBody = is_array($adjust_time_tracking_request_schema) ? json_encode($adjust_time_tracking_request_schema) : $adjust_time_tracking_request_schema; + } + } + // Authentication methods // Basic authentication @@ -1252,7 +1294,7 @@ public function getTimeTrackingRecordRequest($id, string $contentType = self::CO $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody diff --git a/lib/Api/LastChangeInformationApi.php b/lib/Api/LastChangeInformationApi.php index c38140f5..61d1632b 100644 --- a/lib/Api/LastChangeInformationApi.php +++ b/lib/Api/LastChangeInformationApi.php @@ -133,15 +133,15 @@ public function getConfig() { /** * Operation getChangedEmployeeIds * - * Get Updated Employee IDs + * Get Changed Employee IDs * - * @param string $since URL encoded iso8601 timestamp (required) - * @param string|null $type Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" (optional) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + * @param string|null $type Filter by change type. If omitted, all change types are returned. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeIds'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ChangedEmployeeIdsResponse */ public function getChangedEmployeeIds($since, $type = null, string $contentType = self::CONTENT_TYPES['getChangedEmployeeIds'][0]) { list($response) = $this->getChangedEmployeeIdsWithHttpInfo($since, $type, $contentType); @@ -151,15 +151,15 @@ public function getChangedEmployeeIds($since, $type = null, string $contentType /** * Operation getChangedEmployeeIdsWithHttpInfo * - * Get Updated Employee IDs + * Get Changed Employee IDs * - * @param string $since URL encoded iso8601 timestamp (required) - * @param string|null $type Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" (optional) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + * @param string|null $type Filter by change type. If omitted, all change types are returned. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeIds'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\ChangedEmployeeIdsResponse, HTTP status code, HTTP response headers (array of strings) */ public function getChangedEmployeeIdsWithHttpInfo($since, $type = null, string $contentType = self::CONTENT_TYPES['getChangedEmployeeIds'][0]) { $request = $this->getChangedEmployeeIdsRequest($since, $type, $contentType); @@ -170,8 +170,30 @@ public function getChangedEmployeeIdsWithHttpInfo($since, $type = null, string $ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ChangedEmployeeIdsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\ChangedEmployeeIdsResponse', $request, $response, ); @@ -180,10 +202,10 @@ public function getChangedEmployeeIdsWithHttpInfo($since, $type = null, string $ /** * Operation getChangedEmployeeIdsAsync * - * Get Updated Employee IDs + * Get Changed Employee IDs * - * @param string $since URL encoded iso8601 timestamp (required) - * @param string|null $type Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" (optional) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + * @param string|null $type Filter by change type. If omitted, all change types are returned. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeIds'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -201,27 +223,29 @@ function ($response) { /** * Operation getChangedEmployeeIdsAsyncWithHttpInfo * - * Get Updated Employee IDs + * Get Changed Employee IDs * - * @param string $since URL encoded iso8601 timestamp (required) - * @param string|null $type Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" (optional) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + * @param string|null $type Filter by change type. If omitted, all change types are returned. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeIds'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function getChangedEmployeeIdsAsyncWithHttpInfo($since, $type = null, string $contentType = self::CONTENT_TYPES['getChangedEmployeeIds'][0]) { - + $returnType = '\BhrSdk\Model\ChangedEmployeeIdsResponse'; $request = $this->getChangedEmployeeIdsRequest($since, $type, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -246,8 +270,8 @@ function ($exception) { /** * Create request for operation 'getChangedEmployeeIds' * - * @param string $since URL encoded iso8601 timestamp (required) - * @param string|null $type Use one of these in the {type} variable in the URL: \"inserted\", \"updated\", \"deleted\" (optional) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + * @param string|null $type Filter by change type. If omitted, all change types are returned. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeIds'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -288,7 +312,7 @@ public function getChangedEmployeeIdsRequest($since, $type = null, string $conte } $headers = $this->headerSelector->selectHeaders( - ['application/xml', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); diff --git a/lib/Api/LocationsApi.php b/lib/Api/LocationsApi.php new file mode 100644 index 00000000..db01ecb7 --- /dev/null +++ b/lib/Api/LocationsApi.php @@ -0,0 +1,1393 @@ +<?php +declare(strict_types=1); +/** + * LocationsApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * LocationsApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class LocationsApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'createLocation' => [ + 'application/json', + ], + 'deleteLocation' => [ + 'application/json', + ], + 'getLocation' => [ + 'application/json', + ], + 'getLocations' => [ + 'application/json', + ], + 'updateLocation' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation createLocation + * + * Create a job location + * + * @param \BhrSdk\Model\CreateLocationRequest $create_location_request create_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createLocation($create_location_request, string $contentType = self::CONTENT_TYPES['createLocation'][0]) { + list($response) = $this->createLocationWithHttpInfo($create_location_request, $contentType); + return $response; + } + + /** + * Operation createLocationWithHttpInfo + * + * Create a job location + * + * @param \BhrSdk\Model\CreateLocationRequest $create_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createLocationWithHttpInfo($create_location_request, string $contentType = self::CONTENT_TYPES['createLocation'][0]) { + $request = $this->createLocationRequest($create_location_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + } + + /** + * Operation createLocationAsync + * + * Create a job location + * + * @param \BhrSdk\Model\CreateLocationRequest $create_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createLocationAsync($create_location_request, string $contentType = self::CONTENT_TYPES['createLocation'][0]) { + return $this->createLocationAsyncWithHttpInfo($create_location_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createLocationAsyncWithHttpInfo + * + * Create a job location + * + * @param \BhrSdk\Model\CreateLocationRequest $create_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createLocationAsyncWithHttpInfo($create_location_request, string $contentType = self::CONTENT_TYPES['createLocation'][0]) { + $returnType = '\BhrSdk\Model\LocationResponseObject'; + $request = $this->createLocationRequest($create_location_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createLocation' + * + * @param \BhrSdk\Model\CreateLocationRequest $create_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createLocationRequest($create_location_request, string $contentType = self::CONTENT_TYPES['createLocation'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'create_location_request' => $create_location_request, + ], + methodName: 'createLocation' + ); + + $resourcePath = '/api/v1/hris/org/locations'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_location_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_location_request)); + } else { + $httpBody = is_array($create_location_request) ? json_encode($create_location_request) : $create_location_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteLocation + * + * Delete a job location + * + * @param string $id The ID of the location to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteLocation($id, string $contentType = self::CONTENT_TYPES['deleteLocation'][0]) { + list($response) = $this->deleteLocationWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteLocationWithHttpInfo + * + * Delete a job location + * + * @param string $id The ID of the location to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteLocationWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteLocation'][0]) { + $request = $this->deleteLocationRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteLocationAsync + * + * Delete a job location + * + * @param string $id The ID of the location to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteLocationAsync($id, string $contentType = self::CONTENT_TYPES['deleteLocation'][0]) { + return $this->deleteLocationAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteLocationAsyncWithHttpInfo + * + * Delete a job location + * + * @param string $id The ID of the location to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteLocationAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteLocation'][0]) { + + $request = $this->deleteLocationRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteLocation' + * + * @param string $id The ID of the location to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteLocationRequest($id, string $contentType = self::CONTENT_TYPES['deleteLocation'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteLocation' + ); + + $resourcePath = '/api/v1/hris/org/locations/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getLocation + * + * Get a job location + * + * @param string $id The ID of the location (required) + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getLocation($id, $expand = null, string $contentType = self::CONTENT_TYPES['getLocation'][0]) { + list($response) = $this->getLocationWithHttpInfo($id, $expand, $contentType); + return $response; + } + + /** + * Operation getLocationWithHttpInfo + * + * Get a job location + * + * @param string $id The ID of the location (required) + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getLocationWithHttpInfo($id, $expand = null, string $contentType = self::CONTENT_TYPES['getLocation'][0]) { + $request = $this->getLocationRequest($id, $expand, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + } + + /** + * Operation getLocationAsync + * + * Get a job location + * + * @param string $id The ID of the location (required) + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLocationAsync($id, $expand = null, string $contentType = self::CONTENT_TYPES['getLocation'][0]) { + return $this->getLocationAsyncWithHttpInfo($id, $expand, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLocationAsyncWithHttpInfo + * + * Get a job location + * + * @param string $id The ID of the location (required) + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLocationAsyncWithHttpInfo($id, $expand = null, string $contentType = self::CONTENT_TYPES['getLocation'][0]) { + $returnType = '\BhrSdk\Model\LocationResponseObject'; + $request = $this->getLocationRequest($id, $expand, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getLocation' + * + * @param string $id The ID of the location (required) + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getLocationRequest($id, $expand = null, string $contentType = self::CONTENT_TYPES['getLocation'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'getLocation' + ); + + $resourcePath = '/api/v1/hris/org/locations/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'expand' => ['value' => $expand, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => false], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getLocations + * + * List job locations + * + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 0) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation (optional, default to '') + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocations'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\PagedLocationResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getLocations($page_size = 500, $page = 0, $sort = '', $select = '', $filter = '', $expand = null, string $contentType = self::CONTENT_TYPES['getLocations'][0]) { + list($response) = $this->getLocationsWithHttpInfo($page_size, $page, $sort, $select, $filter, $expand, $contentType); + return $response; + } + + /** + * Operation getLocationsWithHttpInfo + * + * List job locations + * + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 0) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation (optional, default to '') + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocations'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\PagedLocationResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getLocationsWithHttpInfo($page_size = 500, $page = 0, $sort = '', $select = '', $filter = '', $expand = null, string $contentType = self::CONTENT_TYPES['getLocations'][0]) { + $request = $this->getLocationsRequest($page_size, $page, $sort, $select, $filter, $expand, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\PagedLocationResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 429: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\PagedLocationResponse', + $request, + $response, + ); + } + + /** + * Operation getLocationsAsync + * + * List job locations + * + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 0) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation (optional, default to '') + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLocationsAsync($page_size = 500, $page = 0, $sort = '', $select = '', $filter = '', $expand = null, string $contentType = self::CONTENT_TYPES['getLocations'][0]) { + return $this->getLocationsAsyncWithHttpInfo($page_size, $page, $sort, $select, $filter, $expand, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLocationsAsyncWithHttpInfo + * + * List job locations + * + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 0) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation (optional, default to '') + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLocationsAsyncWithHttpInfo($page_size = 500, $page = 0, $sort = '', $select = '', $filter = '', $expand = null, string $contentType = self::CONTENT_TYPES['getLocations'][0]) { + $returnType = '\BhrSdk\Model\PagedLocationResponse'; + $request = $this->getLocationsRequest($page_size, $page, $sort, $select, $filter, $expand, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getLocations' + * + * @param int|null $page_size The number of items to return per page. (optional, default to 500) + * @param int|null $page The page number to retrieve. (optional, default to 0) + * @param string|null $sort Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $select Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt (optional, default to '') + * @param string|null $filter Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation (optional, default to '') + * @param string[]|null $expand Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getLocations'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getLocationsRequest($page_size = 500, $page = 0, $sort = '', $select = '', $filter = '', $expand = null, string $contentType = self::CONTENT_TYPES['getLocations'][0]) { + + $resourcePath = '/api/v1/hris/org/locations'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'select' => ['value' => $select, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'expand' => ['value' => $expand, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => false], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateLocation + * + * Update a job location + * + * @param string $id The ID of the location to update (required) + * @param \BhrSdk\Model\UpdateLocationRequest $update_location_request update_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function updateLocation($id, $update_location_request, string $contentType = self::CONTENT_TYPES['updateLocation'][0]) { + list($response) = $this->updateLocationWithHttpInfo($id, $update_location_request, $contentType); + return $response; + } + + /** + * Operation updateLocationWithHttpInfo + * + * Update a job location + * + * @param string $id The ID of the location to update (required) + * @param \BhrSdk\Model\UpdateLocationRequest $update_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateLocation'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\LocationResponseObject|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateLocationWithHttpInfo($id, $update_location_request, string $contentType = self::CONTENT_TYPES['updateLocation'][0]) { + $request = $this->updateLocationRequest($id, $update_location_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LocationResponseObject', + $request, + $response, + ); + } + + /** + * Operation updateLocationAsync + * + * Update a job location + * + * @param string $id The ID of the location to update (required) + * @param \BhrSdk\Model\UpdateLocationRequest $update_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateLocationAsync($id, $update_location_request, string $contentType = self::CONTENT_TYPES['updateLocation'][0]) { + return $this->updateLocationAsyncWithHttpInfo($id, $update_location_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateLocationAsyncWithHttpInfo + * + * Update a job location + * + * @param string $id The ID of the location to update (required) + * @param \BhrSdk\Model\UpdateLocationRequest $update_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateLocationAsyncWithHttpInfo($id, $update_location_request, string $contentType = self::CONTENT_TYPES['updateLocation'][0]) { + $returnType = '\BhrSdk\Model\LocationResponseObject'; + $request = $this->updateLocationRequest($id, $update_location_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateLocation' + * + * @param string $id The ID of the location to update (required) + * @param \BhrSdk\Model\UpdateLocationRequest $update_location_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateLocation'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateLocationRequest($id, $update_location_request, string $contentType = self::CONTENT_TYPES['updateLocation'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'update_location_request' => $update_location_request, + ], + methodName: 'updateLocation' + ); + + $resourcePath = '/api/v1/hris/org/locations/{id}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_location_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_location_request)); + } else { + $httpBody = is_array($update_location_request) ? json_encode($update_location_request) : $update_location_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/LoginApi.php b/lib/Api/LoginApi.php index 35d7d4a2..7231395c 100644 --- a/lib/Api/LoginApi.php +++ b/lib/Api/LoginApi.php @@ -133,42 +133,46 @@ public function getConfig() { /** * Operation login * - * User Login + * Login * + * @param string $application_key The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) + * @param string $user The user's email address or username. (required) + * @param string $password The user's password. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $application_key application_key (optional) - * @param string|null $user user (optional) - * @param string|null $password password (optional) + * @param string|null $format When set to `json`, forces a JSON response regardless of the `Accept` header. (optional) + * @param string|null $device_id Optional device identifier. When provided, the generated API key is associated with this device. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['login'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\LoginResponse|\BhrSdk\Model\LoginFailureResponse|\BhrSdk\Model\LoginFailureResponse * @deprecated */ - public function login($accept_header_parameter = null, $application_key = null, $user = null, $password = null, string $contentType = self::CONTENT_TYPES['login'][0]) { - list($response) = $this->loginWithHttpInfo($accept_header_parameter, $application_key, $user, $password, $contentType); + public function login($application_key, $user, $password, $accept_header_parameter = null, $format = null, $device_id = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + list($response) = $this->loginWithHttpInfo($application_key, $user, $password, $accept_header_parameter, $format, $device_id, $contentType); return $response; } /** * Operation loginWithHttpInfo * - * User Login + * Login * + * @param string $application_key The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) + * @param string $user The user's email address or username. (required) + * @param string $password The user's password. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $application_key (optional) - * @param string|null $user (optional) - * @param string|null $password (optional) + * @param string|null $format When set to `json`, forces a JSON response regardless of the `Accept` header. (optional) + * @param string|null $device_id Optional device identifier. When provided, the generated API key is associated with this device. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['login'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\LoginResponse|\BhrSdk\Model\LoginFailureResponse|\BhrSdk\Model\LoginFailureResponse, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function loginWithHttpInfo($accept_header_parameter = null, $application_key = null, $user = null, $password = null, string $contentType = self::CONTENT_TYPES['login'][0]) { - $request = $this->loginRequest($accept_header_parameter, $application_key, $user, $password, $contentType); + public function loginWithHttpInfo($application_key, $user, $password, $accept_header_parameter = null, $format = null, $device_id = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + $request = $this->loginRequest($application_key, $user, $password, $accept_header_parameter, $format, $device_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -176,8 +180,42 @@ public function loginWithHttpInfo($accept_header_parameter = null, $application_ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LoginResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LoginFailureResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\LoginFailureResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\LoginResponse', $request, $response, ); @@ -186,20 +224,22 @@ public function loginWithHttpInfo($accept_header_parameter = null, $application_ /** * Operation loginAsync * - * User Login + * Login * + * @param string $application_key The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) + * @param string $user The user's email address or username. (required) + * @param string $password The user's password. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $application_key (optional) - * @param string|null $user (optional) - * @param string|null $password (optional) + * @param string|null $format When set to `json`, forces a JSON response regardless of the `Accept` header. (optional) + * @param string|null $device_id Optional device identifier. When provided, the generated API key is associated with this device. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['login'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function loginAsync($accept_header_parameter = null, $application_key = null, $user = null, $password = null, string $contentType = self::CONTENT_TYPES['login'][0]) { - return $this->loginAsyncWithHttpInfo($accept_header_parameter, $application_key, $user, $password, $contentType) + public function loginAsync($application_key, $user, $password, $accept_header_parameter = null, $format = null, $device_id = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + return $this->loginAsyncWithHttpInfo($application_key, $user, $password, $accept_header_parameter, $format, $device_id, $contentType) ->then( function ($response) { return $response[0]; @@ -210,30 +250,34 @@ function ($response) { /** * Operation loginAsyncWithHttpInfo * - * User Login + * Login * + * @param string $application_key The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) + * @param string $user The user's email address or username. (required) + * @param string $password The user's password. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $application_key (optional) - * @param string|null $user (optional) - * @param string|null $password (optional) + * @param string|null $format When set to `json`, forces a JSON response regardless of the `Accept` header. (optional) + * @param string|null $device_id Optional device identifier. When provided, the generated API key is associated with this device. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['login'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function loginAsyncWithHttpInfo($accept_header_parameter = null, $application_key = null, $user = null, $password = null, string $contentType = self::CONTENT_TYPES['login'][0]) { - - $request = $this->loginRequest($accept_header_parameter, $application_key, $user, $password, $contentType); + public function loginAsyncWithHttpInfo($application_key, $user, $password, $accept_header_parameter = null, $format = null, $device_id = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + $returnType = '\BhrSdk\Model\LoginResponse'; + $request = $this->loginRequest($application_key, $user, $password, $accept_header_parameter, $format, $device_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -258,17 +302,28 @@ function ($exception) { /** * Create request for operation 'login' * + * @param string $application_key The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) + * @param string $user The user's email address or username. (required) + * @param string $password The user's password. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $application_key (optional) - * @param string|null $user (optional) - * @param string|null $password (optional) + * @param string|null $format When set to `json`, forces a JSON response regardless of the `Accept` header. (optional) + * @param string|null $device_id Optional device identifier. When provided, the generated API key is associated with this device. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['login'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function loginRequest($accept_header_parameter = null, $application_key = null, $user = null, $password = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + public function loginRequest($application_key, $user, $password, $accept_header_parameter = null, $format = null, $device_id = null, string $contentType = self::CONTENT_TYPES['login'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'application_key' => $application_key, + 'user' => $user, + 'password' => $password, + ], + methodName: 'login' + ); $resourcePath = '/api/v1/login'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); @@ -278,6 +333,22 @@ public function loginRequest($accept_header_parameter = null, $application_key = $httpBody = ''; $multipart = false; + $parameters = [ + 'format' => ['value' => $format, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // header params if ($accept_header_parameter !== null) { $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); @@ -290,6 +361,7 @@ public function loginRequest($accept_header_parameter = null, $application_key = 'applicationKey' => $application_key, 'user' => $user, 'password' => $password, + 'deviceId' => $device_id, ]); $formParams = $formDataProcessor->flatten($formData); diff --git a/lib/Api/OnboardingApi.php b/lib/Api/OnboardingApi.php new file mode 100644 index 00000000..303599b3 --- /dev/null +++ b/lib/Api/OnboardingApi.php @@ -0,0 +1,2876 @@ +<?php +declare(strict_types=1); +/** + * OnboardingApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * OnboardingApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class OnboardingApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'caa7fc488bcfaef14125398f2ebb987d' => [ + 'application/json', + ], + 'call0158de7cde2a4c4cf577f0b25070d809' => [ + 'application/json', + ], + 'call044949386f2d655c6a627ef53f9434b7' => [ + 'application/json', + ], + 'call19c7e26a1347ae7eb22919e9b0595c19' => [ + 'application/json', + ], + 'call1ab0279d46023eb951a434f24df885f1' => [ + 'application/json', + ], + 'call288aa996aba16d7a495c62321ea999a9' => [ + 'application/json', + ], + 'call696f0a229cdde60b733568e3c4d043d9' => [ + 'application/json', + ], + 'call847dd061d1d1859e7ce8cb3adfc9faf2' => [ + 'application/json', + ], + 'ec1ba8e76f33960b018d0d7518fe97b5' => [ + 'application/json', + ], + 'f44b802c30cdea2b9076b3f82f99c74d' => [ + 'application/json', + ], + 'f49b0f1f2fb1ef2c408ba12916ee9baa' => [ + 'application/json', + ], + 'updateNewHirePacketGtkyAnswerVisibility' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation caa7fc488bcfaef14125398f2ebb987d + * + * Delete new hire packet + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function caa7fc488bcfaef14125398f2ebb987d($id, string $contentType = self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'][0]) { + list($response) = $this->caa7fc488bcfaef14125398f2ebb987dWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation caa7fc488bcfaef14125398f2ebb987dWithHttpInfo + * + * Delete new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'] to see the possible values for this operation + * + * @throws \BhrSdk\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 caa7fc488bcfaef14125398f2ebb987dWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'][0]) { + $request = $this->caa7fc488bcfaef14125398f2ebb987dRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation caa7fc488bcfaef14125398f2ebb987dAsync + * + * Delete new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function caa7fc488bcfaef14125398f2ebb987dAsync($id, string $contentType = self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'][0]) { + return $this->caa7fc488bcfaef14125398f2ebb987dAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation caa7fc488bcfaef14125398f2ebb987dAsyncWithHttpInfo + * + * Delete new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function caa7fc488bcfaef14125398f2ebb987dAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'][0]) { + + $request = $this->caa7fc488bcfaef14125398f2ebb987dRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'caa7fc488bcfaef14125398f2ebb987d' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function caa7fc488bcfaef14125398f2ebb987dRequest($id, string $contentType = self::CONTENT_TYPES['caa7fc488bcfaef14125398f2ebb987d'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'caa7fc488bcfaef14125398f2ebb987d' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call0158de7cde2a4c4cf577f0b25070d809 + * + * List employee onboarding experiences + * + * @param int $employee_id employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\OnboardingExperiencesListResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function call0158de7cde2a4c4cf577f0b25070d809($employee_id, string $contentType = self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'][0]) { + list($response) = $this->call0158de7cde2a4c4cf577f0b25070d809WithHttpInfo($employee_id, $contentType); + return $response; + } + + /** + * Operation call0158de7cde2a4c4cf577f0b25070d809WithHttpInfo + * + * List employee onboarding experiences + * + * @param int $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\OnboardingExperiencesListResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call0158de7cde2a4c4cf577f0b25070d809WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'][0]) { + $request = $this->call0158de7cde2a4c4cf577f0b25070d809Request($employee_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencesListResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencesListResponse', + $request, + $response, + ); + } + + /** + * Operation call0158de7cde2a4c4cf577f0b25070d809Async + * + * List employee onboarding experiences + * + * @param int $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call0158de7cde2a4c4cf577f0b25070d809Async($employee_id, string $contentType = self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'][0]) { + return $this->call0158de7cde2a4c4cf577f0b25070d809AsyncWithHttpInfo($employee_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call0158de7cde2a4c4cf577f0b25070d809AsyncWithHttpInfo + * + * List employee onboarding experiences + * + * @param int $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call0158de7cde2a4c4cf577f0b25070d809AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'][0]) { + $returnType = '\BhrSdk\Model\OnboardingExperiencesListResponse'; + $request = $this->call0158de7cde2a4c4cf577f0b25070d809Request($employee_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call0158de7cde2a4c4cf577f0b25070d809' + * + * @param int $employee_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call0158de7cde2a4c4cf577f0b25070d809Request($employee_id, string $contentType = self::CONTENT_TYPES['call0158de7cde2a4c4cf577f0b25070d809'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'call0158de7cde2a4c4cf577f0b25070d809' + ); + + $resourcePath = '/api/v1/employees/{employeeId}/onboarding-experiences'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call044949386f2d655c6a627ef53f9434b7 + * + * Get welcome new hires widget + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHireWidgetResponse + */ + public function call044949386f2d655c6a627ef53f9434b7(string $contentType = self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'][0]) { + list($response) = $this->call044949386f2d655c6a627ef53f9434b7WithHttpInfo($contentType); + return $response; + } + + /** + * Operation call044949386f2d655c6a627ef53f9434b7WithHttpInfo + * + * Get welcome new hires widget + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHireWidgetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call044949386f2d655c6a627ef53f9434b7WithHttpInfo(string $contentType = self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'][0]) { + $request = $this->call044949386f2d655c6a627ef53f9434b7Request($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHireWidgetResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHireWidgetResponse', + $request, + $response, + ); + } + + /** + * Operation call044949386f2d655c6a627ef53f9434b7Async + * + * Get welcome new hires widget + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call044949386f2d655c6a627ef53f9434b7Async(string $contentType = self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'][0]) { + return $this->call044949386f2d655c6a627ef53f9434b7AsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call044949386f2d655c6a627ef53f9434b7AsyncWithHttpInfo + * + * Get welcome new hires widget + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call044949386f2d655c6a627ef53f9434b7AsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'][0]) { + $returnType = '\BhrSdk\Model\NewHireWidgetResponse'; + $request = $this->call044949386f2d655c6a627ef53f9434b7Request($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call044949386f2d655c6a627ef53f9434b7' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call044949386f2d655c6a627ef53f9434b7Request(string $contentType = self::CONTENT_TYPES['call044949386f2d655c6a627ef53f9434b7'][0]) { + + $resourcePath = '/api/v1/onboarding/new-hire-widget'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call19c7e26a1347ae7eb22919e9b0595c19 + * + * Cancel new hire packet + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketPublicApi + */ + public function call19c7e26a1347ae7eb22919e9b0595c19($id, string $contentType = self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'][0]) { + list($response) = $this->call19c7e26a1347ae7eb22919e9b0595c19WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call19c7e26a1347ae7eb22919e9b0595c19WithHttpInfo + * + * Cancel new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketPublicApi, HTTP status code, HTTP response headers (array of strings) + */ + public function call19c7e26a1347ae7eb22919e9b0595c19WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'][0]) { + $request = $this->call19c7e26a1347ae7eb22919e9b0595c19Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $request, + $response, + ); + } + + /** + * Operation call19c7e26a1347ae7eb22919e9b0595c19Async + * + * Cancel new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call19c7e26a1347ae7eb22919e9b0595c19Async($id, string $contentType = self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'][0]) { + return $this->call19c7e26a1347ae7eb22919e9b0595c19AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call19c7e26a1347ae7eb22919e9b0595c19AsyncWithHttpInfo + * + * Cancel new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call19c7e26a1347ae7eb22919e9b0595c19AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketPublicApi'; + $request = $this->call19c7e26a1347ae7eb22919e9b0595c19Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call19c7e26a1347ae7eb22919e9b0595c19' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call19c7e26a1347ae7eb22919e9b0595c19Request($id, string $contentType = self::CONTENT_TYPES['call19c7e26a1347ae7eb22919e9b0595c19'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call19c7e26a1347ae7eb22919e9b0595c19' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}/cancel'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call1ab0279d46023eb951a434f24df885f1 + * + * Update new hire packet + * + * @param int $id id (required) + * @param \BhrSdk\Model\NewHirePacketPublicApiWritableBody $new_hire_packet_public_api_writable_body new_hire_packet_public_api_writable_body (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketPublicApi + */ + public function call1ab0279d46023eb951a434f24df885f1($id, $new_hire_packet_public_api_writable_body, string $contentType = self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'][0]) { + list($response) = $this->call1ab0279d46023eb951a434f24df885f1WithHttpInfo($id, $new_hire_packet_public_api_writable_body, $contentType); + return $response; + } + + /** + * Operation call1ab0279d46023eb951a434f24df885f1WithHttpInfo + * + * Update new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketPublicApiWritableBody $new_hire_packet_public_api_writable_body (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketPublicApi, HTTP status code, HTTP response headers (array of strings) + */ + public function call1ab0279d46023eb951a434f24df885f1WithHttpInfo($id, $new_hire_packet_public_api_writable_body, string $contentType = self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'][0]) { + $request = $this->call1ab0279d46023eb951a434f24df885f1Request($id, $new_hire_packet_public_api_writable_body, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $request, + $response, + ); + } + + /** + * Operation call1ab0279d46023eb951a434f24df885f1Async + * + * Update new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketPublicApiWritableBody $new_hire_packet_public_api_writable_body (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1ab0279d46023eb951a434f24df885f1Async($id, $new_hire_packet_public_api_writable_body, string $contentType = self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'][0]) { + return $this->call1ab0279d46023eb951a434f24df885f1AsyncWithHttpInfo($id, $new_hire_packet_public_api_writable_body, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call1ab0279d46023eb951a434f24df885f1AsyncWithHttpInfo + * + * Update new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketPublicApiWritableBody $new_hire_packet_public_api_writable_body (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call1ab0279d46023eb951a434f24df885f1AsyncWithHttpInfo($id, $new_hire_packet_public_api_writable_body, string $contentType = self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketPublicApi'; + $request = $this->call1ab0279d46023eb951a434f24df885f1Request($id, $new_hire_packet_public_api_writable_body, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call1ab0279d46023eb951a434f24df885f1' + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketPublicApiWritableBody $new_hire_packet_public_api_writable_body (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call1ab0279d46023eb951a434f24df885f1Request($id, $new_hire_packet_public_api_writable_body, string $contentType = self::CONTENT_TYPES['call1ab0279d46023eb951a434f24df885f1'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'new_hire_packet_public_api_writable_body' => $new_hire_packet_public_api_writable_body, + ], + methodName: 'call1ab0279d46023eb951a434f24df885f1' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($new_hire_packet_public_api_writable_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($new_hire_packet_public_api_writable_body)); + } else { + $httpBody = is_array($new_hire_packet_public_api_writable_body) ? json_encode($new_hire_packet_public_api_writable_body) : $new_hire_packet_public_api_writable_body; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call288aa996aba16d7a495c62321ea999a9 + * + * Create employee onboarding experience + * + * @param int $employee_id employee_id (required) + * @param \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request|null $_288aa996aba16d7a495c62321ea999a9_request _288aa996aba16d7a495c62321ea999a9_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\OnboardingExperiencePublicApi|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function call288aa996aba16d7a495c62321ea999a9($employee_id, $_288aa996aba16d7a495c62321ea999a9_request = null, string $contentType = self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'][0]) { + list($response) = $this->call288aa996aba16d7a495c62321ea999a9WithHttpInfo($employee_id, $_288aa996aba16d7a495c62321ea999a9_request, $contentType); + return $response; + } + + /** + * Operation call288aa996aba16d7a495c62321ea999a9WithHttpInfo + * + * Create employee onboarding experience + * + * @param int $employee_id (required) + * @param \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request|null $_288aa996aba16d7a495c62321ea999a9_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\OnboardingExperiencePublicApi|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call288aa996aba16d7a495c62321ea999a9WithHttpInfo($employee_id, $_288aa996aba16d7a495c62321ea999a9_request = null, string $contentType = self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'][0]) { + $request = $this->call288aa996aba16d7a495c62321ea999a9Request($employee_id, $_288aa996aba16d7a495c62321ea999a9_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencePublicApi', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencePublicApi', + $request, + $response, + ); + } + + /** + * Operation call288aa996aba16d7a495c62321ea999a9Async + * + * Create employee onboarding experience + * + * @param int $employee_id (required) + * @param \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request|null $_288aa996aba16d7a495c62321ea999a9_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call288aa996aba16d7a495c62321ea999a9Async($employee_id, $_288aa996aba16d7a495c62321ea999a9_request = null, string $contentType = self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'][0]) { + return $this->call288aa996aba16d7a495c62321ea999a9AsyncWithHttpInfo($employee_id, $_288aa996aba16d7a495c62321ea999a9_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call288aa996aba16d7a495c62321ea999a9AsyncWithHttpInfo + * + * Create employee onboarding experience + * + * @param int $employee_id (required) + * @param \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request|null $_288aa996aba16d7a495c62321ea999a9_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call288aa996aba16d7a495c62321ea999a9AsyncWithHttpInfo($employee_id, $_288aa996aba16d7a495c62321ea999a9_request = null, string $contentType = self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'][0]) { + $returnType = '\BhrSdk\Model\OnboardingExperiencePublicApi'; + $request = $this->call288aa996aba16d7a495c62321ea999a9Request($employee_id, $_288aa996aba16d7a495c62321ea999a9_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call288aa996aba16d7a495c62321ea999a9' + * + * @param int $employee_id (required) + * @param \BhrSdk\Model\_288aa996aba16d7a495c62321ea999a9Request|null $_288aa996aba16d7a495c62321ea999a9_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call288aa996aba16d7a495c62321ea999a9Request($employee_id, $_288aa996aba16d7a495c62321ea999a9_request = null, string $contentType = self::CONTENT_TYPES['call288aa996aba16d7a495c62321ea999a9'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'call288aa996aba16d7a495c62321ea999a9' + ); + + $resourcePath = '/api/v1/employees/{employeeId}/onboarding-experiences'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($_288aa996aba16d7a495c62321ea999a9_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($_288aa996aba16d7a495c62321ea999a9_request)); + } else { + $httpBody = is_array($_288aa996aba16d7a495c62321ea999a9_request) ? json_encode($_288aa996aba16d7a495c62321ea999a9_request) : $_288aa996aba16d7a495c62321ea999a9_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call696f0a229cdde60b733568e3c4d043d9 + * + * Get new hire packet by id + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketPublicApi + */ + public function call696f0a229cdde60b733568e3c4d043d9($id, string $contentType = self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'][0]) { + list($response) = $this->call696f0a229cdde60b733568e3c4d043d9WithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation call696f0a229cdde60b733568e3c4d043d9WithHttpInfo + * + * Get new hire packet by id + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketPublicApi, HTTP status code, HTTP response headers (array of strings) + */ + public function call696f0a229cdde60b733568e3c4d043d9WithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'][0]) { + $request = $this->call696f0a229cdde60b733568e3c4d043d9Request($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $request, + $response, + ); + } + + /** + * Operation call696f0a229cdde60b733568e3c4d043d9Async + * + * Get new hire packet by id + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call696f0a229cdde60b733568e3c4d043d9Async($id, string $contentType = self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'][0]) { + return $this->call696f0a229cdde60b733568e3c4d043d9AsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call696f0a229cdde60b733568e3c4d043d9AsyncWithHttpInfo + * + * Get new hire packet by id + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call696f0a229cdde60b733568e3c4d043d9AsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketPublicApi'; + $request = $this->call696f0a229cdde60b733568e3c4d043d9Request($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call696f0a229cdde60b733568e3c4d043d9' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call696f0a229cdde60b733568e3c4d043d9Request($id, string $contentType = self::CONTENT_TYPES['call696f0a229cdde60b733568e3c4d043d9'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'call696f0a229cdde60b733568e3c4d043d9' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation call847dd061d1d1859e7ce8cb3adfc9faf2 + * + * Get employee onboarding experience by id + * + * @param int $employee_id employee_id (required) + * @param int $onboarding_experience_id onboarding_experience_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\OnboardingExperiencePublicApi|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse + */ + public function call847dd061d1d1859e7ce8cb3adfc9faf2($employee_id, $onboarding_experience_id, string $contentType = self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'][0]) { + list($response) = $this->call847dd061d1d1859e7ce8cb3adfc9faf2WithHttpInfo($employee_id, $onboarding_experience_id, $contentType); + return $response; + } + + /** + * Operation call847dd061d1d1859e7ce8cb3adfc9faf2WithHttpInfo + * + * Get employee onboarding experience by id + * + * @param int $employee_id (required) + * @param int $onboarding_experience_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\OnboardingExperiencePublicApi|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse|\BhrSdk\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function call847dd061d1d1859e7ce8cb3adfc9faf2WithHttpInfo($employee_id, $onboarding_experience_id, string $contentType = self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'][0]) { + $request = $this->call847dd061d1d1859e7ce8cb3adfc9faf2Request($employee_id, $onboarding_experience_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencePublicApi', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ErrorResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\OnboardingExperiencePublicApi', + $request, + $response, + ); + } + + /** + * Operation call847dd061d1d1859e7ce8cb3adfc9faf2Async + * + * Get employee onboarding experience by id + * + * @param int $employee_id (required) + * @param int $onboarding_experience_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call847dd061d1d1859e7ce8cb3adfc9faf2Async($employee_id, $onboarding_experience_id, string $contentType = self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'][0]) { + return $this->call847dd061d1d1859e7ce8cb3adfc9faf2AsyncWithHttpInfo($employee_id, $onboarding_experience_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation call847dd061d1d1859e7ce8cb3adfc9faf2AsyncWithHttpInfo + * + * Get employee onboarding experience by id + * + * @param int $employee_id (required) + * @param int $onboarding_experience_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function call847dd061d1d1859e7ce8cb3adfc9faf2AsyncWithHttpInfo($employee_id, $onboarding_experience_id, string $contentType = self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'][0]) { + $returnType = '\BhrSdk\Model\OnboardingExperiencePublicApi'; + $request = $this->call847dd061d1d1859e7ce8cb3adfc9faf2Request($employee_id, $onboarding_experience_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'call847dd061d1d1859e7ce8cb3adfc9faf2' + * + * @param int $employee_id (required) + * @param int $onboarding_experience_id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function call847dd061d1d1859e7ce8cb3adfc9faf2Request($employee_id, $onboarding_experience_id, string $contentType = self::CONTENT_TYPES['call847dd061d1d1859e7ce8cb3adfc9faf2'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + 'onboarding_experience_id' => $onboarding_experience_id, + ], + methodName: 'call847dd061d1d1859e7ce8cb3adfc9faf2' + ); + + $resourcePath = '/api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + // path params + if ($onboarding_experience_id !== null) { + $resourcePath = str_replace( + '{' . 'onboardingExperienceId' . '}', + ObjectSerializer::toPathValue((string) $onboarding_experience_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation ec1ba8e76f33960b018d0d7518fe97b5 + * + * Create new hire packet + * + * @param \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request $ec1ba8e76f33960b018d0d7518fe97b5_request ec1ba8e76f33960b018d0d7518fe97b5_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketPublicApi + */ + public function ec1ba8e76f33960b018d0d7518fe97b5($ec1ba8e76f33960b018d0d7518fe97b5_request, string $contentType = self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'][0]) { + list($response) = $this->ec1ba8e76f33960b018d0d7518fe97b5WithHttpInfo($ec1ba8e76f33960b018d0d7518fe97b5_request, $contentType); + return $response; + } + + /** + * Operation ec1ba8e76f33960b018d0d7518fe97b5WithHttpInfo + * + * Create new hire packet + * + * @param \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request $ec1ba8e76f33960b018d0d7518fe97b5_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketPublicApi, HTTP status code, HTTP response headers (array of strings) + */ + public function ec1ba8e76f33960b018d0d7518fe97b5WithHttpInfo($ec1ba8e76f33960b018d0d7518fe97b5_request, string $contentType = self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'][0]) { + $request = $this->ec1ba8e76f33960b018d0d7518fe97b5Request($ec1ba8e76f33960b018d0d7518fe97b5_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $request, + $response, + ); + } + + /** + * Operation ec1ba8e76f33960b018d0d7518fe97b5Async + * + * Create new hire packet + * + * @param \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request $ec1ba8e76f33960b018d0d7518fe97b5_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ec1ba8e76f33960b018d0d7518fe97b5Async($ec1ba8e76f33960b018d0d7518fe97b5_request, string $contentType = self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'][0]) { + return $this->ec1ba8e76f33960b018d0d7518fe97b5AsyncWithHttpInfo($ec1ba8e76f33960b018d0d7518fe97b5_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation ec1ba8e76f33960b018d0d7518fe97b5AsyncWithHttpInfo + * + * Create new hire packet + * + * @param \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request $ec1ba8e76f33960b018d0d7518fe97b5_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ec1ba8e76f33960b018d0d7518fe97b5AsyncWithHttpInfo($ec1ba8e76f33960b018d0d7518fe97b5_request, string $contentType = self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketPublicApi'; + $request = $this->ec1ba8e76f33960b018d0d7518fe97b5Request($ec1ba8e76f33960b018d0d7518fe97b5_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'ec1ba8e76f33960b018d0d7518fe97b5' + * + * @param \BhrSdk\Model\Ec1ba8e76f33960b018d0d7518fe97b5Request $ec1ba8e76f33960b018d0d7518fe97b5_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function ec1ba8e76f33960b018d0d7518fe97b5Request($ec1ba8e76f33960b018d0d7518fe97b5_request, string $contentType = self::CONTENT_TYPES['ec1ba8e76f33960b018d0d7518fe97b5'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'ec1ba8e76f33960b018d0d7518fe97b5_request' => $ec1ba8e76f33960b018d0d7518fe97b5_request, + ], + methodName: 'ec1ba8e76f33960b018d0d7518fe97b5' + ); + + $resourcePath = '/api/v1/new-hire-packets'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($ec1ba8e76f33960b018d0d7518fe97b5_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($ec1ba8e76f33960b018d0d7518fe97b5_request)); + } else { + $httpBody = is_array($ec1ba8e76f33960b018d0d7518fe97b5_request) ? json_encode($ec1ba8e76f33960b018d0d7518fe97b5_request) : $ec1ba8e76f33960b018d0d7518fe97b5_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation f44b802c30cdea2b9076b3f82f99c74d + * + * List new hire packets + * + * @param int|null $page page (optional) + * @param int|null $page_size page_size (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketsListResponse + */ + public function f44b802c30cdea2b9076b3f82f99c74d($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'][0]) { + list($response) = $this->f44b802c30cdea2b9076b3f82f99c74dWithHttpInfo($page, $page_size, $contentType); + return $response; + } + + /** + * Operation f44b802c30cdea2b9076b3f82f99c74dWithHttpInfo + * + * List new hire packets + * + * @param int|null $page (optional) + * @param int|null $page_size (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketsListResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function f44b802c30cdea2b9076b3f82f99c74dWithHttpInfo($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'][0]) { + $request = $this->f44b802c30cdea2b9076b3f82f99c74dRequest($page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketsListResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketsListResponse', + $request, + $response, + ); + } + + /** + * Operation f44b802c30cdea2b9076b3f82f99c74dAsync + * + * List new hire packets + * + * @param int|null $page (optional) + * @param int|null $page_size (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f44b802c30cdea2b9076b3f82f99c74dAsync($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'][0]) { + return $this->f44b802c30cdea2b9076b3f82f99c74dAsyncWithHttpInfo($page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation f44b802c30cdea2b9076b3f82f99c74dAsyncWithHttpInfo + * + * List new hire packets + * + * @param int|null $page (optional) + * @param int|null $page_size (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f44b802c30cdea2b9076b3f82f99c74dAsyncWithHttpInfo($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketsListResponse'; + $request = $this->f44b802c30cdea2b9076b3f82f99c74dRequest($page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'f44b802c30cdea2b9076b3f82f99c74d' + * + * @param int|null $page (optional) + * @param int|null $page_size (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function f44b802c30cdea2b9076b3f82f99c74dRequest($page = null, $page_size = null, string $contentType = self::CONTENT_TYPES['f44b802c30cdea2b9076b3f82f99c74d'][0]) { + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling OnboardingApi.f44b802c30cdea2b9076b3f82f99c74d, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 100) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling OnboardingApi.f44b802c30cdea2b9076b3f82f99c74d, must be smaller than or equal to 100.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling OnboardingApi.f44b802c30cdea2b9076b3f82f99c74d, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/new-hire-packets'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation f49b0f1f2fb1ef2c408ba12916ee9baa + * + * Send new hire packet + * + * @param int $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketPublicApi + */ + public function f49b0f1f2fb1ef2c408ba12916ee9baa($id, string $contentType = self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'][0]) { + list($response) = $this->f49b0f1f2fb1ef2c408ba12916ee9baaWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation f49b0f1f2fb1ef2c408ba12916ee9baaWithHttpInfo + * + * Send new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketPublicApi, HTTP status code, HTTP response headers (array of strings) + */ + public function f49b0f1f2fb1ef2c408ba12916ee9baaWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'][0]) { + $request = $this->f49b0f1f2fb1ef2c408ba12916ee9baaRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketPublicApi', + $request, + $response, + ); + } + + /** + * Operation f49b0f1f2fb1ef2c408ba12916ee9baaAsync + * + * Send new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f49b0f1f2fb1ef2c408ba12916ee9baaAsync($id, string $contentType = self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'][0]) { + return $this->f49b0f1f2fb1ef2c408ba12916ee9baaAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation f49b0f1f2fb1ef2c408ba12916ee9baaAsyncWithHttpInfo + * + * Send new hire packet + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function f49b0f1f2fb1ef2c408ba12916ee9baaAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketPublicApi'; + $request = $this->f49b0f1f2fb1ef2c408ba12916ee9baaRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'f49b0f1f2fb1ef2c408ba12916ee9baa' + * + * @param int $id (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function f49b0f1f2fb1ef2c408ba12916ee9baaRequest($id, string $contentType = self::CONTENT_TYPES['f49b0f1f2fb1ef2c408ba12916ee9baa'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'f49b0f1f2fb1ef2c408ba12916ee9baa' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}/send'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation updateNewHirePacketGtkyAnswerVisibility + * + * Update GTKY answer visibility for a new hire packet + * + * @param int $id id (required) + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest $new_hire_packet_gtky_answer_visibility_request new_hire_packet_gtky_answer_visibility_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse + */ + public function updateNewHirePacketGtkyAnswerVisibility($id, $new_hire_packet_gtky_answer_visibility_request, string $contentType = self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'][0]) { + list($response) = $this->updateNewHirePacketGtkyAnswerVisibilityWithHttpInfo($id, $new_hire_packet_gtky_answer_visibility_request, $contentType); + return $response; + } + + /** + * Operation updateNewHirePacketGtkyAnswerVisibilityWithHttpInfo + * + * Update GTKY answer visibility for a new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest $new_hire_packet_gtky_answer_visibility_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateNewHirePacketGtkyAnswerVisibilityWithHttpInfo($id, $new_hire_packet_gtky_answer_visibility_request, string $contentType = self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'][0]) { + $request = $this->updateNewHirePacketGtkyAnswerVisibilityRequest($id, $new_hire_packet_gtky_answer_visibility_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse', + $request, + $response, + ); + } + + /** + * Operation updateNewHirePacketGtkyAnswerVisibilityAsync + * + * Update GTKY answer visibility for a new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest $new_hire_packet_gtky_answer_visibility_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateNewHirePacketGtkyAnswerVisibilityAsync($id, $new_hire_packet_gtky_answer_visibility_request, string $contentType = self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'][0]) { + return $this->updateNewHirePacketGtkyAnswerVisibilityAsyncWithHttpInfo($id, $new_hire_packet_gtky_answer_visibility_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateNewHirePacketGtkyAnswerVisibilityAsyncWithHttpInfo + * + * Update GTKY answer visibility for a new hire packet + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest $new_hire_packet_gtky_answer_visibility_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateNewHirePacketGtkyAnswerVisibilityAsyncWithHttpInfo($id, $new_hire_packet_gtky_answer_visibility_request, string $contentType = self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'][0]) { + $returnType = '\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityResponse'; + $request = $this->updateNewHirePacketGtkyAnswerVisibilityRequest($id, $new_hire_packet_gtky_answer_visibility_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'updateNewHirePacketGtkyAnswerVisibility' + * + * @param int $id (required) + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityRequest $new_hire_packet_gtky_answer_visibility_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateNewHirePacketGtkyAnswerVisibilityRequest($id, $new_hire_packet_gtky_answer_visibility_request, string $contentType = self::CONTENT_TYPES['updateNewHirePacketGtkyAnswerVisibility'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'new_hire_packet_gtky_answer_visibility_request' => $new_hire_packet_gtky_answer_visibility_request, + ], + methodName: 'updateNewHirePacketGtkyAnswerVisibility' + ); + + $resourcePath = '/api/v1/new-hire-packets/{id}/question-visibility'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($new_hire_packet_gtky_answer_visibility_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($new_hire_packet_gtky_answer_visibility_request)); + } else { + $httpBody = is_array($new_hire_packet_gtky_answer_visibility_request) ? json_encode($new_hire_packet_gtky_answer_visibility_request) : $new_hire_packet_gtky_answer_visibility_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/PhotosApi.php b/lib/Api/PhotosApi.php index a8381494..5824cbbd 100644 --- a/lib/Api/PhotosApi.php +++ b/lib/Api/PhotosApi.php @@ -83,6 +83,7 @@ class PhotosApi { 'application/json', ], 'uploadEmployeePhoto' => [ + 'multipart/form-data', 'application/json', ], ]; @@ -138,16 +139,18 @@ public function getConfig() { * * Get Employee Photo * - * @param string $employee_id The ID for the employee you are getting the photo for. (required) - * @param string $size Photo size (required) + * @param int $employee_id The ID of the employee whose photo to retrieve. (required) + * @param string $size The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. (required) + * @param int|null $width Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. (optional) + * @param int|null $height Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeePhoto'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function getEmployeePhoto($employee_id, $size, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { - list($response) = $this->getEmployeePhotoWithHttpInfo($employee_id, $size, $contentType); + public function getEmployeePhoto($employee_id, $size, $width = null, $height = null, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { + list($response) = $this->getEmployeePhotoWithHttpInfo($employee_id, $size, $width, $height, $contentType); return $response; } @@ -156,16 +159,18 @@ public function getEmployeePhoto($employee_id, $size, string $contentType = self * * Get Employee Photo * - * @param string $employee_id The ID for the employee you are getting the photo for. (required) - * @param string $size Photo size (required) + * @param int $employee_id The ID of the employee whose photo to retrieve. (required) + * @param string $size The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. (required) + * @param int|null $width Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. (optional) + * @param int|null $height Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeePhoto'] to see the possible values for this operation * * @throws \BhrSdk\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 getEmployeePhotoWithHttpInfo($employee_id, $size, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { - $request = $this->getEmployeePhotoRequest($employee_id, $size, $contentType); + public function getEmployeePhotoWithHttpInfo($employee_id, $size, $width = null, $height = null, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { + $request = $this->getEmployeePhotoRequest($employee_id, $size, $width, $height, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -185,15 +190,17 @@ public function getEmployeePhotoWithHttpInfo($employee_id, $size, string $conten * * Get Employee Photo * - * @param string $employee_id The ID for the employee you are getting the photo for. (required) - * @param string $size Photo size (required) + * @param int $employee_id The ID of the employee whose photo to retrieve. (required) + * @param string $size The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. (required) + * @param int|null $width Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. (optional) + * @param int|null $height Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeePhotoAsync($employee_id, $size, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { - return $this->getEmployeePhotoAsyncWithHttpInfo($employee_id, $size, $contentType) + public function getEmployeePhotoAsync($employee_id, $size, $width = null, $height = null, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { + return $this->getEmployeePhotoAsyncWithHttpInfo($employee_id, $size, $width, $height, $contentType) ->then( function ($response) { return $response[0]; @@ -206,16 +213,18 @@ function ($response) { * * Get Employee Photo * - * @param string $employee_id The ID for the employee you are getting the photo for. (required) - * @param string $size Photo size (required) + * @param int $employee_id The ID of the employee whose photo to retrieve. (required) + * @param string $size The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. (required) + * @param int|null $width Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. (optional) + * @param int|null $height Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeePhotoAsyncWithHttpInfo($employee_id, $size, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { + public function getEmployeePhotoAsyncWithHttpInfo($employee_id, $size, $width = null, $height = null, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { - $request = $this->getEmployeePhotoRequest($employee_id, $size, $contentType); + $request = $this->getEmployeePhotoRequest($employee_id, $size, $width, $height, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -249,14 +258,16 @@ function ($exception) { /** * Create request for operation 'getEmployeePhoto' * - * @param string $employee_id The ID for the employee you are getting the photo for. (required) - * @param string $size Photo size (required) + * @param int $employee_id The ID of the employee whose photo to retrieve. (required) + * @param string $size The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`. (required) + * @param int|null $width Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes. (optional) + * @param int|null $height Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeePhotoRequest($employee_id, $size, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { + public function getEmployeePhotoRequest($employee_id, $size, $width = null, $height = null, string $contentType = self::CONTENT_TYPES['getEmployeePhoto'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -274,6 +285,23 @@ public function getEmployeePhotoRequest($employee_id, $size, string $contentType $httpBody = ''; $multipart = false; + $parameters = [ + 'width' => ['value' => $width, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'height' => ['value' => $height, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -292,7 +320,7 @@ public function getEmployeePhotoRequest($employee_id, $size, string $contentType } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['image/*', 'application/json', ], $contentType, $multipart ); @@ -346,15 +374,16 @@ public function getEmployeePhotoRequest($employee_id, $size, string $contentType * * Upload Employee Photo * - * @param string $employee_id The ID for the employee you are setting the photo for. (required) + * @param int $employee_id The ID of the employee whose photo is being uploaded. (required) + * @param \SplFileObject $file The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeePhoto'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function uploadEmployeePhoto($employee_id, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { - list($response) = $this->uploadEmployeePhotoWithHttpInfo($employee_id, $contentType); + public function uploadEmployeePhoto($employee_id, $file, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { + list($response) = $this->uploadEmployeePhotoWithHttpInfo($employee_id, $file, $contentType); return $response; } @@ -363,15 +392,16 @@ public function uploadEmployeePhoto($employee_id, string $contentType = self::CO * * Upload Employee Photo * - * @param string $employee_id The ID for the employee you are setting the photo for. (required) + * @param int $employee_id The ID of the employee whose photo is being uploaded. (required) + * @param \SplFileObject $file The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeePhoto'] to see the possible values for this operation * * @throws \BhrSdk\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 uploadEmployeePhotoWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { - $request = $this->uploadEmployeePhotoRequest($employee_id, $contentType); + public function uploadEmployeePhotoWithHttpInfo($employee_id, $file, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { + $request = $this->uploadEmployeePhotoRequest($employee_id, $file, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -391,14 +421,15 @@ public function uploadEmployeePhotoWithHttpInfo($employee_id, string $contentTyp * * Upload Employee Photo * - * @param string $employee_id The ID for the employee you are setting the photo for. (required) + * @param int $employee_id The ID of the employee whose photo is being uploaded. (required) + * @param \SplFileObject $file The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadEmployeePhotoAsync($employee_id, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { - return $this->uploadEmployeePhotoAsyncWithHttpInfo($employee_id, $contentType) + public function uploadEmployeePhotoAsync($employee_id, $file, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { + return $this->uploadEmployeePhotoAsyncWithHttpInfo($employee_id, $file, $contentType) ->then( function ($response) { return $response[0]; @@ -411,15 +442,16 @@ function ($response) { * * Upload Employee Photo * - * @param string $employee_id The ID for the employee you are setting the photo for. (required) + * @param int $employee_id The ID of the employee whose photo is being uploaded. (required) + * @param \SplFileObject $file The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadEmployeePhotoAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { + public function uploadEmployeePhotoAsyncWithHttpInfo($employee_id, $file, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { - $request = $this->uploadEmployeePhotoRequest($employee_id, $contentType); + $request = $this->uploadEmployeePhotoRequest($employee_id, $file, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -453,24 +485,26 @@ function ($exception) { /** * Create request for operation 'uploadEmployeePhoto' * - * @param string $employee_id The ID for the employee you are setting the photo for. (required) + * @param int $employee_id The ID of the employee whose photo is being uploaded. (required) + * @param \SplFileObject $file The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['uploadEmployeePhoto'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function uploadEmployeePhotoRequest($employee_id, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { + public function uploadEmployeePhotoRequest($employee_id, $file, string $contentType = self::CONTENT_TYPES['uploadEmployeePhoto'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, + 'file' => $file, ], methodName: 'uploadEmployeePhoto' ); $resourcePath = '/api/v1/employees/{employeeId}/photo'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); - + $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -485,12 +519,47 @@ public function uploadEmployeePhotoRequest($employee_id, string $contentType = s ); } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + + $multipart = true; $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); + if (count($formParams) > 0) { + /* @phpstan-ignore-next-line */ + 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); + } + } + // Authentication methods // Basic authentication diff --git a/lib/Api/ReportsApi.php b/lib/Api/ReportsApi.php index d344e183..4ebb9e96 100644 --- a/lib/Api/ReportsApi.php +++ b/lib/Api/ReportsApi.php @@ -84,6 +84,7 @@ class ReportsApi { ], 'requestCustomReport' => [ 'application/json', + 'application/xml', ], ]; @@ -138,19 +139,20 @@ public function getConfig() { * * Get Company Report * - * @param string $id {id} is a report ID. (required) - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $fd yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" (optional) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param int $id The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param string|null $fd Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyReport'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\GetCompanyReportResponse + * @deprecated */ - public function getCompanyReport($id, $format, $accept_header_parameter = null, $fd = null, $only_current = false, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { - list($response) = $this->getCompanyReportWithHttpInfo($id, $format, $accept_header_parameter, $fd, $only_current, $contentType); + public function getCompanyReport($id, $accept = null, $format = null, $fd = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { + list($response) = $this->getCompanyReportWithHttpInfo($id, $accept, $format, $fd, $only_current, $contentType); return $response; } @@ -159,19 +161,20 @@ public function getCompanyReport($id, $format, $accept_header_parameter = null, * * Get Company Report * - * @param string $id {id} is a report ID. (required) - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $fd yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" (optional) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param int $id The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param string|null $fd Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyReport'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\GetCompanyReportResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getCompanyReportWithHttpInfo($id, $format, $accept_header_parameter = null, $fd = null, $only_current = false, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { - $request = $this->getCompanyReportRequest($id, $format, $accept_header_parameter, $fd, $only_current, $contentType); + public function getCompanyReportWithHttpInfo($id, $accept = null, $format = null, $fd = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { + $request = $this->getCompanyReportRequest($id, $accept, $format, $fd, $only_current, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -179,8 +182,30 @@ public function getCompanyReportWithHttpInfo($id, $format, $accept_header_parame $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\GetCompanyReportResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\GetCompanyReportResponse', $request, $response, ); @@ -191,18 +216,19 @@ public function getCompanyReportWithHttpInfo($id, $format, $accept_header_parame * * Get Company Report * - * @param string $id {id} is a report ID. (required) - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $fd yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" (optional) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param int $id The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param string|null $fd Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getCompanyReportAsync($id, $format, $accept_header_parameter = null, $fd = null, $only_current = false, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { - return $this->getCompanyReportAsyncWithHttpInfo($id, $format, $accept_header_parameter, $fd, $only_current, $contentType) + public function getCompanyReportAsync($id, $accept = null, $format = null, $fd = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { + return $this->getCompanyReportAsyncWithHttpInfo($id, $accept, $format, $fd, $only_current, $contentType) ->then( function ($response) { return $response[0]; @@ -215,28 +241,31 @@ function ($response) { * * Get Company Report * - * @param string $id {id} is a report ID. (required) - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $fd yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" (optional) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param int $id The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param string|null $fd Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getCompanyReportAsyncWithHttpInfo($id, $format, $accept_header_parameter = null, $fd = null, $only_current = false, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { - - $request = $this->getCompanyReportRequest($id, $format, $accept_header_parameter, $fd, $only_current, $contentType); + public function getCompanyReportAsyncWithHttpInfo($id, $accept = null, $format = null, $fd = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { + $returnType = '\BhrSdk\Model\GetCompanyReportResponse'; + $request = $this->getCompanyReportRequest($id, $accept, $format, $fd, $only_current, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -261,22 +290,22 @@ function ($exception) { /** * Create request for operation 'getCompanyReport' * - * @param string $id {id} is a report ID. (required) - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $fd yes=apply standard duplicate field filtering, no=return the raw results with no duplicate filtering. Default value is \"yes\" (optional) - * @param bool|null $only_current Setting to false will return future dated values from history table fields. (optional, default to false) + * @param int $id The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param string|null $fd Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getCompanyReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getCompanyReportRequest($id, $format, $accept_header_parameter = null, $fd = null, $only_current = false, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { + public function getCompanyReportRequest($id, $accept = null, $format = null, $fd = null, $only_current = true, string $contentType = self::CONTENT_TYPES['getCompanyReport'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, - 'format' => $format, ], methodName: 'getCompanyReport' ); @@ -290,7 +319,7 @@ public function getCompanyReportRequest($id, $format, $accept_header_parameter = $multipart = false; $parameters = [ - 'format' => ['value' => $format, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'format' => ['value' => $format, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'fd' => ['value' => $fd, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'onlyCurrent' => ['value' => $only_current, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], ]; @@ -308,8 +337,8 @@ public function getCompanyReportRequest($id, $format, $accept_header_parameter = } // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + if ($accept !== null) { + $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); } // path params @@ -322,7 +351,7 @@ public function getCompanyReportRequest($id, $format, $accept_header_parameter = } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', 'text/xml', 'text/csv', 'application/pdf', 'application/vnd.ms-excel', ], $contentType, $multipart ); @@ -376,17 +405,19 @@ public function getCompanyReportRequest($id, $format, $accept_header_parameter = * * Request Custom Report * - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) * @param \BhrSdk\Model\RequestCustomReport $request_custom_report request_custom_report (required) - * @param bool|null $only_current Limits the report to only current employees. Setting to false will include future-dated employees in the report. (optional, default to false) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['requestCustomReport'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\RequestCustomReportResponse + * @deprecated */ - public function requestCustomReport($format, $request_custom_report, $only_current = false, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { - list($response) = $this->requestCustomReportWithHttpInfo($format, $request_custom_report, $only_current, $contentType); + public function requestCustomReport($request_custom_report, $accept = null, $format = null, $only_current = true, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { + list($response) = $this->requestCustomReportWithHttpInfo($request_custom_report, $accept, $format, $only_current, $contentType); return $response; } @@ -395,17 +426,19 @@ public function requestCustomReport($format, $request_custom_report, $only_curre * * Request Custom Report * - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) * @param \BhrSdk\Model\RequestCustomReport $request_custom_report (required) - * @param bool|null $only_current Limits the report to only current employees. Setting to false will include future-dated employees in the report. (optional, default to false) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['requestCustomReport'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\RequestCustomReportResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function requestCustomReportWithHttpInfo($format, $request_custom_report, $only_current = false, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { - $request = $this->requestCustomReportRequest($format, $request_custom_report, $only_current, $contentType); + public function requestCustomReportWithHttpInfo($request_custom_report, $accept = null, $format = null, $only_current = true, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { + $request = $this->requestCustomReportRequest($request_custom_report, $accept, $format, $only_current, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -413,8 +446,30 @@ public function requestCustomReportWithHttpInfo($format, $request_custom_report, $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\RequestCustomReportResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\RequestCustomReportResponse', $request, $response, ); @@ -425,16 +480,18 @@ public function requestCustomReportWithHttpInfo($format, $request_custom_report, * * Request Custom Report * - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) * @param \BhrSdk\Model\RequestCustomReport $request_custom_report (required) - * @param bool|null $only_current Limits the report to only current employees. Setting to false will include future-dated employees in the report. (optional, default to false) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['requestCustomReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function requestCustomReportAsync($format, $request_custom_report, $only_current = false, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { - return $this->requestCustomReportAsyncWithHttpInfo($format, $request_custom_report, $only_current, $contentType) + public function requestCustomReportAsync($request_custom_report, $accept = null, $format = null, $only_current = true, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { + return $this->requestCustomReportAsyncWithHttpInfo($request_custom_report, $accept, $format, $only_current, $contentType) ->then( function ($response) { return $response[0]; @@ -447,26 +504,30 @@ function ($response) { * * Request Custom Report * - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) * @param \BhrSdk\Model\RequestCustomReport $request_custom_report (required) - * @param bool|null $only_current Limits the report to only current employees. Setting to false will include future-dated employees in the report. (optional, default to false) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['requestCustomReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function requestCustomReportAsyncWithHttpInfo($format, $request_custom_report, $only_current = false, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { - - $request = $this->requestCustomReportRequest($format, $request_custom_report, $only_current, $contentType); + public function requestCustomReportAsyncWithHttpInfo($request_custom_report, $accept = null, $format = null, $only_current = true, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { + $returnType = '\BhrSdk\Model\RequestCustomReportResponse'; + $request = $this->requestCustomReportRequest($request_custom_report, $accept, $format, $only_current, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -491,19 +552,20 @@ function ($exception) { /** * Create request for operation 'requestCustomReport' * - * @param string $format The output format for the report. Supported formats: CSV, PDF, XLS, XML, JSON (required) * @param \BhrSdk\Model\RequestCustomReport $request_custom_report (required) - * @param bool|null $only_current Limits the report to only current employees. Setting to false will include future-dated employees in the report. (optional, default to false) + * @param string|null $accept The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. (optional) + * @param string|null $format The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. (optional) + * @param bool|null $only_current Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. (optional, default to true) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['requestCustomReport'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function requestCustomReportRequest($format, $request_custom_report, $only_current = false, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { + public function requestCustomReportRequest($request_custom_report, $accept = null, $format = null, $only_current = true, string $contentType = self::CONTENT_TYPES['requestCustomReport'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'format' => $format, 'request_custom_report' => $request_custom_report, ], methodName: 'requestCustomReport' @@ -518,7 +580,7 @@ public function requestCustomReportRequest($format, $request_custom_report, $onl $multipart = false; $parameters = [ - 'format' => ['value' => $format, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'format' => ['value' => $format, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], 'onlyCurrent' => ['value' => $only_current, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], ]; @@ -534,8 +596,13 @@ public function requestCustomReportRequest($format, $request_custom_report, $onl } } + // header params + if ($accept !== null) { + $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); + } + $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'text/xml', 'text/csv', 'application/pdf', 'application/vnd.ms-excel', ], $contentType, $multipart ); diff --git a/lib/Api/SchedulingApi.php b/lib/Api/SchedulingApi.php new file mode 100644 index 00000000..fe4fa8fe --- /dev/null +++ b/lib/Api/SchedulingApi.php @@ -0,0 +1,3303 @@ +<?php +declare(strict_types=1); +/** + * SchedulingApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * SchedulingApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class SchedulingApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'schedulingCreateSchedule' => [ + 'application/json', + ], + 'schedulingCreateShift' => [ + 'application/json', + ], + 'schedulingDeleteSchedule' => [ + 'application/json', + ], + 'schedulingDeleteShift' => [ + 'application/json', + ], + 'schedulingGetSchedule' => [ + 'application/json', + ], + 'schedulingGetSchedulePdf' => [ + 'application/json', + ], + 'schedulingGetShift' => [ + 'application/json', + ], + 'schedulingListSchedules' => [ + 'application/json', + ], + 'schedulingListShifts' => [ + 'application/json', + ], + 'schedulingListTimezones' => [ + 'application/json', + ], + 'schedulingPublishShifts' => [ + 'application/json', + ], + 'schedulingUpdateSchedule' => [ + 'application/json', + ], + 'schedulingUpdateShift' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation schedulingCreateSchedule + * + * Create Schedule + * + * @param \BhrSdk\Model\SchedulingCreateScheduleRequestV1 $scheduling_create_schedule_request_v1 scheduling_create_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingCreateSchedule($scheduling_create_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateSchedule'][0]) { + list($response) = $this->schedulingCreateScheduleWithHttpInfo($scheduling_create_schedule_request_v1, $contentType); + return $response; + } + + /** + * Operation schedulingCreateScheduleWithHttpInfo + * + * Create Schedule + * + * @param \BhrSdk\Model\SchedulingCreateScheduleRequestV1 $scheduling_create_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingCreateScheduleWithHttpInfo($scheduling_create_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateSchedule'][0]) { + $request = $this->schedulingCreateScheduleRequest($scheduling_create_schedule_request_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + } + + /** + * Operation schedulingCreateScheduleAsync + * + * Create Schedule + * + * @param \BhrSdk\Model\SchedulingCreateScheduleRequestV1 $scheduling_create_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingCreateScheduleAsync($scheduling_create_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateSchedule'][0]) { + return $this->schedulingCreateScheduleAsyncWithHttpInfo($scheduling_create_schedule_request_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingCreateScheduleAsyncWithHttpInfo + * + * Create Schedule + * + * @param \BhrSdk\Model\SchedulingCreateScheduleRequestV1 $scheduling_create_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingCreateScheduleAsyncWithHttpInfo($scheduling_create_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateSchedule'][0]) { + $returnType = '\BhrSdk\Model\SchedulingScheduleV1'; + $request = $this->schedulingCreateScheduleRequest($scheduling_create_schedule_request_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingCreateSchedule' + * + * @param \BhrSdk\Model\SchedulingCreateScheduleRequestV1 $scheduling_create_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingCreateScheduleRequest($scheduling_create_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateSchedule'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'scheduling_create_schedule_request_v1' => $scheduling_create_schedule_request_v1, + ], + methodName: 'schedulingCreateSchedule' + ); + + $resourcePath = '/api/v1/scheduling/schedules'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($scheduling_create_schedule_request_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($scheduling_create_schedule_request_v1)); + } else { + $httpBody = is_array($scheduling_create_schedule_request_v1) ? json_encode($scheduling_create_schedule_request_v1) : $scheduling_create_schedule_request_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingCreateShift + * + * Create Shift + * + * @param \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 $scheduling_create_scheduling_shift_request_v1 scheduling_create_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingCreateShift($scheduling_create_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateShift'][0]) { + list($response) = $this->schedulingCreateShiftWithHttpInfo($scheduling_create_scheduling_shift_request_v1, $contentType); + return $response; + } + + /** + * Operation schedulingCreateShiftWithHttpInfo + * + * Create Shift + * + * @param \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 $scheduling_create_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingCreateShiftWithHttpInfo($scheduling_create_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateShift'][0]) { + $request = $this->schedulingCreateShiftRequest($scheduling_create_scheduling_shift_request_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + } + + /** + * Operation schedulingCreateShiftAsync + * + * Create Shift + * + * @param \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 $scheduling_create_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingCreateShiftAsync($scheduling_create_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateShift'][0]) { + return $this->schedulingCreateShiftAsyncWithHttpInfo($scheduling_create_scheduling_shift_request_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingCreateShiftAsyncWithHttpInfo + * + * Create Shift + * + * @param \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 $scheduling_create_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingCreateShiftAsyncWithHttpInfo($scheduling_create_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateShift'][0]) { + $returnType = '\BhrSdk\Model\SchedulingSchedulingShiftV1'; + $request = $this->schedulingCreateShiftRequest($scheduling_create_scheduling_shift_request_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingCreateShift' + * + * @param \BhrSdk\Model\SchedulingCreateSchedulingShiftRequestV1 $scheduling_create_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingCreateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingCreateShiftRequest($scheduling_create_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingCreateShift'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'scheduling_create_scheduling_shift_request_v1' => $scheduling_create_scheduling_shift_request_v1, + ], + methodName: 'schedulingCreateShift' + ); + + $resourcePath = '/api/v1/scheduling/shifts'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($scheduling_create_scheduling_shift_request_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($scheduling_create_scheduling_shift_request_v1)); + } else { + $httpBody = is_array($scheduling_create_scheduling_shift_request_v1) ? json_encode($scheduling_create_scheduling_shift_request_v1) : $scheduling_create_scheduling_shift_request_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingDeleteSchedule + * + * Delete Schedule + * + * @param string $id The schedule UUID (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function schedulingDeleteSchedule($id, string $contentType = self::CONTENT_TYPES['schedulingDeleteSchedule'][0]) { + list($response) = $this->schedulingDeleteScheduleWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation schedulingDeleteScheduleWithHttpInfo + * + * Delete Schedule + * + * @param string $id The schedule UUID (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\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 schedulingDeleteScheduleWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingDeleteSchedule'][0]) { + $request = $this->schedulingDeleteScheduleRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation schedulingDeleteScheduleAsync + * + * Delete Schedule + * + * @param string $id The schedule UUID (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingDeleteScheduleAsync($id, string $contentType = self::CONTENT_TYPES['schedulingDeleteSchedule'][0]) { + return $this->schedulingDeleteScheduleAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingDeleteScheduleAsyncWithHttpInfo + * + * Delete Schedule + * + * @param string $id The schedule UUID (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingDeleteScheduleAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingDeleteSchedule'][0]) { + + $request = $this->schedulingDeleteScheduleRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'schedulingDeleteSchedule' + * + * @param string $id The schedule UUID (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingDeleteScheduleRequest($id, string $contentType = self::CONTENT_TYPES['schedulingDeleteSchedule'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'schedulingDeleteSchedule' + ); + + $resourcePath = '/api/v1/scheduling/schedules/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingDeleteShift + * + * Delete Shift + * + * @param string $id The shift UUID, or the projected shift composite ID. (required) + * @param string|null $recurrence_edit_option How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. (optional, default to 'instance') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function schedulingDeleteShift($id, $recurrence_edit_option = 'instance', string $contentType = self::CONTENT_TYPES['schedulingDeleteShift'][0]) { + list($response) = $this->schedulingDeleteShiftWithHttpInfo($id, $recurrence_edit_option, $contentType); + return $response; + } + + /** + * Operation schedulingDeleteShiftWithHttpInfo + * + * Delete Shift + * + * @param string $id The shift UUID, or the projected shift composite ID. (required) + * @param string|null $recurrence_edit_option How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. (optional, default to 'instance') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteShift'] to see the possible values for this operation + * + * @throws \BhrSdk\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 schedulingDeleteShiftWithHttpInfo($id, $recurrence_edit_option = 'instance', string $contentType = self::CONTENT_TYPES['schedulingDeleteShift'][0]) { + $request = $this->schedulingDeleteShiftRequest($id, $recurrence_edit_option, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation schedulingDeleteShiftAsync + * + * Delete Shift + * + * @param string $id The shift UUID, or the projected shift composite ID. (required) + * @param string|null $recurrence_edit_option How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. (optional, default to 'instance') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingDeleteShiftAsync($id, $recurrence_edit_option = 'instance', string $contentType = self::CONTENT_TYPES['schedulingDeleteShift'][0]) { + return $this->schedulingDeleteShiftAsyncWithHttpInfo($id, $recurrence_edit_option, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingDeleteShiftAsyncWithHttpInfo + * + * Delete Shift + * + * @param string $id The shift UUID, or the projected shift composite ID. (required) + * @param string|null $recurrence_edit_option How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. (optional, default to 'instance') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingDeleteShiftAsyncWithHttpInfo($id, $recurrence_edit_option = 'instance', string $contentType = self::CONTENT_TYPES['schedulingDeleteShift'][0]) { + + $request = $this->schedulingDeleteShiftRequest($id, $recurrence_edit_option, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'schedulingDeleteShift' + * + * @param string $id The shift UUID, or the projected shift composite ID. (required) + * @param string|null $recurrence_edit_option How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. (optional, default to 'instance') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingDeleteShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingDeleteShiftRequest($id, $recurrence_edit_option = 'instance', string $contentType = self::CONTENT_TYPES['schedulingDeleteShift'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'schedulingDeleteShift' + ); + + $resourcePath = '/api/v1/scheduling/shifts/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'recurrenceEditOption' => ['value' => $recurrence_edit_option, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingGetSchedule + * + * Get Schedule + * + * @param string $id The ID of the schedule (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingGetSchedule($id, string $contentType = self::CONTENT_TYPES['schedulingGetSchedule'][0]) { + list($response) = $this->schedulingGetScheduleWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation schedulingGetScheduleWithHttpInfo + * + * Get Schedule + * + * @param string $id The ID of the schedule (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingGetScheduleWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingGetSchedule'][0]) { + $request = $this->schedulingGetScheduleRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + } + + /** + * Operation schedulingGetScheduleAsync + * + * Get Schedule + * + * @param string $id The ID of the schedule (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetScheduleAsync($id, string $contentType = self::CONTENT_TYPES['schedulingGetSchedule'][0]) { + return $this->schedulingGetScheduleAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingGetScheduleAsyncWithHttpInfo + * + * Get Schedule + * + * @param string $id The ID of the schedule (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetScheduleAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingGetSchedule'][0]) { + $returnType = '\BhrSdk\Model\SchedulingScheduleV1'; + $request = $this->schedulingGetScheduleRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingGetSchedule' + * + * @param string $id The ID of the schedule (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingGetScheduleRequest($id, string $contentType = self::CONTENT_TYPES['schedulingGetSchedule'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'schedulingGetSchedule' + ); + + $resourcePath = '/api/v1/scheduling/schedules/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingGetSchedulePdf + * + * Get Schedule PDF + * + * @param string $id The schedule ID (required) + * @param \DateTime $start_ymd Start date in YYYY-MM-DD format (required) + * @param \DateTime $end_ymd End date in YYYY-MM-DD format (required) + * @param string|null $group_by Group employees by this field (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. (optional) + * @param bool|null $include_employees_without_shifts Whether to include employees who have no shifts in the date range (optional, default to false) + * @param bool|null $include_holidays Whether to include holidays in the PDF (optional, default to false) + * @param bool|null $include_time_off Whether to include time-off entries in the PDF (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedulePdf'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function schedulingGetSchedulePdf($id, $start_ymd, $end_ymd, $group_by = null, $employee_ids = null, $include_employees_without_shifts = false, $include_holidays = false, $include_time_off = false, string $contentType = self::CONTENT_TYPES['schedulingGetSchedulePdf'][0]) { + list($response) = $this->schedulingGetSchedulePdfWithHttpInfo($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off, $contentType); + return $response; + } + + /** + * Operation schedulingGetSchedulePdfWithHttpInfo + * + * Get Schedule PDF + * + * @param string $id The schedule ID (required) + * @param \DateTime $start_ymd Start date in YYYY-MM-DD format (required) + * @param \DateTime $end_ymd End date in YYYY-MM-DD format (required) + * @param string|null $group_by Group employees by this field (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. (optional) + * @param bool|null $include_employees_without_shifts Whether to include employees who have no shifts in the date range (optional, default to false) + * @param bool|null $include_holidays Whether to include holidays in the PDF (optional, default to false) + * @param bool|null $include_time_off Whether to include time-off entries in the PDF (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedulePdf'] to see the possible values for this operation + * + * @throws \BhrSdk\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 schedulingGetSchedulePdfWithHttpInfo($id, $start_ymd, $end_ymd, $group_by = null, $employee_ids = null, $include_employees_without_shifts = false, $include_holidays = false, $include_time_off = false, string $contentType = self::CONTENT_TYPES['schedulingGetSchedulePdf'][0]) { + $request = $this->schedulingGetSchedulePdfRequest($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation schedulingGetSchedulePdfAsync + * + * Get Schedule PDF + * + * @param string $id The schedule ID (required) + * @param \DateTime $start_ymd Start date in YYYY-MM-DD format (required) + * @param \DateTime $end_ymd End date in YYYY-MM-DD format (required) + * @param string|null $group_by Group employees by this field (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. (optional) + * @param bool|null $include_employees_without_shifts Whether to include employees who have no shifts in the date range (optional, default to false) + * @param bool|null $include_holidays Whether to include holidays in the PDF (optional, default to false) + * @param bool|null $include_time_off Whether to include time-off entries in the PDF (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedulePdf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetSchedulePdfAsync($id, $start_ymd, $end_ymd, $group_by = null, $employee_ids = null, $include_employees_without_shifts = false, $include_holidays = false, $include_time_off = false, string $contentType = self::CONTENT_TYPES['schedulingGetSchedulePdf'][0]) { + return $this->schedulingGetSchedulePdfAsyncWithHttpInfo($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingGetSchedulePdfAsyncWithHttpInfo + * + * Get Schedule PDF + * + * @param string $id The schedule ID (required) + * @param \DateTime $start_ymd Start date in YYYY-MM-DD format (required) + * @param \DateTime $end_ymd End date in YYYY-MM-DD format (required) + * @param string|null $group_by Group employees by this field (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. (optional) + * @param bool|null $include_employees_without_shifts Whether to include employees who have no shifts in the date range (optional, default to false) + * @param bool|null $include_holidays Whether to include holidays in the PDF (optional, default to false) + * @param bool|null $include_time_off Whether to include time-off entries in the PDF (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedulePdf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetSchedulePdfAsyncWithHttpInfo($id, $start_ymd, $end_ymd, $group_by = null, $employee_ids = null, $include_employees_without_shifts = false, $include_holidays = false, $include_time_off = false, string $contentType = self::CONTENT_TYPES['schedulingGetSchedulePdf'][0]) { + + $request = $this->schedulingGetSchedulePdfRequest($id, $start_ymd, $end_ymd, $group_by, $employee_ids, $include_employees_without_shifts, $include_holidays, $include_time_off, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'schedulingGetSchedulePdf' + * + * @param string $id The schedule ID (required) + * @param \DateTime $start_ymd Start date in YYYY-MM-DD format (required) + * @param \DateTime $end_ymd End date in YYYY-MM-DD format (required) + * @param string|null $group_by Group employees by this field (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. (optional) + * @param bool|null $include_employees_without_shifts Whether to include employees who have no shifts in the date range (optional, default to false) + * @param bool|null $include_holidays Whether to include holidays in the PDF (optional, default to false) + * @param bool|null $include_time_off Whether to include time-off entries in the PDF (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetSchedulePdf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingGetSchedulePdfRequest($id, $start_ymd, $end_ymd, $group_by = null, $employee_ids = null, $include_employees_without_shifts = false, $include_holidays = false, $include_time_off = false, string $contentType = self::CONTENT_TYPES['schedulingGetSchedulePdf'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'start_ymd' => $start_ymd, + 'end_ymd' => $end_ymd, + ], + methodName: 'schedulingGetSchedulePdf' + ); + + $resourcePath = '/api/v1/scheduling/schedules/{id}/pdf'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'startYmd' => ['value' => $start_ymd, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'endYmd' => ['value' => $end_ymd, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'groupBy' => ['value' => $group_by, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'employeeIds[]' => ['value' => $employee_ids, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'includeEmployeesWithoutShifts' => ['value' => $include_employees_without_shifts, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + 'includeHolidays' => ['value' => $include_holidays, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + 'includeTimeOff' => ['value' => $include_time_off, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/pdf', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingGetShift + * + * Get Shift + * + * @param string $id The shift uuid (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingGetShift($id, string $contentType = self::CONTENT_TYPES['schedulingGetShift'][0]) { + list($response) = $this->schedulingGetShiftWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation schedulingGetShiftWithHttpInfo + * + * Get Shift + * + * @param string $id The shift uuid (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingGetShiftWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingGetShift'][0]) { + $request = $this->schedulingGetShiftRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + } + + /** + * Operation schedulingGetShiftAsync + * + * Get Shift + * + * @param string $id The shift uuid (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetShiftAsync($id, string $contentType = self::CONTENT_TYPES['schedulingGetShift'][0]) { + return $this->schedulingGetShiftAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingGetShiftAsyncWithHttpInfo + * + * Get Shift + * + * @param string $id The shift uuid (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingGetShiftAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['schedulingGetShift'][0]) { + $returnType = '\BhrSdk\Model\SchedulingSchedulingShiftV1'; + $request = $this->schedulingGetShiftRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingGetShift' + * + * @param string $id The shift uuid (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingGetShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingGetShiftRequest($id, string $contentType = self::CONTENT_TYPES['schedulingGetShift'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'schedulingGetShift' + ); + + $resourcePath = '/api/v1/scheduling/shifts/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingListSchedules + * + * List Schedules + * + * @param string|null $filter OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. (optional) + * @param string|null $sort Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt (optional) + * @param int|null $page The starting page for pagination (optional, default to 1) + * @param int|null $page_size The number of items to be returned (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListSchedules'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingScheduleListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingListSchedules($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListSchedules'][0]) { + list($response) = $this->schedulingListSchedulesWithHttpInfo($filter, $sort, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation schedulingListSchedulesWithHttpInfo + * + * List Schedules + * + * @param string|null $filter OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. (optional) + * @param string|null $sort Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt (optional) + * @param int|null $page The starting page for pagination (optional, default to 1) + * @param int|null $page_size The number of items to be returned (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListSchedules'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingScheduleListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingListSchedulesWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListSchedules'][0]) { + $request = $this->schedulingListSchedulesRequest($filter, $sort, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleListResponseV1', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleListResponseV1', + $request, + $response, + ); + } + + /** + * Operation schedulingListSchedulesAsync + * + * List Schedules + * + * @param string|null $filter OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. (optional) + * @param string|null $sort Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt (optional) + * @param int|null $page The starting page for pagination (optional, default to 1) + * @param int|null $page_size The number of items to be returned (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListSchedules'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListSchedulesAsync($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListSchedules'][0]) { + return $this->schedulingListSchedulesAsyncWithHttpInfo($filter, $sort, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingListSchedulesAsyncWithHttpInfo + * + * List Schedules + * + * @param string|null $filter OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. (optional) + * @param string|null $sort Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt (optional) + * @param int|null $page The starting page for pagination (optional, default to 1) + * @param int|null $page_size The number of items to be returned (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListSchedules'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListSchedulesAsyncWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListSchedules'][0]) { + $returnType = '\BhrSdk\Model\SchedulingScheduleListResponseV1'; + $request = $this->schedulingListSchedulesRequest($filter, $sort, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingListSchedules' + * + * @param string|null $filter OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. (optional) + * @param string|null $sort Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt (optional) + * @param int|null $page The starting page for pagination (optional, default to 1) + * @param int|null $page_size The number of items to be returned (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListSchedules'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingListSchedulesRequest($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListSchedules'][0]) { + + $resourcePath = '/api/v1/scheduling/schedules'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingListShifts + * + * List Shifts + * + * @param string[]|null $ids Filter by shift IDs. If provided, other filters are ignored. (optional) + * @param \DateTime|null $start Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param \DateTime|null $end End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). (optional) + * @param string[]|null $schedule_ids Filter by schedule IDs. (optional) + * @param string[]|null $statuses Filter by shift statuses. (optional) + * @param int|null $page The starting page for pagination. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. (optional, default to 1000) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListShifts'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingShiftListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingListShifts($ids = null, $start = null, $end = null, $employee_ids = null, $schedule_ids = null, $statuses = null, $page = 1, $page_size = 1000, string $contentType = self::CONTENT_TYPES['schedulingListShifts'][0]) { + list($response) = $this->schedulingListShiftsWithHttpInfo($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation schedulingListShiftsWithHttpInfo + * + * List Shifts + * + * @param string[]|null $ids Filter by shift IDs. If provided, other filters are ignored. (optional) + * @param \DateTime|null $start Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param \DateTime|null $end End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). (optional) + * @param string[]|null $schedule_ids Filter by schedule IDs. (optional) + * @param string[]|null $statuses Filter by shift statuses. (optional) + * @param int|null $page The starting page for pagination. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. (optional, default to 1000) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListShifts'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingShiftListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingListShiftsWithHttpInfo($ids = null, $start = null, $end = null, $employee_ids = null, $schedule_ids = null, $statuses = null, $page = 1, $page_size = 1000, string $contentType = self::CONTENT_TYPES['schedulingListShifts'][0]) { + $request = $this->schedulingListShiftsRequest($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingShiftListResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingShiftListResponseV1', + $request, + $response, + ); + } + + /** + * Operation schedulingListShiftsAsync + * + * List Shifts + * + * @param string[]|null $ids Filter by shift IDs. If provided, other filters are ignored. (optional) + * @param \DateTime|null $start Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param \DateTime|null $end End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). (optional) + * @param string[]|null $schedule_ids Filter by schedule IDs. (optional) + * @param string[]|null $statuses Filter by shift statuses. (optional) + * @param int|null $page The starting page for pagination. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. (optional, default to 1000) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListShiftsAsync($ids = null, $start = null, $end = null, $employee_ids = null, $schedule_ids = null, $statuses = null, $page = 1, $page_size = 1000, string $contentType = self::CONTENT_TYPES['schedulingListShifts'][0]) { + return $this->schedulingListShiftsAsyncWithHttpInfo($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingListShiftsAsyncWithHttpInfo + * + * List Shifts + * + * @param string[]|null $ids Filter by shift IDs. If provided, other filters are ignored. (optional) + * @param \DateTime|null $start Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param \DateTime|null $end End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). (optional) + * @param string[]|null $schedule_ids Filter by schedule IDs. (optional) + * @param string[]|null $statuses Filter by shift statuses. (optional) + * @param int|null $page The starting page for pagination. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. (optional, default to 1000) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListShiftsAsyncWithHttpInfo($ids = null, $start = null, $end = null, $employee_ids = null, $schedule_ids = null, $statuses = null, $page = 1, $page_size = 1000, string $contentType = self::CONTENT_TYPES['schedulingListShifts'][0]) { + $returnType = '\BhrSdk\Model\SchedulingShiftListResponseV1'; + $request = $this->schedulingListShiftsRequest($ids, $start, $end, $employee_ids, $schedule_ids, $statuses, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingListShifts' + * + * @param string[]|null $ids Filter by shift IDs. If provided, other filters are ignored. (optional) + * @param \DateTime|null $start Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param \DateTime|null $end End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. (optional) + * @param string[]|null $employee_ids Filter by employee IDs. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). (optional) + * @param string[]|null $schedule_ids Filter by schedule IDs. (optional) + * @param string[]|null $statuses Filter by shift statuses. (optional) + * @param int|null $page The starting page for pagination. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. (optional, default to 1000) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingListShiftsRequest($ids = null, $start = null, $end = null, $employee_ids = null, $schedule_ids = null, $statuses = null, $page = 1, $page_size = 1000, string $contentType = self::CONTENT_TYPES['schedulingListShifts'][0]) { + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling SchedulingApi.schedulingListShifts, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 1000) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling SchedulingApi.schedulingListShifts, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling SchedulingApi.schedulingListShifts, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/scheduling/shifts'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'ids' => ['value' => $ids, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'start' => ['value' => $start, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'end' => ['value' => $end, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'employeeIds' => ['value' => $employee_ids, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'scheduleIds' => ['value' => $schedule_ids, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'statuses' => ['value' => $statuses, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingListTimezones + * + * List Timezones + * + * @param string|null $filter OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. (optional) + * @param string|null $sort Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListTimezones'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingTimezoneListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingListTimezones($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListTimezones'][0]) { + list($response) = $this->schedulingListTimezonesWithHttpInfo($filter, $sort, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation schedulingListTimezonesWithHttpInfo + * + * List Timezones + * + * @param string|null $filter OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. (optional) + * @param string|null $sort Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListTimezones'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingTimezoneListResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingListTimezonesWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListTimezones'][0]) { + $request = $this->schedulingListTimezonesRequest($filter, $sort, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingTimezoneListResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingTimezoneListResponseV1', + $request, + $response, + ); + } + + /** + * Operation schedulingListTimezonesAsync + * + * List Timezones + * + * @param string|null $filter OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. (optional) + * @param string|null $sort Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListTimezones'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListTimezonesAsync($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListTimezones'][0]) { + return $this->schedulingListTimezonesAsyncWithHttpInfo($filter, $sort, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingListTimezonesAsyncWithHttpInfo + * + * List Timezones + * + * @param string|null $filter OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. (optional) + * @param string|null $sort Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListTimezones'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingListTimezonesAsyncWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListTimezones'][0]) { + $returnType = '\BhrSdk\Model\SchedulingTimezoneListResponseV1'; + $request = $this->schedulingListTimezonesRequest($filter, $sort, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingListTimezones' + * + * @param string|null $filter OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. (optional) + * @param string|null $sort Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items to be returned. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingListTimezones'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingListTimezonesRequest($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['schedulingListTimezones'][0]) { + + $resourcePath = '/api/v1/scheduling/timezones'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingPublishShifts + * + * Publish Shifts + * + * @param \BhrSdk\Model\SchedulingPublishShiftsRequest $scheduling_publish_shifts_request scheduling_publish_shifts_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingPublishShifts'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingPublishShifts($scheduling_publish_shifts_request, string $contentType = self::CONTENT_TYPES['schedulingPublishShifts'][0]) { + list($response) = $this->schedulingPublishShiftsWithHttpInfo($scheduling_publish_shifts_request, $contentType); + return $response; + } + + /** + * Operation schedulingPublishShiftsWithHttpInfo + * + * Publish Shifts + * + * @param \BhrSdk\Model\SchedulingPublishShiftsRequest $scheduling_publish_shifts_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingPublishShifts'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\SchedulingPublishShiftsResultV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingPublishShiftsWithHttpInfo($scheduling_publish_shifts_request, string $contentType = self::CONTENT_TYPES['schedulingPublishShifts'][0]) { + $request = $this->schedulingPublishShiftsRequest($scheduling_publish_shifts_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingPublishShiftsResultV1', + $request, + $response, + ); + case 207: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingPublishShiftsResultV1', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingPublishShiftsResultV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingPublishShiftsResultV1', + $request, + $response, + ); + } + + /** + * Operation schedulingPublishShiftsAsync + * + * Publish Shifts + * + * @param \BhrSdk\Model\SchedulingPublishShiftsRequest $scheduling_publish_shifts_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingPublishShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingPublishShiftsAsync($scheduling_publish_shifts_request, string $contentType = self::CONTENT_TYPES['schedulingPublishShifts'][0]) { + return $this->schedulingPublishShiftsAsyncWithHttpInfo($scheduling_publish_shifts_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingPublishShiftsAsyncWithHttpInfo + * + * Publish Shifts + * + * @param \BhrSdk\Model\SchedulingPublishShiftsRequest $scheduling_publish_shifts_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingPublishShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingPublishShiftsAsyncWithHttpInfo($scheduling_publish_shifts_request, string $contentType = self::CONTENT_TYPES['schedulingPublishShifts'][0]) { + $returnType = '\BhrSdk\Model\SchedulingPublishShiftsResultV1'; + $request = $this->schedulingPublishShiftsRequest($scheduling_publish_shifts_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingPublishShifts' + * + * @param \BhrSdk\Model\SchedulingPublishShiftsRequest $scheduling_publish_shifts_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingPublishShifts'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingPublishShiftsRequest($scheduling_publish_shifts_request, string $contentType = self::CONTENT_TYPES['schedulingPublishShifts'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'scheduling_publish_shifts_request' => $scheduling_publish_shifts_request, + ], + methodName: 'schedulingPublishShifts' + ); + + $resourcePath = '/api/v1/scheduling/shifts/publish'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($scheduling_publish_shifts_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($scheduling_publish_shifts_request)); + } else { + $httpBody = is_array($scheduling_publish_shifts_request) ? json_encode($scheduling_publish_shifts_request) : $scheduling_publish_shifts_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingUpdateSchedule + * + * Update Schedule + * + * @param string $id The schedule UUID (required) + * @param \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 $scheduling_update_schedule_request_v1 scheduling_update_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingUpdateSchedule($id, $scheduling_update_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateSchedule'][0]) { + list($response) = $this->schedulingUpdateScheduleWithHttpInfo($id, $scheduling_update_schedule_request_v1, $contentType); + return $response; + } + + /** + * Operation schedulingUpdateScheduleWithHttpInfo + * + * Update Schedule + * + * @param string $id The schedule UUID (required) + * @param \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 $scheduling_update_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateSchedule'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingScheduleV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingUpdateScheduleWithHttpInfo($id, $scheduling_update_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateSchedule'][0]) { + $request = $this->schedulingUpdateScheduleRequest($id, $scheduling_update_schedule_request_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingScheduleV1', + $request, + $response, + ); + } + + /** + * Operation schedulingUpdateScheduleAsync + * + * Update Schedule + * + * @param string $id The schedule UUID (required) + * @param \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 $scheduling_update_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingUpdateScheduleAsync($id, $scheduling_update_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateSchedule'][0]) { + return $this->schedulingUpdateScheduleAsyncWithHttpInfo($id, $scheduling_update_schedule_request_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingUpdateScheduleAsyncWithHttpInfo + * + * Update Schedule + * + * @param string $id The schedule UUID (required) + * @param \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 $scheduling_update_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingUpdateScheduleAsyncWithHttpInfo($id, $scheduling_update_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateSchedule'][0]) { + $returnType = '\BhrSdk\Model\SchedulingScheduleV1'; + $request = $this->schedulingUpdateScheduleRequest($id, $scheduling_update_schedule_request_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingUpdateSchedule' + * + * @param string $id The schedule UUID (required) + * @param \BhrSdk\Model\SchedulingUpdateScheduleRequestV1 $scheduling_update_schedule_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateSchedule'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingUpdateScheduleRequest($id, $scheduling_update_schedule_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateSchedule'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'scheduling_update_schedule_request_v1' => $scheduling_update_schedule_request_v1, + ], + methodName: 'schedulingUpdateSchedule' + ); + + $resourcePath = '/api/v1/scheduling/schedules/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($scheduling_update_schedule_request_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($scheduling_update_schedule_request_v1)); + } else { + $httpBody = is_array($scheduling_update_schedule_request_v1) ? json_encode($scheduling_update_schedule_request_v1) : $scheduling_update_schedule_request_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PATCH', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation schedulingUpdateShift + * + * Update Shift + * + * @param string $id The shift uuid (required) + * @param \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 $scheduling_update_scheduling_shift_request_v1 scheduling_update_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function schedulingUpdateShift($id, $scheduling_update_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateShift'][0]) { + list($response) = $this->schedulingUpdateShiftWithHttpInfo($id, $scheduling_update_scheduling_shift_request_v1, $contentType); + return $response; + } + + /** + * Operation schedulingUpdateShiftWithHttpInfo + * + * Update Shift + * + * @param string $id The shift uuid (required) + * @param \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 $scheduling_update_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateShift'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\SchedulingSchedulingShiftV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function schedulingUpdateShiftWithHttpInfo($id, $scheduling_update_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateShift'][0]) { + $request = $this->schedulingUpdateShiftRequest($id, $scheduling_update_scheduling_shift_request_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\SchedulingSchedulingShiftV1', + $request, + $response, + ); + } + + /** + * Operation schedulingUpdateShiftAsync + * + * Update Shift + * + * @param string $id The shift uuid (required) + * @param \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 $scheduling_update_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingUpdateShiftAsync($id, $scheduling_update_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateShift'][0]) { + return $this->schedulingUpdateShiftAsyncWithHttpInfo($id, $scheduling_update_scheduling_shift_request_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation schedulingUpdateShiftAsyncWithHttpInfo + * + * Update Shift + * + * @param string $id The shift uuid (required) + * @param \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 $scheduling_update_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function schedulingUpdateShiftAsyncWithHttpInfo($id, $scheduling_update_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateShift'][0]) { + $returnType = '\BhrSdk\Model\SchedulingSchedulingShiftV1'; + $request = $this->schedulingUpdateShiftRequest($id, $scheduling_update_scheduling_shift_request_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'schedulingUpdateShift' + * + * @param string $id The shift uuid (required) + * @param \BhrSdk\Model\SchedulingUpdateSchedulingShiftRequestV1 $scheduling_update_scheduling_shift_request_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['schedulingUpdateShift'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function schedulingUpdateShiftRequest($id, $scheduling_update_scheduling_shift_request_v1, string $contentType = self::CONTENT_TYPES['schedulingUpdateShift'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'scheduling_update_scheduling_shift_request_v1' => $scheduling_update_scheduling_shift_request_v1, + ], + methodName: 'schedulingUpdateShift' + ); + + $resourcePath = '/api/v1/scheduling/shifts/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($scheduling_update_scheduling_shift_request_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($scheduling_update_scheduling_shift_request_v1)); + } else { + $httpBody = is_array($scheduling_update_scheduling_shift_request_v1) ? json_encode($scheduling_update_scheduling_shift_request_v1) : $scheduling_update_scheduling_shift_request_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PATCH', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/TabularDataApi.php b/lib/Api/TabularDataApi.php index 79e583cf..28500729 100644 --- a/lib/Api/TabularDataApi.php +++ b/lib/Api/TabularDataApi.php @@ -79,26 +79,34 @@ class TabularDataApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addEmployeeTableRow' => [ + 'createTableRow' => [ 'application/json', + 'application/xml', + 'text/xml', ], - 'addEmployeeTableRowV1' => [ + 'createTableRowV11' => [ 'application/json', + 'application/xml', + 'text/xml', ], - 'deleteEmployeeTableRowV1' => [ + 'deleteEmployeeTableRow' => [ 'application/json', ], 'getChangedEmployeeTableData' => [ 'application/json', ], - 'getEmployeeTableRow' => [ + 'getEmployeeTableData' => [ 'application/json', ], - 'updateEmployeeTableRow' => [ + 'updateTableRow' => [ 'application/json', + 'application/xml', + 'text/xml', ], - 'updateEmployeeTableRowV' => [ + 'updateTableRowV11' => [ 'application/json', + 'application/xml', + 'text/xml', ], ]; @@ -149,40 +157,40 @@ public function getConfig() { } /** - * Operation addEmployeeTableRow + * Operation createTableRow * * Create Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRow'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function addEmployeeTableRow($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRow'][0]) { - list($response) = $this->addEmployeeTableRowWithHttpInfo($id, $table, $table_row_update, $contentType); + public function createTableRow($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRow'][0]) { + list($response) = $this->createTableRowWithHttpInfo($id, $table, $table_row_update, $contentType); return $response; } /** - * Operation addEmployeeTableRowWithHttpInfo + * Operation createTableRowWithHttpInfo * * Create Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRow'] to see the possible values for this operation * * @throws \BhrSdk\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 addEmployeeTableRowWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRow'][0]) { - $request = $this->addEmployeeTableRowRequest($id, $table, $table_row_update, $contentType); + public function createTableRowWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRow'][0]) { + $request = $this->createTableRowRequest($id, $table, $table_row_update, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -198,20 +206,20 @@ public function addEmployeeTableRowWithHttpInfo($id, $table, $table_row_update, } /** - * Operation addEmployeeTableRowAsync + * Operation createTableRowAsync * * Create Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeTableRowAsync($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRow'][0]) { - return $this->addEmployeeTableRowAsyncWithHttpInfo($id, $table, $table_row_update, $contentType) + public function createTableRowAsync($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRow'][0]) { + return $this->createTableRowAsyncWithHttpInfo($id, $table, $table_row_update, $contentType) ->then( function ($response) { return $response[0]; @@ -220,21 +228,21 @@ function ($response) { } /** - * Operation addEmployeeTableRowAsyncWithHttpInfo + * Operation createTableRowAsyncWithHttpInfo * * Create Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeTableRowAsyncWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRow'][0]) { + public function createTableRowAsyncWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRow'][0]) { - $request = $this->addEmployeeTableRowRequest($id, $table, $table_row_update, $contentType); + $request = $this->createTableRowRequest($id, $table, $table_row_update, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -266,17 +274,17 @@ function ($exception) { } /** - * Create request for operation 'addEmployeeTableRow' + * Create request for operation 'createTableRow' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEmployeeTableRowRequest($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRow'][0]) { + public function createTableRowRequest($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRow'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -284,7 +292,7 @@ public function addEmployeeTableRowRequest($id, $table, $table_row_update, strin 'table' => $table, 'table_row_update' => $table_row_update, ], - methodName: 'addEmployeeTableRow' + methodName: 'createTableRow' ); $resourcePath = '/api/v1/employees/{id}/tables/{table}'; @@ -313,7 +321,7 @@ public function addEmployeeTableRowRequest($id, $table, $table_row_update, strin } $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + [], $contentType, $multipart ); @@ -373,40 +381,40 @@ public function addEmployeeTableRowRequest($id, $table, $table_row_update, strin } /** - * Operation addEmployeeTableRowV1 + * Operation createTableRowV11 * * Create Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRowV1'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRowV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function addEmployeeTableRowV1($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRowV1'][0]) { - list($response) = $this->addEmployeeTableRowV1WithHttpInfo($id, $table, $table_row_update, $contentType); + public function createTableRowV11($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRowV11'][0]) { + list($response) = $this->createTableRowV11WithHttpInfo($id, $table, $table_row_update, $contentType); return $response; } /** - * Operation addEmployeeTableRowV1WithHttpInfo + * Operation createTableRowV11WithHttpInfo * * Create Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRowV1'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRowV11'] to see the possible values for this operation * * @throws \BhrSdk\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 addEmployeeTableRowV1WithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRowV1'][0]) { - $request = $this->addEmployeeTableRowV1Request($id, $table, $table_row_update, $contentType); + public function createTableRowV11WithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRowV11'][0]) { + $request = $this->createTableRowV11Request($id, $table, $table_row_update, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -422,20 +430,20 @@ public function addEmployeeTableRowV1WithHttpInfo($id, $table, $table_row_update } /** - * Operation addEmployeeTableRowV1Async + * Operation createTableRowV11Async * * Create Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRowV1'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeTableRowV1Async($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRowV1'][0]) { - return $this->addEmployeeTableRowV1AsyncWithHttpInfo($id, $table, $table_row_update, $contentType) + public function createTableRowV11Async($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRowV11'][0]) { + return $this->createTableRowV11AsyncWithHttpInfo($id, $table, $table_row_update, $contentType) ->then( function ($response) { return $response[0]; @@ -444,21 +452,21 @@ function ($response) { } /** - * Operation addEmployeeTableRowV1AsyncWithHttpInfo + * Operation createTableRowV11AsyncWithHttpInfo * * Create Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRowV1'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEmployeeTableRowV1AsyncWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRowV1'][0]) { + public function createTableRowV11AsyncWithHttpInfo($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRowV11'][0]) { - $request = $this->addEmployeeTableRowV1Request($id, $table, $table_row_update, $contentType); + $request = $this->createTableRowV11Request($id, $table, $table_row_update, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -490,17 +498,17 @@ function ($exception) { } /** - * Create request for operation 'addEmployeeTableRowV1' + * Create request for operation 'createTableRowV11' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEmployeeTableRowV1'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEmployeeTableRowV1Request($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['addEmployeeTableRowV1'][0]) { + public function createTableRowV11Request($id, $table, $table_row_update, string $contentType = self::CONTENT_TYPES['createTableRowV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -508,7 +516,7 @@ public function addEmployeeTableRowV1Request($id, $table, $table_row_update, str 'table' => $table, 'table_row_update' => $table_row_update, ], - methodName: 'addEmployeeTableRowV1' + methodName: 'createTableRowV11' ); $resourcePath = '/api/v1_1/employees/{id}/tables/{table}'; @@ -537,7 +545,7 @@ public function addEmployeeTableRowV1Request($id, $table, $table_row_update, str } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -597,40 +605,40 @@ public function addEmployeeTableRowV1Request($id, $table, $table_row_update, str } /** - * Operation deleteEmployeeTableRowV1 + * Operation deleteEmployeeTableRow * - * Delete Table Row + * Delete Employee Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRowV1'] to see the possible values for this operation + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) + * @param string $row_id The ID of the specific row to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRow'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TableRowDeleteResponse */ - public function deleteEmployeeTableRowV1($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRowV1'][0]) { - list($response) = $this->deleteEmployeeTableRowV1WithHttpInfo($id, $table, $row_id, $contentType); + public function deleteEmployeeTableRow($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRow'][0]) { + list($response) = $this->deleteEmployeeTableRowWithHttpInfo($id, $table, $row_id, $contentType); return $response; } /** - * Operation deleteEmployeeTableRowV1WithHttpInfo + * Operation deleteEmployeeTableRowWithHttpInfo * - * Delete Table Row + * Delete Employee Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRowV1'] to see the possible values for this operation + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) + * @param string $row_id The ID of the specific row to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRow'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TableRowDeleteResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEmployeeTableRowV1WithHttpInfo($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRowV1'][0]) { - $request = $this->deleteEmployeeTableRowV1Request($id, $table, $row_id, $contentType); + public function deleteEmployeeTableRowWithHttpInfo($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRow'][0]) { + $request = $this->deleteEmployeeTableRowRequest($id, $table, $row_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -668,20 +676,20 @@ public function deleteEmployeeTableRowV1WithHttpInfo($id, $table, $row_id, strin } /** - * Operation deleteEmployeeTableRowV1Async + * Operation deleteEmployeeTableRowAsync * - * Delete Table Row + * Delete Employee Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRowV1'] to see the possible values for this operation + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) + * @param string $row_id The ID of the specific row to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmployeeTableRowV1Async($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRowV1'][0]) { - return $this->deleteEmployeeTableRowV1AsyncWithHttpInfo($id, $table, $row_id, $contentType) + public function deleteEmployeeTableRowAsync($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRow'][0]) { + return $this->deleteEmployeeTableRowAsyncWithHttpInfo($id, $table, $row_id, $contentType) ->then( function ($response) { return $response[0]; @@ -690,21 +698,21 @@ function ($response) { } /** - * Operation deleteEmployeeTableRowV1AsyncWithHttpInfo + * Operation deleteEmployeeTableRowAsyncWithHttpInfo * - * Delete Table Row + * Delete Employee Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRowV1'] to see the possible values for this operation + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) + * @param string $row_id The ID of the specific row to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmployeeTableRowV1AsyncWithHttpInfo($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRowV1'][0]) { + public function deleteEmployeeTableRowAsyncWithHttpInfo($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRow'][0]) { $returnType = '\BhrSdk\Model\TableRowDeleteResponse'; - $request = $this->deleteEmployeeTableRowV1Request($id, $table, $row_id, $contentType); + $request = $this->deleteEmployeeTableRowRequest($id, $table, $row_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -738,17 +746,17 @@ function ($exception) { } /** - * Create request for operation 'deleteEmployeeTableRowV1' + * Create request for operation 'deleteEmployeeTableRow' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRowV1'] to see the possible values for this operation + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) + * @param string $row_id The ID of the specific row to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteEmployeeTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteEmployeeTableRowV1Request($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRowV1'][0]) { + public function deleteEmployeeTableRowRequest($id, $table, $row_id, string $contentType = self::CONTENT_TYPES['deleteEmployeeTableRow'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -756,7 +764,7 @@ public function deleteEmployeeTableRowV1Request($id, $table, $row_id, string $co 'table' => $table, 'row_id' => $row_id, ], - methodName: 'deleteEmployeeTableRowV1' + methodName: 'deleteEmployeeTableRow' ); $resourcePath = '/api/v1/employees/{id}/tables/{table}/{rowId}'; @@ -847,13 +855,13 @@ public function deleteEmployeeTableRowV1Request($id, $table, $row_id, string $co * * Get Changed Employee Table Data * - * @param string $table Table name (required) - * @param string $since URL encoded iso8601 timestamp (required) + * @param string $table The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeTableData'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ChangedEmployeeTableDataResponse */ public function getChangedEmployeeTableData($table, $since, string $contentType = self::CONTENT_TYPES['getChangedEmployeeTableData'][0]) { list($response) = $this->getChangedEmployeeTableDataWithHttpInfo($table, $since, $contentType); @@ -865,13 +873,13 @@ public function getChangedEmployeeTableData($table, $since, string $contentType * * Get Changed Employee Table Data * - * @param string $table Table name (required) - * @param string $since URL encoded iso8601 timestamp (required) + * @param string $table The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeTableData'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\ChangedEmployeeTableDataResponse, HTTP status code, HTTP response headers (array of strings) */ public function getChangedEmployeeTableDataWithHttpInfo($table, $since, string $contentType = self::CONTENT_TYPES['getChangedEmployeeTableData'][0]) { $request = $this->getChangedEmployeeTableDataRequest($table, $since, $contentType); @@ -882,8 +890,30 @@ public function getChangedEmployeeTableDataWithHttpInfo($table, $since, string $ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ChangedEmployeeTableDataResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\ChangedEmployeeTableDataResponse', $request, $response, ); @@ -894,8 +924,8 @@ public function getChangedEmployeeTableDataWithHttpInfo($table, $since, string $ * * Get Changed Employee Table Data * - * @param string $table Table name (required) - * @param string $since URL encoded iso8601 timestamp (required) + * @param string $table The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -915,25 +945,27 @@ function ($response) { * * Get Changed Employee Table Data * - * @param string $table Table name (required) - * @param string $since URL encoded iso8601 timestamp (required) + * @param string $table The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function getChangedEmployeeTableDataAsyncWithHttpInfo($table, $since, string $contentType = self::CONTENT_TYPES['getChangedEmployeeTableData'][0]) { - + $returnType = '\BhrSdk\Model\ChangedEmployeeTableDataResponse'; $request = $this->getChangedEmployeeTableDataRequest($table, $since, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -958,8 +990,8 @@ function ($exception) { /** * Create request for operation 'getChangedEmployeeTableData' * - * @param string $table Table name (required) - * @param string $since URL encoded iso8601 timestamp (required) + * @param string $table The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param \DateTime $since ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getChangedEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1009,7 +1041,7 @@ public function getChangedEmployeeTableDataRequest($table, $since, string $conte } $headers = $this->headerSelector->selectHeaders( - ['application/xml', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -1059,38 +1091,40 @@ public function getChangedEmployeeTableDataRequest($table, $since, string $conte } /** - * Operation getEmployeeTableRow + * Operation getEmployeeTableData * - * Get Employee Table Rows + * Get Employee Table Data * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableRow'] to see the possible values for this operation + * @param string $id The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + * @param string $table The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableData'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeTableRow[] */ - public function getEmployeeTableRow($id, $table, string $contentType = self::CONTENT_TYPES['getEmployeeTableRow'][0]) { - list($response) = $this->getEmployeeTableRowWithHttpInfo($id, $table, $contentType); + public function getEmployeeTableData($id, $table, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeTableData'][0]) { + list($response) = $this->getEmployeeTableDataWithHttpInfo($id, $table, $accept_header_parameter, $contentType); return $response; } /** - * Operation getEmployeeTableRowWithHttpInfo + * Operation getEmployeeTableDataWithHttpInfo * - * Get Employee Table Rows + * Get Employee Table Data * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableRow'] to see the possible values for this operation + * @param string $id The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + * @param string $table The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableData'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeTableRow[], HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeTableRowWithHttpInfo($id, $table, string $contentType = self::CONTENT_TYPES['getEmployeeTableRow'][0]) { - $request = $this->getEmployeeTableRowRequest($id, $table, $contentType); + public function getEmployeeTableDataWithHttpInfo($id, $table, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeTableData'][0]) { + $request = $this->getEmployeeTableDataRequest($id, $table, $accept_header_parameter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1098,27 +1132,50 @@ public function getEmployeeTableRowWithHttpInfo($id, $table, string $contentType $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeTableRow[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeTableRow[]', $request, $response, ); } /** - * Operation getEmployeeTableRowAsync + * Operation getEmployeeTableDataAsync * - * Get Employee Table Rows + * Get Employee Table Data * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableRow'] to see the possible values for this operation + * @param string $id The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + * @param string $table The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeTableRowAsync($id, $table, string $contentType = self::CONTENT_TYPES['getEmployeeTableRow'][0]) { - return $this->getEmployeeTableRowAsyncWithHttpInfo($id, $table, $contentType) + public function getEmployeeTableDataAsync($id, $table, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeTableData'][0]) { + return $this->getEmployeeTableDataAsyncWithHttpInfo($id, $table, $accept_header_parameter, $contentType) ->then( function ($response) { return $response[0]; @@ -1127,29 +1184,32 @@ function ($response) { } /** - * Operation getEmployeeTableRowAsyncWithHttpInfo + * Operation getEmployeeTableDataAsyncWithHttpInfo * - * Get Employee Table Rows + * Get Employee Table Data * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableRow'] to see the possible values for this operation + * @param string $id The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + * @param string $table The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmployeeTableRowAsyncWithHttpInfo($id, $table, string $contentType = self::CONTENT_TYPES['getEmployeeTableRow'][0]) { - - $request = $this->getEmployeeTableRowRequest($id, $table, $contentType); + public function getEmployeeTableDataAsyncWithHttpInfo($id, $table, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeTableData'][0]) { + $returnType = '\BhrSdk\Model\EmployeeTableRow[]'; + $request = $this->getEmployeeTableDataRequest($id, $table, $accept_header_parameter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1172,23 +1232,24 @@ function ($exception) { } /** - * Create request for operation 'getEmployeeTableRow' + * Create request for operation 'getEmployeeTableData' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableRow'] to see the possible values for this operation + * @param string $id The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + * @param string $table The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getEmployeeTableData'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeTableRowRequest($id, $table, string $contentType = self::CONTENT_TYPES['getEmployeeTableRow'][0]) { + public function getEmployeeTableDataRequest($id, $table, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getEmployeeTableData'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, 'table' => $table, ], - methodName: 'getEmployeeTableRow' + methodName: 'getEmployeeTableData' ); $resourcePath = '/api/v1/employees/{id}/tables/{table}'; @@ -1199,6 +1260,11 @@ public function getEmployeeTableRowRequest($id, $table, string $contentType = se $httpBody = ''; $multipart = false; + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + // path params if ($id !== null) { $resourcePath = str_replace( @@ -1217,7 +1283,7 @@ public function getEmployeeTableRowRequest($id, $table, string $contentType = se } $headers = $this->headerSelector->selectHeaders( - ['application/xml', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -1267,42 +1333,42 @@ public function getEmployeeTableRowRequest($id, $table, string $contentType = se } /** - * Operation updateEmployeeTableRow + * Operation updateTableRow * * Update Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRow'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function updateEmployeeTableRow($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRow'][0]) { - list($response) = $this->updateEmployeeTableRowWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType); + public function updateTableRow($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRow'][0]) { + list($response) = $this->updateTableRowWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType); return $response; } /** - * Operation updateEmployeeTableRowWithHttpInfo + * Operation updateTableRowWithHttpInfo * * Update Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRow'] to see the possible values for this operation * * @throws \BhrSdk\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 updateEmployeeTableRowWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRow'][0]) { - $request = $this->updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_update, $contentType); + public function updateTableRowWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRow'][0]) { + $request = $this->updateTableRowRequest($id, $table, $row_id, $table_row_update, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1318,21 +1384,21 @@ public function updateEmployeeTableRowWithHttpInfo($id, $table, $row_id, $table_ } /** - * Operation updateEmployeeTableRowAsync + * Operation updateTableRowAsync * * Update Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmployeeTableRowAsync($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRow'][0]) { - return $this->updateEmployeeTableRowAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType) + public function updateTableRowAsync($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRow'][0]) { + return $this->updateTableRowAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType) ->then( function ($response) { return $response[0]; @@ -1341,22 +1407,22 @@ function ($response) { } /** - * Operation updateEmployeeTableRowAsyncWithHttpInfo + * Operation updateTableRowAsyncWithHttpInfo * * Update Table Row * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmployeeTableRowAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRow'][0]) { + public function updateTableRowAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRow'][0]) { - $request = $this->updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_update, $contentType); + $request = $this->updateTableRowRequest($id, $table, $row_id, $table_row_update, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1388,18 +1454,18 @@ function ($exception) { } /** - * Create request for operation 'updateEmployeeTableRow' + * Create request for operation 'updateTableRow' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRow'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRow'][0]) { + public function updateTableRowRequest($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRow'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -1408,7 +1474,7 @@ public function updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_u 'row_id' => $row_id, 'table_row_update' => $table_row_update, ], - methodName: 'updateEmployeeTableRow' + methodName: 'updateTableRow' ); $resourcePath = '/api/v1/employees/{id}/tables/{table}/{rowId}'; @@ -1445,7 +1511,7 @@ public function updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_u } $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + [], $contentType, $multipart ); @@ -1505,42 +1571,42 @@ public function updateEmployeeTableRowRequest($id, $table, $row_id, $table_row_u } /** - * Operation updateEmployeeTableRowV + * Operation updateTableRowV11 * * Update Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRowV'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRowV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function updateEmployeeTableRowV($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRowV'][0]) { - list($response) = $this->updateEmployeeTableRowVWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType); + public function updateTableRowV11($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRowV11'][0]) { + list($response) = $this->updateTableRowV11WithHttpInfo($id, $table, $row_id, $table_row_update, $contentType); return $response; } /** - * Operation updateEmployeeTableRowVWithHttpInfo + * Operation updateTableRowV11WithHttpInfo * * Update Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRowV'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRowV11'] to see the possible values for this operation * * @throws \BhrSdk\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 updateEmployeeTableRowVWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRowV'][0]) { - $request = $this->updateEmployeeTableRowVRequest($id, $table, $row_id, $table_row_update, $contentType); + public function updateTableRowV11WithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRowV11'][0]) { + $request = $this->updateTableRowV11Request($id, $table, $row_id, $table_row_update, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1556,21 +1622,21 @@ public function updateEmployeeTableRowVWithHttpInfo($id, $table, $row_id, $table } /** - * Operation updateEmployeeTableRowVAsync + * Operation updateTableRowV11Async * * Update Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRowV'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmployeeTableRowVAsync($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRowV'][0]) { - return $this->updateEmployeeTableRowVAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType) + public function updateTableRowV11Async($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRowV11'][0]) { + return $this->updateTableRowV11AsyncWithHttpInfo($id, $table, $row_id, $table_row_update, $contentType) ->then( function ($response) { return $response[0]; @@ -1579,22 +1645,22 @@ function ($response) { } /** - * Operation updateEmployeeTableRowVAsyncWithHttpInfo + * Operation updateTableRowV11AsyncWithHttpInfo * * Update Table Row v1.1 * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRowV'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmployeeTableRowVAsyncWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRowV'][0]) { + public function updateTableRowV11AsyncWithHttpInfo($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRowV11'][0]) { - $request = $this->updateEmployeeTableRowVRequest($id, $table, $row_id, $table_row_update, $contentType); + $request = $this->updateTableRowV11Request($id, $table, $row_id, $table_row_update, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1626,18 +1692,18 @@ function ($exception) { } /** - * Create request for operation 'updateEmployeeTableRowV' + * Create request for operation 'updateTableRowV11' * - * @param string $id {id} is the employee ID. (required) - * @param string $table Table name (required) - * @param string $row_id Row ID (required) + * @param string $id The employee ID. (required) + * @param string $table The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + * @param string $row_id The ID of the row to update. (required) * @param \BhrSdk\Model\TableRowUpdate $table_row_update (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateEmployeeTableRowV'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTableRowV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateEmployeeTableRowVRequest($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateEmployeeTableRowV'][0]) { + public function updateTableRowV11Request($id, $table, $row_id, $table_row_update, string $contentType = self::CONTENT_TYPES['updateTableRowV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -1646,7 +1712,7 @@ public function updateEmployeeTableRowVRequest($id, $table, $row_id, $table_row_ 'row_id' => $row_id, 'table_row_update' => $table_row_update, ], - methodName: 'updateEmployeeTableRowV' + methodName: 'updateTableRowV11' ); $resourcePath = '/api/v1_1/employees/{id}/tables/{table}/{rowId}'; @@ -1683,7 +1749,7 @@ public function updateEmployeeTableRowVRequest($id, $table, $row_id, $table_row_ } $headers = $this->headerSelector->selectHeaders( - ['application/xml', 'application/json', ], + [], $contentType, $multipart ); diff --git a/lib/Api/TimeOffApi.php b/lib/Api/TimeOffApi.php index e166217d..75109c79 100644 --- a/lib/Api/TimeOffApi.php +++ b/lib/Api/TimeOffApi.php @@ -79,44 +79,48 @@ class TimeOffApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'getAListOfWhoIsOut' => [ + 'adjustTimeOffBalance' => [ 'application/json', + 'application/xml', ], - 'getTimeOffPolicies' => [ + 'assignTimeOffPolicies' => [ 'application/json', ], - 'getTimeOffTypes' => [ + 'assignTimeOffPoliciesV11' => [ 'application/json', ], - 'timeOffAddATimeOffHistoryItemForTimeOffRequest' => [ + 'createTimeOffHistory' => [ 'application/json', + 'application/xml', ], - 'timeOffAddATimeOffRequest' => [ + 'createTimeOffRequest' => [ 'application/json', + 'application/xml', ], - 'timeOffAdjustTimeOffBalance' => [ + 'getTimeOffBalance' => [ 'application/json', ], - 'timeOffAssignTimeOffPoliciesForAnEmployee' => [ + 'listEmployeeTimeOffPolicies' => [ 'application/json', ], - 'timeOffAssignTimeOffPoliciesForAnEmployeeV11' => [ + 'listEmployeeTimeOffPoliciesV11' => [ 'application/json', ], - 'timeOffChangeARequestStatus' => [ + 'listTimeOffPolicies' => [ 'application/json', ], - 'timeOffEstimateFutureTimeOffBalances' => [ + 'listTimeOffRequests' => [ 'application/json', ], - 'timeOffGetTimeOffRequests' => [ + 'listTimeOffTypes' => [ 'application/json', ], - 'timeOffListTimeOffPoliciesForEmployee' => [ + 'listWhosOut' => [ 'application/json', ], - 'timeOffListTimeOffPoliciesForEmployeeV11' => [ + 'updateTimeOffRequestStatus' => [ 'application/json', + 'application/xml', ], ]; @@ -167,40 +171,38 @@ public function getConfig() { } /** - * Operation getAListOfWhoIsOut + * Operation adjustTimeOffBalance * - * Get Who’s Out + * Adjust Time Off Balance * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $start A date in the form YYYY-MM-DD - defaults to the current date. (optional) - * @param string|null $end A date in the form YYYY-MM-DD - defaults to 14 days from the start date. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAListOfWhoIsOut'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance adjust_time_off_balance (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['adjustTimeOffBalance'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function getAListOfWhoIsOut($accept_header_parameter = null, $start = null, $end = null, string $contentType = self::CONTENT_TYPES['getAListOfWhoIsOut'][0]) { - list($response) = $this->getAListOfWhoIsOutWithHttpInfo($accept_header_parameter, $start, $end, $contentType); + public function adjustTimeOffBalance($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['adjustTimeOffBalance'][0]) { + list($response) = $this->adjustTimeOffBalanceWithHttpInfo($employee_id, $adjust_time_off_balance, $contentType); return $response; } /** - * Operation getAListOfWhoIsOutWithHttpInfo + * Operation adjustTimeOffBalanceWithHttpInfo * - * Get Who’s Out + * Adjust Time Off Balance * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $start A date in the form YYYY-MM-DD - defaults to the current date. (optional) - * @param string|null $end A date in the form YYYY-MM-DD - defaults to 14 days from the start date. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAListOfWhoIsOut'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['adjustTimeOffBalance'] to see the possible values for this operation * * @throws \BhrSdk\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 getAListOfWhoIsOutWithHttpInfo($accept_header_parameter = null, $start = null, $end = null, string $contentType = self::CONTENT_TYPES['getAListOfWhoIsOut'][0]) { - $request = $this->getAListOfWhoIsOutRequest($accept_header_parameter, $start, $end, $contentType); + public function adjustTimeOffBalanceWithHttpInfo($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['adjustTimeOffBalance'][0]) { + $request = $this->adjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -216,20 +218,19 @@ public function getAListOfWhoIsOutWithHttpInfo($accept_header_parameter = null, } /** - * Operation getAListOfWhoIsOutAsync + * Operation adjustTimeOffBalanceAsync * - * Get Who’s Out + * Adjust Time Off Balance * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $start A date in the form YYYY-MM-DD - defaults to the current date. (optional) - * @param string|null $end A date in the form YYYY-MM-DD - defaults to 14 days from the start date. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAListOfWhoIsOut'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['adjustTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAListOfWhoIsOutAsync($accept_header_parameter = null, $start = null, $end = null, string $contentType = self::CONTENT_TYPES['getAListOfWhoIsOut'][0]) { - return $this->getAListOfWhoIsOutAsyncWithHttpInfo($accept_header_parameter, $start, $end, $contentType) + public function adjustTimeOffBalanceAsync($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['adjustTimeOffBalance'][0]) { + return $this->adjustTimeOffBalanceAsyncWithHttpInfo($employee_id, $adjust_time_off_balance, $contentType) ->then( function ($response) { return $response[0]; @@ -238,21 +239,20 @@ function ($response) { } /** - * Operation getAListOfWhoIsOutAsyncWithHttpInfo + * Operation adjustTimeOffBalanceAsyncWithHttpInfo * - * Get Who’s Out + * Adjust Time Off Balance * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $start A date in the form YYYY-MM-DD - defaults to the current date. (optional) - * @param string|null $end A date in the form YYYY-MM-DD - defaults to 14 days from the start date. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAListOfWhoIsOut'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['adjustTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAListOfWhoIsOutAsyncWithHttpInfo($accept_header_parameter = null, $start = null, $end = null, string $contentType = self::CONTENT_TYPES['getAListOfWhoIsOut'][0]) { + public function adjustTimeOffBalanceAsyncWithHttpInfo($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['adjustTimeOffBalance'][0]) { - $request = $this->getAListOfWhoIsOutRequest($accept_header_parameter, $start, $end, $contentType); + $request = $this->adjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -284,54 +284,58 @@ function ($exception) { } /** - * Create request for operation 'getAListOfWhoIsOut' + * Create request for operation 'adjustTimeOffBalance' * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $start A date in the form YYYY-MM-DD - defaults to the current date. (optional) - * @param string|null $end A date in the form YYYY-MM-DD - defaults to 14 days from the start date. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getAListOfWhoIsOut'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['adjustTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAListOfWhoIsOutRequest($accept_header_parameter = null, $start = null, $end = null, string $contentType = self::CONTENT_TYPES['getAListOfWhoIsOut'][0]) { + public function adjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['adjustTimeOffBalance'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + 'adjust_time_off_balance' => $adjust_time_off_balance, + ], + methodName: 'adjustTimeOffBalance' + ); - $resourcePath = '/api/v1/time_off/whos_out'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/employees/{employeeId}/time_off/balance_adjustment'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - $parameters = [ - 'start' => ['value' => $start, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - 'end' => ['value' => $end, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } - } - - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); + // for model (json/xml) + if (isset($adjust_time_off_balance)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($adjust_time_off_balance)); + } else { + $httpBody = is_array($adjust_time_off_balance) ? json_encode($adjust_time_off_balance) : $adjust_time_off_balance; + } + } + // Authentication methods // Basic authentication @@ -369,7 +373,7 @@ public function getAListOfWhoIsOutRequest($accept_header_parameter = null, $star $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -377,36 +381,38 @@ public function getAListOfWhoIsOutRequest($accept_header_parameter = null, $star } /** - * Operation getTimeOffPolicies + * Operation assignTimeOffPolicies * - * Get Time Off Policies + * Assign Time Off Policies * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffPolicies'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\AssignedTimeOffPolicy[] */ - public function getTimeOffPolicies($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getTimeOffPolicies'][0]) { - list($response) = $this->getTimeOffPoliciesWithHttpInfo($accept_header_parameter, $contentType); + public function assignTimeOffPolicies($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPolicies'][0]) { + list($response) = $this->assignTimeOffPoliciesWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, $contentType); return $response; } /** - * Operation getTimeOffPoliciesWithHttpInfo + * Operation assignTimeOffPoliciesWithHttpInfo * - * Get Time Off Policies + * Assign Time Off Policies * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffPolicies'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\AssignedTimeOffPolicy[], HTTP status code, HTTP response headers (array of strings) */ - public function getTimeOffPoliciesWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getTimeOffPolicies'][0]) { - $request = $this->getTimeOffPoliciesRequest($accept_header_parameter, $contentType); + public function assignTimeOffPoliciesWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPolicies'][0]) { + $request = $this->assignTimeOffPoliciesRequest($employee_id, $assign_time_off_policies_request_inner, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -414,26 +420,49 @@ public function getTimeOffPoliciesWithHttpInfo($accept_header_parameter = null, $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AssignedTimeOffPolicy[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\AssignedTimeOffPolicy[]', $request, $response, ); } /** - * Operation getTimeOffPoliciesAsync + * Operation assignTimeOffPoliciesAsync * - * Get Time Off Policies + * Assign Time Off Policies * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffPolicies'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeOffPoliciesAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getTimeOffPolicies'][0]) { - return $this->getTimeOffPoliciesAsyncWithHttpInfo($accept_header_parameter, $contentType) + public function assignTimeOffPoliciesAsync($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPolicies'][0]) { + return $this->assignTimeOffPoliciesAsyncWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, $contentType) ->then( function ($response) { return $response[0]; @@ -442,28 +471,31 @@ function ($response) { } /** - * Operation getTimeOffPoliciesAsyncWithHttpInfo + * Operation assignTimeOffPoliciesAsyncWithHttpInfo * - * Get Time Off Policies + * Assign Time Off Policies * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffPolicies'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeOffPoliciesAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getTimeOffPolicies'][0]) { - - $request = $this->getTimeOffPoliciesRequest($accept_header_parameter, $contentType); + public function assignTimeOffPoliciesAsyncWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPolicies'][0]) { + $returnType = '\BhrSdk\Model\AssignedTimeOffPolicy[]'; + $request = $this->assignTimeOffPoliciesRequest($employee_id, $assign_time_off_policies_request_inner, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -486,27 +518,40 @@ function ($exception) { } /** - * Create request for operation 'getTimeOffPolicies' + * Create request for operation 'assignTimeOffPolicies' * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffPolicies'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTimeOffPoliciesRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['getTimeOffPolicies'][0]) { + public function assignTimeOffPoliciesRequest($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPolicies'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + 'assign_time_off_policies_request_inner' => $assign_time_off_policies_request_inner, + ], + methodName: 'assignTimeOffPolicies' + ); - $resourcePath = '/api/v1/meta/time_off/policies'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/employees/{employeeId}/time_off/policies'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); } $headers = $this->headerSelector->selectHeaders( @@ -515,6 +560,16 @@ public function getTimeOffPoliciesRequest($accept_header_parameter = null, strin $multipart ); + // for model (json/xml) + if (isset($assign_time_off_policies_request_inner)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($assign_time_off_policies_request_inner)); + } else { + $httpBody = is_array($assign_time_off_policies_request_inner) ? json_encode($assign_time_off_policies_request_inner) : $assign_time_off_policies_request_inner; + } + } + // Authentication methods // Basic authentication @@ -552,7 +607,7 @@ public function getTimeOffPoliciesRequest($accept_header_parameter = null, strin $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -560,38 +615,38 @@ public function getTimeOffPoliciesRequest($accept_header_parameter = null, strin } /** - * Operation getTimeOffTypes + * Operation assignTimeOffPoliciesV11 * - * Get Time Off Types + * Assign Time Off Policies v1.1 * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $mode set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffTypes'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\AssignedTimeOffPolicyV11[] */ - public function getTimeOffTypes($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['getTimeOffTypes'][0]) { - list($response) = $this->getTimeOffTypesWithHttpInfo($accept_header_parameter, $mode, $contentType); + public function assignTimeOffPoliciesV11($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPoliciesV11'][0]) { + list($response) = $this->assignTimeOffPoliciesV11WithHttpInfo($employee_id, $assign_time_off_policies_request_inner, $contentType); return $response; } /** - * Operation getTimeOffTypesWithHttpInfo + * Operation assignTimeOffPoliciesV11WithHttpInfo * - * Get Time Off Types + * Assign Time Off Policies v1.1 * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $mode set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffTypes'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\AssignedTimeOffPolicyV11[], HTTP status code, HTTP response headers (array of strings) */ - public function getTimeOffTypesWithHttpInfo($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['getTimeOffTypes'][0]) { - $request = $this->getTimeOffTypesRequest($accept_header_parameter, $mode, $contentType); + public function assignTimeOffPoliciesV11WithHttpInfo($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPoliciesV11'][0]) { + $request = $this->assignTimeOffPoliciesV11Request($employee_id, $assign_time_off_policies_request_inner, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -599,27 +654,49 @@ public function getTimeOffTypesWithHttpInfo($accept_header_parameter = null, $mo $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\AssignedTimeOffPolicyV11[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\AssignedTimeOffPolicyV11[]', $request, $response, ); } /** - * Operation getTimeOffTypesAsync + * Operation assignTimeOffPoliciesV11Async * - * Get Time Off Types + * Assign Time Off Policies v1.1 * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $mode set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffTypes'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeOffTypesAsync($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['getTimeOffTypes'][0]) { - return $this->getTimeOffTypesAsyncWithHttpInfo($accept_header_parameter, $mode, $contentType) + public function assignTimeOffPoliciesV11Async($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPoliciesV11'][0]) { + return $this->assignTimeOffPoliciesV11AsyncWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, $contentType) ->then( function ($response) { return $response[0]; @@ -628,29 +705,31 @@ function ($response) { } /** - * Operation getTimeOffTypesAsyncWithHttpInfo + * Operation assignTimeOffPoliciesV11AsyncWithHttpInfo * - * Get Time Off Types + * Assign Time Off Policies v1.1 * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $mode set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffTypes'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimeOffTypesAsyncWithHttpInfo($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['getTimeOffTypes'][0]) { - - $request = $this->getTimeOffTypesRequest($accept_header_parameter, $mode, $contentType); + public function assignTimeOffPoliciesV11AsyncWithHttpInfo($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPoliciesV11'][0]) { + $returnType = '\BhrSdk\Model\AssignedTimeOffPolicyV11[]'; + $request = $this->assignTimeOffPoliciesV11Request($employee_id, $assign_time_off_policies_request_inner, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -673,44 +752,40 @@ function ($exception) { } /** - * Create request for operation 'getTimeOffTypes' + * Create request for operation 'assignTimeOffPoliciesV11' * - * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string|null $mode set to \\'request\\' to get a list of all time off types with which this user can create a time off request. The default is to return the list of time off types the user has permissions on. This distinction is important, as employees can request time off for types that they don\\'t have permission to view balances and requests for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffTypes'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to assign policies to. (required) + * @param \BhrSdk\Model\AssignTimeOffPoliciesRequestInner[] $assign_time_off_policies_request_inner (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTimeOffTypesRequest($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['getTimeOffTypes'][0]) { + public function assignTimeOffPoliciesV11Request($employee_id, $assign_time_off_policies_request_inner, string $contentType = self::CONTENT_TYPES['assignTimeOffPoliciesV11'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + 'assign_time_off_policies_request_inner' => $assign_time_off_policies_request_inner, + ], + methodName: 'assignTimeOffPoliciesV11' + ); - $resourcePath = '/api/v1/meta/time_off/types'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1_1/employees/{employeeId}/time_off/policies'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - $parameters = [ - 'mode' => ['value' => $mode, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } - } - - // header params - if ($accept_header_parameter !== null) { - $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); } $headers = $this->headerSelector->selectHeaders( @@ -719,6 +794,16 @@ public function getTimeOffTypesRequest($accept_header_parameter = null, $mode = $multipart ); + // for model (json/xml) + if (isset($assign_time_off_policies_request_inner)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($assign_time_off_policies_request_inner)); + } else { + $httpBody = is_array($assign_time_off_policies_request_inner) ? json_encode($assign_time_off_policies_request_inner) : $assign_time_off_policies_request_inner; + } + } + // Authentication methods // Basic authentication @@ -756,7 +841,7 @@ public function getTimeOffTypesRequest($accept_header_parameter = null, $mode = $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -764,38 +849,38 @@ public function getTimeOffTypesRequest($accept_header_parameter = null, $mode = } /** - * Operation timeOffAddATimeOffHistoryItemForTimeOffRequest + * Operation createTimeOffHistory * - * Create Time Off Request History Item + * Create Time Off History Item * * @param int $employee_id The ID of the employee. (required) * @param \BhrSdk\Model\TimeOffHistory $time_off_history time_off_history (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffHistory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function timeOffAddATimeOffHistoryItemForTimeOffRequest($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'][0]) { - list($response) = $this->timeOffAddATimeOffHistoryItemForTimeOffRequestWithHttpInfo($employee_id, $time_off_history, $contentType); + public function createTimeOffHistory($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['createTimeOffHistory'][0]) { + list($response) = $this->createTimeOffHistoryWithHttpInfo($employee_id, $time_off_history, $contentType); return $response; } /** - * Operation timeOffAddATimeOffHistoryItemForTimeOffRequestWithHttpInfo + * Operation createTimeOffHistoryWithHttpInfo * - * Create Time Off Request History Item + * Create Time Off History Item * * @param int $employee_id The ID of the employee. (required) * @param \BhrSdk\Model\TimeOffHistory $time_off_history (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffHistory'] to see the possible values for this operation * * @throws \BhrSdk\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 timeOffAddATimeOffHistoryItemForTimeOffRequestWithHttpInfo($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'][0]) { - $request = $this->timeOffAddATimeOffHistoryItemForTimeOffRequestRequest($employee_id, $time_off_history, $contentType); + public function createTimeOffHistoryWithHttpInfo($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['createTimeOffHistory'][0]) { + $request = $this->createTimeOffHistoryRequest($employee_id, $time_off_history, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -811,19 +896,19 @@ public function timeOffAddATimeOffHistoryItemForTimeOffRequestWithHttpInfo($empl } /** - * Operation timeOffAddATimeOffHistoryItemForTimeOffRequestAsync + * Operation createTimeOffHistoryAsync * - * Create Time Off Request History Item + * Create Time Off History Item * * @param int $employee_id The ID of the employee. (required) * @param \BhrSdk\Model\TimeOffHistory $time_off_history (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAddATimeOffHistoryItemForTimeOffRequestAsync($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'][0]) { - return $this->timeOffAddATimeOffHistoryItemForTimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_history, $contentType) + public function createTimeOffHistoryAsync($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['createTimeOffHistory'][0]) { + return $this->createTimeOffHistoryAsyncWithHttpInfo($employee_id, $time_off_history, $contentType) ->then( function ($response) { return $response[0]; @@ -832,20 +917,20 @@ function ($response) { } /** - * Operation timeOffAddATimeOffHistoryItemForTimeOffRequestAsyncWithHttpInfo + * Operation createTimeOffHistoryAsyncWithHttpInfo * - * Create Time Off Request History Item + * Create Time Off History Item * * @param int $employee_id The ID of the employee. (required) * @param \BhrSdk\Model\TimeOffHistory $time_off_history (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAddATimeOffHistoryItemForTimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'][0]) { + public function createTimeOffHistoryAsyncWithHttpInfo($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['createTimeOffHistory'][0]) { - $request = $this->timeOffAddATimeOffHistoryItemForTimeOffRequestRequest($employee_id, $time_off_history, $contentType); + $request = $this->createTimeOffHistoryRequest($employee_id, $time_off_history, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -877,23 +962,23 @@ function ($exception) { } /** - * Create request for operation 'timeOffAddATimeOffHistoryItemForTimeOffRequest' + * Create request for operation 'createTimeOffHistory' * * @param int $employee_id The ID of the employee. (required) * @param \BhrSdk\Model\TimeOffHistory $time_off_history (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffAddATimeOffHistoryItemForTimeOffRequestRequest($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffHistoryItemForTimeOffRequest'][0]) { + public function createTimeOffHistoryRequest($employee_id, $time_off_history, string $contentType = self::CONTENT_TYPES['createTimeOffHistory'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'time_off_history' => $time_off_history, ], - methodName: 'timeOffAddATimeOffHistoryItemForTimeOffRequest' + methodName: 'createTimeOffHistory' ); $resourcePath = '/api/v1/employees/{employeeId}/time_off/history'; @@ -974,38 +1059,38 @@ public function timeOffAddATimeOffHistoryItemForTimeOffRequestRequest($employee_ } /** - * Operation timeOffAddATimeOffRequest + * Operation createTimeOffRequest * * Create Time Off Request * - * @param string $employee_id employee_id (required) + * @param int $employee_id The ID of the employee to create the time off request for. (required) * @param \BhrSdk\Model\TimeOffRequest $time_off_request time_off_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffRequest'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\CreatedTimeOffRequest */ - public function timeOffAddATimeOffRequest($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffRequest'][0]) { - list($response) = $this->timeOffAddATimeOffRequestWithHttpInfo($employee_id, $time_off_request, $contentType); + public function createTimeOffRequest($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['createTimeOffRequest'][0]) { + list($response) = $this->createTimeOffRequestWithHttpInfo($employee_id, $time_off_request, $contentType); return $response; } /** - * Operation timeOffAddATimeOffRequestWithHttpInfo + * Operation createTimeOffRequestWithHttpInfo * * Create Time Off Request * - * @param string $employee_id (required) + * @param int $employee_id The ID of the employee to create the time off request for. (required) * @param \BhrSdk\Model\TimeOffRequest $time_off_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffRequest'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\CreatedTimeOffRequest, HTTP status code, HTTP response headers (array of strings) */ - public function timeOffAddATimeOffRequestWithHttpInfo($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffRequest'][0]) { - $request = $this->timeOffAddATimeOffRequestRequest($employee_id, $time_off_request, $contentType); + public function createTimeOffRequestWithHttpInfo($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['createTimeOffRequest'][0]) { + $request = $this->createTimeOffRequestRequest($employee_id, $time_off_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1013,27 +1098,49 @@ public function timeOffAddATimeOffRequestWithHttpInfo($employee_id, $time_off_re $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreatedTimeOffRequest', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\CreatedTimeOffRequest', $request, $response, ); } /** - * Operation timeOffAddATimeOffRequestAsync + * Operation createTimeOffRequestAsync * * Create Time Off Request * - * @param string $employee_id (required) + * @param int $employee_id The ID of the employee to create the time off request for. (required) * @param \BhrSdk\Model\TimeOffRequest $time_off_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAddATimeOffRequestAsync($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffRequest'][0]) { - return $this->timeOffAddATimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_request, $contentType) + public function createTimeOffRequestAsync($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['createTimeOffRequest'][0]) { + return $this->createTimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_request, $contentType) ->then( function ($response) { return $response[0]; @@ -1042,29 +1149,31 @@ function ($response) { } /** - * Operation timeOffAddATimeOffRequestAsyncWithHttpInfo + * Operation createTimeOffRequestAsyncWithHttpInfo * * Create Time Off Request * - * @param string $employee_id (required) + * @param int $employee_id The ID of the employee to create the time off request for. (required) * @param \BhrSdk\Model\TimeOffRequest $time_off_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAddATimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffRequest'][0]) { - - $request = $this->timeOffAddATimeOffRequestRequest($employee_id, $time_off_request, $contentType); + public function createTimeOffRequestAsyncWithHttpInfo($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['createTimeOffRequest'][0]) { + $returnType = '\BhrSdk\Model\CreatedTimeOffRequest'; + $request = $this->createTimeOffRequestRequest($employee_id, $time_off_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1087,23 +1196,23 @@ function ($exception) { } /** - * Create request for operation 'timeOffAddATimeOffRequest' + * Create request for operation 'createTimeOffRequest' * - * @param string $employee_id (required) + * @param int $employee_id The ID of the employee to create the time off request for. (required) * @param \BhrSdk\Model\TimeOffRequest $time_off_request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAddATimeOffRequest'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeOffRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffAddATimeOffRequestRequest($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['timeOffAddATimeOffRequest'][0]) { + public function createTimeOffRequestRequest($employee_id, $time_off_request, string $contentType = self::CONTENT_TYPES['createTimeOffRequest'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, 'time_off_request' => $time_off_request, ], - methodName: 'timeOffAddATimeOffRequest' + methodName: 'createTimeOffRequest' ); $resourcePath = '/api/v1/employees/{employeeId}/time_off/request'; @@ -1184,38 +1293,42 @@ public function timeOffAddATimeOffRequestRequest($employee_id, $time_off_request } /** - * Operation timeOffAdjustTimeOffBalance + * Operation getTimeOffBalance * - * Update Time Off Balance + * Get Time Off Balance * - * @param int $employee_id The ID of the employee. (required) - * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance adjust_time_off_balance (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to get time off balances for. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $end The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. (optional) + * @param int|null $precision Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. (optional, default to 2) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffBalance'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimeOffBalanceEntry[]|\BhrSdk\Model\ProblemDetailsResponse */ - public function timeOffAdjustTimeOffBalance($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'][0]) { - list($response) = $this->timeOffAdjustTimeOffBalanceWithHttpInfo($employee_id, $adjust_time_off_balance, $contentType); + public function getTimeOffBalance($employee_id, $accept_header_parameter = null, $end = null, $precision = 2, string $contentType = self::CONTENT_TYPES['getTimeOffBalance'][0]) { + list($response) = $this->getTimeOffBalanceWithHttpInfo($employee_id, $accept_header_parameter, $end, $precision, $contentType); return $response; } /** - * Operation timeOffAdjustTimeOffBalanceWithHttpInfo + * Operation getTimeOffBalanceWithHttpInfo * - * Update Time Off Balance + * Get Time Off Balance * - * @param int $employee_id The ID of the employee. (required) - * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to get time off balances for. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $end The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. (optional) + * @param int|null $precision Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. (optional, default to 2) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffBalance'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimeOffBalanceEntry[]|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function timeOffAdjustTimeOffBalanceWithHttpInfo($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'][0]) { - $request = $this->timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, $contentType); + public function getTimeOffBalanceWithHttpInfo($employee_id, $accept_header_parameter = null, $end = null, $precision = 2, string $contentType = self::CONTENT_TYPES['getTimeOffBalance'][0]) { + $request = $this->getTimeOffBalanceRequest($employee_id, $accept_header_parameter, $end, $precision, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1223,27 +1336,57 @@ public function timeOffAdjustTimeOffBalanceWithHttpInfo($employee_id, $adjust_ti $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeOffBalanceEntry[]', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimeOffBalanceEntry[]', $request, $response, ); } /** - * Operation timeOffAdjustTimeOffBalanceAsync + * Operation getTimeOffBalanceAsync * - * Update Time Off Balance + * Get Time Off Balance * - * @param int $employee_id The ID of the employee. (required) - * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to get time off balances for. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $end The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. (optional) + * @param int|null $precision Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. (optional, default to 2) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAdjustTimeOffBalanceAsync($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'][0]) { - return $this->timeOffAdjustTimeOffBalanceAsyncWithHttpInfo($employee_id, $adjust_time_off_balance, $contentType) + public function getTimeOffBalanceAsync($employee_id, $accept_header_parameter = null, $end = null, $precision = 2, string $contentType = self::CONTENT_TYPES['getTimeOffBalance'][0]) { + return $this->getTimeOffBalanceAsyncWithHttpInfo($employee_id, $accept_header_parameter, $end, $precision, $contentType) ->then( function ($response) { return $response[0]; @@ -1252,29 +1395,33 @@ function ($response) { } /** - * Operation timeOffAdjustTimeOffBalanceAsyncWithHttpInfo + * Operation getTimeOffBalanceAsyncWithHttpInfo * - * Update Time Off Balance + * Get Time Off Balance * - * @param int $employee_id The ID of the employee. (required) - * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to get time off balances for. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $end The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. (optional) + * @param int|null $precision Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. (optional, default to 2) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAdjustTimeOffBalanceAsyncWithHttpInfo($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'][0]) { - - $request = $this->timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, $contentType); + public function getTimeOffBalanceAsyncWithHttpInfo($employee_id, $accept_header_parameter = null, $end = null, $precision = 2, string $contentType = self::CONTENT_TYPES['getTimeOffBalance'][0]) { + $returnType = '\BhrSdk\Model\TimeOffBalanceEntry[]'; + $request = $this->getTimeOffBalanceRequest($employee_id, $accept_header_parameter, $end, $precision, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1297,33 +1444,63 @@ function ($exception) { } /** - * Create request for operation 'timeOffAdjustTimeOffBalance' + * Create request for operation 'getTimeOffBalance' * - * @param int $employee_id The ID of the employee. (required) - * @param \BhrSdk\Model\AdjustTimeOffBalance $adjust_time_off_balance (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'] to see the possible values for this operation + * @param int $employee_id The ID of the employee to get time off balances for. (required) + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $end The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. (optional) + * @param int|null $precision Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2. (optional, default to 2) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimeOffBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_off_balance, string $contentType = self::CONTENT_TYPES['timeOffAdjustTimeOffBalance'][0]) { + public function getTimeOffBalanceRequest($employee_id, $accept_header_parameter = null, $end = null, $precision = 2, string $contentType = self::CONTENT_TYPES['getTimeOffBalance'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'adjust_time_off_balance' => $adjust_time_off_balance, ], - methodName: 'timeOffAdjustTimeOffBalance' + methodName: 'getTimeOffBalance' ); - $resourcePath = '/api/v1/employees/{employeeId}/time_off/balance_adjustment'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + if ($precision !== null && $precision > 4) { + throw new \InvalidArgumentException('invalid value for "$precision" when calling TimeOffApi.getTimeOffBalance, must be smaller than or equal to 4.'); + } + if ($precision !== null && $precision < 0) { + throw new \InvalidArgumentException('invalid value for "$precision" when calling TimeOffApi.getTimeOffBalance, must be bigger than or equal to 0.'); + } + + $resourcePath = '/api/v1/employees/{employeeId}/time_off/calculator'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + $parameters = [ + 'end' => ['value' => $end, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'precision' => ['value' => $precision, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + // path params if ($employee_id !== null) { $resourcePath = str_replace( @@ -1334,21 +1511,11 @@ public function timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_of } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); - // for model (json/xml) - if (isset($adjust_time_off_balance)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($adjust_time_off_balance)); - } else { - $httpBody = is_array($adjust_time_off_balance) ? json_encode($adjust_time_off_balance) : $adjust_time_off_balance; - } - } - // Authentication methods // Basic authentication @@ -1386,7 +1553,7 @@ public function timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_of $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1394,38 +1561,36 @@ public function timeOffAdjustTimeOffBalanceRequest($employee_id, $adjust_time_of } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployee + * Operation listEmployeeTimeOffPolicies * - * Assign Time Off Policies + * List Employee Time Off Policies * - * @param string $employee_id employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeTimeOffPolicyAssignment[] */ - public function timeOffAssignTimeOffPoliciesForAnEmployee($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'][0]) { - list($response) = $this->timeOffAssignTimeOffPoliciesForAnEmployeeWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPolicies($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPolicies'][0]) { + list($response) = $this->listEmployeeTimeOffPoliciesWithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeWithHttpInfo + * Operation listEmployeeTimeOffPoliciesWithHttpInfo * - * Assign Time Off Policies + * List Employee Time Off Policies * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeTimeOffPolicyAssignment[], HTTP status code, HTTP response headers (array of strings) */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'][0]) { - $request = $this->timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPoliciesWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPolicies'][0]) { + $request = $this->listEmployeeTimeOffPoliciesRequest($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1433,27 +1598,48 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeWithHttpInfo($employee_ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeTimeOffPolicyAssignment[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeTimeOffPolicyAssignment[]', $request, $response, ); } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeAsync + * Operation listEmployeeTimeOffPoliciesAsync * - * Assign Time Off Policies + * List Employee Time Off Policies * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeAsync($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'][0]) { - return $this->timeOffAssignTimeOffPoliciesForAnEmployeeAsyncWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType) + public function listEmployeeTimeOffPoliciesAsync($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPolicies'][0]) { + return $this->listEmployeeTimeOffPoliciesAsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1462,29 +1648,30 @@ function ($response) { } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeAsyncWithHttpInfo + * Operation listEmployeeTimeOffPoliciesAsyncWithHttpInfo * - * Assign Time Off Policies + * List Employee Time Off Policies * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeAsyncWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'][0]) { - - $request = $this->timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPoliciesAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPolicies'][0]) { + $returnType = '\BhrSdk\Model\EmployeeTimeOffPolicyAssignment[]'; + $request = $this->listEmployeeTimeOffPoliciesRequest($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1507,27 +1694,25 @@ function ($exception) { } /** - * Create request for operation 'timeOffAssignTimeOffPoliciesForAnEmployee' + * Create request for operation 'listEmployeeTimeOffPolicies' * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployee'][0]) { + public function listEmployeeTimeOffPoliciesRequest($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPolicies'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'time_off_assign_time_off_policies_for_an_employee_request_inner' => $time_off_assign_time_off_policies_for_an_employee_request_inner, ], - methodName: 'timeOffAssignTimeOffPoliciesForAnEmployee' + methodName: 'listEmployeeTimeOffPolicies' ); $resourcePath = '/api/v1/employees/{employeeId}/time_off/policies'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -1549,16 +1734,6 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $ $multipart ); - // for model (json/xml) - if (isset($time_off_assign_time_off_policies_for_an_employee_request_inner)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_off_assign_time_off_policies_for_an_employee_request_inner)); - } else { - $httpBody = is_array($time_off_assign_time_off_policies_for_an_employee_request_inner) ? json_encode($time_off_assign_time_off_policies_for_an_employee_request_inner) : $time_off_assign_time_off_policies_for_an_employee_request_inner; - } - } - // Authentication methods // Basic authentication @@ -1596,7 +1771,7 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $ $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1604,38 +1779,36 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeRequest($employee_id, $ } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeV11 + * Operation listEmployeeTimeOffPoliciesV11 * - * Assign Time Off Policies v1.1 + * List Employee Time Off Policies v1.1 * - * @param string $employee_id employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[] */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeV11($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'][0]) { - list($response) = $this->timeOffAssignTimeOffPoliciesForAnEmployeeV11WithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPoliciesV11($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'][0]) { + list($response) = $this->listEmployeeTimeOffPoliciesV11WithHttpInfo($employee_id, $contentType); return $response; } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeV11WithHttpInfo + * Operation listEmployeeTimeOffPoliciesV11WithHttpInfo * - * Assign Time Off Policies v1.1 + * List Employee Time Off Policies v1.1 * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[], HTTP status code, HTTP response headers (array of strings) */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeV11WithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'][0]) { - $request = $this->timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPoliciesV11WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'][0]) { + $request = $this->listEmployeeTimeOffPoliciesV11Request($employee_id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1643,27 +1816,48 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeV11WithHttpInfo($employ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[]', $request, $response, ); } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeV11Async + * Operation listEmployeeTimeOffPoliciesV11Async * - * Assign Time Off Policies v1.1 + * List Employee Time Off Policies v1.1 * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeV11Async($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'][0]) { - return $this->timeOffAssignTimeOffPoliciesForAnEmployeeV11AsyncWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType) + public function listEmployeeTimeOffPoliciesV11Async($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'][0]) { + return $this->listEmployeeTimeOffPoliciesV11AsyncWithHttpInfo($employee_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1672,29 +1866,30 @@ function ($response) { } /** - * Operation timeOffAssignTimeOffPoliciesForAnEmployeeV11AsyncWithHttpInfo + * Operation listEmployeeTimeOffPoliciesV11AsyncWithHttpInfo * - * Assign Time Off Policies v1.1 + * List Employee Time Off Policies v1.1 * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeV11AsyncWithHttpInfo($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'][0]) { - - $request = $this->timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, $contentType); + public function listEmployeeTimeOffPoliciesV11AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'][0]) { + $returnType = '\BhrSdk\Model\EmployeeTimeOffPolicyAssignmentV11[]'; + $request = $this->listEmployeeTimeOffPoliciesV11Request($employee_id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1717,27 +1912,25 @@ function ($exception) { } /** - * Create request for operation 'timeOffAssignTimeOffPoliciesForAnEmployeeV11' + * Create request for operation 'listEmployeeTimeOffPoliciesV11' * - * @param string $employee_id (required) - * @param \BhrSdk\Model\TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner[] $time_off_assign_time_off_policies_for_an_employee_request_inner (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'] to see the possible values for this operation + * @param int $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id, $time_off_assign_time_off_policies_for_an_employee_request_inner, string $contentType = self::CONTENT_TYPES['timeOffAssignTimeOffPoliciesForAnEmployeeV11'][0]) { + public function listEmployeeTimeOffPoliciesV11Request($employee_id, string $contentType = self::CONTENT_TYPES['listEmployeeTimeOffPoliciesV11'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'time_off_assign_time_off_policies_for_an_employee_request_inner' => $time_off_assign_time_off_policies_for_an_employee_request_inner, ], - methodName: 'timeOffAssignTimeOffPoliciesForAnEmployeeV11' + methodName: 'listEmployeeTimeOffPoliciesV11' ); $resourcePath = '/api/v1_1/employees/{employeeId}/time_off/policies'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -1759,16 +1952,6 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id $multipart ); - // for model (json/xml) - if (isset($time_off_assign_time_off_policies_for_an_employee_request_inner)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_off_assign_time_off_policies_for_an_employee_request_inner)); - } else { - $httpBody = is_array($time_off_assign_time_off_policies_for_an_employee_request_inner) ? json_encode($time_off_assign_time_off_policies_for_an_employee_request_inner) : $time_off_assign_time_off_policies_for_an_employee_request_inner; - } - } - // Authentication methods // Basic authentication @@ -1806,7 +1989,7 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1814,38 +1997,36 @@ public function timeOffAssignTimeOffPoliciesForAnEmployeeV11Request($employee_id } /** - * Operation timeOffChangeARequestStatus + * Operation listTimeOffPolicies * - * Update Time Off Request Status + * List Time Off Policies * - * @param string $request_id request_id (required) - * @param \BhrSdk\Model\Request $request request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffChangeARequestStatus'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimeOffPolicy[] */ - public function timeOffChangeARequestStatus($request_id, $request, string $contentType = self::CONTENT_TYPES['timeOffChangeARequestStatus'][0]) { - list($response) = $this->timeOffChangeARequestStatusWithHttpInfo($request_id, $request, $contentType); + public function listTimeOffPolicies($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTimeOffPolicies'][0]) { + list($response) = $this->listTimeOffPoliciesWithHttpInfo($accept_header_parameter, $contentType); return $response; } /** - * Operation timeOffChangeARequestStatusWithHttpInfo + * Operation listTimeOffPoliciesWithHttpInfo * - * Update Time Off Request Status + * List Time Off Policies * - * @param string $request_id (required) - * @param \BhrSdk\Model\Request $request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffChangeARequestStatus'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffPolicies'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimeOffPolicy[], HTTP status code, HTTP response headers (array of strings) */ - public function timeOffChangeARequestStatusWithHttpInfo($request_id, $request, string $contentType = self::CONTENT_TYPES['timeOffChangeARequestStatus'][0]) { - $request = $this->timeOffChangeARequestStatusRequest($request_id, $request, $contentType); + public function listTimeOffPoliciesWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTimeOffPolicies'][0]) { + $request = $this->listTimeOffPoliciesRequest($accept_header_parameter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1853,27 +2034,48 @@ public function timeOffChangeARequestStatusWithHttpInfo($request_id, $request, s $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeOffPolicy[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimeOffPolicy[]', $request, $response, ); } /** - * Operation timeOffChangeARequestStatusAsync + * Operation listTimeOffPoliciesAsync * - * Update Time Off Request Status + * List Time Off Policies * - * @param string $request_id (required) - * @param \BhrSdk\Model\Request $request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffChangeARequestStatus'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffChangeARequestStatusAsync($request_id, $request, string $contentType = self::CONTENT_TYPES['timeOffChangeARequestStatus'][0]) { - return $this->timeOffChangeARequestStatusAsyncWithHttpInfo($request_id, $request, $contentType) + public function listTimeOffPoliciesAsync($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTimeOffPolicies'][0]) { + return $this->listTimeOffPoliciesAsyncWithHttpInfo($accept_header_parameter, $contentType) ->then( function ($response) { return $response[0]; @@ -1882,29 +2084,30 @@ function ($response) { } /** - * Operation timeOffChangeARequestStatusAsyncWithHttpInfo + * Operation listTimeOffPoliciesAsyncWithHttpInfo * - * Update Time Off Request Status + * List Time Off Policies * - * @param string $request_id (required) - * @param \BhrSdk\Model\Request $request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffChangeARequestStatus'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffChangeARequestStatusAsyncWithHttpInfo($request_id, $request, string $contentType = self::CONTENT_TYPES['timeOffChangeARequestStatus'][0]) { - - $request = $this->timeOffChangeARequestStatusRequest($request_id, $request, $contentType); + public function listTimeOffPoliciesAsyncWithHttpInfo($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTimeOffPolicies'][0]) { + $returnType = '\BhrSdk\Model\TimeOffPolicy[]'; + $request = $this->listTimeOffPoliciesRequest($accept_header_parameter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1927,40 +2130,27 @@ function ($exception) { } /** - * Create request for operation 'timeOffChangeARequestStatus' + * Create request for operation 'listTimeOffPolicies' * - * @param string $request_id (required) - * @param \BhrSdk\Model\Request $request (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffChangeARequestStatus'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffPolicies'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffChangeARequestStatusRequest($request_id, $request, string $contentType = self::CONTENT_TYPES['timeOffChangeARequestStatus'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'request_id' => $request_id, - 'request' => $request, - ], - methodName: 'timeOffChangeARequestStatus' - ); + public function listTimeOffPoliciesRequest($accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['listTimeOffPolicies'][0]) { - $resourcePath = '/api/v1/time_off/requests/{requestId}/status'; - $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + $resourcePath = '/api/v1/meta/time_off/policies'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // path params - if ($request_id !== null) { - $resourcePath = str_replace( - '{' . 'requestId' . '}', - ObjectSerializer::toPathValue((string) $request_id), - $resourcePath - ); + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); } $headers = $this->headerSelector->selectHeaders( @@ -1969,16 +2159,6 @@ public function timeOffChangeARequestStatusRequest($request_id, $request, string $multipart ); - // for model (json/xml) - if (isset($request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($request)); - } else { - $httpBody = is_array($request) ? json_encode($request) : $request; - } - } - // Authentication methods // Basic authentication @@ -2016,7 +2196,7 @@ public function timeOffChangeARequestStatusRequest($request_id, $request, string $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -2024,40 +2204,52 @@ public function timeOffChangeARequestStatusRequest($request_id, $request, string } /** - * Operation timeOffEstimateFutureTimeOffBalances + * Operation listTimeOffRequests * - * Estimate Future Time Off Balances + * List Time Off Requests * - * @param \DateTime $end end (required) - * @param string $employee_id employee_id (required) + * @param \DateTime $start The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) + * @param \DateTime $end The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'] to see the possible values for this operation + * @param int|null $id A particular request ID to limit the response to. (optional) + * @param string|null $action Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. (optional, default to 'view') + * @param int|null $employee_id A particular employee ID to limit the response to. (optional) + * @param string|null $type A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. (optional) + * @param string|null $status A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. (optional) + * @param string|null $exclude_note When set to any truthy value, omits the `notes` object from each request in the response. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffRequests'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimeOffRequest1[] */ - public function timeOffEstimateFutureTimeOffBalances($end, $employee_id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'][0]) { - list($response) = $this->timeOffEstimateFutureTimeOffBalancesWithHttpInfo($end, $employee_id, $accept_header_parameter, $contentType); + public function listTimeOffRequests($start, $end, $accept_header_parameter = null, $id = null, $action = 'view', $employee_id = null, $type = null, $status = null, $exclude_note = null, string $contentType = self::CONTENT_TYPES['listTimeOffRequests'][0]) { + list($response) = $this->listTimeOffRequestsWithHttpInfo($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note, $contentType); return $response; } /** - * Operation timeOffEstimateFutureTimeOffBalancesWithHttpInfo + * Operation listTimeOffRequestsWithHttpInfo * - * Estimate Future Time Off Balances + * List Time Off Requests * - * @param \DateTime $end (required) - * @param string $employee_id (required) + * @param \DateTime $start The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) + * @param \DateTime $end The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'] to see the possible values for this operation + * @param int|null $id A particular request ID to limit the response to. (optional) + * @param string|null $action Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. (optional, default to 'view') + * @param int|null $employee_id A particular employee ID to limit the response to. (optional) + * @param string|null $type A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. (optional) + * @param string|null $status A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. (optional) + * @param string|null $exclude_note When set to any truthy value, omits the `notes` object from each request in the response. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffRequests'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimeOffRequest1[], HTTP status code, HTTP response headers (array of strings) */ - public function timeOffEstimateFutureTimeOffBalancesWithHttpInfo($end, $employee_id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'][0]) { - $request = $this->timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, $accept_header_parameter, $contentType); + public function listTimeOffRequestsWithHttpInfo($start, $end, $accept_header_parameter = null, $id = null, $action = 'view', $employee_id = null, $type = null, $status = null, $exclude_note = null, string $contentType = self::CONTENT_TYPES['listTimeOffRequests'][0]) { + $request = $this->listTimeOffRequestsRequest($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2065,28 +2257,56 @@ public function timeOffEstimateFutureTimeOffBalancesWithHttpInfo($end, $employee $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeOffRequest1[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimeOffRequest1[]', $request, $response, ); } /** - * Operation timeOffEstimateFutureTimeOffBalancesAsync + * Operation listTimeOffRequestsAsync * - * Estimate Future Time Off Balances + * List Time Off Requests * - * @param \DateTime $end (required) - * @param string $employee_id (required) + * @param \DateTime $start The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) + * @param \DateTime $end The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'] to see the possible values for this operation + * @param int|null $id A particular request ID to limit the response to. (optional) + * @param string|null $action Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. (optional, default to 'view') + * @param int|null $employee_id A particular employee ID to limit the response to. (optional) + * @param string|null $type A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. (optional) + * @param string|null $status A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. (optional) + * @param string|null $exclude_note When set to any truthy value, omits the `notes` object from each request in the response. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffRequests'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffEstimateFutureTimeOffBalancesAsync($end, $employee_id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'][0]) { - return $this->timeOffEstimateFutureTimeOffBalancesAsyncWithHttpInfo($end, $employee_id, $accept_header_parameter, $contentType) + public function listTimeOffRequestsAsync($start, $end, $accept_header_parameter = null, $id = null, $action = 'view', $employee_id = null, $type = null, $status = null, $exclude_note = null, string $contentType = self::CONTENT_TYPES['listTimeOffRequests'][0]) { + return $this->listTimeOffRequestsAsyncWithHttpInfo($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note, $contentType) ->then( function ($response) { return $response[0]; @@ -2095,30 +2315,38 @@ function ($response) { } /** - * Operation timeOffEstimateFutureTimeOffBalancesAsyncWithHttpInfo + * Operation listTimeOffRequestsAsyncWithHttpInfo * - * Estimate Future Time Off Balances + * List Time Off Requests * - * @param \DateTime $end (required) - * @param string $employee_id (required) + * @param \DateTime $start The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) + * @param \DateTime $end The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'] to see the possible values for this operation + * @param int|null $id A particular request ID to limit the response to. (optional) + * @param string|null $action Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. (optional, default to 'view') + * @param int|null $employee_id A particular employee ID to limit the response to. (optional) + * @param string|null $type A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. (optional) + * @param string|null $status A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. (optional) + * @param string|null $exclude_note When set to any truthy value, omits the `notes` object from each request in the response. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffRequests'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffEstimateFutureTimeOffBalancesAsyncWithHttpInfo($end, $employee_id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'][0]) { - - $request = $this->timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, $accept_header_parameter, $contentType); + public function listTimeOffRequestsAsyncWithHttpInfo($start, $end, $accept_header_parameter = null, $id = null, $action = 'view', $employee_id = null, $type = null, $status = null, $exclude_note = null, string $contentType = self::CONTENT_TYPES['listTimeOffRequests'][0]) { + $returnType = '\BhrSdk\Model\TimeOffRequest1[]'; + $request = $this->listTimeOffRequestsRequest($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $exclude_note, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2141,27 +2369,33 @@ function ($exception) { } /** - * Create request for operation 'timeOffEstimateFutureTimeOffBalances' + * Create request for operation 'listTimeOffRequests' * - * @param \DateTime $end (required) - * @param string $employee_id (required) + * @param \DateTime $start The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) + * @param \DateTime $end The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'] to see the possible values for this operation + * @param int|null $id A particular request ID to limit the response to. (optional) + * @param string|null $action Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. (optional, default to 'view') + * @param int|null $employee_id A particular employee ID to limit the response to. (optional) + * @param string|null $type A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. (optional) + * @param string|null $status A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. (optional) + * @param string|null $exclude_note When set to any truthy value, omits the `notes` object from each request in the response. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffRequests'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, $accept_header_parameter = null, string $contentType = self::CONTENT_TYPES['timeOffEstimateFutureTimeOffBalances'][0]) { + public function listTimeOffRequestsRequest($start, $end, $accept_header_parameter = null, $id = null, $action = 'view', $employee_id = null, $type = null, $status = null, $exclude_note = null, string $contentType = self::CONTENT_TYPES['listTimeOffRequests'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ + 'start' => $start, 'end' => $end, - 'employee_id' => $employee_id, ], - methodName: 'timeOffEstimateFutureTimeOffBalances' + methodName: 'listTimeOffRequests' ); - $resourcePath = '/api/v1/employees/{employeeId}/time_off/calculator'; + $resourcePath = '/api/v1/time_off/requests'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2170,7 +2404,14 @@ public function timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, $multipart = false; $parameters = [ + 'id' => ['value' => $id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'action' => ['value' => $action, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'employeeId' => ['value' => $employee_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'start' => ['value' => $start, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], 'end' => ['value' => $end, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'type' => ['value' => $type, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'status' => ['value' => $status, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'excludeNote' => ['value' => $exclude_note, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], ]; // Process parameters and build query values directly @@ -2190,15 +2431,6 @@ public function timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); } - // path params - if ($employee_id !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue((string) $employee_id), - $resourcePath - ); - } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/xml', ], $contentType, @@ -2250,50 +2482,38 @@ public function timeOffEstimateFutureTimeOffBalancesRequest($end, $employee_id, } /** - * Operation timeOffGetTimeOffRequests + * Operation listTimeOffTypes * - * Get Time Off Requests + * List Time Off Types * - * @param string $start YYYY-MM-DD. Only show time off that occurs on/after the specified start date. (required) - * @param string $end YYYY-MM-DD. Only show time off that occurs on/before the specified end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param int|null $id A particular request ID to limit the response to. (optional) - * @param string|null $action Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. (optional) - * @param string|null $employee_id A particular employee ID to limit the response to. (optional) - * @param string|null $type A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. (optional) - * @param string|null $status A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffGetTimeOffRequests'] to see the possible values for this operation + * @param string|null $mode Set to `request` to limit the results to time off types the authenticated employee can request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffTypes'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimeOffTypesAndDefaultHours */ - public function timeOffGetTimeOffRequests($start, $end, $accept_header_parameter = null, $id = null, $action = null, $employee_id = null, $type = null, $status = null, string $contentType = self::CONTENT_TYPES['timeOffGetTimeOffRequests'][0]) { - list($response) = $this->timeOffGetTimeOffRequestsWithHttpInfo($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $contentType); + public function listTimeOffTypes($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['listTimeOffTypes'][0]) { + list($response) = $this->listTimeOffTypesWithHttpInfo($accept_header_parameter, $mode, $contentType); return $response; } /** - * Operation timeOffGetTimeOffRequestsWithHttpInfo + * Operation listTimeOffTypesWithHttpInfo * - * Get Time Off Requests + * List Time Off Types * - * @param string $start YYYY-MM-DD. Only show time off that occurs on/after the specified start date. (required) - * @param string $end YYYY-MM-DD. Only show time off that occurs on/before the specified end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param int|null $id A particular request ID to limit the response to. (optional) - * @param string|null $action Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. (optional) - * @param string|null $employee_id A particular employee ID to limit the response to. (optional) - * @param string|null $type A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. (optional) - * @param string|null $status A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffGetTimeOffRequests'] to see the possible values for this operation + * @param string|null $mode Set to `request` to limit the results to time off types the authenticated employee can request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffTypes'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimeOffTypesAndDefaultHours, HTTP status code, HTTP response headers (array of strings) */ - public function timeOffGetTimeOffRequestsWithHttpInfo($start, $end, $accept_header_parameter = null, $id = null, $action = null, $employee_id = null, $type = null, $status = null, string $contentType = self::CONTENT_TYPES['timeOffGetTimeOffRequests'][0]) { - $request = $this->timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $contentType); + public function listTimeOffTypesWithHttpInfo($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['listTimeOffTypes'][0]) { + $request = $this->listTimeOffTypesRequest($accept_header_parameter, $mode, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2301,33 +2521,49 @@ public function timeOffGetTimeOffRequestsWithHttpInfo($start, $end, $accept_head $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeOffTypesAndDefaultHours', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimeOffTypesAndDefaultHours', $request, $response, ); } /** - * Operation timeOffGetTimeOffRequestsAsync + * Operation listTimeOffTypesAsync * - * Get Time Off Requests + * List Time Off Types * - * @param string $start YYYY-MM-DD. Only show time off that occurs on/after the specified start date. (required) - * @param string $end YYYY-MM-DD. Only show time off that occurs on/before the specified end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param int|null $id A particular request ID to limit the response to. (optional) - * @param string|null $action Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. (optional) - * @param string|null $employee_id A particular employee ID to limit the response to. (optional) - * @param string|null $type A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. (optional) - * @param string|null $status A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffGetTimeOffRequests'] to see the possible values for this operation + * @param string|null $mode Set to `request` to limit the results to time off types the authenticated employee can request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffGetTimeOffRequestsAsync($start, $end, $accept_header_parameter = null, $id = null, $action = null, $employee_id = null, $type = null, $status = null, string $contentType = self::CONTENT_TYPES['timeOffGetTimeOffRequests'][0]) { - return $this->timeOffGetTimeOffRequestsAsyncWithHttpInfo($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $contentType) + public function listTimeOffTypesAsync($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['listTimeOffTypes'][0]) { + return $this->listTimeOffTypesAsyncWithHttpInfo($accept_header_parameter, $mode, $contentType) ->then( function ($response) { return $response[0]; @@ -2336,35 +2572,31 @@ function ($response) { } /** - * Operation timeOffGetTimeOffRequestsAsyncWithHttpInfo + * Operation listTimeOffTypesAsyncWithHttpInfo * - * Get Time Off Requests + * List Time Off Types * - * @param string $start YYYY-MM-DD. Only show time off that occurs on/after the specified start date. (required) - * @param string $end YYYY-MM-DD. Only show time off that occurs on/before the specified end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param int|null $id A particular request ID to limit the response to. (optional) - * @param string|null $action Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. (optional) - * @param string|null $employee_id A particular employee ID to limit the response to. (optional) - * @param string|null $type A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. (optional) - * @param string|null $status A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffGetTimeOffRequests'] to see the possible values for this operation + * @param string|null $mode Set to `request` to limit the results to time off types the authenticated employee can request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffGetTimeOffRequestsAsyncWithHttpInfo($start, $end, $accept_header_parameter = null, $id = null, $action = null, $employee_id = null, $type = null, $status = null, string $contentType = self::CONTENT_TYPES['timeOffGetTimeOffRequests'][0]) { - - $request = $this->timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_parameter, $id, $action, $employee_id, $type, $status, $contentType); + public function listTimeOffTypesAsyncWithHttpInfo($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['listTimeOffTypes'][0]) { + $returnType = '\BhrSdk\Model\TimeOffTypesAndDefaultHours'; + $request = $this->listTimeOffTypesRequest($accept_header_parameter, $mode, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2387,32 +2619,18 @@ function ($exception) { } /** - * Create request for operation 'timeOffGetTimeOffRequests' + * Create request for operation 'listTimeOffTypes' * - * @param string $start YYYY-MM-DD. Only show time off that occurs on/after the specified start date. (required) - * @param string $end YYYY-MM-DD. Only show time off that occurs on/before the specified end date. (required) * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) - * @param int|null $id A particular request ID to limit the response to. (optional) - * @param string|null $action Limit to requests that the user has a particular level of access to. Legal values are: \"view\" or \"approve\". Defaults to view. (optional) - * @param string|null $employee_id A particular employee ID to limit the response to. (optional) - * @param string|null $type A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included. (optional) - * @param string|null $status A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are \"approved\", \"denied\", \"superceded\", \"requested\", \"canceled\". (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffGetTimeOffRequests'] to see the possible values for this operation + * @param string|null $mode Set to `request` to limit the results to time off types the authenticated employee can request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimeOffTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_parameter = null, $id = null, $action = null, $employee_id = null, $type = null, $status = null, string $contentType = self::CONTENT_TYPES['timeOffGetTimeOffRequests'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'start' => $start, - 'end' => $end, - ], - methodName: 'timeOffGetTimeOffRequests' - ); + public function listTimeOffTypesRequest($accept_header_parameter = null, $mode = null, string $contentType = self::CONTENT_TYPES['listTimeOffTypes'][0]) { - $resourcePath = '/api/v1/time_off/requests'; + $resourcePath = '/api/v1/meta/time_off/types'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2421,13 +2639,7 @@ public function timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_pa $multipart = false; $parameters = [ - 'id' => ['value' => $id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], - 'action' => ['value' => $action, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - 'employeeId' => ['value' => $employee_id, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - 'start' => ['value' => $start, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], - 'end' => ['value' => $end, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], - 'type' => ['value' => $type, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - 'status' => ['value' => $status, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'mode' => ['value' => $mode, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], ]; // Process parameters and build query values directly @@ -2448,7 +2660,7 @@ public function timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_pa } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -2498,36 +2710,42 @@ public function timeOffGetTimeOffRequestsRequest($start, $end, $accept_header_pa } /** - * Operation timeOffListTimeOffPoliciesForEmployee + * Operation listWhosOut * - * Get Time Off Policies for Employee + * List Who’s Out * - * @param string $employee_id employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $start Start date in YYYY-MM-DD format. Defaults to today. (optional) + * @param \DateTime|null $end End date in YYYY-MM-DD format. Defaults to 14 days after the start date. (optional) + * @param string|null $filter Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWhosOut'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\WhosOutEntry[] */ - public function timeOffListTimeOffPoliciesForEmployee($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'][0]) { - list($response) = $this->timeOffListTimeOffPoliciesForEmployeeWithHttpInfo($employee_id, $contentType); + public function listWhosOut($accept_header_parameter = null, $start = null, $end = null, $filter = null, string $contentType = self::CONTENT_TYPES['listWhosOut'][0]) { + list($response) = $this->listWhosOutWithHttpInfo($accept_header_parameter, $start, $end, $filter, $contentType); return $response; } /** - * Operation timeOffListTimeOffPoliciesForEmployeeWithHttpInfo + * Operation listWhosOutWithHttpInfo * - * Get Time Off Policies for Employee + * List Who’s Out * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $start Start date in YYYY-MM-DD format. Defaults to today. (optional) + * @param \DateTime|null $end End date in YYYY-MM-DD format. Defaults to 14 days after the start date. (optional) + * @param string|null $filter Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWhosOut'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\WhosOutEntry[], HTTP status code, HTTP response headers (array of strings) */ - public function timeOffListTimeOffPoliciesForEmployeeWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'][0]) { - $request = $this->timeOffListTimeOffPoliciesForEmployeeRequest($employee_id, $contentType); + public function listWhosOutWithHttpInfo($accept_header_parameter = null, $start = null, $end = null, $filter = null, string $contentType = self::CONTENT_TYPES['listWhosOut'][0]) { + $request = $this->listWhosOutRequest($accept_header_parameter, $start, $end, $filter, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2535,26 +2753,51 @@ public function timeOffListTimeOffPoliciesForEmployeeWithHttpInfo($employee_id, $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WhosOutEntry[]', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\WhosOutEntry[]', $request, $response, ); } /** - * Operation timeOffListTimeOffPoliciesForEmployeeAsync + * Operation listWhosOutAsync * - * Get Time Off Policies for Employee + * List Who’s Out * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $start Start date in YYYY-MM-DD format. Defaults to today. (optional) + * @param \DateTime|null $end End date in YYYY-MM-DD format. Defaults to 14 days after the start date. (optional) + * @param string|null $filter Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWhosOut'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffListTimeOffPoliciesForEmployeeAsync($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'][0]) { - return $this->timeOffListTimeOffPoliciesForEmployeeAsyncWithHttpInfo($employee_id, $contentType) + public function listWhosOutAsync($accept_header_parameter = null, $start = null, $end = null, $filter = null, string $contentType = self::CONTENT_TYPES['listWhosOut'][0]) { + return $this->listWhosOutAsyncWithHttpInfo($accept_header_parameter, $start, $end, $filter, $contentType) ->then( function ($response) { return $response[0]; @@ -2563,28 +2806,33 @@ function ($response) { } /** - * Operation timeOffListTimeOffPoliciesForEmployeeAsyncWithHttpInfo + * Operation listWhosOutAsyncWithHttpInfo * - * Get Time Off Policies for Employee + * List Who’s Out * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $start Start date in YYYY-MM-DD format. Defaults to today. (optional) + * @param \DateTime|null $end End date in YYYY-MM-DD format. Defaults to 14 days after the start date. (optional) + * @param string|null $filter Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWhosOut'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffListTimeOffPoliciesForEmployeeAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'][0]) { - - $request = $this->timeOffListTimeOffPoliciesForEmployeeRequest($employee_id, $contentType); + public function listWhosOutAsyncWithHttpInfo($accept_header_parameter = null, $start = null, $end = null, $filter = null, string $contentType = self::CONTENT_TYPES['listWhosOut'][0]) { + $returnType = '\BhrSdk\Model\WhosOutEntry[]'; + $request = $this->listWhosOutRequest($accept_header_parameter, $start, $end, $filter, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2607,24 +2855,20 @@ function ($exception) { } /** - * Create request for operation 'timeOffListTimeOffPoliciesForEmployee' + * Create request for operation 'listWhosOut' * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'] to see the possible values for this operation + * @param string|null $accept_header_parameter This endpoint can produce either JSON or XML. (optional) + * @param \DateTime|null $start Start date in YYYY-MM-DD format. Defaults to today. (optional) + * @param \DateTime|null $end End date in YYYY-MM-DD format. Defaults to 14 days after the start date. (optional) + * @param string|null $filter Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWhosOut'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffListTimeOffPoliciesForEmployeeRequest($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployee'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'employee_id' => $employee_id, - ], - methodName: 'timeOffListTimeOffPoliciesForEmployee' - ); + public function listWhosOutRequest($accept_header_parameter = null, $start = null, $end = null, $filter = null, string $contentType = self::CONTENT_TYPES['listWhosOut'][0]) { - $resourcePath = '/api/v1/employees/{employeeId}/time_off/policies'; + $resourcePath = '/api/v1/time_off/whos_out'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -2632,17 +2876,31 @@ public function timeOffListTimeOffPoliciesForEmployeeRequest($employee_id, strin $httpBody = ''; $multipart = false; - // path params - if ($employee_id !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue((string) $employee_id), - $resourcePath - ); + $parameters = [ + 'start' => ['value' => $start, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'end' => ['value' => $end, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // header params + if ($accept_header_parameter !== null) { + $headerParams['AcceptHeaderParameter'] = ObjectSerializer::toHeaderValue($accept_header_parameter); } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'application/xml', ], $contentType, $multipart ); @@ -2692,36 +2950,38 @@ public function timeOffListTimeOffPoliciesForEmployeeRequest($employee_id, strin } /** - * Operation timeOffListTimeOffPoliciesForEmployeeV11 + * Operation updateTimeOffRequestStatus * - * Get Time Off Policies for Employee v1.1 + * Update Time Off Request Status * - * @param string $employee_id employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'] to see the possible values for this operation + * @param int $request_id The ID of the time off request to update. (required) + * @param \BhrSdk\Model\Request $request request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeOffRequestStatus'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return mixed */ - public function timeOffListTimeOffPoliciesForEmployeeV11($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'][0]) { - list($response) = $this->timeOffListTimeOffPoliciesForEmployeeV11WithHttpInfo($employee_id, $contentType); + public function updateTimeOffRequestStatus($request_id, $request, string $contentType = self::CONTENT_TYPES['updateTimeOffRequestStatus'][0]) { + list($response) = $this->updateTimeOffRequestStatusWithHttpInfo($request_id, $request, $contentType); return $response; } /** - * Operation timeOffListTimeOffPoliciesForEmployeeV11WithHttpInfo + * Operation updateTimeOffRequestStatusWithHttpInfo * - * Get Time Off Policies for Employee v1.1 + * Update Time Off Request Status * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'] to see the possible values for this operation + * @param int $request_id The ID of the time off request to update. (required) + * @param \BhrSdk\Model\Request $request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeOffRequestStatus'] to see the possible values for this operation * * @throws \BhrSdk\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 timeOffListTimeOffPoliciesForEmployeeV11WithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'][0]) { - $request = $this->timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, $contentType); + public function updateTimeOffRequestStatusWithHttpInfo($request_id, $request, string $contentType = self::CONTENT_TYPES['updateTimeOffRequestStatus'][0]) { + $request = $this->updateTimeOffRequestStatusRequest($request_id, $request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -2737,18 +2997,19 @@ public function timeOffListTimeOffPoliciesForEmployeeV11WithHttpInfo($employee_i } /** - * Operation timeOffListTimeOffPoliciesForEmployeeV11Async + * Operation updateTimeOffRequestStatusAsync * - * Get Time Off Policies for Employee v1.1 + * Update Time Off Request Status * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'] to see the possible values for this operation + * @param int $request_id The ID of the time off request to update. (required) + * @param \BhrSdk\Model\Request $request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeOffRequestStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffListTimeOffPoliciesForEmployeeV11Async($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'][0]) { - return $this->timeOffListTimeOffPoliciesForEmployeeV11AsyncWithHttpInfo($employee_id, $contentType) + public function updateTimeOffRequestStatusAsync($request_id, $request, string $contentType = self::CONTENT_TYPES['updateTimeOffRequestStatus'][0]) { + return $this->updateTimeOffRequestStatusAsyncWithHttpInfo($request_id, $request, $contentType) ->then( function ($response) { return $response[0]; @@ -2757,19 +3018,20 @@ function ($response) { } /** - * Operation timeOffListTimeOffPoliciesForEmployeeV11AsyncWithHttpInfo + * Operation updateTimeOffRequestStatusAsyncWithHttpInfo * - * Get Time Off Policies for Employee v1.1 + * Update Time Off Request Status * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'] to see the possible values for this operation + * @param int $request_id The ID of the time off request to update. (required) + * @param \BhrSdk\Model\Request $request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeOffRequestStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function timeOffListTimeOffPoliciesForEmployeeV11AsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'][0]) { + public function updateTimeOffRequestStatusAsyncWithHttpInfo($request_id, $request, string $contentType = self::CONTENT_TYPES['updateTimeOffRequestStatus'][0]) { - $request = $this->timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, $contentType); + $request = $this->updateTimeOffRequestStatusRequest($request_id, $request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -2801,25 +3063,27 @@ function ($exception) { } /** - * Create request for operation 'timeOffListTimeOffPoliciesForEmployeeV11' + * Create request for operation 'updateTimeOffRequestStatus' * - * @param string $employee_id (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'] to see the possible values for this operation + * @param int $request_id The ID of the time off request to update. (required) + * @param \BhrSdk\Model\Request $request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTimeOffRequestStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, string $contentType = self::CONTENT_TYPES['timeOffListTimeOffPoliciesForEmployeeV11'][0]) { + public function updateTimeOffRequestStatusRequest($request_id, $request, string $contentType = self::CONTENT_TYPES['updateTimeOffRequestStatus'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'employee_id' => $employee_id, + 'request_id' => $request_id, + 'request' => $request, ], - methodName: 'timeOffListTimeOffPoliciesForEmployeeV11' + methodName: 'updateTimeOffRequestStatus' ); - $resourcePath = '/api/v1_1/employees/{employeeId}/time_off/policies'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/time_off/requests/{requestId}/status'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -2827,10 +3091,10 @@ public function timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, st $multipart = false; // path params - if ($employee_id !== null) { + if ($request_id !== null) { $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue((string) $employee_id), + '{' . 'requestId' . '}', + ObjectSerializer::toPathValue((string) $request_id), $resourcePath ); } @@ -2841,6 +3105,16 @@ public function timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, st $multipart ); + // for model (json/xml) + if (isset($request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($request)); + } else { + $httpBody = is_array($request) ? json_encode($request) : $request; + } + } + // Authentication methods // Basic authentication @@ -2878,7 +3152,7 @@ public function timeOffListTimeOffPoliciesForEmployeeV11Request($employee_id, st $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody diff --git a/lib/Api/TimeTrackingApi.php b/lib/Api/TimeTrackingApi.php index a8f6ac4b..c7b4d353 100644 --- a/lib/Api/TimeTrackingApi.php +++ b/lib/Api/TimeTrackingApi.php @@ -79,20 +79,47 @@ class TimeTrackingApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addEditTimesheetClockEntries' => [ + 'assignEmployeesToBreakPolicy' => [ 'application/json', ], - 'addEditTimesheetHourEntries' => [ + 'createBreak' => [ 'application/json', ], - 'addTimesheetClockInEntry' => [ + 'createBreakPolicy' => [ 'application/json', ], - 'addTimesheetClockOutEntry' => [ + 'createOrUpdateTimesheetClockEntries' => [ + 'application/json', + ], + 'createOrUpdateTimesheetHourEntries' => [ + 'application/json', + ], + 'createProject' => [ + 'application/json', + ], + 'createProjectTask' => [ 'application/json', ], 'createTimeTrackingProject' => [ 'application/json', + ], + 'createTimesheetClockInEntry' => [ + 'application/json', + ], + 'createTimesheetClockOutEntry' => [ + 'application/json', + ], + 'deleteBreak' => [ + 'application/json', + ], + 'deleteBreakPolicy' => [ + 'application/json', + ], + 'deleteProject' => [ + 'application/json', + ], + 'deleteTask' => [ + 'application/json', ], 'deleteTimesheetClockEntriesViaPost' => [ 'application/json', @@ -100,7 +127,70 @@ class TimeTrackingApi { 'deleteTimesheetHourEntriesViaPost' => [ 'application/json', ], - 'getTimesheetEntries' => [ + 'getBreak' => [ + 'application/json', + ], + 'getBreakPolicy' => [ + 'application/json', + ], + 'getBreakPolicySuggestions' => [ + 'application/json', + ], + 'getProject' => [ + 'application/json', + ], + 'getTask' => [ + 'application/json', + ], + 'listBreakAssessments' => [ + 'application/json', + ], + 'listBreakPolicies' => [ + 'application/json', + ], + 'listBreakPolicyBreaks' => [ + 'application/json', + ], + 'listBreakPolicyEmployees' => [ + 'application/json', + ], + 'listEmployeeBreakAvailabilities' => [ + 'application/json', + ], + 'listEmployeeBreakPolicies' => [ + 'application/json', + ], + 'listProjectTasks' => [ + 'application/json', + ], + 'listProjects' => [ + 'application/json', + ], + 'listTimesheetEntries' => [ + 'application/json', + ], + 'replaceBreaksForBreakPolicy' => [ + 'application/json', + ], + 'setBreakPolicyEmployees' => [ + 'application/json', + ], + 'syncBreakPolicy' => [ + 'application/json', + ], + 'unassignEmployeesFromBreakPolicy' => [ + 'application/json', + ], + 'updateBreak' => [ + 'application/json', + ], + 'updateBreakPolicy' => [ + 'application/json', + ], + 'updateProject' => [ + 'application/json', + ], + 'updateTask' => [ 'application/json', ], ]; @@ -152,36 +242,38 @@ public function getConfig() { } /** - * Operation addEditTimesheetClockEntries + * Operation assignEmployeesToBreakPolicy * - * Create or Update Timesheet Clock Entries + * Assign Employees to Break Policy * - * @param \BhrSdk\Model\ClockEntriesSchema|null $clock_entries_schema clock_entries_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetClockEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest $assign_employees_to_break_policy_request assign_employees_to_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignEmployeesToBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|mixed|mixed|mixed|mixed|mixed|mixed + * @return mixed */ - public function addEditTimesheetClockEntries($clock_entries_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetClockEntries'][0]) { - list($response) = $this->addEditTimesheetClockEntriesWithHttpInfo($clock_entries_schema, $contentType); + public function assignEmployeesToBreakPolicy($id, $assign_employees_to_break_policy_request, string $contentType = self::CONTENT_TYPES['assignEmployeesToBreakPolicy'][0]) { + list($response) = $this->assignEmployeesToBreakPolicyWithHttpInfo($id, $assign_employees_to_break_policy_request, $contentType); return $response; } /** - * Operation addEditTimesheetClockEntriesWithHttpInfo + * Operation assignEmployeesToBreakPolicyWithHttpInfo * - * Create or Update Timesheet Clock Entries + * Assign Employees to Break Policy * - * @param \BhrSdk\Model\ClockEntriesSchema|null $clock_entries_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetClockEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest $assign_employees_to_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignEmployeesToBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|mixed|mixed|mixed|mixed|mixed|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function addEditTimesheetClockEntriesWithHttpInfo($clock_entries_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetClockEntries'][0]) { - $request = $this->addEditTimesheetClockEntriesRequest($clock_entries_schema, $contentType); + public function assignEmployeesToBreakPolicyWithHttpInfo($id, $assign_employees_to_break_policy_request, string $contentType = self::CONTENT_TYPES['assignEmployeesToBreakPolicy'][0]) { + $request = $this->assignEmployeesToBreakPolicyRequest($id, $assign_employees_to_break_policy_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -189,84 +281,27 @@ public function addEditTimesheetClockEntriesWithHttpInfo($clock_entries_schema = $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 201: - return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', - $request, - $response, - ); - case 400: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 401: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 403: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 406: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 409: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 500: - return ApiHelper::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 ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', + 'object', // or 'mixed' or any other generic type $request, $response, ); } /** - * Operation addEditTimesheetClockEntriesAsync + * Operation assignEmployeesToBreakPolicyAsync * - * Create or Update Timesheet Clock Entries + * Assign Employees to Break Policy * - * @param \BhrSdk\Model\ClockEntriesSchema|null $clock_entries_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetClockEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest $assign_employees_to_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignEmployeesToBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEditTimesheetClockEntriesAsync($clock_entries_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetClockEntries'][0]) { - return $this->addEditTimesheetClockEntriesAsyncWithHttpInfo($clock_entries_schema, $contentType) + public function assignEmployeesToBreakPolicyAsync($id, $assign_employees_to_break_policy_request, string $contentType = self::CONTENT_TYPES['assignEmployeesToBreakPolicy'][0]) { + return $this->assignEmployeesToBreakPolicyAsyncWithHttpInfo($id, $assign_employees_to_break_policy_request, $contentType) ->then( function ($response) { return $response[0]; @@ -275,30 +310,29 @@ function ($response) { } /** - * Operation addEditTimesheetClockEntriesAsyncWithHttpInfo + * Operation assignEmployeesToBreakPolicyAsyncWithHttpInfo * - * Create or Update Timesheet Clock Entries + * Assign Employees to Break Policy * - * @param \BhrSdk\Model\ClockEntriesSchema|null $clock_entries_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetClockEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest $assign_employees_to_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignEmployeesToBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEditTimesheetClockEntriesAsyncWithHttpInfo($clock_entries_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetClockEntries'][0]) { - $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]'; - $request = $this->addEditTimesheetClockEntriesRequest($clock_entries_schema, $contentType); + public function assignEmployeesToBreakPolicyAsyncWithHttpInfo($id, $assign_employees_to_break_policy_request, string $contentType = self::CONTENT_TYPES['assignEmployeesToBreakPolicy'][0]) { + + $request = $this->assignEmployeesToBreakPolicyRequest($id, $assign_employees_to_break_policy_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) use ($returnType) { + function ($response) { $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } + $content = json_decode($content); return [ - ObjectSerializer::deserialize($content, $returnType, []), + ObjectSerializer::deserialize($content, 'object', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -321,17 +355,26 @@ function ($exception) { } /** - * Create request for operation 'addEditTimesheetClockEntries' + * Create request for operation 'assignEmployeesToBreakPolicy' * - * @param \BhrSdk\Model\ClockEntriesSchema|null $clock_entries_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetClockEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\AssignEmployeesToBreakPolicyRequest $assign_employees_to_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['assignEmployeesToBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEditTimesheetClockEntriesRequest($clock_entries_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetClockEntries'][0]) { + public function assignEmployeesToBreakPolicyRequest($id, $assign_employees_to_break_policy_request, string $contentType = self::CONTENT_TYPES['assignEmployeesToBreakPolicy'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'assign_employees_to_break_policy_request' => $assign_employees_to_break_policy_request, + ], + methodName: 'assignEmployeesToBreakPolicy' + ); - $resourcePath = '/api/v1/time_tracking/clock_entries/store'; + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/assign'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; @@ -339,6 +382,15 @@ public function addEditTimesheetClockEntriesRequest($clock_entries_schema = null $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -346,12 +398,12 @@ public function addEditTimesheetClockEntriesRequest($clock_entries_schema = null ); // for model (json/xml) - if (isset($clock_entries_schema)) { + if (isset($assign_employees_to_break_policy_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_entries_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($assign_employees_to_break_policy_request)); } else { - $httpBody = is_array($clock_entries_schema) ? json_encode($clock_entries_schema) : $clock_entries_schema; + $httpBody = is_array($assign_employees_to_break_policy_request) ? json_encode($assign_employees_to_break_policy_request) : $assign_employees_to_break_policy_request; } } @@ -400,36 +452,38 @@ public function addEditTimesheetClockEntriesRequest($clock_entries_schema = null } /** - * Operation addEditTimesheetHourEntries + * Operation createBreak * - * Create or Update Timesheet Hour Entries + * Create Break * - * @param \BhrSdk\Model\HourEntriesRequestSchema|null $hour_entries_request_schema hour_entries_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetHourEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 $time_tracking_create_time_tracking_break_v1 time_tracking_create_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreak'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|mixed|mixed|mixed|mixed|mixed|mixed + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function addEditTimesheetHourEntries($hour_entries_request_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetHourEntries'][0]) { - list($response) = $this->addEditTimesheetHourEntriesWithHttpInfo($hour_entries_request_schema, $contentType); + public function createBreak($id, $time_tracking_create_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['createBreak'][0]) { + list($response) = $this->createBreakWithHttpInfo($id, $time_tracking_create_time_tracking_break_v1, $contentType); return $response; } /** - * Operation addEditTimesheetHourEntriesWithHttpInfo + * Operation createBreakWithHttpInfo * - * Create or Update Timesheet Hour Entries + * Create Break * - * @param \BhrSdk\Model\HourEntriesRequestSchema|null $hour_entries_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetHourEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 $time_tracking_create_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreak'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|mixed|mixed|mixed|mixed|mixed|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addEditTimesheetHourEntriesWithHttpInfo($hour_entries_request_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetHourEntries'][0]) { - $request = $this->addEditTimesheetHourEntriesRequest($hour_entries_request_schema, $contentType); + public function createBreakWithHttpInfo($id, $time_tracking_create_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['createBreak'][0]) { + $request = $this->createBreakRequest($id, $time_tracking_create_time_tracking_break_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -440,43 +494,19 @@ public function addEditTimesheetHourEntriesWithHttpInfo($hour_entries_request_sc switch($statusCode) { case 201: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', - $request, - $response, - ); - case 400: - return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', $request, $response, ); - case 401: + case 422: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); case 403: return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 406: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 409: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 500: - return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -496,25 +526,26 @@ public function addEditTimesheetHourEntriesWithHttpInfo($hour_entries_request_sc } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', $request, $response, ); } /** - * Operation addEditTimesheetHourEntriesAsync + * Operation createBreakAsync * - * Create or Update Timesheet Hour Entries + * Create Break * - * @param \BhrSdk\Model\HourEntriesRequestSchema|null $hour_entries_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetHourEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 $time_tracking_create_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEditTimesheetHourEntriesAsync($hour_entries_request_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetHourEntries'][0]) { - return $this->addEditTimesheetHourEntriesAsyncWithHttpInfo($hour_entries_request_schema, $contentType) + public function createBreakAsync($id, $time_tracking_create_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['createBreak'][0]) { + return $this->createBreakAsyncWithHttpInfo($id, $time_tracking_create_time_tracking_break_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -523,19 +554,20 @@ function ($response) { } /** - * Operation addEditTimesheetHourEntriesAsyncWithHttpInfo + * Operation createBreakAsyncWithHttpInfo * - * Create or Update Timesheet Hour Entries + * Create Break * - * @param \BhrSdk\Model\HourEntriesRequestSchema|null $hour_entries_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetHourEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 $time_tracking_create_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addEditTimesheetHourEntriesAsyncWithHttpInfo($hour_entries_request_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetHourEntries'][0]) { - $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]'; - $request = $this->addEditTimesheetHourEntriesRequest($hour_entries_request_schema, $contentType); + public function createBreakAsyncWithHttpInfo($id, $time_tracking_create_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['createBreak'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1'; + $request = $this->createBreakRequest($id, $time_tracking_create_time_tracking_break_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -569,17 +601,26 @@ function ($exception) { } /** - * Create request for operation 'addEditTimesheetHourEntries' + * Create request for operation 'createBreak' * - * @param \BhrSdk\Model\HourEntriesRequestSchema|null $hour_entries_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addEditTimesheetHourEntries'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakV1 $time_tracking_create_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addEditTimesheetHourEntriesRequest($hour_entries_request_schema = null, string $contentType = self::CONTENT_TYPES['addEditTimesheetHourEntries'][0]) { + public function createBreakRequest($id, $time_tracking_create_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['createBreak'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'time_tracking_create_time_tracking_break_v1' => $time_tracking_create_time_tracking_break_v1, + ], + methodName: 'createBreak' + ); - $resourcePath = '/api/v1/time_tracking/hour_entries/store'; + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/breaks'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; @@ -587,6 +628,15 @@ public function addEditTimesheetHourEntriesRequest($hour_entries_request_schema $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -594,12 +644,12 @@ public function addEditTimesheetHourEntriesRequest($hour_entries_request_schema ); // for model (json/xml) - if (isset($hour_entries_request_schema)) { + if (isset($time_tracking_create_time_tracking_break_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($hour_entries_request_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_create_time_tracking_break_v1)); } else { - $httpBody = is_array($hour_entries_request_schema) ? json_encode($hour_entries_request_schema) : $hour_entries_request_schema; + $httpBody = is_array($time_tracking_create_time_tracking_break_v1) ? json_encode($time_tracking_create_time_tracking_break_v1) : $time_tracking_create_time_tracking_break_v1; } } @@ -648,38 +698,36 @@ public function addEditTimesheetHourEntriesRequest($hour_entries_request_schema } /** - * Operation addTimesheetClockInEntry + * Operation createBreakPolicy * - * Create Timesheet Clock-In Entry + * Create Break Policy * - * @param int $employee_id ID of the employee to clock in. (required) - * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema clock_in_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockInEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 $time_tracking_create_time_tracking_break_policy_v1 time_tracking_create_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer|mixed|mixed|mixed|mixed|mixed + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function addTimesheetClockInEntry($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockInEntry'][0]) { - list($response) = $this->addTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_request_schema, $contentType); + public function createBreakPolicy($time_tracking_create_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['createBreakPolicy'][0]) { + list($response) = $this->createBreakPolicyWithHttpInfo($time_tracking_create_time_tracking_break_policy_v1, $contentType); return $response; } /** - * Operation addTimesheetClockInEntryWithHttpInfo + * Operation createBreakPolicyWithHttpInfo * - * Create Timesheet Clock-In Entry + * Create Break Policy * - * @param int $employee_id ID of the employee to clock in. (required) - * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockInEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 $time_tracking_create_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer|mixed|mixed|mixed|mixed|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockInEntry'][0]) { - $request = $this->addTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema, $contentType); + public function createBreakPolicyWithHttpInfo($time_tracking_create_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['createBreakPolicy'][0]) { + $request = $this->createBreakPolicyRequest($time_tracking_create_time_tracking_break_policy_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -688,39 +736,21 @@ public function addTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_req $statusCode = $response->getStatusCode(); switch($statusCode) { - case 200: - return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', - $request, - $response, - ); - case 400: - return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 401: + case 201: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1', $request, $response, ); case 403: return ApiHelper::handleResponseWithDataType( - 'mixed', - $request, - $response, - ); - case 406: - return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - case 409: + case 422: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -740,26 +770,25 @@ public function addTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_req } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1', $request, $response, ); } /** - * Operation addTimesheetClockInEntryAsync + * Operation createBreakPolicyAsync * - * Create Timesheet Clock-In Entry + * Create Break Policy * - * @param int $employee_id ID of the employee to clock in. (required) - * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockInEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 $time_tracking_create_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimesheetClockInEntryAsync($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockInEntry'][0]) { - return $this->addTimesheetClockInEntryAsyncWithHttpInfo($employee_id, $clock_in_request_schema, $contentType) + public function createBreakPolicyAsync($time_tracking_create_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['createBreakPolicy'][0]) { + return $this->createBreakPolicyAsyncWithHttpInfo($time_tracking_create_time_tracking_break_policy_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -768,20 +797,19 @@ function ($response) { } /** - * Operation addTimesheetClockInEntryAsyncWithHttpInfo + * Operation createBreakPolicyAsyncWithHttpInfo * - * Create Timesheet Clock-In Entry + * Create Break Policy * - * @param int $employee_id ID of the employee to clock in. (required) - * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockInEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 $time_tracking_create_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimesheetClockInEntryAsyncWithHttpInfo($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockInEntry'][0]) { - $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer'; - $request = $this->addTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema, $contentType); + public function createBreakPolicyAsyncWithHttpInfo($time_tracking_create_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['createBreakPolicy'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1'; + $request = $this->createBreakPolicyRequest($time_tracking_create_time_tracking_break_policy_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -815,25 +843,24 @@ function ($exception) { } /** - * Create request for operation 'addTimesheetClockInEntry' + * Create request for operation 'createBreakPolicy' * - * @param int $employee_id ID of the employee to clock in. (required) - * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockInEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\TimeTrackingCreateTimeTrackingBreakPolicyV1 $time_tracking_create_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockInEntry'][0]) { + public function createBreakPolicyRequest($time_tracking_create_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['createBreakPolicy'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'employee_id' => $employee_id, + 'time_tracking_create_time_tracking_break_policy_v1' => $time_tracking_create_time_tracking_break_policy_v1, ], - methodName: 'addTimesheetClockInEntry' + methodName: 'createBreakPolicy' ); - $resourcePath = '/api/v1/time_tracking/employees/{employeeId}/clock_in'; + $resourcePath = '/api/v1/time-tracking/break-policies'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; @@ -841,15 +868,6 @@ public function addTimesheetClockInEntryRequest($employee_id, $clock_in_request_ $httpBody = ''; $multipart = false; - // path params - if ($employee_id !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue((string) $employee_id), - $resourcePath - ); - } - $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -857,12 +875,12 @@ public function addTimesheetClockInEntryRequest($employee_id, $clock_in_request_ ); // for model (json/xml) - if (isset($clock_in_request_schema)) { + if (isset($time_tracking_create_time_tracking_break_policy_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_in_request_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_create_time_tracking_break_policy_v1)); } else { - $httpBody = is_array($clock_in_request_schema) ? json_encode($clock_in_request_schema) : $clock_in_request_schema; + $httpBody = is_array($time_tracking_create_time_tracking_break_policy_v1) ? json_encode($time_tracking_create_time_tracking_break_policy_v1) : $time_tracking_create_time_tracking_break_policy_v1; } } @@ -911,38 +929,36 @@ public function addTimesheetClockInEntryRequest($employee_id, $clock_in_request_ } /** - * Operation addTimesheetClockOutEntry + * Operation createOrUpdateTimesheetClockEntries * - * Create Timesheet Clock-Out Entry + * Create or Update Timesheet Clock Entries * - * @param int $employee_id ID of the employee to clock out. (required) - * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema clock_out_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockOutEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\ClockEntriesSchema $clock_entries_schema clock_entries_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer|mixed|mixed|mixed|mixed|mixed|mixed + * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function addTimesheetClockOutEntry($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockOutEntry'][0]) { - list($response) = $this->addTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_request_schema, $contentType); + public function createOrUpdateTimesheetClockEntries($clock_entries_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'][0]) { + list($response) = $this->createOrUpdateTimesheetClockEntriesWithHttpInfo($clock_entries_schema, $contentType); return $response; } /** - * Operation addTimesheetClockOutEntryWithHttpInfo + * Operation createOrUpdateTimesheetClockEntriesWithHttpInfo * - * Create Timesheet Clock-Out Entry + * Create or Update Timesheet Clock Entries * - * @param int $employee_id ID of the employee to clock out. (required) - * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockOutEntry'] to see the possible values for this operation + * @param \BhrSdk\Model\ClockEntriesSchema $clock_entries_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer|mixed|mixed|mixed|mixed|mixed|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockOutEntry'][0]) { - $request = $this->addTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema, $contentType); + public function createOrUpdateTimesheetClockEntriesWithHttpInfo($clock_entries_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'][0]) { + $request = $this->createOrUpdateTimesheetClockEntriesRequest($clock_entries_schema, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -951,50 +967,7107 @@ public function addTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_r $statusCode = $response->getStatusCode(); switch($statusCode) { - case 200: + case 201: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', $request, $response, ); case 400: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); case 401: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); case 403: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); case 406: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); case 409: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - case 500: + case 412: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - } - + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', + $request, + $response, + ); + } + + /** + * Operation createOrUpdateTimesheetClockEntriesAsync + * + * Create or Update Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntriesSchema $clock_entries_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrUpdateTimesheetClockEntriesAsync($clock_entries_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'][0]) { + return $this->createOrUpdateTimesheetClockEntriesAsyncWithHttpInfo($clock_entries_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createOrUpdateTimesheetClockEntriesAsyncWithHttpInfo + * + * Create or Update Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntriesSchema $clock_entries_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrUpdateTimesheetClockEntriesAsyncWithHttpInfo($clock_entries_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'][0]) { + $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]'; + $request = $this->createOrUpdateTimesheetClockEntriesRequest($clock_entries_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createOrUpdateTimesheetClockEntries' + * + * @param \BhrSdk\Model\ClockEntriesSchema $clock_entries_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createOrUpdateTimesheetClockEntriesRequest($clock_entries_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetClockEntries'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'clock_entries_schema' => $clock_entries_schema, + ], + methodName: 'createOrUpdateTimesheetClockEntries' + ); + + $resourcePath = '/api/v1/time_tracking/clock_entries/store'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($clock_entries_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_entries_schema)); + } else { + $httpBody = is_array($clock_entries_schema) ? json_encode($clock_entries_schema) : $clock_entries_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createOrUpdateTimesheetHourEntries + * + * Create or Update Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntriesRequestSchema $hour_entries_request_schema hour_entries_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createOrUpdateTimesheetHourEntries($hour_entries_request_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'][0]) { + list($response) = $this->createOrUpdateTimesheetHourEntriesWithHttpInfo($hour_entries_request_schema, $contentType); + return $response; + } + + /** + * Operation createOrUpdateTimesheetHourEntriesWithHttpInfo + * + * Create or Update Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntriesRequestSchema $hour_entries_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createOrUpdateTimesheetHourEntriesWithHttpInfo($hour_entries_request_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'][0]) { + $request = $this->createOrUpdateTimesheetHourEntriesRequest($hour_entries_request_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 406: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 412: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]', + $request, + $response, + ); + } + + /** + * Operation createOrUpdateTimesheetHourEntriesAsync + * + * Create or Update Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntriesRequestSchema $hour_entries_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrUpdateTimesheetHourEntriesAsync($hour_entries_request_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'][0]) { + return $this->createOrUpdateTimesheetHourEntriesAsyncWithHttpInfo($hour_entries_request_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createOrUpdateTimesheetHourEntriesAsyncWithHttpInfo + * + * Create or Update Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntriesRequestSchema $hour_entries_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOrUpdateTimesheetHourEntriesAsyncWithHttpInfo($hour_entries_request_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'][0]) { + $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer[]'; + $request = $this->createOrUpdateTimesheetHourEntriesRequest($hour_entries_request_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createOrUpdateTimesheetHourEntries' + * + * @param \BhrSdk\Model\HourEntriesRequestSchema $hour_entries_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createOrUpdateTimesheetHourEntriesRequest($hour_entries_request_schema, string $contentType = self::CONTENT_TYPES['createOrUpdateTimesheetHourEntries'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'hour_entries_request_schema' => $hour_entries_request_schema, + ], + methodName: 'createOrUpdateTimesheetHourEntries' + ); + + $resourcePath = '/api/v1/time_tracking/hour_entries/store'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($hour_entries_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($hour_entries_request_schema)); + } else { + $httpBody = is_array($hour_entries_request_schema) ? json_encode($hour_entries_request_schema) : $hour_entries_request_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createProject + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 $project_create_time_tracking_project_v1 project_create_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createProject($project_create_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['createProject'][0]) { + list($response) = $this->createProjectWithHttpInfo($project_create_time_tracking_project_v1, $contentType); + return $response; + } + + /** + * Operation createProjectWithHttpInfo + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 $project_create_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createProjectWithHttpInfo($project_create_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['createProject'][0]) { + $request = $this->createProjectRequest($project_create_time_tracking_project_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', + $request, + $response, + ); + } + + /** + * Operation createProjectAsync + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 $project_create_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createProjectAsync($project_create_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['createProject'][0]) { + return $this->createProjectAsyncWithHttpInfo($project_create_time_tracking_project_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createProjectAsyncWithHttpInfo + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 $project_create_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createProjectAsyncWithHttpInfo($project_create_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['createProject'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingProjectV1'; + $request = $this->createProjectRequest($project_create_time_tracking_project_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createProject' + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1 $project_create_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createProjectRequest($project_create_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['createProject'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'project_create_time_tracking_project_v1' => $project_create_time_tracking_project_v1, + ], + methodName: 'createProject' + ); + + $resourcePath = '/api/v1/time-tracking/projects'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($project_create_time_tracking_project_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_create_time_tracking_project_v1)); + } else { + $httpBody = is_array($project_create_time_tracking_project_v1) ? json_encode($project_create_time_tracking_project_v1) : $project_create_time_tracking_project_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createProjectTask + * + * Create Time Tracking Project Task + * + * @param string $project_id The project ID. (required) + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 $project_create_time_tracking_project_task_v1 project_create_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProjectTask'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createProjectTask($project_id, $project_create_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['createProjectTask'][0]) { + list($response) = $this->createProjectTaskWithHttpInfo($project_id, $project_create_time_tracking_project_task_v1, $contentType); + return $response; + } + + /** + * Operation createProjectTaskWithHttpInfo + * + * Create Time Tracking Project Task + * + * @param string $project_id The project ID. (required) + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 $project_create_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProjectTask'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createProjectTaskWithHttpInfo($project_id, $project_create_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['createProjectTask'][0]) { + $request = $this->createProjectTaskRequest($project_id, $project_create_time_tracking_project_task_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', + $request, + $response, + ); + } + + /** + * Operation createProjectTaskAsync + * + * Create Time Tracking Project Task + * + * @param string $project_id The project ID. (required) + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 $project_create_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProjectTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createProjectTaskAsync($project_id, $project_create_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['createProjectTask'][0]) { + return $this->createProjectTaskAsyncWithHttpInfo($project_id, $project_create_time_tracking_project_task_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createProjectTaskAsyncWithHttpInfo + * + * Create Time Tracking Project Task + * + * @param string $project_id The project ID. (required) + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 $project_create_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProjectTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createProjectTaskAsyncWithHttpInfo($project_id, $project_create_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['createProjectTask'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingTaskV1'; + $request = $this->createProjectTaskRequest($project_id, $project_create_time_tracking_project_task_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createProjectTask' + * + * @param string $project_id The project ID. (required) + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectTaskV1 $project_create_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createProjectTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createProjectTaskRequest($project_id, $project_create_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['createProjectTask'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'project_id' => $project_id, + 'project_create_time_tracking_project_task_v1' => $project_create_time_tracking_project_task_v1, + ], + methodName: 'createProjectTask' + ); + + $resourcePath = '/api/v1/time-tracking/projects/{projectId}/tasks'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($project_id !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue((string) $project_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($project_create_time_tracking_project_task_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_create_time_tracking_project_task_v1)); + } else { + $httpBody = is_array($project_create_time_tracking_project_task_v1) ? json_encode($project_create_time_tracking_project_task_v1) : $project_create_time_tracking_project_task_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createTimeTrackingProject + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateRequestSchema $project_create_request_schema project_create_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createTimeTrackingProject($project_create_request_schema, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + list($response) = $this->createTimeTrackingProjectWithHttpInfo($project_create_request_schema, $contentType); + return $response; + } + + /** + * Operation createTimeTrackingProjectWithHttpInfo + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateRequestSchema $project_create_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createTimeTrackingProjectWithHttpInfo($project_create_request_schema, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + $request = $this->createTimeTrackingProjectRequest($project_create_request_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 406: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds', + $request, + $response, + ); + } + + /** + * Operation createTimeTrackingProjectAsync + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateRequestSchema $project_create_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimeTrackingProjectAsync($project_create_request_schema, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + return $this->createTimeTrackingProjectAsyncWithHttpInfo($project_create_request_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createTimeTrackingProjectAsyncWithHttpInfo + * + * Create Time Tracking Project + * + * @param \BhrSdk\Model\ProjectCreateRequestSchema $project_create_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimeTrackingProjectAsyncWithHttpInfo($project_create_request_schema, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds'; + $request = $this->createTimeTrackingProjectRequest($project_create_request_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createTimeTrackingProject' + * + * @param \BhrSdk\Model\ProjectCreateRequestSchema $project_create_request_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createTimeTrackingProjectRequest($project_create_request_schema, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'project_create_request_schema' => $project_create_request_schema, + ], + methodName: 'createTimeTrackingProject' + ); + + $resourcePath = '/api/v1/time_tracking/projects'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($project_create_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_create_request_schema)); + } else { + $httpBody = is_array($project_create_request_schema) ? json_encode($project_create_request_schema) : $project_create_request_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createTimesheetClockInEntry + * + * Create Timesheet Clock-In Entry + * + * @param int $employee_id ID of the employee to clock in. (required) + * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema clock_in_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockInEntry'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createTimesheetClockInEntry($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockInEntry'][0]) { + list($response) = $this->createTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_request_schema, $contentType); + return $response; + } + + /** + * Operation createTimesheetClockInEntryWithHttpInfo + * + * Create Timesheet Clock-In Entry + * + * @param int $employee_id ID of the employee to clock in. (required) + * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockInEntry'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createTimesheetClockInEntryWithHttpInfo($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockInEntry'][0]) { + $request = $this->createTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 406: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 412: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + $request, + $response, + ); + } + + /** + * Operation createTimesheetClockInEntryAsync + * + * Create Timesheet Clock-In Entry + * + * @param int $employee_id ID of the employee to clock in. (required) + * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockInEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimesheetClockInEntryAsync($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockInEntry'][0]) { + return $this->createTimesheetClockInEntryAsyncWithHttpInfo($employee_id, $clock_in_request_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createTimesheetClockInEntryAsyncWithHttpInfo + * + * Create Timesheet Clock-In Entry + * + * @param int $employee_id ID of the employee to clock in. (required) + * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockInEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimesheetClockInEntryAsyncWithHttpInfo($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockInEntry'][0]) { + $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer'; + $request = $this->createTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createTimesheetClockInEntry' + * + * @param int $employee_id ID of the employee to clock in. (required) + * @param \BhrSdk\Model\ClockInRequestSchema|null $clock_in_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockInEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createTimesheetClockInEntryRequest($employee_id, $clock_in_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockInEntry'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'createTimesheetClockInEntry' + ); + + $resourcePath = '/api/v1/time_tracking/employees/{employeeId}/clock_in'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($clock_in_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_in_request_schema)); + } else { + $httpBody = is_array($clock_in_request_schema) ? json_encode($clock_in_request_schema) : $clock_in_request_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation createTimesheetClockOutEntry + * + * Create Timesheet Clock-Out Entry + * + * @param int $employee_id ID of the employee to clock out. (required) + * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema clock_out_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockOutEntry'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimesheetEntryInfoApiTransformer|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function createTimesheetClockOutEntry($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockOutEntry'][0]) { + list($response) = $this->createTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_request_schema, $contentType); + return $response; + } + + /** + * Operation createTimesheetClockOutEntryWithHttpInfo + * + * Create Timesheet Clock-Out Entry + * + * @param int $employee_id ID of the employee to clock out. (required) + * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockOutEntry'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimesheetEntryInfoApiTransformer|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockOutEntry'][0]) { + $request = $this->createTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 412: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + $request, + $response, + ); + } + + /** + * Operation createTimesheetClockOutEntryAsync + * + * Create Timesheet Clock-Out Entry + * + * @param int $employee_id ID of the employee to clock out. (required) + * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockOutEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimesheetClockOutEntryAsync($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockOutEntry'][0]) { + return $this->createTimesheetClockOutEntryAsyncWithHttpInfo($employee_id, $clock_out_request_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createTimesheetClockOutEntryAsyncWithHttpInfo + * + * Create Timesheet Clock-Out Entry + * + * @param int $employee_id ID of the employee to clock out. (required) + * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockOutEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTimesheetClockOutEntryAsyncWithHttpInfo($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockOutEntry'][0]) { + $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer'; + $request = $this->createTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createTimesheetClockOutEntry' + * + * @param int $employee_id ID of the employee to clock out. (required) + * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimesheetClockOutEntry'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimesheetClockOutEntry'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'createTimesheetClockOutEntry' + ); + + $resourcePath = '/api/v1/time_tracking/employees/{employeeId}/clock_out'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($clock_out_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_out_request_schema)); + } else { + $httpBody = is_array($clock_out_request_schema) ? json_encode($clock_out_request_schema) : $clock_out_request_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteBreak + * + * Delete Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreak'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteBreak($id, string $contentType = self::CONTENT_TYPES['deleteBreak'][0]) { + list($response) = $this->deleteBreakWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteBreakWithHttpInfo + * + * Delete Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreak'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteBreakWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteBreak'][0]) { + $request = $this->deleteBreakRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteBreakAsync + * + * Delete Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBreakAsync($id, string $contentType = self::CONTENT_TYPES['deleteBreak'][0]) { + return $this->deleteBreakAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteBreakAsyncWithHttpInfo + * + * Delete Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBreakAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteBreak'][0]) { + + $request = $this->deleteBreakRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteBreak' + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteBreakRequest($id, string $contentType = self::CONTENT_TYPES['deleteBreak'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteBreak' + ); + + $resourcePath = '/api/v1/time-tracking/breaks/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteBreakPolicy + * + * Delete Break Policy + * + * @param string $id The break policy ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteBreakPolicy($id, string $contentType = self::CONTENT_TYPES['deleteBreakPolicy'][0]) { + list($response) = $this->deleteBreakPolicyWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteBreakPolicyWithHttpInfo + * + * Delete Break Policy + * + * @param string $id The break policy ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteBreakPolicyWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteBreakPolicy'][0]) { + $request = $this->deleteBreakPolicyRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteBreakPolicyAsync + * + * Delete Break Policy + * + * @param string $id The break policy ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBreakPolicyAsync($id, string $contentType = self::CONTENT_TYPES['deleteBreakPolicy'][0]) { + return $this->deleteBreakPolicyAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteBreakPolicyAsyncWithHttpInfo + * + * Delete Break Policy + * + * @param string $id The break policy ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteBreakPolicyAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteBreakPolicy'][0]) { + + $request = $this->deleteBreakPolicyRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteBreakPolicy' + * + * @param string $id The break policy ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteBreakPolicyRequest($id, string $contentType = self::CONTENT_TYPES['deleteBreakPolicy'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteBreakPolicy' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteProject + * + * Delete Time Tracking Project + * + * @param int $id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteProject($id, string $contentType = self::CONTENT_TYPES['deleteProject'][0]) { + list($response) = $this->deleteProjectWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteProjectWithHttpInfo + * + * Delete Time Tracking Project + * + * @param int $id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteProject'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteProjectWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteProject'][0]) { + $request = $this->deleteProjectRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteProjectAsync + * + * Delete Time Tracking Project + * + * @param int $id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteProjectAsync($id, string $contentType = self::CONTENT_TYPES['deleteProject'][0]) { + return $this->deleteProjectAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteProjectAsyncWithHttpInfo + * + * Delete Time Tracking Project + * + * @param int $id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteProjectAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteProject'][0]) { + + $request = $this->deleteProjectRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteProject' + * + * @param int $id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteProjectRequest($id, string $contentType = self::CONTENT_TYPES['deleteProject'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteProject' + ); + + $resourcePath = '/api/v1/time-tracking/projects/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteTask + * + * Delete Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTask'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteTask($id, string $contentType = self::CONTENT_TYPES['deleteTask'][0]) { + list($response) = $this->deleteTaskWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation deleteTaskWithHttpInfo + * + * Delete Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTask'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteTaskWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTask'][0]) { + $request = $this->deleteTaskRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteTaskAsync + * + * Delete Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTaskAsync($id, string $contentType = self::CONTENT_TYPES['deleteTask'][0]) { + return $this->deleteTaskAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteTaskAsyncWithHttpInfo + * + * Delete Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTaskAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteTask'][0]) { + + $request = $this->deleteTaskRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteTask' + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteTaskRequest($id, string $contentType = self::CONTENT_TYPES['deleteTask'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'deleteTask' + ); + + $resourcePath = '/api/v1/time-tracking/tasks/{id}'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteTimesheetClockEntriesViaPost + * + * Delete Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema clock_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + list($response) = $this->deleteTimesheetClockEntriesViaPostWithHttpInfo($clock_entry_ids_schema, $contentType); + return $response; + } + + /** + * Operation deleteTimesheetClockEntriesViaPostWithHttpInfo + * + * Delete Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteTimesheetClockEntriesViaPostWithHttpInfo($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + $request = $this->deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteTimesheetClockEntriesViaPostAsync + * + * Delete Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTimesheetClockEntriesViaPostAsync($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + return $this->deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo($clock_entry_ids_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo + * + * Delete Timesheet Clock Entries + * + * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + + $request = $this->deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteTimesheetClockEntriesViaPost' + * + * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'clock_entry_ids_schema' => $clock_entry_ids_schema, + ], + methodName: 'deleteTimesheetClockEntriesViaPost' + ); + + $resourcePath = '/api/v1/time_tracking/clock_entries/delete'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($clock_entry_ids_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_entry_ids_schema)); + } else { + $httpBody = is_array($clock_entry_ids_schema) ? json_encode($clock_entry_ids_schema) : $clock_entry_ids_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation deleteTimesheetHourEntriesViaPost + * + * Delete Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntryIdsSchema $hour_entry_ids_schema hour_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + list($response) = $this->deleteTimesheetHourEntriesViaPostWithHttpInfo($hour_entry_ids_schema, $contentType); + return $response; + } + + /** + * Operation deleteTimesheetHourEntriesViaPostWithHttpInfo + * + * Delete Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntryIdsSchema $hour_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * + * @throws \BhrSdk\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 deleteTimesheetHourEntriesViaPostWithHttpInfo($hour_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + $request = $this->deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation deleteTimesheetHourEntriesViaPostAsync + * + * Delete Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntryIdsSchema $hour_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTimesheetHourEntriesViaPostAsync($hour_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + return $this->deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo($hour_entry_ids_schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo + * + * Delete Timesheet Hour Entries + * + * @param \BhrSdk\Model\HourEntryIdsSchema $hour_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo($hour_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + + $request = $this->deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'deleteTimesheetHourEntriesViaPost' + * + * @param \BhrSdk\Model\HourEntryIdsSchema $hour_entry_ids_schema (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'hour_entry_ids_schema' => $hour_entry_ids_schema, + ], + methodName: 'deleteTimesheetHourEntriesViaPost' + ); + + $resourcePath = '/api/v1/time_tracking/hour_entries/delete'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($hour_entry_ids_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($hour_entry_ids_schema)); + } else { + $httpBody = is_array($hour_entry_ids_schema) ? json_encode($hour_entry_ids_schema) : $hour_entry_ids_schema; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getBreak + * + * Get Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreak'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getBreak($id, string $contentType = self::CONTENT_TYPES['getBreak'][0]) { + list($response) = $this->getBreakWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation getBreakWithHttpInfo + * + * Get Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreak'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getBreakWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getBreak'][0]) { + $request = $this->getBreakRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', + $request, + $response, + ); + } + + /** + * Operation getBreakAsync + * + * Get Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakAsync($id, string $contentType = self::CONTENT_TYPES['getBreak'][0]) { + return $this->getBreakAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBreakAsyncWithHttpInfo + * + * Get Break + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getBreak'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1'; + $request = $this->getBreakRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getBreak' + * + * @param string $id The break ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreak'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBreakRequest($id, string $contentType = self::CONTENT_TYPES['getBreak'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'getBreak' + ); + + $resourcePath = '/api/v1/time-tracking/breaks/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getBreakPolicy + * + * Get Break Policy + * + * @param string $id The break policy ID. (required) + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getBreakPolicy($id, $include_counts = false, string $contentType = self::CONTENT_TYPES['getBreakPolicy'][0]) { + list($response) = $this->getBreakPolicyWithHttpInfo($id, $include_counts, $contentType); + return $response; + } + + /** + * Operation getBreakPolicyWithHttpInfo + * + * Get Break Policy + * + * @param string $id The break policy ID. (required) + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getBreakPolicyWithHttpInfo($id, $include_counts = false, string $contentType = self::CONTENT_TYPES['getBreakPolicy'][0]) { + $request = $this->getBreakPolicyRequest($id, $include_counts, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1', + $request, + $response, + ); + } + + /** + * Operation getBreakPolicyAsync + * + * Get Break Policy + * + * @param string $id The break policy ID. (required) + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakPolicyAsync($id, $include_counts = false, string $contentType = self::CONTENT_TYPES['getBreakPolicy'][0]) { + return $this->getBreakPolicyAsyncWithHttpInfo($id, $include_counts, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBreakPolicyAsyncWithHttpInfo + * + * Get Break Policy + * + * @param string $id The break policy ID. (required) + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakPolicyAsyncWithHttpInfo($id, $include_counts = false, string $contentType = self::CONTENT_TYPES['getBreakPolicy'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1'; + $request = $this->getBreakPolicyRequest($id, $include_counts, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getBreakPolicy' + * + * @param string $id The break policy ID. (required) + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBreakPolicyRequest($id, $include_counts = false, string $contentType = self::CONTENT_TYPES['getBreakPolicy'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'getBreakPolicy' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'includeCounts' => ['value' => $include_counts, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getBreakPolicySuggestions + * + * Get Break Policy Suggestions + * + * @param \BhrSdk\Model\GetBreakPolicySuggestionsRequest $get_break_policy_suggestions_request get_break_policy_suggestions_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicySuggestions'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getBreakPolicySuggestions($get_break_policy_suggestions_request, string $contentType = self::CONTENT_TYPES['getBreakPolicySuggestions'][0]) { + list($response) = $this->getBreakPolicySuggestionsWithHttpInfo($get_break_policy_suggestions_request, $contentType); + return $response; + } + + /** + * Operation getBreakPolicySuggestionsWithHttpInfo + * + * Get Break Policy Suggestions + * + * @param \BhrSdk\Model\GetBreakPolicySuggestionsRequest $get_break_policy_suggestions_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicySuggestions'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getBreakPolicySuggestionsWithHttpInfo($get_break_policy_suggestions_request, string $contentType = self::CONTENT_TYPES['getBreakPolicySuggestions'][0]) { + $request = $this->getBreakPolicySuggestionsRequest($get_break_policy_suggestions_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1', + $request, + $response, + ); + } + + /** + * Operation getBreakPolicySuggestionsAsync + * + * Get Break Policy Suggestions + * + * @param \BhrSdk\Model\GetBreakPolicySuggestionsRequest $get_break_policy_suggestions_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicySuggestions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakPolicySuggestionsAsync($get_break_policy_suggestions_request, string $contentType = self::CONTENT_TYPES['getBreakPolicySuggestions'][0]) { + return $this->getBreakPolicySuggestionsAsyncWithHttpInfo($get_break_policy_suggestions_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBreakPolicySuggestionsAsyncWithHttpInfo + * + * Get Break Policy Suggestions + * + * @param \BhrSdk\Model\GetBreakPolicySuggestionsRequest $get_break_policy_suggestions_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicySuggestions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBreakPolicySuggestionsAsyncWithHttpInfo($get_break_policy_suggestions_request, string $contentType = self::CONTENT_TYPES['getBreakPolicySuggestions'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1'; + $request = $this->getBreakPolicySuggestionsRequest($get_break_policy_suggestions_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getBreakPolicySuggestions' + * + * @param \BhrSdk\Model\GetBreakPolicySuggestionsRequest $get_break_policy_suggestions_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getBreakPolicySuggestions'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBreakPolicySuggestionsRequest($get_break_policy_suggestions_request, string $contentType = self::CONTENT_TYPES['getBreakPolicySuggestions'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'get_break_policy_suggestions_request' => $get_break_policy_suggestions_request, + ], + methodName: 'getBreakPolicySuggestions' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/suggestions'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($get_break_policy_suggestions_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($get_break_policy_suggestions_request)); + } else { + $httpBody = is_array($get_break_policy_suggestions_request) ? json_encode($get_break_policy_suggestions_request) : $get_break_policy_suggestions_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getProject + * + * Get Time Tracking Project + * + * @param int $project_id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getProject($project_id, string $contentType = self::CONTENT_TYPES['getProject'][0]) { + list($response) = $this->getProjectWithHttpInfo($project_id, $contentType); + return $response; + } + + /** + * Operation getProjectWithHttpInfo + * + * Get Time Tracking Project + * + * @param int $project_id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getProject'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getProjectWithHttpInfo($project_id, string $contentType = self::CONTENT_TYPES['getProject'][0]) { + $request = $this->getProjectRequest($project_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', + $request, + $response, + ); + } + + /** + * Operation getProjectAsync + * + * Get Time Tracking Project + * + * @param int $project_id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProjectAsync($project_id, string $contentType = self::CONTENT_TYPES['getProject'][0]) { + return $this->getProjectAsyncWithHttpInfo($project_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProjectAsyncWithHttpInfo + * + * Get Time Tracking Project + * + * @param int $project_id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProjectAsyncWithHttpInfo($project_id, string $contentType = self::CONTENT_TYPES['getProject'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingProjectV1'; + $request = $this->getProjectRequest($project_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getProject' + * + * @param int $project_id The project ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getProject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProjectRequest($project_id, string $contentType = self::CONTENT_TYPES['getProject'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'project_id' => $project_id, + ], + methodName: 'getProject' + ); + + $resourcePath = '/api/v1/time-tracking/projects/{projectId}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($project_id !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue((string) $project_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getTask + * + * Get Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTask'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getTask($id, string $contentType = self::CONTENT_TYPES['getTask'][0]) { + list($response) = $this->getTaskWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation getTaskWithHttpInfo + * + * Get Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTask'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getTaskWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTask'][0]) { + $request = $this->getTaskRequest($id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', + $request, + $response, + ); + } + + /** + * Operation getTaskAsync + * + * Get Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTaskAsync($id, string $contentType = self::CONTENT_TYPES['getTask'][0]) { + return $this->getTaskAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTaskAsyncWithHttpInfo + * + * Get Time Tracking Task + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTaskAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getTask'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingTaskV1'; + $request = $this->getTaskRequest($id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getTask' + * + * @param int $id The task ID. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTask'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTaskRequest($id, string $contentType = self::CONTENT_TYPES['getTask'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'getTask' + ); + + $resourcePath = '/api/v1/time-tracking/tasks/{id}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBreakAssessments + * + * List Break Assessments + * + * @param int|null $offset Number of items to skip before returning results. Defaults to 0. (optional, default to 0) + * @param int|null $limit Maximum number of items to return. Defaults to 100. Maximum is 500. (optional, default to 100) + * @param string|null $filter OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakAssessments'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listBreakAssessments($offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakAssessments'][0]) { + list($response) = $this->listBreakAssessmentsWithHttpInfo($offset, $limit, $filter, $contentType); + return $response; + } + + /** + * Operation listBreakAssessmentsWithHttpInfo + * + * List Break Assessments + * + * @param int|null $offset Number of items to skip before returning results. Defaults to 0. (optional, default to 0) + * @param int|null $limit Maximum number of items to return. Defaults to 100. Maximum is 500. (optional, default to 100) + * @param string|null $filter OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakAssessments'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBreakAssessmentsWithHttpInfo($offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakAssessments'][0]) { + $request = $this->listBreakAssessmentsRequest($offset, $limit, $filter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1', + $request, + $response, + ); + } + + /** + * Operation listBreakAssessmentsAsync + * + * List Break Assessments + * + * @param int|null $offset Number of items to skip before returning results. Defaults to 0. (optional, default to 0) + * @param int|null $limit Maximum number of items to return. Defaults to 100. Maximum is 500. (optional, default to 100) + * @param string|null $filter OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakAssessments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakAssessmentsAsync($offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakAssessments'][0]) { + return $this->listBreakAssessmentsAsyncWithHttpInfo($offset, $limit, $filter, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBreakAssessmentsAsyncWithHttpInfo + * + * List Break Assessments + * + * @param int|null $offset Number of items to skip before returning results. Defaults to 0. (optional, default to 0) + * @param int|null $limit Maximum number of items to return. Defaults to 100. Maximum is 500. (optional, default to 100) + * @param string|null $filter OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakAssessments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakAssessmentsAsyncWithHttpInfo($offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakAssessments'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingPaginatedBreakAssessmentsResponseV1'; + $request = $this->listBreakAssessmentsRequest($offset, $limit, $filter, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBreakAssessments' + * + * @param int|null $offset Number of items to skip before returning results. Defaults to 0. (optional, default to 0) + * @param int|null $limit Maximum number of items to return. Defaults to 100. Maximum is 500. (optional, default to 100) + * @param string|null $filter OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakAssessments'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBreakAssessmentsRequest($offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakAssessments'][0]) { + + if ($offset !== null && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling TimeTrackingApi.listBreakAssessments, must be bigger than or equal to 0.'); + } + + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listBreakAssessments, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listBreakAssessments, must be bigger than or equal to 0.'); + } + + $resourcePath = '/api/v1/time-tracking/break-assessments'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'offset' => ['value' => $offset, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBreakPolicies + * + * List Break Policies + * + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. (optional, default to '') + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicies'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listBreakPolicies($offset = 0, $limit = 100, $filter = '', $include_counts = false, string $contentType = self::CONTENT_TYPES['listBreakPolicies'][0]) { + list($response) = $this->listBreakPoliciesWithHttpInfo($offset, $limit, $filter, $include_counts, $contentType); + return $response; + } + + /** + * Operation listBreakPoliciesWithHttpInfo + * + * List Break Policies + * + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. (optional, default to '') + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicies'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBreakPoliciesWithHttpInfo($offset = 0, $limit = 100, $filter = '', $include_counts = false, string $contentType = self::CONTENT_TYPES['listBreakPolicies'][0]) { + $request = $this->listBreakPoliciesRequest($offset, $limit, $filter, $include_counts, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1', + $request, + $response, + ); + } + + /** + * Operation listBreakPoliciesAsync + * + * List Break Policies + * + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. (optional, default to '') + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPoliciesAsync($offset = 0, $limit = 100, $filter = '', $include_counts = false, string $contentType = self::CONTENT_TYPES['listBreakPolicies'][0]) { + return $this->listBreakPoliciesAsyncWithHttpInfo($offset, $limit, $filter, $include_counts, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBreakPoliciesAsyncWithHttpInfo + * + * List Break Policies + * + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. (optional, default to '') + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPoliciesAsyncWithHttpInfo($offset = 0, $limit = 100, $filter = '', $include_counts = false, string $contentType = self::CONTENT_TYPES['listBreakPolicies'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1'; + $request = $this->listBreakPoliciesRequest($offset, $limit, $filter, $include_counts, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBreakPolicies' + * + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. (optional, default to '') + * @param bool|null $include_counts Include employee and break counts (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBreakPoliciesRequest($offset = 0, $limit = 100, $filter = '', $include_counts = false, string $contentType = self::CONTENT_TYPES['listBreakPolicies'][0]) { + + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listBreakPolicies, must be smaller than or equal to 500.'); + } + + $resourcePath = '/api/v1/time-tracking/break-policies'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'offset' => ['value' => $offset, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'includeCounts' => ['value' => $include_counts, 'type' => 'boolean', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBreakPolicyBreaks + * + * List Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyBreaks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listBreakPolicyBreaks($id, $offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakPolicyBreaks'][0]) { + list($response) = $this->listBreakPolicyBreaksWithHttpInfo($id, $offset, $limit, $filter, $contentType); + return $response; + } + + /** + * Operation listBreakPolicyBreaksWithHttpInfo + * + * List Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyBreaks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBreakPolicyBreaksWithHttpInfo($id, $offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakPolicyBreaks'][0]) { + $request = $this->listBreakPolicyBreaksRequest($id, $offset, $limit, $filter, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1', + $request, + $response, + ); + } + + /** + * Operation listBreakPolicyBreaksAsync + * + * List Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyBreaks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPolicyBreaksAsync($id, $offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakPolicyBreaks'][0]) { + return $this->listBreakPolicyBreaksAsyncWithHttpInfo($id, $offset, $limit, $filter, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBreakPolicyBreaksAsyncWithHttpInfo + * + * List Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyBreaks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPolicyBreaksAsyncWithHttpInfo($id, $offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakPolicyBreaks'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingPaginatedBreaksResponseV1'; + $request = $this->listBreakPolicyBreaksRequest($id, $offset, $limit, $filter, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBreakPolicyBreaks' + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string|null $filter OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. (optional, default to '') + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyBreaks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBreakPolicyBreaksRequest($id, $offset = 0, $limit = 100, $filter = '', string $contentType = self::CONTENT_TYPES['listBreakPolicyBreaks'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'listBreakPolicyBreaks' + ); + + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listBreakPolicyBreaks, must be smaller than or equal to 500.'); + } + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/breaks'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'offset' => ['value' => $offset, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listBreakPolicyEmployees + * + * List Break Policy Employees + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listBreakPolicyEmployees($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listBreakPolicyEmployees'][0]) { + list($response) = $this->listBreakPolicyEmployeesWithHttpInfo($id, $offset, $limit, $contentType); + return $response; + } + + /** + * Operation listBreakPolicyEmployeesWithHttpInfo + * + * List Break Policy Employees + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBreakPolicyEmployeesWithHttpInfo($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listBreakPolicyEmployees'][0]) { + $request = $this->listBreakPolicyEmployeesRequest($id, $offset, $limit, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1', + $request, + $response, + ); + } + + /** + * Operation listBreakPolicyEmployeesAsync + * + * List Break Policy Employees + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPolicyEmployeesAsync($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listBreakPolicyEmployees'][0]) { + return $this->listBreakPolicyEmployeesAsyncWithHttpInfo($id, $offset, $limit, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBreakPolicyEmployeesAsyncWithHttpInfo + * + * List Break Policy Employees + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBreakPolicyEmployeesAsyncWithHttpInfo($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listBreakPolicyEmployees'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingPaginatedBreakPolicyEmployeesResponseV1'; + $request = $this->listBreakPolicyEmployeesRequest($id, $offset, $limit, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listBreakPolicyEmployees' + * + * @param string $id The break policy ID. (required) + * @param int|null $offset The offset of items to retrieve (optional, default to 0) + * @param int|null $limit The maximum items to retrieve (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBreakPolicyEmployeesRequest($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listBreakPolicyEmployees'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'listBreakPolicyEmployees' + ); + + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listBreakPolicyEmployees, must be smaller than or equal to 500.'); + } + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/employees'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'offset' => ['value' => $offset, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listEmployeeBreakAvailabilities + * + * List Employee Break Availabilities + * + * @param int $id The employee ID. (required) + * @param string|null $effective The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakAvailabilities'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listEmployeeBreakAvailabilities($id, $effective = null, string $contentType = self::CONTENT_TYPES['listEmployeeBreakAvailabilities'][0]) { + list($response) = $this->listEmployeeBreakAvailabilitiesWithHttpInfo($id, $effective, $contentType); + return $response; + } + + /** + * Operation listEmployeeBreakAvailabilitiesWithHttpInfo + * + * List Employee Break Availabilities + * + * @param int $id The employee ID. (required) + * @param string|null $effective The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakAvailabilities'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listEmployeeBreakAvailabilitiesWithHttpInfo($id, $effective = null, string $contentType = self::CONTENT_TYPES['listEmployeeBreakAvailabilities'][0]) { + $request = $this->listEmployeeBreakAvailabilitiesRequest($id, $effective, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]', + $request, + $response, + ); + } + + /** + * Operation listEmployeeBreakAvailabilitiesAsync + * + * List Employee Break Availabilities + * + * @param int $id The employee ID. (required) + * @param string|null $effective The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakAvailabilities'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeBreakAvailabilitiesAsync($id, $effective = null, string $contentType = self::CONTENT_TYPES['listEmployeeBreakAvailabilities'][0]) { + return $this->listEmployeeBreakAvailabilitiesAsyncWithHttpInfo($id, $effective, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listEmployeeBreakAvailabilitiesAsyncWithHttpInfo + * + * List Employee Break Availabilities + * + * @param int $id The employee ID. (required) + * @param string|null $effective The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakAvailabilities'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeBreakAvailabilitiesAsyncWithHttpInfo($id, $effective = null, string $contentType = self::CONTENT_TYPES['listEmployeeBreakAvailabilities'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakAvailabilityV1[]'; + $request = $this->listEmployeeBreakAvailabilitiesRequest($id, $effective, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listEmployeeBreakAvailabilities' + * + * @param int $id The employee ID. (required) + * @param string|null $effective The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakAvailabilities'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listEmployeeBreakAvailabilitiesRequest($id, $effective = null, string $contentType = self::CONTENT_TYPES['listEmployeeBreakAvailabilities'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'listEmployeeBreakAvailabilities' + ); + + if ($effective !== null && !preg_match("/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/", $effective)) { + throw new \InvalidArgumentException("invalid value for \"effective\" when calling TimeTrackingApi.listEmployeeBreakAvailabilities, must conform to the pattern /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/."); + } + + $resourcePath = '/api/v1/time-tracking/employees/{id}/break-availabilities'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'effective' => ['value' => $effective, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listEmployeeBreakPolicies + * + * List Employee Break Policies + * + * @param int $id The employee ID. (required) + * @param int|null $offset The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. (optional, default to 0) + * @param int|null $limit The maximum number of items to return. Must be between 0 and 500. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakPolicies'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listEmployeeBreakPolicies($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listEmployeeBreakPolicies'][0]) { + list($response) = $this->listEmployeeBreakPoliciesWithHttpInfo($id, $offset, $limit, $contentType); + return $response; + } + + /** + * Operation listEmployeeBreakPoliciesWithHttpInfo + * + * List Employee Break Policies + * + * @param int $id The employee ID. (required) + * @param int|null $offset The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. (optional, default to 0) + * @param int|null $limit The maximum number of items to return. Must be between 0 and 500. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakPolicies'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listEmployeeBreakPoliciesWithHttpInfo($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listEmployeeBreakPolicies'][0]) { + $request = $this->listEmployeeBreakPoliciesRequest($id, $offset, $limit, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1', + $request, + $response, + ); + } + + /** + * Operation listEmployeeBreakPoliciesAsync + * + * List Employee Break Policies + * + * @param int $id The employee ID. (required) + * @param int|null $offset The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. (optional, default to 0) + * @param int|null $limit The maximum number of items to return. Must be between 0 and 500. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeBreakPoliciesAsync($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listEmployeeBreakPolicies'][0]) { + return $this->listEmployeeBreakPoliciesAsyncWithHttpInfo($id, $offset, $limit, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listEmployeeBreakPoliciesAsyncWithHttpInfo + * + * List Employee Break Policies + * + * @param int $id The employee ID. (required) + * @param int|null $offset The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. (optional, default to 0) + * @param int|null $limit The maximum number of items to return. Must be between 0 and 500. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listEmployeeBreakPoliciesAsyncWithHttpInfo($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listEmployeeBreakPolicies'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingPaginatedBreakPoliciesResponseV1'; + $request = $this->listEmployeeBreakPoliciesRequest($id, $offset, $limit, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listEmployeeBreakPolicies' + * + * @param int $id The employee ID. (required) + * @param int|null $offset The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. (optional, default to 0) + * @param int|null $limit The maximum number of items to return. Must be between 0 and 500. Defaults to 100. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeBreakPolicies'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listEmployeeBreakPoliciesRequest($id, $offset = 0, $limit = 100, string $contentType = self::CONTENT_TYPES['listEmployeeBreakPolicies'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + ], + methodName: 'listEmployeeBreakPolicies' + ); + + if ($offset !== null && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling TimeTrackingApi.listEmployeeBreakPolicies, must be bigger than or equal to 0.'); + } + + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listEmployeeBreakPolicies, must be smaller than or equal to 500.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TimeTrackingApi.listEmployeeBreakPolicies, must be bigger than or equal to 0.'); + } + + $resourcePath = '/api/v1/time-tracking/employees/{id}/break-policies'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'offset' => ['value' => $offset, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'limit' => ['value' => $limit, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listProjectTasks + * + * List Time Tracking Project Tasks + * + * @param int $project_id The project ID. (required) + * @param string[]|null $statuses Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. (optional) + * @param int|null $page The page number to retrieve (1-indexed). (optional, default to 1) + * @param int|null $page_size The maximum number of items per page. (optional, default to 25) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjectTasks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectPaginatedTasksResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listProjectTasks($project_id, $statuses = null, $page = 1, $page_size = 25, string $contentType = self::CONTENT_TYPES['listProjectTasks'][0]) { + list($response) = $this->listProjectTasksWithHttpInfo($project_id, $statuses, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation listProjectTasksWithHttpInfo + * + * List Time Tracking Project Tasks + * + * @param int $project_id The project ID. (required) + * @param string[]|null $statuses Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. (optional) + * @param int|null $page The page number to retrieve (1-indexed). (optional, default to 1) + * @param int|null $page_size The maximum number of items per page. (optional, default to 25) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjectTasks'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectPaginatedTasksResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listProjectTasksWithHttpInfo($project_id, $statuses = null, $page = 1, $page_size = 25, string $contentType = self::CONTENT_TYPES['listProjectTasks'][0]) { + $request = $this->listProjectTasksRequest($project_id, $statuses, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectPaginatedTasksResponseV1', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectPaginatedTasksResponseV1', + $request, + $response, + ); + } + + /** + * Operation listProjectTasksAsync + * + * List Time Tracking Project Tasks + * + * @param int $project_id The project ID. (required) + * @param string[]|null $statuses Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. (optional) + * @param int|null $page The page number to retrieve (1-indexed). (optional, default to 1) + * @param int|null $page_size The maximum number of items per page. (optional, default to 25) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjectTasks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listProjectTasksAsync($project_id, $statuses = null, $page = 1, $page_size = 25, string $contentType = self::CONTENT_TYPES['listProjectTasks'][0]) { + return $this->listProjectTasksAsyncWithHttpInfo($project_id, $statuses, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listProjectTasksAsyncWithHttpInfo + * + * List Time Tracking Project Tasks + * + * @param int $project_id The project ID. (required) + * @param string[]|null $statuses Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. (optional) + * @param int|null $page The page number to retrieve (1-indexed). (optional, default to 1) + * @param int|null $page_size The maximum number of items per page. (optional, default to 25) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjectTasks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listProjectTasksAsyncWithHttpInfo($project_id, $statuses = null, $page = 1, $page_size = 25, string $contentType = self::CONTENT_TYPES['listProjectTasks'][0]) { + $returnType = '\BhrSdk\Model\ProjectPaginatedTasksResponseV1'; + $request = $this->listProjectTasksRequest($project_id, $statuses, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listProjectTasks' + * + * @param int $project_id The project ID. (required) + * @param string[]|null $statuses Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. (optional) + * @param int|null $page The page number to retrieve (1-indexed). (optional, default to 1) + * @param int|null $page_size The maximum number of items per page. (optional, default to 25) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjectTasks'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listProjectTasksRequest($project_id, $statuses = null, $page = 1, $page_size = 25, string $contentType = self::CONTENT_TYPES['listProjectTasks'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'project_id' => $project_id, + ], + methodName: 'listProjectTasks' + ); + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling TimeTrackingApi.listProjectTasks, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 500) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling TimeTrackingApi.listProjectTasks, must be smaller than or equal to 500.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling TimeTrackingApi.listProjectTasks, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/time-tracking/projects/{projectId}/tasks'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'statuses[]' => ['value' => $statuses, 'type' => 'array', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($project_id !== null) { + $resourcePath = str_replace( + '{' . 'projectId' . '}', + ObjectSerializer::toPathValue((string) $project_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listProjects + * + * List Time Tracking Projects + * + * @param string|null $filter OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. (optional) + * @param string|null $sort Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items per page. Defaults to 100, maximum 500. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjects'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listProjects($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['listProjects'][0]) { + list($response) = $this->listProjectsWithHttpInfo($filter, $sort, $page, $page_size, $contentType); + return $response; + } + + /** + * Operation listProjectsWithHttpInfo + * + * List Time Tracking Projects + * + * @param string|null $filter OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. (optional) + * @param string|null $sort Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items per page. Defaults to 100, maximum 500. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjects'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listProjectsWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['listProjects'][0]) { + $request = $this->listProjectsRequest($filter, $sort, $page, $page_size, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1', + $request, + $response, + ); + } + + /** + * Operation listProjectsAsync + * + * List Time Tracking Projects + * + * @param string|null $filter OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. (optional) + * @param string|null $sort Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items per page. Defaults to 100, maximum 500. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjects'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listProjectsAsync($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['listProjects'][0]) { + return $this->listProjectsAsyncWithHttpInfo($filter, $sort, $page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listProjectsAsyncWithHttpInfo + * + * List Time Tracking Projects + * + * @param string|null $filter OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. (optional) + * @param string|null $sort Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items per page. Defaults to 100, maximum 500. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjects'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listProjectsAsyncWithHttpInfo($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['listProjects'][0]) { + $returnType = '\BhrSdk\Model\ProjectPaginatedTimeTrackingProjectsResponseV1'; + $request = $this->listProjectsRequest($filter, $sort, $page, $page_size, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listProjects' + * + * @param string|null $filter OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. (optional) + * @param string|null $sort Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. (optional) + * @param int|null $page The starting page for pagination. Defaults to 1. (optional, default to 1) + * @param int|null $page_size The number of items per page. Defaults to 100, maximum 500. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listProjects'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listProjectsRequest($filter = null, $sort = null, $page = 1, $page_size = 100, string $contentType = self::CONTENT_TYPES['listProjects'][0]) { + + if ($page !== null && $page < 1) { + throw new \InvalidArgumentException('invalid value for "$page" when calling TimeTrackingApi.listProjects, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 500) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling TimeTrackingApi.listProjects, must be smaller than or equal to 500.'); + } + if ($page_size !== null && $page_size < 1) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling TimeTrackingApi.listProjects, must be bigger than or equal to 1.'); + } + + $resourcePath = '/api/v1/time-tracking/projects'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'filter' => ['value' => $filter, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'sort' => ['value' => $sort, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + 'page' => ['value' => $page, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'pageSize' => ['value' => $page_size, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation listTimesheetEntries + * + * List Timesheet Entries + * + * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimesheetEntries'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\EmployeeTimesheetEntryTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function listTimesheetEntries($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['listTimesheetEntries'][0]) { + list($response) = $this->listTimesheetEntriesWithHttpInfo($start, $end, $employee_ids, $contentType); + return $response; + } + + /** + * Operation listTimesheetEntriesWithHttpInfo + * + * List Timesheet Entries + * + * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimesheetEntries'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\EmployeeTimesheetEntryTransformer[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listTimesheetEntriesWithHttpInfo($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['listTimesheetEntries'][0]) { + $request = $this->listTimesheetEntriesRequest($start, $end, $employee_ids, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]', + $request, + $response, + ); + } + + /** + * Operation listTimesheetEntriesAsync + * + * List Timesheet Entries + * + * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimesheetEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listTimesheetEntriesAsync($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['listTimesheetEntries'][0]) { + return $this->listTimesheetEntriesAsyncWithHttpInfo($start, $end, $employee_ids, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listTimesheetEntriesAsyncWithHttpInfo + * + * List Timesheet Entries + * + * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimesheetEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listTimesheetEntriesAsyncWithHttpInfo($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['listTimesheetEntries'][0]) { + $returnType = '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]'; + $request = $this->listTimesheetEntriesRequest($start, $end, $employee_ids, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'listTimesheetEntries' + * + * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTimesheetEntries'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listTimesheetEntriesRequest($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['listTimesheetEntries'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'start' => $start, + 'end' => $end, + ], + methodName: 'listTimesheetEntries' + ); + + if ($employee_ids !== null && !preg_match("/^\\d+(,\\d+)*$/", $employee_ids)) { + throw new \InvalidArgumentException("invalid value for \"employee_ids\" when calling TimeTrackingApi.listTimesheetEntries, must conform to the pattern /^\\d+(,\\d+)*$/."); + } + + $resourcePath = '/api/v1/time_tracking/timesheet_entries'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'start' => ['value' => $start, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'end' => ['value' => $end, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], + 'employeeIds' => ['value' => $employee_ids, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation replaceBreaksForBreakPolicy + * + * Replace Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] $time_tracking_create_or_update_time_tracking_break_without_policy_v1 time_tracking_create_or_update_time_tracking_break_without_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['replaceBreaksForBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function replaceBreaksForBreakPolicy($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, string $contentType = self::CONTENT_TYPES['replaceBreaksForBreakPolicy'][0]) { + list($response) = $this->replaceBreaksForBreakPolicyWithHttpInfo($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, $contentType); + return $response; + } + + /** + * Operation replaceBreaksForBreakPolicyWithHttpInfo + * + * Replace Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] $time_tracking_create_or_update_time_tracking_break_without_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['replaceBreaksForBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function replaceBreaksForBreakPolicyWithHttpInfo($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, string $contentType = self::CONTENT_TYPES['replaceBreaksForBreakPolicy'][0]) { + $request = $this->replaceBreaksForBreakPolicyRequest($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]', + $request, + $response, + ); + } + + /** + * Operation replaceBreaksForBreakPolicyAsync + * + * Replace Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] $time_tracking_create_or_update_time_tracking_break_without_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['replaceBreaksForBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function replaceBreaksForBreakPolicyAsync($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, string $contentType = self::CONTENT_TYPES['replaceBreaksForBreakPolicy'][0]) { + return $this->replaceBreaksForBreakPolicyAsyncWithHttpInfo($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation replaceBreaksForBreakPolicyAsyncWithHttpInfo + * + * Replace Breaks for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] $time_tracking_create_or_update_time_tracking_break_without_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['replaceBreaksForBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function replaceBreaksForBreakPolicyAsyncWithHttpInfo($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, string $contentType = self::CONTENT_TYPES['replaceBreaksForBreakPolicy'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]'; + $request = $this->replaceBreaksForBreakPolicyRequest($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'replaceBreaksForBreakPolicy' + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[] $time_tracking_create_or_update_time_tracking_break_without_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['replaceBreaksForBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function replaceBreaksForBreakPolicyRequest($id, $time_tracking_create_or_update_time_tracking_break_without_policy_v1, string $contentType = self::CONTENT_TYPES['replaceBreaksForBreakPolicy'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'time_tracking_create_or_update_time_tracking_break_without_policy_v1' => $time_tracking_create_or_update_time_tracking_break_without_policy_v1, + ], + methodName: 'replaceBreaksForBreakPolicy' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/breaks'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($time_tracking_create_or_update_time_tracking_break_without_policy_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_create_or_update_time_tracking_break_without_policy_v1)); + } else { + $httpBody = is_array($time_tracking_create_or_update_time_tracking_break_without_policy_v1) ? json_encode($time_tracking_create_or_update_time_tracking_break_without_policy_v1) : $time_tracking_create_or_update_time_tracking_break_without_policy_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation setBreakPolicyEmployees + * + * Set Employees for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\SetBreakPolicyEmployeesRequest $set_break_policy_employees_request set_break_policy_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function setBreakPolicyEmployees($id, $set_break_policy_employees_request, string $contentType = self::CONTENT_TYPES['setBreakPolicyEmployees'][0]) { + list($response) = $this->setBreakPolicyEmployeesWithHttpInfo($id, $set_break_policy_employees_request, $contentType); + return $response; + } + + /** + * Operation setBreakPolicyEmployeesWithHttpInfo + * + * Set Employees for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\SetBreakPolicyEmployeesRequest $set_break_policy_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\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 setBreakPolicyEmployeesWithHttpInfo($id, $set_break_policy_employees_request, string $contentType = self::CONTENT_TYPES['setBreakPolicyEmployees'][0]) { + $request = $this->setBreakPolicyEmployeesRequest($id, $set_break_policy_employees_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation setBreakPolicyEmployeesAsync + * + * Set Employees for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\SetBreakPolicyEmployeesRequest $set_break_policy_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setBreakPolicyEmployeesAsync($id, $set_break_policy_employees_request, string $contentType = self::CONTENT_TYPES['setBreakPolicyEmployees'][0]) { + return $this->setBreakPolicyEmployeesAsyncWithHttpInfo($id, $set_break_policy_employees_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setBreakPolicyEmployeesAsyncWithHttpInfo + * + * Set Employees for Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\SetBreakPolicyEmployeesRequest $set_break_policy_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setBreakPolicyEmployeesAsyncWithHttpInfo($id, $set_break_policy_employees_request, string $contentType = self::CONTENT_TYPES['setBreakPolicyEmployees'][0]) { + + $request = $this->setBreakPolicyEmployeesRequest($id, $set_break_policy_employees_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'setBreakPolicyEmployees' + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\SetBreakPolicyEmployeesRequest $set_break_policy_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setBreakPolicyEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setBreakPolicyEmployeesRequest($id, $set_break_policy_employees_request, string $contentType = self::CONTENT_TYPES['setBreakPolicyEmployees'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'set_break_policy_employees_request' => $set_break_policy_employees_request, + ], + methodName: 'setBreakPolicyEmployees' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/assign'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($set_break_policy_employees_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($set_break_policy_employees_request)); + } else { + $httpBody = is_array($set_break_policy_employees_request) ? json_encode($set_break_policy_employees_request) : $set_break_policy_employees_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation syncBreakPolicy + * + * Sync Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 $time_tracking_sync_time_tracking_break_policy_v1 time_tracking_sync_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['syncBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function syncBreakPolicy($id, $time_tracking_sync_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['syncBreakPolicy'][0]) { + list($response) = $this->syncBreakPolicyWithHttpInfo($id, $time_tracking_sync_time_tracking_break_policy_v1, $contentType); + return $response; + } + + /** + * Operation syncBreakPolicyWithHttpInfo + * + * Sync Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 $time_tracking_sync_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['syncBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function syncBreakPolicyWithHttpInfo($id, $time_tracking_sync_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['syncBreakPolicy'][0]) { + $request = $this->syncBreakPolicyRequest($id, $time_tracking_sync_time_tracking_break_policy_v1, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1009,26 +8082,26 @@ public function addTimesheetClockOutEntryWithHttpInfo($employee_id, $clock_out_r } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimesheetEntryInfoApiTransformer', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1', $request, $response, ); } /** - * Operation addTimesheetClockOutEntryAsync + * Operation syncBreakPolicyAsync * - * Create Timesheet Clock-Out Entry + * Sync Break Policy * - * @param int $employee_id ID of the employee to clock out. (required) - * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockOutEntry'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 $time_tracking_sync_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['syncBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimesheetClockOutEntryAsync($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockOutEntry'][0]) { - return $this->addTimesheetClockOutEntryAsyncWithHttpInfo($employee_id, $clock_out_request_schema, $contentType) + public function syncBreakPolicyAsync($id, $time_tracking_sync_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['syncBreakPolicy'][0]) { + return $this->syncBreakPolicyAsyncWithHttpInfo($id, $time_tracking_sync_time_tracking_break_policy_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -1037,20 +8110,20 @@ function ($response) { } /** - * Operation addTimesheetClockOutEntryAsyncWithHttpInfo + * Operation syncBreakPolicyAsyncWithHttpInfo * - * Create Timesheet Clock-Out Entry + * Sync Break Policy * - * @param int $employee_id ID of the employee to clock out. (required) - * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockOutEntry'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 $time_tracking_sync_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['syncBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTimesheetClockOutEntryAsyncWithHttpInfo($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockOutEntry'][0]) { - $returnType = '\BhrSdk\Model\TimesheetEntryInfoApiTransformer'; - $request = $this->addTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema, $contentType); + public function syncBreakPolicyAsyncWithHttpInfo($id, $time_tracking_sync_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['syncBreakPolicy'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyWithRelationsV1'; + $request = $this->syncBreakPolicyRequest($id, $time_tracking_sync_time_tracking_break_policy_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1084,25 +8157,236 @@ function ($exception) { } /** - * Create request for operation 'addTimesheetClockOutEntry' + * Create request for operation 'syncBreakPolicy' * - * @param int $employee_id ID of the employee to clock out. (required) - * @param \BhrSdk\Model\ClockOutRequestSchema|null $clock_out_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTimesheetClockOutEntry'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingSyncTimeTrackingBreakPolicyV1 $time_tracking_sync_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['syncBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTimesheetClockOutEntryRequest($employee_id, $clock_out_request_schema = null, string $contentType = self::CONTENT_TYPES['addTimesheetClockOutEntry'][0]) { + public function syncBreakPolicyRequest($id, $time_tracking_sync_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['syncBreakPolicy'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'employee_id' => $employee_id, + 'id' => $id, + 'time_tracking_sync_time_tracking_break_policy_v1' => $time_tracking_sync_time_tracking_break_policy_v1, ], - methodName: 'addTimesheetClockOutEntry' + methodName: 'syncBreakPolicy' ); - $resourcePath = '/api/v1/time_tracking/employees/{employeeId}/clock_out'; + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/sync'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($time_tracking_sync_time_tracking_break_policy_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_sync_time_tracking_break_policy_v1)); + } else { + $httpBody = is_array($time_tracking_sync_time_tracking_break_policy_v1) ? json_encode($time_tracking_sync_time_tracking_break_policy_v1) : $time_tracking_sync_time_tracking_break_policy_v1; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation unassignEmployeesFromBreakPolicy + * + * Unassign Employees from Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest $unassign_employees_from_break_policy_request unassign_employees_from_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function unassignEmployeesFromBreakPolicy($id, $unassign_employees_from_break_policy_request, string $contentType = self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'][0]) { + list($response) = $this->unassignEmployeesFromBreakPolicyWithHttpInfo($id, $unassign_employees_from_break_policy_request, $contentType); + return $response; + } + + /** + * Operation unassignEmployeesFromBreakPolicyWithHttpInfo + * + * Unassign Employees from Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest $unassign_employees_from_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'] to see the possible values for this operation + * + * @throws \BhrSdk\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 unassignEmployeesFromBreakPolicyWithHttpInfo($id, $unassign_employees_from_break_policy_request, string $contentType = self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'][0]) { + $request = $this->unassignEmployeesFromBreakPolicyRequest($id, $unassign_employees_from_break_policy_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation unassignEmployeesFromBreakPolicyAsync + * + * Unassign Employees from Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest $unassign_employees_from_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function unassignEmployeesFromBreakPolicyAsync($id, $unassign_employees_from_break_policy_request, string $contentType = self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'][0]) { + return $this->unassignEmployeesFromBreakPolicyAsyncWithHttpInfo($id, $unassign_employees_from_break_policy_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation unassignEmployeesFromBreakPolicyAsyncWithHttpInfo + * + * Unassign Employees from Break Policy + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest $unassign_employees_from_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function unassignEmployeesFromBreakPolicyAsyncWithHttpInfo($id, $unassign_employees_from_break_policy_request, string $contentType = self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'][0]) { + + $request = $this->unassignEmployeesFromBreakPolicyRequest($id, $unassign_employees_from_break_policy_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'unassignEmployeesFromBreakPolicy' + * + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\UnassignEmployeesFromBreakPolicyRequest $unassign_employees_from_break_policy_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function unassignEmployeesFromBreakPolicyRequest($id, $unassign_employees_from_break_policy_request, string $contentType = self::CONTENT_TYPES['unassignEmployeesFromBreakPolicy'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'unassign_employees_from_break_policy_request' => $unassign_employees_from_break_policy_request, + ], + methodName: 'unassignEmployeesFromBreakPolicy' + ); + + $resourcePath = '/api/v1/time-tracking/break-policies/{id}/unassign'; $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); $queryParams = []; @@ -1111,10 +8395,10 @@ public function addTimesheetClockOutEntryRequest($employee_id, $clock_out_reques $multipart = false; // path params - if ($employee_id !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue((string) $employee_id), + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), $resourcePath ); } @@ -1126,12 +8410,12 @@ public function addTimesheetClockOutEntryRequest($employee_id, $clock_out_reques ); // for model (json/xml) - if (isset($clock_out_request_schema)) { + if (isset($unassign_employees_from_break_policy_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_out_request_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($unassign_employees_from_break_policy_request)); } else { - $httpBody = is_array($clock_out_request_schema) ? json_encode($clock_out_request_schema) : $clock_out_request_schema; + $httpBody = is_array($unassign_employees_from_break_policy_request) ? json_encode($unassign_employees_from_break_policy_request) : $unassign_employees_from_break_policy_request; } } @@ -1180,36 +8464,38 @@ public function addTimesheetClockOutEntryRequest($employee_id, $clock_out_reques } /** - * Operation createTimeTrackingProject + * Operation updateBreak * - * Create Time Tracking Project + * Update Break * - * @param \BhrSdk\Model\ProjectCreateRequestSchema|null $project_create_request_schema project_create_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * @param string $id The break ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 $time_tracking_update_time_tracking_break_v1 time_tracking_update_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreak'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function createTimeTrackingProject($project_create_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { - list($response) = $this->createTimeTrackingProjectWithHttpInfo($project_create_request_schema, $contentType); + public function updateBreak($id, $time_tracking_update_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['updateBreak'][0]) { + list($response) = $this->updateBreakWithHttpInfo($id, $time_tracking_update_time_tracking_break_v1, $contentType); return $response; } /** - * Operation createTimeTrackingProjectWithHttpInfo + * Operation updateBreakWithHttpInfo * - * Create Time Tracking Project + * Update Break * - * @param \BhrSdk\Model\ProjectCreateRequestSchema|null $project_create_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * @param string $id The break ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 $time_tracking_update_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreak'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createTimeTrackingProjectWithHttpInfo($project_create_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { - $request = $this->createTimeTrackingProjectRequest($project_create_request_schema, $contentType); + public function updateBreakWithHttpInfo($id, $time_tracking_update_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['updateBreak'][0]) { + $request = $this->updateBreakRequest($id, $time_tracking_update_time_tracking_break_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1218,9 +8504,21 @@ public function createTimeTrackingProjectWithHttpInfo($project_create_request_sc $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: + case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -1240,25 +8538,26 @@ public function createTimeTrackingProjectWithHttpInfo($project_create_request_sc } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds', + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1', $request, $response, ); } /** - * Operation createTimeTrackingProjectAsync + * Operation updateBreakAsync * - * Create Time Tracking Project + * Update Break * - * @param \BhrSdk\Model\ProjectCreateRequestSchema|null $project_create_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * @param string $id The break ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 $time_tracking_update_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTimeTrackingProjectAsync($project_create_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { - return $this->createTimeTrackingProjectAsyncWithHttpInfo($project_create_request_schema, $contentType) + public function updateBreakAsync($id, $time_tracking_update_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['updateBreak'][0]) { + return $this->updateBreakAsyncWithHttpInfo($id, $time_tracking_update_time_tracking_break_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -1267,19 +8566,20 @@ function ($response) { } /** - * Operation createTimeTrackingProjectAsyncWithHttpInfo + * Operation updateBreakAsyncWithHttpInfo * - * Create Time Tracking Project + * Update Break * - * @param \BhrSdk\Model\ProjectCreateRequestSchema|null $project_create_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * @param string $id The break ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 $time_tracking_update_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createTimeTrackingProjectAsyncWithHttpInfo($project_create_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { - $returnType = '\BhrSdk\Model\TimeTrackingProjectWithTasksAndEmployeeIds'; - $request = $this->createTimeTrackingProjectRequest($project_create_request_schema, $contentType); + public function updateBreakAsyncWithHttpInfo($id, $time_tracking_update_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['updateBreak'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1'; + $request = $this->updateBreakRequest($id, $time_tracking_update_time_tracking_break_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1313,24 +8613,42 @@ function ($exception) { } /** - * Create request for operation 'createTimeTrackingProject' + * Create request for operation 'updateBreak' * - * @param \BhrSdk\Model\ProjectCreateRequestSchema|null $project_create_request_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTimeTrackingProject'] to see the possible values for this operation + * @param string $id The break ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakV1 $time_tracking_update_time_tracking_break_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreak'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createTimeTrackingProjectRequest($project_create_request_schema = null, string $contentType = self::CONTENT_TYPES['createTimeTrackingProject'][0]) { + public function updateBreakRequest($id, $time_tracking_update_time_tracking_break_v1, string $contentType = self::CONTENT_TYPES['updateBreak'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'time_tracking_update_time_tracking_break_v1' => $time_tracking_update_time_tracking_break_v1, + ], + methodName: 'updateBreak' + ); - $resourcePath = '/api/v1/time_tracking/projects'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $resourcePath = '/api/v1/time-tracking/breaks/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -1338,12 +8656,12 @@ public function createTimeTrackingProjectRequest($project_create_request_schema ); // for model (json/xml) - if (isset($project_create_request_schema)) { + if (isset($time_tracking_update_time_tracking_break_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_create_request_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_update_time_tracking_break_v1)); } else { - $httpBody = is_array($project_create_request_schema) ? json_encode($project_create_request_schema) : $project_create_request_schema; + $httpBody = is_array($time_tracking_update_time_tracking_break_v1) ? json_encode($time_tracking_update_time_tracking_break_v1) : $time_tracking_update_time_tracking_break_v1; } } @@ -1384,7 +8702,7 @@ public function createTimeTrackingProjectRequest($project_create_request_schema $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PATCH', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1392,36 +8710,38 @@ public function createTimeTrackingProjectRequest($project_create_request_schema } /** - * Operation deleteTimesheetClockEntriesViaPost + * Operation updateBreakPolicy * - * Delete Timesheet Clock Entries + * Update Break Policy * - * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema clock_entry_ids_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 $time_tracking_update_time_tracking_break_policy_v1 time_tracking_update_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function deleteTimesheetClockEntriesViaPost($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { - list($response) = $this->deleteTimesheetClockEntriesViaPostWithHttpInfo($clock_entry_ids_schema, $contentType); + public function updateBreakPolicy($id, $time_tracking_update_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['updateBreakPolicy'][0]) { + list($response) = $this->updateBreakPolicyWithHttpInfo($id, $time_tracking_update_time_tracking_break_policy_v1, $contentType); return $response; } /** - * Operation deleteTimesheetClockEntriesViaPostWithHttpInfo + * Operation updateBreakPolicyWithHttpInfo * - * Delete Timesheet Clock Entries + * Update Break Policy * - * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 $time_tracking_update_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreakPolicy'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTimesheetClockEntriesViaPostWithHttpInfo($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { - $request = $this->deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, $contentType); + public function updateBreakPolicyWithHttpInfo($id, $time_tracking_update_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['updateBreakPolicy'][0]) { + $request = $this->updateBreakPolicyRequest($id, $time_tracking_update_time_tracking_break_policy_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1429,26 +8749,73 @@ public function deleteTimesheetClockEntriesViaPostWithHttpInfo($clock_entry_ids_ $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1', $request, $response, ); } /** - * Operation deleteTimesheetClockEntriesViaPostAsync + * Operation updateBreakPolicyAsync * - * Delete Timesheet Clock Entries + * Update Break Policy * - * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 $time_tracking_update_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimesheetClockEntriesViaPostAsync($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { - return $this->deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo($clock_entry_ids_schema, $contentType) + public function updateBreakPolicyAsync($id, $time_tracking_update_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['updateBreakPolicy'][0]) { + return $this->updateBreakPolicyAsyncWithHttpInfo($id, $time_tracking_update_time_tracking_break_policy_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -1457,28 +8824,31 @@ function ($response) { } /** - * Operation deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo + * Operation updateBreakPolicyAsyncWithHttpInfo * - * Delete Timesheet Clock Entries + * Update Break Policy * - * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 $time_tracking_update_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimesheetClockEntriesViaPostAsyncWithHttpInfo($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { - - $request = $this->deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, $contentType); + public function updateBreakPolicyAsyncWithHttpInfo($id, $time_tracking_update_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['updateBreakPolicy'][0]) { + $returnType = '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1'; + $request = $this->updateBreakPolicyRequest($id, $time_tracking_update_time_tracking_break_policy_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1501,31 +8871,42 @@ function ($exception) { } /** - * Create request for operation 'deleteTimesheetClockEntriesViaPost' + * Create request for operation 'updateBreakPolicy' * - * @param \BhrSdk\Model\ClockEntryIdsSchema $clock_entry_ids_schema (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'] to see the possible values for this operation + * @param string $id The break policy ID. (required) + * @param \BhrSdk\Model\TimeTrackingUpdateTimeTrackingBreakPolicyV1 $time_tracking_update_time_tracking_break_policy_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateBreakPolicy'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schema, string $contentType = self::CONTENT_TYPES['deleteTimesheetClockEntriesViaPost'][0]) { + public function updateBreakPolicyRequest($id, $time_tracking_update_time_tracking_break_policy_v1, string $contentType = self::CONTENT_TYPES['updateBreakPolicy'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'clock_entry_ids_schema' => $clock_entry_ids_schema, + 'id' => $id, + 'time_tracking_update_time_tracking_break_policy_v1' => $time_tracking_update_time_tracking_break_policy_v1, ], - methodName: 'deleteTimesheetClockEntriesViaPost' + methodName: 'updateBreakPolicy' ); - $resourcePath = '/api/v1/time_tracking/clock_entries/delete'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $resourcePath = '/api/v1/time-tracking/break-policies/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -1533,12 +8914,12 @@ public function deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schem ); // for model (json/xml) - if (isset($clock_entry_ids_schema)) { + if (isset($time_tracking_update_time_tracking_break_policy_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($clock_entry_ids_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($time_tracking_update_time_tracking_break_policy_v1)); } else { - $httpBody = is_array($clock_entry_ids_schema) ? json_encode($clock_entry_ids_schema) : $clock_entry_ids_schema; + $httpBody = is_array($time_tracking_update_time_tracking_break_policy_v1) ? json_encode($time_tracking_update_time_tracking_break_policy_v1) : $time_tracking_update_time_tracking_break_policy_v1; } } @@ -1579,7 +8960,7 @@ public function deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schem $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PATCH', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1587,36 +8968,38 @@ public function deleteTimesheetClockEntriesViaPostRequest($clock_entry_ids_schem } /** - * Operation deleteTimesheetHourEntriesViaPost + * Operation updateProject * - * Delete Timesheet Hour Entries + * Update Time Tracking Project * - * @param \BhrSdk\Model\HourEntryIdsSchema|null $hour_entry_ids_schema hour_entry_ids_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * @param int $id The project ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 $project_update_time_tracking_project_v1 project_update_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateProject'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function deleteTimesheetHourEntriesViaPost($hour_entry_ids_schema = null, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { - list($response) = $this->deleteTimesheetHourEntriesViaPostWithHttpInfo($hour_entry_ids_schema, $contentType); + public function updateProject($id, $project_update_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['updateProject'][0]) { + list($response) = $this->updateProjectWithHttpInfo($id, $project_update_time_tracking_project_v1, $contentType); return $response; } /** - * Operation deleteTimesheetHourEntriesViaPostWithHttpInfo + * Operation updateProjectWithHttpInfo * - * Delete Timesheet Hour Entries + * Update Time Tracking Project * - * @param \BhrSdk\Model\HourEntryIdsSchema|null $hour_entry_ids_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * @param int $id The project ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 $project_update_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateProject'] to see the possible values for this operation * * @throws \BhrSdk\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 \BhrSdk\Model\ProjectTimeTrackingProjectV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTimesheetHourEntriesViaPostWithHttpInfo($hour_entry_ids_schema = null, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { - $request = $this->deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema, $contentType); + public function updateProjectWithHttpInfo($id, $project_update_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['updateProject'][0]) { + $request = $this->updateProjectRequest($id, $project_update_time_tracking_project_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1624,26 +9007,85 @@ public function deleteTimesheetHourEntriesViaPostWithHttpInfo($hour_entry_ids_sc $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 401: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 409: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 422: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + '\BhrSdk\Model\ProjectTimeTrackingProjectV1', $request, $response, ); } /** - * Operation deleteTimesheetHourEntriesViaPostAsync + * Operation updateProjectAsync * - * Delete Timesheet Hour Entries + * Update Time Tracking Project * - * @param \BhrSdk\Model\HourEntryIdsSchema|null $hour_entry_ids_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * @param int $id The project ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 $project_update_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimesheetHourEntriesViaPostAsync($hour_entry_ids_schema = null, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { - return $this->deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo($hour_entry_ids_schema, $contentType) + public function updateProjectAsync($id, $project_update_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['updateProject'][0]) { + return $this->updateProjectAsyncWithHttpInfo($id, $project_update_time_tracking_project_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -1652,28 +9094,31 @@ function ($response) { } /** - * Operation deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo + * Operation updateProjectAsyncWithHttpInfo * - * Delete Timesheet Hour Entries + * Update Time Tracking Project * - * @param \BhrSdk\Model\HourEntryIdsSchema|null $hour_entry_ids_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * @param int $id The project ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 $project_update_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTimesheetHourEntriesViaPostAsyncWithHttpInfo($hour_entry_ids_schema = null, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { - - $request = $this->deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema, $contentType); + public function updateProjectAsyncWithHttpInfo($id, $project_update_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['updateProject'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingProjectV1'; + $request = $this->updateProjectRequest($id, $project_update_time_tracking_project_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1696,24 +9141,42 @@ function ($exception) { } /** - * Create request for operation 'deleteTimesheetHourEntriesViaPost' + * Create request for operation 'updateProject' * - * @param \BhrSdk\Model\HourEntryIdsSchema|null $hour_entry_ids_schema (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'] to see the possible values for this operation + * @param int $id The project ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectV1 $project_update_time_tracking_project_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateProject'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema = null, string $contentType = self::CONTENT_TYPES['deleteTimesheetHourEntriesViaPost'][0]) { + public function updateProjectRequest($id, $project_update_time_tracking_project_v1, string $contentType = self::CONTENT_TYPES['updateProject'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'id' => $id, + 'project_update_time_tracking_project_v1' => $project_update_time_tracking_project_v1, + ], + methodName: 'updateProject' + ); - $resourcePath = '/api/v1/time_tracking/hour_entries/delete'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $resourcePath = '/api/v1/time-tracking/projects/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); + } + $headers = $this->headerSelector->selectHeaders( ['application/json', ], $contentType, @@ -1721,12 +9184,12 @@ public function deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema ); // for model (json/xml) - if (isset($hour_entry_ids_schema)) { + if (isset($project_update_time_tracking_project_v1)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($hour_entry_ids_schema)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_update_time_tracking_project_v1)); } else { - $httpBody = is_array($hour_entry_ids_schema) ? json_encode($hour_entry_ids_schema) : $hour_entry_ids_schema; + $httpBody = is_array($project_update_time_tracking_project_v1) ? json_encode($project_update_time_tracking_project_v1) : $project_update_time_tracking_project_v1; } } @@ -1767,7 +9230,7 @@ public function deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PATCH', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1775,40 +9238,38 @@ public function deleteTimesheetHourEntriesViaPostRequest($hour_entry_ids_schema } /** - * Operation getTimesheetEntries + * Operation updateTask * - * Get Timesheet Entries + * Update Time Tracking Task * - * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimesheetEntries'] to see the possible values for this operation + * @param int $id The task ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 $project_update_time_tracking_project_task_v1 project_update_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTask'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\EmployeeTimesheetEntryTransformer[]|mixed|mixed|mixed|mixed + * @return \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse */ - public function getTimesheetEntries($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['getTimesheetEntries'][0]) { - list($response) = $this->getTimesheetEntriesWithHttpInfo($start, $end, $employee_ids, $contentType); + public function updateTask($id, $project_update_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['updateTask'][0]) { + list($response) = $this->updateTaskWithHttpInfo($id, $project_update_time_tracking_project_task_v1, $contentType); return $response; } /** - * Operation getTimesheetEntriesWithHttpInfo + * Operation updateTaskWithHttpInfo * - * Get Timesheet Entries + * Update Time Tracking Task * - * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimesheetEntries'] to see the possible values for this operation + * @param int $id The task ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 $project_update_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTask'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\EmployeeTimesheetEntryTransformer[]|mixed|mixed|mixed|mixed, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\ProjectTimeTrackingTaskV1|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getTimesheetEntriesWithHttpInfo($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['getTimesheetEntries'][0]) { - $request = $this->getTimesheetEntriesRequest($start, $end, $employee_ids, $contentType); + public function updateTaskWithHttpInfo($id, $project_update_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['updateTask'][0]) { + $request = $this->updateTaskRequest($id, $project_update_time_tracking_project_task_v1, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1819,31 +9280,31 @@ public function getTimesheetEntriesWithHttpInfo($start, $end, $employee_ids = nu switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]', + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', $request, $response, ); - case 400: + case 403: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - case 401: + case 404: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - case 403: + case 409: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); - case 500: + case 422: return ApiHelper::handleResponseWithDataType( - 'mixed', + '\BhrSdk\Model\ProblemDetailsResponse', $request, $response, ); @@ -1863,27 +9324,26 @@ public function getTimesheetEntriesWithHttpInfo($start, $end, $employee_ids = nu } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]', + '\BhrSdk\Model\ProjectTimeTrackingTaskV1', $request, $response, ); } /** - * Operation getTimesheetEntriesAsync + * Operation updateTaskAsync * - * Get Timesheet Entries + * Update Time Tracking Task * - * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimesheetEntries'] to see the possible values for this operation + * @param int $id The task ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 $project_update_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTask'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimesheetEntriesAsync($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['getTimesheetEntries'][0]) { - return $this->getTimesheetEntriesAsyncWithHttpInfo($start, $end, $employee_ids, $contentType) + public function updateTaskAsync($id, $project_update_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['updateTask'][0]) { + return $this->updateTaskAsyncWithHttpInfo($id, $project_update_time_tracking_project_task_v1, $contentType) ->then( function ($response) { return $response[0]; @@ -1892,21 +9352,20 @@ function ($response) { } /** - * Operation getTimesheetEntriesAsyncWithHttpInfo + * Operation updateTaskAsyncWithHttpInfo * - * Get Timesheet Entries + * Update Time Tracking Task * - * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimesheetEntries'] to see the possible values for this operation + * @param int $id The task ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 $project_update_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTask'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTimesheetEntriesAsyncWithHttpInfo($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['getTimesheetEntries'][0]) { - $returnType = '\BhrSdk\Model\EmployeeTimesheetEntryTransformer[]'; - $request = $this->getTimesheetEntriesRequest($start, $end, $employee_ids, $contentType); + public function updateTaskAsyncWithHttpInfo($id, $project_update_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['updateTask'][0]) { + $returnType = '\BhrSdk\Model\ProjectTimeTrackingTaskV1'; + $request = $this->updateTaskRequest($id, $project_update_time_tracking_project_task_v1, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1940,54 +9399,40 @@ function ($exception) { } /** - * Create request for operation 'getTimesheetEntries' + * Create request for operation 'updateTask' * - * @param \DateTime $start YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - * @param \DateTime $end YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - * @param string|null $employee_ids A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. (optional) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTimesheetEntries'] to see the possible values for this operation + * @param int $id The task ID. (required) + * @param \BhrSdk\Model\ProjectUpdateTimeTrackingProjectTaskV1 $project_update_time_tracking_project_task_v1 (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateTask'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTimesheetEntriesRequest($start, $end, $employee_ids = null, string $contentType = self::CONTENT_TYPES['getTimesheetEntries'][0]) { + public function updateTaskRequest($id, $project_update_time_tracking_project_task_v1, string $contentType = self::CONTENT_TYPES['updateTask'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'start' => $start, - 'end' => $end, + 'id' => $id, + 'project_update_time_tracking_project_task_v1' => $project_update_time_tracking_project_task_v1, ], - methodName: 'getTimesheetEntries' + methodName: 'updateTask' ); - if ($employee_ids !== null && !preg_match("/^\\d+(,\\d+)*$/", $employee_ids)) { - throw new \InvalidArgumentException("invalid value for \"employee_ids\" when calling TimeTrackingApi.getTimesheetEntries, must conform to the pattern /^\\d+(,\\d+)*$/."); - } - - $resourcePath = '/api/v1/time_tracking/timesheet_entries'; - $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + $resourcePath = '/api/v1/time-tracking/tasks/{id}'; + $this->logger?->info('Request method: [PATCH], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - $parameters = [ - 'start' => ['value' => $start, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], - 'end' => ['value' => $end, 'type' => 'string', 'required' => true, 'style' => 'form', 'explode' => true], - 'employeeIds' => ['value' => $employee_ids, 'type' => 'string', 'required' => false, 'style' => 'form', 'explode' => true], - ]; - - // Process parameters and build query values directly - $queryParams = []; - - foreach ($parameters as $paramName => $config) { - $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); - - if ($value !== null) { - // Merge each parameter value directly into queryParams - $queryParams = array_merge($queryParams, $value); - } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue((string) $id), + $resourcePath + ); } $headers = $this->headerSelector->selectHeaders( @@ -1996,6 +9441,16 @@ public function getTimesheetEntriesRequest($start, $end, $employee_ids = null, s $multipart ); + // for model (json/xml) + if (isset($project_update_time_tracking_project_task_v1)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($project_update_time_tracking_project_task_v1)); + } else { + $httpBody = is_array($project_update_time_tracking_project_task_v1) ? json_encode($project_update_time_tracking_project_task_v1) : $project_update_time_tracking_project_task_v1; + } + } + // Authentication methods // Basic authentication @@ -2033,7 +9488,7 @@ public function getTimesheetEntriesRequest($start, $end, $employee_ids = null, s $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PATCH', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody diff --git a/lib/Api/TotalRewardsApi.php b/lib/Api/TotalRewardsApi.php new file mode 100644 index 00000000..2e3709ba --- /dev/null +++ b/lib/Api/TotalRewardsApi.php @@ -0,0 +1,1809 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * TotalRewardsApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class TotalRewardsApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'addTotalRewardsEmployees' => [ + 'application/json', + ], + 'checkTotalRewardsProfile' => [ + 'application/json', + ], + 'getTotalRewardsPrintableStatement' => [ + 'application/json', + ], + 'getTotalRewardsStatement' => [ + 'application/json', + ], + 'removeTotalRewardsCustomDisclaimer' => [ + 'application/json', + ], + 'removeTotalRewardsEmployees' => [ + 'application/json', + ], + 'setTotalRewardsCustomDisclaimer' => [ + 'application/json', + ], + 'setTotalRewardsOnboardingStep' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation addTotalRewardsEmployees + * + * Add Employees to Total Rewards + * + * @param \BhrSdk\Model\AddTotalRewardsEmployeesRequest $add_total_rewards_employees_request add_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function addTotalRewardsEmployees($add_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['addTotalRewardsEmployees'][0]) { + list($response) = $this->addTotalRewardsEmployeesWithHttpInfo($add_total_rewards_employees_request, $contentType); + return $response; + } + + /** + * Operation addTotalRewardsEmployeesWithHttpInfo + * + * Add Employees to Total Rewards + * + * @param \BhrSdk\Model\AddTotalRewardsEmployeesRequest $add_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\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 addTotalRewardsEmployeesWithHttpInfo($add_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['addTotalRewardsEmployees'][0]) { + $request = $this->addTotalRewardsEmployeesRequest($add_total_rewards_employees_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation addTotalRewardsEmployeesAsync + * + * Add Employees to Total Rewards + * + * @param \BhrSdk\Model\AddTotalRewardsEmployeesRequest $add_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addTotalRewardsEmployeesAsync($add_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['addTotalRewardsEmployees'][0]) { + return $this->addTotalRewardsEmployeesAsyncWithHttpInfo($add_total_rewards_employees_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addTotalRewardsEmployeesAsyncWithHttpInfo + * + * Add Employees to Total Rewards + * + * @param \BhrSdk\Model\AddTotalRewardsEmployeesRequest $add_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addTotalRewardsEmployeesAsyncWithHttpInfo($add_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['addTotalRewardsEmployees'][0]) { + + $request = $this->addTotalRewardsEmployeesRequest($add_total_rewards_employees_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'addTotalRewardsEmployees' + * + * @param \BhrSdk\Model\AddTotalRewardsEmployeesRequest $add_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function addTotalRewardsEmployeesRequest($add_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['addTotalRewardsEmployees'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'add_total_rewards_employees_request' => $add_total_rewards_employees_request, + ], + methodName: 'addTotalRewardsEmployees' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/employees'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($add_total_rewards_employees_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($add_total_rewards_employees_request)); + } else { + $httpBody = is_array($add_total_rewards_employees_request) ? json_encode($add_total_rewards_employees_request) : $add_total_rewards_employees_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation checkTotalRewardsProfile + * + * Check Total Rewards Profile Availability + * + * @param string $employee_id The ID of the employee to check. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['checkTotalRewardsProfile'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function checkTotalRewardsProfile($employee_id, string $contentType = self::CONTENT_TYPES['checkTotalRewardsProfile'][0]) { + list($response) = $this->checkTotalRewardsProfileWithHttpInfo($employee_id, $contentType); + return $response; + } + + /** + * Operation checkTotalRewardsProfileWithHttpInfo + * + * Check Total Rewards Profile Availability + * + * @param string $employee_id The ID of the employee to check. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['checkTotalRewardsProfile'] to see the possible values for this operation + * + * @throws \BhrSdk\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 checkTotalRewardsProfileWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['checkTotalRewardsProfile'][0]) { + $request = $this->checkTotalRewardsProfileRequest($employee_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation checkTotalRewardsProfileAsync + * + * Check Total Rewards Profile Availability + * + * @param string $employee_id The ID of the employee to check. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['checkTotalRewardsProfile'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function checkTotalRewardsProfileAsync($employee_id, string $contentType = self::CONTENT_TYPES['checkTotalRewardsProfile'][0]) { + return $this->checkTotalRewardsProfileAsyncWithHttpInfo($employee_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation checkTotalRewardsProfileAsyncWithHttpInfo + * + * Check Total Rewards Profile Availability + * + * @param string $employee_id The ID of the employee to check. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['checkTotalRewardsProfile'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function checkTotalRewardsProfileAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['checkTotalRewardsProfile'][0]) { + + $request = $this->checkTotalRewardsProfileRequest($employee_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'checkTotalRewardsProfile' + * + * @param string $employee_id The ID of the employee to check. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['checkTotalRewardsProfile'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function checkTotalRewardsProfileRequest($employee_id, string $contentType = self::CONTENT_TYPES['checkTotalRewardsProfile'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'checkTotalRewardsProfile' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/{employeeId}'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getTotalRewardsPrintableStatement + * + * Get Printable Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param float|null $multiplier Hours-per-week multiplier for annualizing hourly pay. (optional) + * @param int|null $year Statement year. Defaults to the current year when omitted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsPrintableStatement'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function getTotalRewardsPrintableStatement($employee_id, $multiplier = null, $year = null, string $contentType = self::CONTENT_TYPES['getTotalRewardsPrintableStatement'][0]) { + list($response) = $this->getTotalRewardsPrintableStatementWithHttpInfo($employee_id, $multiplier, $year, $contentType); + return $response; + } + + /** + * Operation getTotalRewardsPrintableStatementWithHttpInfo + * + * Get Printable Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param float|null $multiplier Hours-per-week multiplier for annualizing hourly pay. (optional) + * @param int|null $year Statement year. Defaults to the current year when omitted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsPrintableStatement'] to see the possible values for this operation + * + * @throws \BhrSdk\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 getTotalRewardsPrintableStatementWithHttpInfo($employee_id, $multiplier = null, $year = null, string $contentType = self::CONTENT_TYPES['getTotalRewardsPrintableStatement'][0]) { + $request = $this->getTotalRewardsPrintableStatementRequest($employee_id, $multiplier, $year, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation getTotalRewardsPrintableStatementAsync + * + * Get Printable Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param float|null $multiplier Hours-per-week multiplier for annualizing hourly pay. (optional) + * @param int|null $year Statement year. Defaults to the current year when omitted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsPrintableStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTotalRewardsPrintableStatementAsync($employee_id, $multiplier = null, $year = null, string $contentType = self::CONTENT_TYPES['getTotalRewardsPrintableStatement'][0]) { + return $this->getTotalRewardsPrintableStatementAsyncWithHttpInfo($employee_id, $multiplier, $year, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTotalRewardsPrintableStatementAsyncWithHttpInfo + * + * Get Printable Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param float|null $multiplier Hours-per-week multiplier for annualizing hourly pay. (optional) + * @param int|null $year Statement year. Defaults to the current year when omitted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsPrintableStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTotalRewardsPrintableStatementAsyncWithHttpInfo($employee_id, $multiplier = null, $year = null, string $contentType = self::CONTENT_TYPES['getTotalRewardsPrintableStatement'][0]) { + + $request = $this->getTotalRewardsPrintableStatementRequest($employee_id, $multiplier, $year, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'getTotalRewardsPrintableStatement' + * + * @param string $employee_id The ID of the employee. (required) + * @param float|null $multiplier Hours-per-week multiplier for annualizing hourly pay. (optional) + * @param int|null $year Statement year. Defaults to the current year when omitted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsPrintableStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTotalRewardsPrintableStatementRequest($employee_id, $multiplier = null, $year = null, string $contentType = self::CONTENT_TYPES['getTotalRewardsPrintableStatement'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'getTotalRewardsPrintableStatement' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/{employeeId}/printable'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $parameters = [ + 'multiplier' => ['value' => $multiplier, 'type' => 'number', 'required' => false, 'style' => 'form', 'explode' => true], + 'year' => ['value' => $year, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + ]; + + // Process parameters and build query values directly + $queryParams = []; + + foreach ($parameters as $paramName => $config) { + $value = ObjectSerializer::toQueryValue($config['value'], $paramName, $config['type'], $config['style'], $config['explode'], $config['required']); + + if ($value !== null) { + // Merge each parameter value directly into queryParams + $queryParams = array_merge($queryParams, $value); + } + } + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/pdf', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation getTotalRewardsStatement + * + * Get Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsStatement'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TotalRewardsEmployeeStatement|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function getTotalRewardsStatement($employee_id, string $contentType = self::CONTENT_TYPES['getTotalRewardsStatement'][0]) { + list($response) = $this->getTotalRewardsStatementWithHttpInfo($employee_id, $contentType); + return $response; + } + + /** + * Operation getTotalRewardsStatementWithHttpInfo + * + * Get Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsStatement'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TotalRewardsEmployeeStatement|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getTotalRewardsStatementWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getTotalRewardsStatement'][0]) { + $request = $this->getTotalRewardsStatementRequest($employee_id, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TotalRewardsEmployeeStatement', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TotalRewardsEmployeeStatement', + $request, + $response, + ); + } + + /** + * Operation getTotalRewardsStatementAsync + * + * Get Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTotalRewardsStatementAsync($employee_id, string $contentType = self::CONTENT_TYPES['getTotalRewardsStatement'][0]) { + return $this->getTotalRewardsStatementAsyncWithHttpInfo($employee_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTotalRewardsStatementAsyncWithHttpInfo + * + * Get Total Rewards Statement + * + * @param string $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTotalRewardsStatementAsyncWithHttpInfo($employee_id, string $contentType = self::CONTENT_TYPES['getTotalRewardsStatement'][0]) { + $returnType = '\BhrSdk\Model\TotalRewardsEmployeeStatement'; + $request = $this->getTotalRewardsStatementRequest($employee_id, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'getTotalRewardsStatement' + * + * @param string $employee_id The ID of the employee. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getTotalRewardsStatement'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTotalRewardsStatementRequest($employee_id, string $contentType = self::CONTENT_TYPES['getTotalRewardsStatement'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'employee_id' => $employee_id, + ], + methodName: 'getTotalRewardsStatement' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/{employeeId}/statement'; + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue((string) $employee_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation removeTotalRewardsCustomDisclaimer + * + * Remove Total Rewards Custom Disclaimer + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function removeTotalRewardsCustomDisclaimer(string $contentType = self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'][0]) { + list($response) = $this->removeTotalRewardsCustomDisclaimerWithHttpInfo($contentType); + return $response; + } + + /** + * Operation removeTotalRewardsCustomDisclaimerWithHttpInfo + * + * Remove Total Rewards Custom Disclaimer + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \BhrSdk\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 removeTotalRewardsCustomDisclaimerWithHttpInfo(string $contentType = self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'][0]) { + $request = $this->removeTotalRewardsCustomDisclaimerRequest($contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation removeTotalRewardsCustomDisclaimerAsync + * + * Remove Total Rewards Custom Disclaimer + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeTotalRewardsCustomDisclaimerAsync(string $contentType = self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'][0]) { + return $this->removeTotalRewardsCustomDisclaimerAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeTotalRewardsCustomDisclaimerAsyncWithHttpInfo + * + * Remove Total Rewards Custom Disclaimer + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeTotalRewardsCustomDisclaimerAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'][0]) { + + $request = $this->removeTotalRewardsCustomDisclaimerRequest($contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'removeTotalRewardsCustomDisclaimer' + * + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function removeTotalRewardsCustomDisclaimerRequest(string $contentType = self::CONTENT_TYPES['removeTotalRewardsCustomDisclaimer'][0]) { + + $resourcePath = '/api/v1/compensation/total_rewards/custom_disclaimer'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation removeTotalRewardsEmployees + * + * Remove Employees from Total Rewards + * + * @param \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest $remove_total_rewards_employees_request remove_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function removeTotalRewardsEmployees($remove_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['removeTotalRewardsEmployees'][0]) { + list($response) = $this->removeTotalRewardsEmployeesWithHttpInfo($remove_total_rewards_employees_request, $contentType); + return $response; + } + + /** + * Operation removeTotalRewardsEmployeesWithHttpInfo + * + * Remove Employees from Total Rewards + * + * @param \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest $remove_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \BhrSdk\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 removeTotalRewardsEmployeesWithHttpInfo($remove_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['removeTotalRewardsEmployees'][0]) { + $request = $this->removeTotalRewardsEmployeesRequest($remove_total_rewards_employees_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation removeTotalRewardsEmployeesAsync + * + * Remove Employees from Total Rewards + * + * @param \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest $remove_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeTotalRewardsEmployeesAsync($remove_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['removeTotalRewardsEmployees'][0]) { + return $this->removeTotalRewardsEmployeesAsyncWithHttpInfo($remove_total_rewards_employees_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeTotalRewardsEmployeesAsyncWithHttpInfo + * + * Remove Employees from Total Rewards + * + * @param \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest $remove_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeTotalRewardsEmployeesAsyncWithHttpInfo($remove_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['removeTotalRewardsEmployees'][0]) { + + $request = $this->removeTotalRewardsEmployeesRequest($remove_total_rewards_employees_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'removeTotalRewardsEmployees' + * + * @param \BhrSdk\Model\RemoveTotalRewardsEmployeesRequest $remove_total_rewards_employees_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['removeTotalRewardsEmployees'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function removeTotalRewardsEmployeesRequest($remove_total_rewards_employees_request, string $contentType = self::CONTENT_TYPES['removeTotalRewardsEmployees'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'remove_total_rewards_employees_request' => $remove_total_rewards_employees_request, + ], + methodName: 'removeTotalRewardsEmployees' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/employees'; + $this->logger?->info('Request method: [DELETE], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($remove_total_rewards_employees_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($remove_total_rewards_employees_request)); + } else { + $httpBody = is_array($remove_total_rewards_employees_request) ? json_encode($remove_total_rewards_employees_request) : $remove_total_rewards_employees_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation setTotalRewardsCustomDisclaimer + * + * Set Total Rewards Custom Disclaimer + * + * @param \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest $set_total_rewards_custom_disclaimer_request set_total_rewards_custom_disclaimer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function setTotalRewardsCustomDisclaimer($set_total_rewards_custom_disclaimer_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'][0]) { + list($response) = $this->setTotalRewardsCustomDisclaimerWithHttpInfo($set_total_rewards_custom_disclaimer_request, $contentType); + return $response; + } + + /** + * Operation setTotalRewardsCustomDisclaimerWithHttpInfo + * + * Set Total Rewards Custom Disclaimer + * + * @param \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest $set_total_rewards_custom_disclaimer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \BhrSdk\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 setTotalRewardsCustomDisclaimerWithHttpInfo($set_total_rewards_custom_disclaimer_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'][0]) { + $request = $this->setTotalRewardsCustomDisclaimerRequest($set_total_rewards_custom_disclaimer_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation setTotalRewardsCustomDisclaimerAsync + * + * Set Total Rewards Custom Disclaimer + * + * @param \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest $set_total_rewards_custom_disclaimer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setTotalRewardsCustomDisclaimerAsync($set_total_rewards_custom_disclaimer_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'][0]) { + return $this->setTotalRewardsCustomDisclaimerAsyncWithHttpInfo($set_total_rewards_custom_disclaimer_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setTotalRewardsCustomDisclaimerAsyncWithHttpInfo + * + * Set Total Rewards Custom Disclaimer + * + * @param \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest $set_total_rewards_custom_disclaimer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setTotalRewardsCustomDisclaimerAsyncWithHttpInfo($set_total_rewards_custom_disclaimer_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'][0]) { + + $request = $this->setTotalRewardsCustomDisclaimerRequest($set_total_rewards_custom_disclaimer_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'setTotalRewardsCustomDisclaimer' + * + * @param \BhrSdk\Model\SetTotalRewardsCustomDisclaimerRequest $set_total_rewards_custom_disclaimer_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setTotalRewardsCustomDisclaimerRequest($set_total_rewards_custom_disclaimer_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsCustomDisclaimer'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'set_total_rewards_custom_disclaimer_request' => $set_total_rewards_custom_disclaimer_request, + ], + methodName: 'setTotalRewardsCustomDisclaimer' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/custom_disclaimer'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($set_total_rewards_custom_disclaimer_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($set_total_rewards_custom_disclaimer_request)); + } else { + $httpBody = is_array($set_total_rewards_custom_disclaimer_request) ? json_encode($set_total_rewards_custom_disclaimer_request) : $set_total_rewards_custom_disclaimer_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation setTotalRewardsOnboardingStep + * + * Set Total Rewards Onboarding Step Status + * + * @param string $step_name Name of the onboarding step. (required) + * @param \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest $set_total_rewards_onboarding_step_request set_total_rewards_onboarding_step_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsOnboardingStep'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\TotalRewardsOnboardingStep|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse + */ + public function setTotalRewardsOnboardingStep($step_name, $set_total_rewards_onboarding_step_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsOnboardingStep'][0]) { + list($response) = $this->setTotalRewardsOnboardingStepWithHttpInfo($step_name, $set_total_rewards_onboarding_step_request, $contentType); + return $response; + } + + /** + * Operation setTotalRewardsOnboardingStepWithHttpInfo + * + * Set Total Rewards Onboarding Step Status + * + * @param string $step_name Name of the onboarding step. (required) + * @param \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest $set_total_rewards_onboarding_step_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsOnboardingStep'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\TotalRewardsOnboardingStep|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse|\BhrSdk\Model\ProblemDetailsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function setTotalRewardsOnboardingStepWithHttpInfo($step_name, $set_total_rewards_onboarding_step_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsOnboardingStep'][0]) { + $request = $this->setTotalRewardsOnboardingStepRequest($step_name, $set_total_rewards_onboarding_step_request, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TotalRewardsOnboardingStep', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\ProblemDetailsResponse', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\TotalRewardsOnboardingStep', + $request, + $response, + ); + } + + /** + * Operation setTotalRewardsOnboardingStepAsync + * + * Set Total Rewards Onboarding Step Status + * + * @param string $step_name Name of the onboarding step. (required) + * @param \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest $set_total_rewards_onboarding_step_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsOnboardingStep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setTotalRewardsOnboardingStepAsync($step_name, $set_total_rewards_onboarding_step_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsOnboardingStep'][0]) { + return $this->setTotalRewardsOnboardingStepAsyncWithHttpInfo($step_name, $set_total_rewards_onboarding_step_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setTotalRewardsOnboardingStepAsyncWithHttpInfo + * + * Set Total Rewards Onboarding Step Status + * + * @param string $step_name Name of the onboarding step. (required) + * @param \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest $set_total_rewards_onboarding_step_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsOnboardingStep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setTotalRewardsOnboardingStepAsyncWithHttpInfo($step_name, $set_total_rewards_onboarding_step_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsOnboardingStep'][0]) { + $returnType = '\BhrSdk\Model\TotalRewardsOnboardingStep'; + $request = $this->setTotalRewardsOnboardingStepRequest($step_name, $set_total_rewards_onboarding_step_request, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'setTotalRewardsOnboardingStep' + * + * @param string $step_name Name of the onboarding step. (required) + * @param \BhrSdk\Model\SetTotalRewardsOnboardingStepRequest $set_total_rewards_onboarding_step_request (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['setTotalRewardsOnboardingStep'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setTotalRewardsOnboardingStepRequest($step_name, $set_total_rewards_onboarding_step_request, string $contentType = self::CONTENT_TYPES['setTotalRewardsOnboardingStep'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'step_name' => $step_name, + 'set_total_rewards_onboarding_step_request' => $set_total_rewards_onboarding_step_request, + ], + methodName: 'setTotalRewardsOnboardingStep' + ); + + $resourcePath = '/api/v1/compensation/total_rewards/onboarding/{stepName}'; + $this->logger?->info('Request method: [PUT], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($step_name !== null) { + $resourcePath = str_replace( + '{' . 'stepName' . '}', + ObjectSerializer::toPathValue((string) $step_name), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($set_total_rewards_onboarding_step_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($set_total_rewards_onboarding_step_request)); + } else { + $httpBody = is_array($set_total_rewards_onboarding_step_request) ? json_encode($set_total_rewards_onboarding_step_request) : $set_total_rewards_onboarding_step_request; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/TrainingApi.php b/lib/Api/TrainingApi.php index 8e9ee9af..98963169 100644 --- a/lib/Api/TrainingApi.php +++ b/lib/Api/TrainingApi.php @@ -79,13 +79,13 @@ class TrainingApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ - 'addNewEmployeeTrainingRecord' => [ + 'createEmployeeTrainingRecord' => [ 'application/json', ], - 'addTrainingCategory' => [ + 'createTrainingCategory' => [ 'application/json', ], - 'addTrainingType' => [ + 'createTrainingType' => [ 'application/json', ], 'deleteEmployeeTrainingRecord' => [ @@ -164,38 +164,38 @@ public function getConfig() { } /** - * Operation addNewEmployeeTrainingRecord + * Operation createEmployeeTrainingRecord * * Create Employee Training Record * * @param int $employee_id The ID of the employee to add a training record to. (required) - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest $add_new_employee_training_record_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewEmployeeTrainingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequest $create_employee_training_record_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeTrainingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TrainingRecord */ - public function addNewEmployeeTrainingRecord($employee_id, $add_new_employee_training_record_request, string $contentType = self::CONTENT_TYPES['addNewEmployeeTrainingRecord'][0]) { - list($response) = $this->addNewEmployeeTrainingRecordWithHttpInfo($employee_id, $add_new_employee_training_record_request, $contentType); + public function createEmployeeTrainingRecord($employee_id, $create_employee_training_record_request, string $contentType = self::CONTENT_TYPES['createEmployeeTrainingRecord'][0]) { + list($response) = $this->createEmployeeTrainingRecordWithHttpInfo($employee_id, $create_employee_training_record_request, $contentType); return $response; } /** - * Operation addNewEmployeeTrainingRecordWithHttpInfo + * Operation createEmployeeTrainingRecordWithHttpInfo * * Create Employee Training Record * * @param int $employee_id The ID of the employee to add a training record to. (required) - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest $add_new_employee_training_record_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewEmployeeTrainingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequest $create_employee_training_record_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeTrainingRecord'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TrainingRecord, HTTP status code, HTTP response headers (array of strings) */ - public function addNewEmployeeTrainingRecordWithHttpInfo($employee_id, $add_new_employee_training_record_request, string $contentType = self::CONTENT_TYPES['addNewEmployeeTrainingRecord'][0]) { - $request = $this->addNewEmployeeTrainingRecordRequest($employee_id, $add_new_employee_training_record_request, $contentType); + public function createEmployeeTrainingRecordWithHttpInfo($employee_id, $create_employee_training_record_request, string $contentType = self::CONTENT_TYPES['createEmployeeTrainingRecord'][0]) { + $request = $this->createEmployeeTrainingRecordRequest($employee_id, $create_employee_training_record_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -233,19 +233,19 @@ public function addNewEmployeeTrainingRecordWithHttpInfo($employee_id, $add_new_ } /** - * Operation addNewEmployeeTrainingRecordAsync + * Operation createEmployeeTrainingRecordAsync * * Create Employee Training Record * * @param int $employee_id The ID of the employee to add a training record to. (required) - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest $add_new_employee_training_record_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewEmployeeTrainingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequest $create_employee_training_record_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeTrainingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewEmployeeTrainingRecordAsync($employee_id, $add_new_employee_training_record_request, string $contentType = self::CONTENT_TYPES['addNewEmployeeTrainingRecord'][0]) { - return $this->addNewEmployeeTrainingRecordAsyncWithHttpInfo($employee_id, $add_new_employee_training_record_request, $contentType) + public function createEmployeeTrainingRecordAsync($employee_id, $create_employee_training_record_request, string $contentType = self::CONTENT_TYPES['createEmployeeTrainingRecord'][0]) { + return $this->createEmployeeTrainingRecordAsyncWithHttpInfo($employee_id, $create_employee_training_record_request, $contentType) ->then( function ($response) { return $response[0]; @@ -254,20 +254,20 @@ function ($response) { } /** - * Operation addNewEmployeeTrainingRecordAsyncWithHttpInfo + * Operation createEmployeeTrainingRecordAsyncWithHttpInfo * * Create Employee Training Record * * @param int $employee_id The ID of the employee to add a training record to. (required) - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest $add_new_employee_training_record_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewEmployeeTrainingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequest $create_employee_training_record_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeTrainingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addNewEmployeeTrainingRecordAsyncWithHttpInfo($employee_id, $add_new_employee_training_record_request, string $contentType = self::CONTENT_TYPES['addNewEmployeeTrainingRecord'][0]) { + public function createEmployeeTrainingRecordAsyncWithHttpInfo($employee_id, $create_employee_training_record_request, string $contentType = self::CONTENT_TYPES['createEmployeeTrainingRecord'][0]) { $returnType = '\BhrSdk\Model\TrainingRecord'; - $request = $this->addNewEmployeeTrainingRecordRequest($employee_id, $add_new_employee_training_record_request, $contentType); + $request = $this->createEmployeeTrainingRecordRequest($employee_id, $create_employee_training_record_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -301,23 +301,23 @@ function ($exception) { } /** - * Create request for operation 'addNewEmployeeTrainingRecord' + * Create request for operation 'createEmployeeTrainingRecord' * * @param int $employee_id The ID of the employee to add a training record to. (required) - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequest $add_new_employee_training_record_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addNewEmployeeTrainingRecord'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequest $create_employee_training_record_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createEmployeeTrainingRecord'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addNewEmployeeTrainingRecordRequest($employee_id, $add_new_employee_training_record_request, string $contentType = self::CONTENT_TYPES['addNewEmployeeTrainingRecord'][0]) { + public function createEmployeeTrainingRecordRequest($employee_id, $create_employee_training_record_request, string $contentType = self::CONTENT_TYPES['createEmployeeTrainingRecord'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'employee_id' => $employee_id, - 'add_new_employee_training_record_request' => $add_new_employee_training_record_request, + 'create_employee_training_record_request' => $create_employee_training_record_request, ], - methodName: 'addNewEmployeeTrainingRecord' + methodName: 'createEmployeeTrainingRecord' ); $resourcePath = '/api/v1/training/record/employee/{employeeId}'; @@ -338,18 +338,18 @@ public function addNewEmployeeTrainingRecordRequest($employee_id, $add_new_emplo } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($add_new_employee_training_record_request)) { + if (isset($create_employee_training_record_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($add_new_employee_training_record_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_employee_training_record_request)); } else { - $httpBody = is_array($add_new_employee_training_record_request) ? json_encode($add_new_employee_training_record_request) : $add_new_employee_training_record_request; + $httpBody = is_array($create_employee_training_record_request) ? json_encode($create_employee_training_record_request) : $create_employee_training_record_request; } } @@ -398,36 +398,36 @@ public function addNewEmployeeTrainingRecordRequest($employee_id, $add_new_emplo } /** - * Operation addTrainingCategory + * Operation createTrainingCategory * * Create Training Category * - * @param \BhrSdk\Model\AddTrainingCategoryRequest $add_training_category_request Training category to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingCategory'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingCategoryRequest $create_training_category_request Training category to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingCategory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TrainingCategory */ - public function addTrainingCategory($add_training_category_request, string $contentType = self::CONTENT_TYPES['addTrainingCategory'][0]) { - list($response) = $this->addTrainingCategoryWithHttpInfo($add_training_category_request, $contentType); + public function createTrainingCategory($create_training_category_request, string $contentType = self::CONTENT_TYPES['createTrainingCategory'][0]) { + list($response) = $this->createTrainingCategoryWithHttpInfo($create_training_category_request, $contentType); return $response; } /** - * Operation addTrainingCategoryWithHttpInfo + * Operation createTrainingCategoryWithHttpInfo * * Create Training Category * - * @param \BhrSdk\Model\AddTrainingCategoryRequest $add_training_category_request Training category to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingCategory'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingCategoryRequest $create_training_category_request Training category to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingCategory'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TrainingCategory, HTTP status code, HTTP response headers (array of strings) */ - public function addTrainingCategoryWithHttpInfo($add_training_category_request, string $contentType = self::CONTENT_TYPES['addTrainingCategory'][0]) { - $request = $this->addTrainingCategoryRequest($add_training_category_request, $contentType); + public function createTrainingCategoryWithHttpInfo($create_training_category_request, string $contentType = self::CONTENT_TYPES['createTrainingCategory'][0]) { + $request = $this->createTrainingCategoryRequest($create_training_category_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -465,18 +465,18 @@ public function addTrainingCategoryWithHttpInfo($add_training_category_request, } /** - * Operation addTrainingCategoryAsync + * Operation createTrainingCategoryAsync * * Create Training Category * - * @param \BhrSdk\Model\AddTrainingCategoryRequest $add_training_category_request Training category to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingCategory'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingCategoryRequest $create_training_category_request Training category to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTrainingCategoryAsync($add_training_category_request, string $contentType = self::CONTENT_TYPES['addTrainingCategory'][0]) { - return $this->addTrainingCategoryAsyncWithHttpInfo($add_training_category_request, $contentType) + public function createTrainingCategoryAsync($create_training_category_request, string $contentType = self::CONTENT_TYPES['createTrainingCategory'][0]) { + return $this->createTrainingCategoryAsyncWithHttpInfo($create_training_category_request, $contentType) ->then( function ($response) { return $response[0]; @@ -485,19 +485,19 @@ function ($response) { } /** - * Operation addTrainingCategoryAsyncWithHttpInfo + * Operation createTrainingCategoryAsyncWithHttpInfo * * Create Training Category * - * @param \BhrSdk\Model\AddTrainingCategoryRequest $add_training_category_request Training category to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingCategory'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingCategoryRequest $create_training_category_request Training category to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTrainingCategoryAsyncWithHttpInfo($add_training_category_request, string $contentType = self::CONTENT_TYPES['addTrainingCategory'][0]) { + public function createTrainingCategoryAsyncWithHttpInfo($create_training_category_request, string $contentType = self::CONTENT_TYPES['createTrainingCategory'][0]) { $returnType = '\BhrSdk\Model\TrainingCategory'; - $request = $this->addTrainingCategoryRequest($add_training_category_request, $contentType); + $request = $this->createTrainingCategoryRequest($create_training_category_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -531,21 +531,21 @@ function ($exception) { } /** - * Create request for operation 'addTrainingCategory' + * Create request for operation 'createTrainingCategory' * - * @param \BhrSdk\Model\AddTrainingCategoryRequest $add_training_category_request Training category to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingCategory'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingCategoryRequest $create_training_category_request Training category to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingCategory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTrainingCategoryRequest($add_training_category_request, string $contentType = self::CONTENT_TYPES['addTrainingCategory'][0]) { + public function createTrainingCategoryRequest($create_training_category_request, string $contentType = self::CONTENT_TYPES['createTrainingCategory'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'add_training_category_request' => $add_training_category_request, + 'create_training_category_request' => $create_training_category_request, ], - methodName: 'addTrainingCategory' + methodName: 'createTrainingCategory' ); $resourcePath = '/api/v1/training/category'; @@ -557,18 +557,18 @@ public function addTrainingCategoryRequest($add_training_category_request, strin $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($add_training_category_request)) { + if (isset($create_training_category_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($add_training_category_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_training_category_request)); } else { - $httpBody = is_array($add_training_category_request) ? json_encode($add_training_category_request) : $add_training_category_request; + $httpBody = is_array($create_training_category_request) ? json_encode($create_training_category_request) : $create_training_category_request; } } @@ -617,36 +617,36 @@ public function addTrainingCategoryRequest($add_training_category_request, strin } /** - * Operation addTrainingType + * Operation createTrainingType * * Create Training Type * - * @param \BhrSdk\Model\AddTrainingTypeRequest $add_training_type_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingType'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingTypeRequest $create_training_type_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingType'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \BhrSdk\Model\TrainingType */ - public function addTrainingType($add_training_type_request, string $contentType = self::CONTENT_TYPES['addTrainingType'][0]) { - list($response) = $this->addTrainingTypeWithHttpInfo($add_training_type_request, $contentType); + public function createTrainingType($create_training_type_request, string $contentType = self::CONTENT_TYPES['createTrainingType'][0]) { + list($response) = $this->createTrainingTypeWithHttpInfo($create_training_type_request, $contentType); return $response; } /** - * Operation addTrainingTypeWithHttpInfo + * Operation createTrainingTypeWithHttpInfo * * Create Training Type * - * @param \BhrSdk\Model\AddTrainingTypeRequest $add_training_type_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingType'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingTypeRequest $create_training_type_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingType'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \BhrSdk\Model\TrainingType, HTTP status code, HTTP response headers (array of strings) */ - public function addTrainingTypeWithHttpInfo($add_training_type_request, string $contentType = self::CONTENT_TYPES['addTrainingType'][0]) { - $request = $this->addTrainingTypeRequest($add_training_type_request, $contentType); + public function createTrainingTypeWithHttpInfo($create_training_type_request, string $contentType = self::CONTENT_TYPES['createTrainingType'][0]) { + $request = $this->createTrainingTypeRequest($create_training_type_request, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -684,18 +684,18 @@ public function addTrainingTypeWithHttpInfo($add_training_type_request, string $ } /** - * Operation addTrainingTypeAsync + * Operation createTrainingTypeAsync * * Create Training Type * - * @param \BhrSdk\Model\AddTrainingTypeRequest $add_training_type_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingType'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingTypeRequest $create_training_type_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTrainingTypeAsync($add_training_type_request, string $contentType = self::CONTENT_TYPES['addTrainingType'][0]) { - return $this->addTrainingTypeAsyncWithHttpInfo($add_training_type_request, $contentType) + public function createTrainingTypeAsync($create_training_type_request, string $contentType = self::CONTENT_TYPES['createTrainingType'][0]) { + return $this->createTrainingTypeAsyncWithHttpInfo($create_training_type_request, $contentType) ->then( function ($response) { return $response[0]; @@ -704,19 +704,19 @@ function ($response) { } /** - * Operation addTrainingTypeAsyncWithHttpInfo + * Operation createTrainingTypeAsyncWithHttpInfo * * Create Training Type * - * @param \BhrSdk\Model\AddTrainingTypeRequest $add_training_type_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingType'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingTypeRequest $create_training_type_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addTrainingTypeAsyncWithHttpInfo($add_training_type_request, string $contentType = self::CONTENT_TYPES['addTrainingType'][0]) { + public function createTrainingTypeAsyncWithHttpInfo($create_training_type_request, string $contentType = self::CONTENT_TYPES['createTrainingType'][0]) { $returnType = '\BhrSdk\Model\TrainingType'; - $request = $this->addTrainingTypeRequest($add_training_type_request, $contentType); + $request = $this->createTrainingTypeRequest($create_training_type_request, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -750,21 +750,21 @@ function ($exception) { } /** - * Create request for operation 'addTrainingType' + * Create request for operation 'createTrainingType' * - * @param \BhrSdk\Model\AddTrainingTypeRequest $add_training_type_request Training object to post (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['addTrainingType'] to see the possible values for this operation + * @param \BhrSdk\Model\CreateTrainingTypeRequest $create_training_type_request Training object to post (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createTrainingType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addTrainingTypeRequest($add_training_type_request, string $contentType = self::CONTENT_TYPES['addTrainingType'][0]) { + public function createTrainingTypeRequest($create_training_type_request, string $contentType = self::CONTENT_TYPES['createTrainingType'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ - 'add_training_type_request' => $add_training_type_request, + 'create_training_type_request' => $create_training_type_request, ], - methodName: 'addTrainingType' + methodName: 'createTrainingType' ); $resourcePath = '/api/v1/training/type'; @@ -776,18 +776,18 @@ public function addTrainingTypeRequest($add_training_type_request, string $conte $multipart = false; $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($add_training_type_request)) { + if (isset($create_training_type_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($add_training_type_request)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_training_type_request)); } else { - $httpBody = is_array($add_training_type_request) ? json_encode($add_training_type_request) : $add_training_type_request; + $httpBody = is_array($create_training_type_request) ? json_encode($create_training_type_request) : $create_training_type_request; } } @@ -980,7 +980,7 @@ public function deleteEmployeeTrainingRecordRequest($employee_training_record_id } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -1174,7 +1174,7 @@ public function deleteTrainingCategoryRequest($training_category_id, string $con } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -1368,7 +1368,7 @@ public function deleteTrainingTypeRequest($training_type_id, string $contentType } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -1420,36 +1420,36 @@ public function deleteTrainingTypeRequest($training_type_id, string $contentType /** * Operation listEmployeeTrainings * - * Get Employee Trainings + * List Employee Training Records * * @param int $employee_id The ID of the employee to get a list of trainings for. (required) - * @param int|null $training_type_id The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. (optional, default to 0) + * @param int|null $type Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTrainings'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TrainingRecordList[] + * @return \BhrSdk\Model\TrainingRecordMap */ - public function listEmployeeTrainings($employee_id, $training_type_id = 0, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { - list($response) = $this->listEmployeeTrainingsWithHttpInfo($employee_id, $training_type_id, $contentType); + public function listEmployeeTrainings($employee_id, $type = null, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { + list($response) = $this->listEmployeeTrainingsWithHttpInfo($employee_id, $type, $contentType); return $response; } /** * Operation listEmployeeTrainingsWithHttpInfo * - * Get Employee Trainings + * List Employee Training Records * * @param int $employee_id The ID of the employee to get a list of trainings for. (required) - * @param int|null $training_type_id The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. (optional, default to 0) + * @param int|null $type Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTrainings'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TrainingRecordList[], HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\TrainingRecordMap, HTTP status code, HTTP response headers (array of strings) */ - public function listEmployeeTrainingsWithHttpInfo($employee_id, $training_type_id = 0, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { - $request = $this->listEmployeeTrainingsRequest($employee_id, $training_type_id, $contentType); + public function listEmployeeTrainingsWithHttpInfo($employee_id, $type = null, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { + $request = $this->listEmployeeTrainingsRequest($employee_id, $type, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1460,7 +1460,7 @@ public function listEmployeeTrainingsWithHttpInfo($employee_id, $training_type_i switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingRecordList[]', + '\BhrSdk\Model\TrainingRecordMap', $request, $response, ); @@ -1480,7 +1480,7 @@ public function listEmployeeTrainingsWithHttpInfo($employee_id, $training_type_i } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingRecordList[]', + '\BhrSdk\Model\TrainingRecordMap', $request, $response, ); @@ -1489,17 +1489,17 @@ public function listEmployeeTrainingsWithHttpInfo($employee_id, $training_type_i /** * Operation listEmployeeTrainingsAsync * - * Get Employee Trainings + * List Employee Training Records * * @param int $employee_id The ID of the employee to get a list of trainings for. (required) - * @param int|null $training_type_id The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. (optional, default to 0) + * @param int|null $type Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTrainings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listEmployeeTrainingsAsync($employee_id, $training_type_id = 0, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { - return $this->listEmployeeTrainingsAsyncWithHttpInfo($employee_id, $training_type_id, $contentType) + public function listEmployeeTrainingsAsync($employee_id, $type = null, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { + return $this->listEmployeeTrainingsAsyncWithHttpInfo($employee_id, $type, $contentType) ->then( function ($response) { return $response[0]; @@ -1510,18 +1510,18 @@ function ($response) { /** * Operation listEmployeeTrainingsAsyncWithHttpInfo * - * Get Employee Trainings + * List Employee Training Records * * @param int $employee_id The ID of the employee to get a list of trainings for. (required) - * @param int|null $training_type_id The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. (optional, default to 0) + * @param int|null $type Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTrainings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listEmployeeTrainingsAsyncWithHttpInfo($employee_id, $training_type_id = 0, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { - $returnType = '\BhrSdk\Model\TrainingRecordList[]'; - $request = $this->listEmployeeTrainingsRequest($employee_id, $training_type_id, $contentType); + public function listEmployeeTrainingsAsyncWithHttpInfo($employee_id, $type = null, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { + $returnType = '\BhrSdk\Model\TrainingRecordMap'; + $request = $this->listEmployeeTrainingsRequest($employee_id, $type, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1558,13 +1558,13 @@ function ($exception) { * Create request for operation 'listEmployeeTrainings' * * @param int $employee_id The ID of the employee to get a list of trainings for. (required) - * @param int|null $training_type_id The training type id is optional. Not supplying a training type id will return the collection of all training records for the employee. (optional, default to 0) + * @param int|null $type Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. (optional) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listEmployeeTrainings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listEmployeeTrainingsRequest($employee_id, $training_type_id = 0, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { + public function listEmployeeTrainingsRequest($employee_id, $type = null, string $contentType = self::CONTENT_TYPES['listEmployeeTrainings'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ @@ -1582,7 +1582,7 @@ public function listEmployeeTrainingsRequest($employee_id, $training_type_id = 0 $multipart = false; $parameters = [ - 'trainingTypeId' => ['value' => $training_type_id, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], + 'type' => ['value' => $type, 'type' => 'integer', 'required' => false, 'style' => 'form', 'explode' => true], ]; // Process parameters and build query values directly @@ -1659,13 +1659,13 @@ public function listEmployeeTrainingsRequest($employee_id, $training_type_id = 0 /** * Operation listTrainingCategories * - * Get Training Categories + * List Training Categories * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingCategories'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TrainingCategoryList[] + * @return array<string,\BhrSdk\Model\TrainingCategory> */ public function listTrainingCategories(string $contentType = self::CONTENT_TYPES['listTrainingCategories'][0]) { list($response) = $this->listTrainingCategoriesWithHttpInfo($contentType); @@ -1675,13 +1675,13 @@ public function listTrainingCategories(string $contentType = self::CONTENT_TYPES /** * Operation listTrainingCategoriesWithHttpInfo * - * Get Training Categories + * List Training Categories * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingCategories'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TrainingCategoryList[], HTTP status code, HTTP response headers (array of strings) + * @return array of array<string,\BhrSdk\Model\TrainingCategory>, HTTP status code, HTTP response headers (array of strings) */ public function listTrainingCategoriesWithHttpInfo(string $contentType = self::CONTENT_TYPES['listTrainingCategories'][0]) { $request = $this->listTrainingCategoriesRequest($contentType); @@ -1695,7 +1695,7 @@ public function listTrainingCategoriesWithHttpInfo(string $contentType = self::C switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingCategoryList[]', + 'array<string,\BhrSdk\Model\TrainingCategory>', $request, $response, ); @@ -1715,7 +1715,7 @@ public function listTrainingCategoriesWithHttpInfo(string $contentType = self::C } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingCategoryList[]', + 'array<string,\BhrSdk\Model\TrainingCategory>', $request, $response, ); @@ -1724,7 +1724,7 @@ public function listTrainingCategoriesWithHttpInfo(string $contentType = self::C /** * Operation listTrainingCategoriesAsync * - * Get Training Categories + * List Training Categories * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingCategories'] to see the possible values for this operation * @@ -1743,7 +1743,7 @@ function ($response) { /** * Operation listTrainingCategoriesAsyncWithHttpInfo * - * Get Training Categories + * List Training Categories * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingCategories'] to see the possible values for this operation * @@ -1751,7 +1751,7 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function listTrainingCategoriesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listTrainingCategories'][0]) { - $returnType = '\BhrSdk\Model\TrainingCategoryList[]'; + $returnType = 'array<string,\BhrSdk\Model\TrainingCategory>'; $request = $this->listTrainingCategoriesRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) @@ -1856,13 +1856,13 @@ public function listTrainingCategoriesRequest(string $contentType = self::CONTEN /** * Operation listTrainingTypes * - * Get Training Types + * List Training Types * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingTypes'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\TrainingTypeList[] + * @return array<string,\BhrSdk\Model\TrainingType> */ public function listTrainingTypes(string $contentType = self::CONTENT_TYPES['listTrainingTypes'][0]) { list($response) = $this->listTrainingTypesWithHttpInfo($contentType); @@ -1872,13 +1872,13 @@ public function listTrainingTypes(string $contentType = self::CONTENT_TYPES['lis /** * Operation listTrainingTypesWithHttpInfo * - * Get Training Types + * List Training Types * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingTypes'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\TrainingTypeList[], HTTP status code, HTTP response headers (array of strings) + * @return array of array<string,\BhrSdk\Model\TrainingType>, HTTP status code, HTTP response headers (array of strings) */ public function listTrainingTypesWithHttpInfo(string $contentType = self::CONTENT_TYPES['listTrainingTypes'][0]) { $request = $this->listTrainingTypesRequest($contentType); @@ -1892,7 +1892,7 @@ public function listTrainingTypesWithHttpInfo(string $contentType = self::CONTEN switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingTypeList[]', + 'array<string,\BhrSdk\Model\TrainingType>', $request, $response, ); @@ -1912,7 +1912,7 @@ public function listTrainingTypesWithHttpInfo(string $contentType = self::CONTEN } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\TrainingTypeList[]', + 'array<string,\BhrSdk\Model\TrainingType>', $request, $response, ); @@ -1921,7 +1921,7 @@ public function listTrainingTypesWithHttpInfo(string $contentType = self::CONTEN /** * Operation listTrainingTypesAsync * - * Get Training Types + * List Training Types * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingTypes'] to see the possible values for this operation * @@ -1940,7 +1940,7 @@ function ($response) { /** * Operation listTrainingTypesAsyncWithHttpInfo * - * Get Training Types + * List Training Types * * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listTrainingTypes'] to see the possible values for this operation * @@ -1948,7 +1948,7 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface */ public function listTrainingTypesAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listTrainingTypes'][0]) { - $returnType = '\BhrSdk\Model\TrainingTypeList[]'; + $returnType = 'array<string,\BhrSdk\Model\TrainingType>'; $request = $this->listTrainingTypesRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) @@ -2091,7 +2091,7 @@ public function updateEmployeeTrainingRecordWithHttpInfo($employee_training_reco $statusCode = $response->getStatusCode(); switch($statusCode) { - case 200: + case 201: return ApiHelper::handleResponseWithDataType( '\BhrSdk\Model\TrainingRecord', $request, @@ -2225,7 +2225,7 @@ public function updateEmployeeTrainingRecordRequest($employee_training_record_id } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -2459,7 +2459,7 @@ public function updateTrainingCategoryRequest($training_category_id, $update_tra } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); @@ -2693,7 +2693,7 @@ public function updateTrainingTypeRequest($training_type_id, $update_training_ty } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/xml', ], + ['application/json', ], $contentType, $multipart ); diff --git a/lib/Api/WebhookEventsApi.php b/lib/Api/WebhookEventsApi.php new file mode 100644 index 00000000..25c17d57 --- /dev/null +++ b/lib/Api/WebhookEventsApi.php @@ -0,0 +1,1276 @@ +<?php +declare(strict_types=1); +/** + * WebhookEventsApi + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Api; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use BhrSdk\ApiException; +use BhrSdk\Configuration; +use BhrSdk\FormDataProcessor; +use BhrSdk\HeaderSelector; +use BhrSdk\ObjectSerializer; +use BhrSdk\Client\Logger\LoggerInterface; +use BhrSdk\ApiHelper; + +/** + * WebhookEventsApi Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class WebhookEventsApi { + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** + * @var LoggerInterface|null Logger instance + */ + protected $logger; + + /** @var string[] $CONTENT_TYPES **/ + public const CONTENT_TYPES = [ + 'companyDeletedWebhook' => [ + 'application/json', + ], + 'companyIntegrationsUpdatedWebhook' => [ + 'application/json', + ], + 'companyUpdatedWebhook' => [ + 'application/json', + ], + 'employeeCreatedWebhook' => [ + 'application/json', + ], + 'employeeDeletedWebhook' => [ + 'application/json', + ], + 'employeeUpdatedWebhook' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + * @param LoggerInterface|null $logger (Optional) logger instance for secure logging + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0, + ?LoggerInterface $logger = null + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + $this->logger = $logger; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() { + return $this->config; + } + + /** + * Operation companyDeletedWebhook + * + * Company Deleted + * + * @param \BhrSdk\Model\CompanyDeletedWebhookPayload|null $company_deleted_webhook_payload Webhook payload containing information about the company deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyDeletedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function companyDeletedWebhook($company_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyDeletedWebhook'][0]) { + list($response) = $this->companyDeletedWebhookWithHttpInfo($company_deleted_webhook_payload, $contentType); + return $response; + } + + /** + * Operation companyDeletedWebhookWithHttpInfo + * + * Company Deleted + * + * @param \BhrSdk\Model\CompanyDeletedWebhookPayload|null $company_deleted_webhook_payload Webhook payload containing information about the company deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyDeletedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 companyDeletedWebhookWithHttpInfo($company_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyDeletedWebhook'][0]) { + $request = $this->companyDeletedWebhookRequest($company_deleted_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation companyDeletedWebhookAsync + * + * Company Deleted + * + * @param \BhrSdk\Model\CompanyDeletedWebhookPayload|null $company_deleted_webhook_payload Webhook payload containing information about the company deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyDeletedWebhookAsync($company_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyDeletedWebhook'][0]) { + return $this->companyDeletedWebhookAsyncWithHttpInfo($company_deleted_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companyDeletedWebhookAsyncWithHttpInfo + * + * Company Deleted + * + * @param \BhrSdk\Model\CompanyDeletedWebhookPayload|null $company_deleted_webhook_payload Webhook payload containing information about the company deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyDeletedWebhookAsyncWithHttpInfo($company_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyDeletedWebhook'][0]) { + + $request = $this->companyDeletedWebhookRequest($company_deleted_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'companyDeletedWebhook' + * + * @param \BhrSdk\Model\CompanyDeletedWebhookPayload|null $company_deleted_webhook_payload Webhook payload containing information about the company deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function companyDeletedWebhookRequest($company_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyDeletedWebhook'][0]) { + + $resourcePath = '/company.deleted'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($company_deleted_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($company_deleted_webhook_payload)); + } else { + $httpBody = is_array($company_deleted_webhook_payload) ? json_encode($company_deleted_webhook_payload) : $company_deleted_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation companyIntegrationsUpdatedWebhook + * + * Company Integrations Updated + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload|null $company_integrations_updated_webhook_payload Webhook payload containing company integration update information (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function companyIntegrationsUpdatedWebhook($company_integrations_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'][0]) { + list($response) = $this->companyIntegrationsUpdatedWebhookWithHttpInfo($company_integrations_updated_webhook_payload, $contentType); + return $response; + } + + /** + * Operation companyIntegrationsUpdatedWebhookWithHttpInfo + * + * Company Integrations Updated + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload|null $company_integrations_updated_webhook_payload Webhook payload containing company integration update information (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 companyIntegrationsUpdatedWebhookWithHttpInfo($company_integrations_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'][0]) { + $request = $this->companyIntegrationsUpdatedWebhookRequest($company_integrations_updated_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation companyIntegrationsUpdatedWebhookAsync + * + * Company Integrations Updated + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload|null $company_integrations_updated_webhook_payload Webhook payload containing company integration update information (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyIntegrationsUpdatedWebhookAsync($company_integrations_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'][0]) { + return $this->companyIntegrationsUpdatedWebhookAsyncWithHttpInfo($company_integrations_updated_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companyIntegrationsUpdatedWebhookAsyncWithHttpInfo + * + * Company Integrations Updated + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload|null $company_integrations_updated_webhook_payload Webhook payload containing company integration update information (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyIntegrationsUpdatedWebhookAsyncWithHttpInfo($company_integrations_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'][0]) { + + $request = $this->companyIntegrationsUpdatedWebhookRequest($company_integrations_updated_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'companyIntegrationsUpdatedWebhook' + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayload|null $company_integrations_updated_webhook_payload Webhook payload containing company integration update information (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function companyIntegrationsUpdatedWebhookRequest($company_integrations_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyIntegrationsUpdatedWebhook'][0]) { + + $resourcePath = '/company-integrations.updated'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($company_integrations_updated_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($company_integrations_updated_webhook_payload)); + } else { + $httpBody = is_array($company_integrations_updated_webhook_payload) ? json_encode($company_integrations_updated_webhook_payload) : $company_integrations_updated_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation companyUpdatedWebhook + * + * Company Updated + * + * @param \BhrSdk\Model\CompanyUpdatedWebhookPayload|null $company_updated_webhook_payload Webhook payload containing information about the company update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function companyUpdatedWebhook($company_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyUpdatedWebhook'][0]) { + list($response) = $this->companyUpdatedWebhookWithHttpInfo($company_updated_webhook_payload, $contentType); + return $response; + } + + /** + * Operation companyUpdatedWebhookWithHttpInfo + * + * Company Updated + * + * @param \BhrSdk\Model\CompanyUpdatedWebhookPayload|null $company_updated_webhook_payload Webhook payload containing information about the company update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 companyUpdatedWebhookWithHttpInfo($company_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyUpdatedWebhook'][0]) { + $request = $this->companyUpdatedWebhookRequest($company_updated_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation companyUpdatedWebhookAsync + * + * Company Updated + * + * @param \BhrSdk\Model\CompanyUpdatedWebhookPayload|null $company_updated_webhook_payload Webhook payload containing information about the company update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyUpdatedWebhookAsync($company_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyUpdatedWebhook'][0]) { + return $this->companyUpdatedWebhookAsyncWithHttpInfo($company_updated_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation companyUpdatedWebhookAsyncWithHttpInfo + * + * Company Updated + * + * @param \BhrSdk\Model\CompanyUpdatedWebhookPayload|null $company_updated_webhook_payload Webhook payload containing information about the company update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function companyUpdatedWebhookAsyncWithHttpInfo($company_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyUpdatedWebhook'][0]) { + + $request = $this->companyUpdatedWebhookRequest($company_updated_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'companyUpdatedWebhook' + * + * @param \BhrSdk\Model\CompanyUpdatedWebhookPayload|null $company_updated_webhook_payload Webhook payload containing information about the company update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['companyUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function companyUpdatedWebhookRequest($company_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['companyUpdatedWebhook'][0]) { + + $resourcePath = '/company.updated'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($company_updated_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($company_updated_webhook_payload)); + } else { + $httpBody = is_array($company_updated_webhook_payload) ? json_encode($company_updated_webhook_payload) : $company_updated_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation employeeCreatedWebhook + * + * Employee Created + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayload|null $employee_created_webhook_payload Webhook payload containing information about the employee creation (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeCreatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function employeeCreatedWebhook($employee_created_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeCreatedWebhook'][0]) { + list($response) = $this->employeeCreatedWebhookWithHttpInfo($employee_created_webhook_payload, $contentType); + return $response; + } + + /** + * Operation employeeCreatedWebhookWithHttpInfo + * + * Employee Created + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayload|null $employee_created_webhook_payload Webhook payload containing information about the employee creation (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeCreatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 employeeCreatedWebhookWithHttpInfo($employee_created_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeCreatedWebhook'][0]) { + $request = $this->employeeCreatedWebhookRequest($employee_created_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation employeeCreatedWebhookAsync + * + * Employee Created + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayload|null $employee_created_webhook_payload Webhook payload containing information about the employee creation (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeCreatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeCreatedWebhookAsync($employee_created_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeCreatedWebhook'][0]) { + return $this->employeeCreatedWebhookAsyncWithHttpInfo($employee_created_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeCreatedWebhookAsyncWithHttpInfo + * + * Employee Created + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayload|null $employee_created_webhook_payload Webhook payload containing information about the employee creation (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeCreatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeCreatedWebhookAsyncWithHttpInfo($employee_created_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeCreatedWebhook'][0]) { + + $request = $this->employeeCreatedWebhookRequest($employee_created_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'employeeCreatedWebhook' + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayload|null $employee_created_webhook_payload Webhook payload containing information about the employee creation (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeCreatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeCreatedWebhookRequest($employee_created_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeCreatedWebhook'][0]) { + + $resourcePath = '/employee.created'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($employee_created_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employee_created_webhook_payload)); + } else { + $httpBody = is_array($employee_created_webhook_payload) ? json_encode($employee_created_webhook_payload) : $employee_created_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation employeeDeletedWebhook + * + * Employee Deleted + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayload|null $employee_deleted_webhook_payload Webhook payload containing information about the employee deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeDeletedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function employeeDeletedWebhook($employee_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeDeletedWebhook'][0]) { + list($response) = $this->employeeDeletedWebhookWithHttpInfo($employee_deleted_webhook_payload, $contentType); + return $response; + } + + /** + * Operation employeeDeletedWebhookWithHttpInfo + * + * Employee Deleted + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayload|null $employee_deleted_webhook_payload Webhook payload containing information about the employee deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeDeletedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 employeeDeletedWebhookWithHttpInfo($employee_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeDeletedWebhook'][0]) { + $request = $this->employeeDeletedWebhookRequest($employee_deleted_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation employeeDeletedWebhookAsync + * + * Employee Deleted + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayload|null $employee_deleted_webhook_payload Webhook payload containing information about the employee deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeDeletedWebhookAsync($employee_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeDeletedWebhook'][0]) { + return $this->employeeDeletedWebhookAsyncWithHttpInfo($employee_deleted_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeDeletedWebhookAsyncWithHttpInfo + * + * Employee Deleted + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayload|null $employee_deleted_webhook_payload Webhook payload containing information about the employee deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeDeletedWebhookAsyncWithHttpInfo($employee_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeDeletedWebhook'][0]) { + + $request = $this->employeeDeletedWebhookRequest($employee_deleted_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'employeeDeletedWebhook' + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayload|null $employee_deleted_webhook_payload Webhook payload containing information about the employee deletion (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeDeletedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeDeletedWebhookRequest($employee_deleted_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeDeletedWebhook'][0]) { + + $resourcePath = '/employee.deleted'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($employee_deleted_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employee_deleted_webhook_payload)); + } else { + $httpBody = is_array($employee_deleted_webhook_payload) ? json_encode($employee_deleted_webhook_payload) : $employee_deleted_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + + /** + * Operation employeeUpdatedWebhook + * + * Employee Updated + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayload|null $employee_updated_webhook_payload Webhook payload containing information about the employee update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return mixed + */ + public function employeeUpdatedWebhook($employee_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeUpdatedWebhook'][0]) { + list($response) = $this->employeeUpdatedWebhookWithHttpInfo($employee_updated_webhook_payload, $contentType); + return $response; + } + + /** + * Operation employeeUpdatedWebhookWithHttpInfo + * + * Employee Updated + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayload|null $employee_updated_webhook_payload Webhook payload containing information about the employee update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeUpdatedWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\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 employeeUpdatedWebhookWithHttpInfo($employee_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeUpdatedWebhook'][0]) { + $request = $this->employeeUpdatedWebhookRequest($employee_updated_webhook_payload, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + return ApiHelper::handleResponseWithDataType( + 'object', // or 'mixed' or any other generic type + $request, + $response, + ); + } + + /** + * Operation employeeUpdatedWebhookAsync + * + * Employee Updated + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayload|null $employee_updated_webhook_payload Webhook payload containing information about the employee update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeUpdatedWebhookAsync($employee_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeUpdatedWebhook'][0]) { + return $this->employeeUpdatedWebhookAsyncWithHttpInfo($employee_updated_webhook_payload, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeUpdatedWebhookAsyncWithHttpInfo + * + * Employee Updated + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayload|null $employee_updated_webhook_payload Webhook payload containing information about the employee update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function employeeUpdatedWebhookAsyncWithHttpInfo($employee_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeUpdatedWebhook'][0]) { + + $request = $this->employeeUpdatedWebhookRequest($employee_updated_webhook_payload, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) { + $content = (string) $response->getBody(); + $content = json_decode($content); + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $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 'employeeUpdatedWebhook' + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayload|null $employee_updated_webhook_payload Webhook payload containing information about the employee update (optional) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['employeeUpdatedWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeUpdatedWebhookRequest($employee_updated_webhook_payload = null, string $contentType = self::CONTENT_TYPES['employeeUpdatedWebhook'][0]) { + + $resourcePath = '/employee.updated'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($employee_updated_webhook_payload)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employee_updated_webhook_payload)); + } else { + $httpBody = is_array($employee_updated_webhook_payload) ? json_encode($employee_updated_webhook_payload) : $employee_updated_webhook_payload; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + +} diff --git a/lib/Api/WebhooksApi.php b/lib/Api/WebhooksApi.php index d6ad9c58..a83626f6 100644 --- a/lib/Api/WebhooksApi.php +++ b/lib/Api/WebhooksApi.php @@ -79,25 +79,28 @@ class WebhooksApi { /** @var string[] $CONTENT_TYPES **/ public const CONTENT_TYPES = [ + 'createWebhook' => [ + 'application/json', + ], 'deleteWebhook' => [ 'application/json', ], - 'getMonitorFields' => [ + 'getPostFields' => [ 'application/json', ], 'getWebhook' => [ 'application/json', ], - 'getWebhookList' => [ + 'listMonitorFields' => [ 'application/json', ], - 'getWebhookLogs' => [ + 'listWebhookLogs' => [ 'application/json', ], - 'postWebhook' => [ + 'listWebhooks' => [ 'application/json', ], - 'putWebhook' => [ + 'updateWebhook' => [ 'application/json', ], ]; @@ -148,17 +151,254 @@ public function getConfig() { return $this->config; } + /** + * Operation createWebhook + * + * Create Webhook + * + * @param \BhrSdk\Model\NewWebHook $new_web_hook new_web_hook (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \BhrSdk\Model\Webhook|\BhrSdk\Model\CreateWebhookBadRequestResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError + */ + public function createWebhook($new_web_hook, string $contentType = self::CONTENT_TYPES['createWebhook'][0]) { + list($response) = $this->createWebhookWithHttpInfo($new_web_hook, $contentType); + return $response; + } + + /** + * Operation createWebhookWithHttpInfo + * + * Create Webhook + * + * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createWebhook'] to see the possible values for this operation + * + * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \BhrSdk\Model\Webhook|\BhrSdk\Model\CreateWebhookBadRequestResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + */ + public function createWebhookWithHttpInfo($new_web_hook, string $contentType = self::CONTENT_TYPES['createWebhook'][0]) { + $request = $this->createWebhookRequest($new_web_hook, $contentType); + $options = ApiHelper::createHttpClientOption($this->config); + + // Send request with retry support for timeout errors + $response = ApiHelper::sendRequestWithRetries($this->logger, $this->client, $this->config, $request, $options); + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\Webhook', + $request, + $response, + ); + case 400: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\CreateWebhookBadRequestResponse', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WebhookError', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WebhookError', + $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 ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\Webhook', + $request, + $response, + ); + } + + /** + * Operation createWebhookAsync + * + * Create Webhook + * + * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWebhookAsync($new_web_hook, string $contentType = self::CONTENT_TYPES['createWebhook'][0]) { + return $this->createWebhookAsyncWithHttpInfo($new_web_hook, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createWebhookAsyncWithHttpInfo + * + * Create Webhook + * + * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createWebhookAsyncWithHttpInfo($new_web_hook, string $contentType = self::CONTENT_TYPES['createWebhook'][0]) { + $returnType = '\BhrSdk\Model\Webhook'; + $request = $this->createWebhookRequest($new_web_hook, $contentType); + + return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) + ->then( + function ($response) use ($returnType) { + $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 'createWebhook' + * + * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['createWebhook'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createWebhookRequest($new_web_hook, string $contentType = self::CONTENT_TYPES['createWebhook'][0]) { + // PHP 8.0+ only + ApiHelper::validateRequiredParameters( + params: [ + 'new_web_hook' => $new_web_hook, + ], + methodName: 'createWebhook' + ); + + $resourcePath = '/api/v1/webhooks'; + $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($new_web_hook)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($new_web_hook)); + } else { + $httpBody = is_array($new_web_hook) ? json_encode($new_web_hook) : $new_web_hook; + } + } + + // Authentication methods + + // Basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $this->logger?->info('Using Basic authentication'); + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // OAuth/Bearer authentication + if (!empty($this->config->getAccessToken())) { + $this->logger?->info('Using Bearer authentication'); + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $this->logger?->debug('Using User-Agent: ' . $this->config->getUserAgent()); + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + // Special handling for accept_header_parameter to set the Accept header directly + /** @phpstan-ignore-next-line */ + if (isset($accept_header_parameter) && $accept_header_parameter !== null) { + $this->logger?->debug('Overriding Accept header: ' . $accept_header_parameter); + /** @phpstan-ignore-next-line */ + $headers['Accept'] = ObjectSerializer::toHeaderValue($accept_header_parameter); + } + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + is_string($httpBody) ? $httpBody : (string)$httpBody + ); + } + /** * Operation deleteWebhook * * Delete Webhook * - * @param string $id {id} is an webhook ID that is associated with the User API key. (required) + * @param int $id The webhook ID to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteWebhook'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return mixed + * @return string|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError */ public function deleteWebhook($id, string $contentType = self::CONTENT_TYPES['deleteWebhook'][0]) { list($response) = $this->deleteWebhookWithHttpInfo($id, $contentType); @@ -170,12 +410,12 @@ public function deleteWebhook($id, string $contentType = self::CONTENT_TYPES['de * * Delete Webhook * - * @param string $id {id} is an webhook ID that is associated with the User API key. (required) + * @param int $id The webhook ID to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteWebhook'] to see the possible values for this operation * * @throws \BhrSdk\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|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) */ public function deleteWebhookWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteWebhook'][0]) { $request = $this->deleteWebhookRequest($id, $contentType); @@ -186,8 +426,48 @@ public function deleteWebhookWithHttpInfo($id, string $contentType = self::CONTE $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); + case 403: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WebhookError', + $request, + $response, + ); + case 404: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WebhookError', + $request, + $response, + ); + case 500: + return ApiHelper::handleResponseWithDataType( + '\BhrSdk\Model\WebhookError', + $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 ApiHelper::handleResponseWithDataType( - 'object', // or 'mixed' or any other generic type + 'string', $request, $response, ); @@ -198,7 +478,7 @@ public function deleteWebhookWithHttpInfo($id, string $contentType = self::CONTE * * Delete Webhook * - * @param string $id {id} is an webhook ID that is associated with the User API key. (required) + * @param int $id The webhook ID to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -218,24 +498,26 @@ function ($response) { * * Delete Webhook * - * @param string $id {id} is an webhook ID that is associated with the User API key. (required) + * @param int $id The webhook ID to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function deleteWebhookAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['deleteWebhook'][0]) { - + $returnType = 'string'; $request = $this->deleteWebhookRequest($id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( - function ($response) { + function ($response) use ($returnType) { $content = (string) $response->getBody(); - $content = json_decode($content); + if ($returnType !== 'string') { + $content = json_decode($content); + } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; @@ -260,7 +542,7 @@ function ($exception) { /** * Create request for operation 'deleteWebhook' * - * @param string $id {id} is an webhook ID that is associated with the User API key. (required) + * @param int $id The webhook ID to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['deleteWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -293,7 +575,7 @@ public function deleteWebhookRequest($id, string $contentType = self::CONTENT_TY } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['text/plain', 'application/json', ], $contentType, $multipart ); @@ -343,34 +625,34 @@ public function deleteWebhookRequest($id, string $contentType = self::CONTENT_TY } /** - * Operation getMonitorFields + * Operation getPostFields * - * Get Monitor Fields + * Get Webhook Post Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMonitorFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getPostFields'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\FieldList|\BhrSdk\Model\WebhookError + * @return \BhrSdk\Model\WebHookPostFieldResponseObject|\BhrSdk\Model\WebhookError */ - public function getMonitorFields(string $contentType = self::CONTENT_TYPES['getMonitorFields'][0]) { - list($response) = $this->getMonitorFieldsWithHttpInfo($contentType); + public function getPostFields(string $contentType = self::CONTENT_TYPES['getPostFields'][0]) { + list($response) = $this->getPostFieldsWithHttpInfo($contentType); return $response; } /** - * Operation getMonitorFieldsWithHttpInfo + * Operation getPostFieldsWithHttpInfo * - * Get Monitor Fields + * Get Webhook Post Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMonitorFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getPostFields'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\FieldList|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\WebHookPostFieldResponseObject|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) */ - public function getMonitorFieldsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMonitorFields'][0]) { - $request = $this->getMonitorFieldsRequest($contentType); + public function getPostFieldsWithHttpInfo(string $contentType = self::CONTENT_TYPES['getPostFields'][0]) { + $request = $this->getPostFieldsRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -381,11 +663,11 @@ public function getMonitorFieldsWithHttpInfo(string $contentType = self::CONTENT switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\FieldList', + '\BhrSdk\Model\WebHookPostFieldResponseObject', $request, $response, ); - case 500: + case 403: return ApiHelper::handleResponseWithDataType( '\BhrSdk\Model\WebhookError', $request, @@ -407,24 +689,24 @@ public function getMonitorFieldsWithHttpInfo(string $contentType = self::CONTENT } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\FieldList', + '\BhrSdk\Model\WebHookPostFieldResponseObject', $request, $response, ); } /** - * Operation getMonitorFieldsAsync + * Operation getPostFieldsAsync * - * Get Monitor Fields + * Get Webhook Post Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMonitorFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getPostFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getMonitorFieldsAsync(string $contentType = self::CONTENT_TYPES['getMonitorFields'][0]) { - return $this->getMonitorFieldsAsyncWithHttpInfo($contentType) + public function getPostFieldsAsync(string $contentType = self::CONTENT_TYPES['getPostFields'][0]) { + return $this->getPostFieldsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -433,18 +715,18 @@ function ($response) { } /** - * Operation getMonitorFieldsAsyncWithHttpInfo + * Operation getPostFieldsAsyncWithHttpInfo * - * Get Monitor Fields + * Get Webhook Post Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMonitorFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getPostFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getMonitorFieldsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getMonitorFields'][0]) { - $returnType = '\BhrSdk\Model\FieldList'; - $request = $this->getMonitorFieldsRequest($contentType); + public function getPostFieldsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getPostFields'][0]) { + $returnType = '\BhrSdk\Model\WebHookPostFieldResponseObject'; + $request = $this->getPostFieldsRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -478,16 +760,16 @@ function ($exception) { } /** - * Create request for operation 'getMonitorFields' + * Create request for operation 'getPostFields' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getMonitorFields'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getPostFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getMonitorFieldsRequest(string $contentType = self::CONTENT_TYPES['getMonitorFields'][0]) { + public function getPostFieldsRequest(string $contentType = self::CONTENT_TYPES['getPostFields'][0]) { - $resourcePath = '/api/v1/webhooks/monitor_fields'; + $resourcePath = '/api/v1/webhooks/post-fields'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -550,7 +832,7 @@ public function getMonitorFieldsRequest(string $contentType = self::CONTENT_TYPE * * Get Webhook * - * @param int $id The webhook ID to display details about. (required) + * @param int $id The webhook ID to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhook'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -567,7 +849,7 @@ public function getWebhook($id, string $contentType = self::CONTENT_TYPES['getWe * * Get Webhook * - * @param int $id The webhook ID to display details about. (required) + * @param int $id The webhook ID to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhook'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format @@ -635,7 +917,7 @@ public function getWebhookWithHttpInfo($id, string $contentType = self::CONTENT_ * * Get Webhook * - * @param int $id The webhook ID to display details about. (required) + * @param int $id The webhook ID to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -655,7 +937,7 @@ function ($response) { * * Get Webhook * - * @param int $id The webhook ID to display details about. (required) + * @param int $id The webhook ID to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -699,7 +981,7 @@ function ($exception) { /** * Create request for operation 'getWebhook' * - * @param int $id The webhook ID to display details about. (required) + * @param int $id The webhook ID to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -782,34 +1064,34 @@ public function getWebhookRequest($id, string $contentType = self::CONTENT_TYPES } /** - * Operation getWebhookList + * Operation listMonitorFields * - * Get Webhooks + * List Monitor Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookList'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMonitorFields'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\WebhooksList|\BhrSdk\Model\WebhookError + * @return \BhrSdk\Model\MonitorFieldList|\BhrSdk\Model\WebhookError */ - public function getWebhookList(string $contentType = self::CONTENT_TYPES['getWebhookList'][0]) { - list($response) = $this->getWebhookListWithHttpInfo($contentType); + public function listMonitorFields(string $contentType = self::CONTENT_TYPES['listMonitorFields'][0]) { + list($response) = $this->listMonitorFieldsWithHttpInfo($contentType); return $response; } /** - * Operation getWebhookListWithHttpInfo + * Operation listMonitorFieldsWithHttpInfo * - * Get Webhooks + * List Monitor Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookList'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMonitorFields'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\WebhooksList|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\MonitorFieldList|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookListWithHttpInfo(string $contentType = self::CONTENT_TYPES['getWebhookList'][0]) { - $request = $this->getWebhookListRequest($contentType); + public function listMonitorFieldsWithHttpInfo(string $contentType = self::CONTENT_TYPES['listMonitorFields'][0]) { + $request = $this->listMonitorFieldsRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -820,7 +1102,7 @@ public function getWebhookListWithHttpInfo(string $contentType = self::CONTENT_T switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebhooksList', + '\BhrSdk\Model\MonitorFieldList', $request, $response, ); @@ -846,24 +1128,24 @@ public function getWebhookListWithHttpInfo(string $contentType = self::CONTENT_T } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebhooksList', + '\BhrSdk\Model\MonitorFieldList', $request, $response, ); } /** - * Operation getWebhookListAsync + * Operation listMonitorFieldsAsync * - * Get Webhooks + * List Monitor Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookList'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMonitorFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookListAsync(string $contentType = self::CONTENT_TYPES['getWebhookList'][0]) { - return $this->getWebhookListAsyncWithHttpInfo($contentType) + public function listMonitorFieldsAsync(string $contentType = self::CONTENT_TYPES['listMonitorFields'][0]) { + return $this->listMonitorFieldsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -872,18 +1154,18 @@ function ($response) { } /** - * Operation getWebhookListAsyncWithHttpInfo + * Operation listMonitorFieldsAsyncWithHttpInfo * - * Get Webhooks + * List Monitor Fields * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookList'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMonitorFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookListAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['getWebhookList'][0]) { - $returnType = '\BhrSdk\Model\WebhooksList'; - $request = $this->getWebhookListRequest($contentType); + public function listMonitorFieldsAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listMonitorFields'][0]) { + $returnType = '\BhrSdk\Model\MonitorFieldList'; + $request = $this->listMonitorFieldsRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -917,16 +1199,16 @@ function ($exception) { } /** - * Create request for operation 'getWebhookList' + * Create request for operation 'listMonitorFields' * - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookList'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listMonitorFields'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getWebhookListRequest(string $contentType = self::CONTENT_TYPES['getWebhookList'][0]) { + public function listMonitorFieldsRequest(string $contentType = self::CONTENT_TYPES['listMonitorFields'][0]) { - $resourcePath = '/api/v1/webhooks'; + $resourcePath = '/api/v1/webhooks/monitor_fields'; $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; @@ -985,36 +1267,36 @@ public function getWebhookListRequest(string $contentType = self::CONTENT_TYPES[ } /** - * Operation getWebhookLogs + * Operation listWebhookLogs * - * Get Webhook Logs + * List Webhook Logs * - * @param string $id The webhook ID to get logs about. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookLogs'] to see the possible values for this operation + * @param int $id The webhook ID to get logs about. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhookLogs'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\WebHookLogResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError + * @return \BhrSdk\Model\WebhookLogListResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|string */ - public function getWebhookLogs($id, string $contentType = self::CONTENT_TYPES['getWebhookLogs'][0]) { - list($response) = $this->getWebhookLogsWithHttpInfo($id, $contentType); + public function listWebhookLogs($id, string $contentType = self::CONTENT_TYPES['listWebhookLogs'][0]) { + list($response) = $this->listWebhookLogsWithHttpInfo($id, $contentType); return $response; } /** - * Operation getWebhookLogsWithHttpInfo + * Operation listWebhookLogsWithHttpInfo * - * Get Webhook Logs + * List Webhook Logs * - * @param string $id The webhook ID to get logs about. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookLogs'] to see the possible values for this operation + * @param int $id The webhook ID to get logs about. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhookLogs'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\WebHookLogResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\WebhookLogListResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|string, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookLogsWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getWebhookLogs'][0]) { - $request = $this->getWebhookLogsRequest($id, $contentType); + public function listWebhookLogsWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['listWebhookLogs'][0]) { + $request = $this->listWebhookLogsRequest($id, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1025,7 +1307,7 @@ public function getWebhookLogsWithHttpInfo($id, string $contentType = self::CONT switch($statusCode) { case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebHookLogResponse', + '\BhrSdk\Model\WebhookLogListResponse', $request, $response, ); @@ -1047,6 +1329,12 @@ public function getWebhookLogsWithHttpInfo($id, string $contentType = self::CONT $request, $response, ); + case 503: + return ApiHelper::handleResponseWithDataType( + 'string', + $request, + $response, + ); } if ($statusCode < 200 || $statusCode > 299) { @@ -1063,25 +1351,25 @@ public function getWebhookLogsWithHttpInfo($id, string $contentType = self::CONT } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebHookLogResponse', + '\BhrSdk\Model\WebhookLogListResponse', $request, $response, ); } /** - * Operation getWebhookLogsAsync + * Operation listWebhookLogsAsync * - * Get Webhook Logs + * List Webhook Logs * - * @param string $id The webhook ID to get logs about. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookLogs'] to see the possible values for this operation + * @param int $id The webhook ID to get logs about. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhookLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookLogsAsync($id, string $contentType = self::CONTENT_TYPES['getWebhookLogs'][0]) { - return $this->getWebhookLogsAsyncWithHttpInfo($id, $contentType) + public function listWebhookLogsAsync($id, string $contentType = self::CONTENT_TYPES['listWebhookLogs'][0]) { + return $this->listWebhookLogsAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1090,19 +1378,19 @@ function ($response) { } /** - * Operation getWebhookLogsAsyncWithHttpInfo + * Operation listWebhookLogsAsyncWithHttpInfo * - * Get Webhook Logs + * List Webhook Logs * - * @param string $id The webhook ID to get logs about. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookLogs'] to see the possible values for this operation + * @param int $id The webhook ID to get logs about. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhookLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookLogsAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['getWebhookLogs'][0]) { - $returnType = '\BhrSdk\Model\WebHookLogResponse'; - $request = $this->getWebhookLogsRequest($id, $contentType); + public function listWebhookLogsAsyncWithHttpInfo($id, string $contentType = self::CONTENT_TYPES['listWebhookLogs'][0]) { + $returnType = '\BhrSdk\Model\WebhookLogListResponse'; + $request = $this->listWebhookLogsRequest($id, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1136,21 +1424,21 @@ function ($exception) { } /** - * Create request for operation 'getWebhookLogs' + * Create request for operation 'listWebhookLogs' * - * @param string $id The webhook ID to get logs about. (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['getWebhookLogs'] to see the possible values for this operation + * @param int $id The webhook ID to get logs about. (required) + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhookLogs'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getWebhookLogsRequest($id, string $contentType = self::CONTENT_TYPES['getWebhookLogs'][0]) { + public function listWebhookLogsRequest($id, string $contentType = self::CONTENT_TYPES['listWebhookLogs'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, ], - methodName: 'getWebhookLogs' + methodName: 'listWebhookLogs' ); $resourcePath = '/api/v1/webhooks/{id}/log'; @@ -1171,7 +1459,7 @@ public function getWebhookLogsRequest($id, string $contentType = self::CONTENT_T } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'text/plain', ], $contentType, $multipart ); @@ -1221,36 +1509,34 @@ public function getWebhookLogsRequest($id, string $contentType = self::CONTENT_T } /** - * Operation postWebhook + * Operation listWebhooks * - * Create Webhook + * List Webhooks * - * @param \BhrSdk\Model\NewWebHook $new_web_hook new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhooks'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\Webhook|\BhrSdk\Model\WebhookBadRequest|\BhrSdk\Model\Unauthorized|\BhrSdk\Model\WebhookError + * @return \BhrSdk\Model\WebhooksList|\BhrSdk\Model\WebhookError */ - public function postWebhook($new_web_hook, string $contentType = self::CONTENT_TYPES['postWebhook'][0]) { - list($response) = $this->postWebhookWithHttpInfo($new_web_hook, $contentType); + public function listWebhooks(string $contentType = self::CONTENT_TYPES['listWebhooks'][0]) { + list($response) = $this->listWebhooksWithHttpInfo($contentType); return $response; } /** - * Operation postWebhookWithHttpInfo + * Operation listWebhooksWithHttpInfo * - * Create Webhook + * List Webhooks * - * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhooks'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\Webhook|\BhrSdk\Model\WebhookBadRequest|\BhrSdk\Model\Unauthorized|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\WebhooksList|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) */ - public function postWebhookWithHttpInfo($new_web_hook, string $contentType = self::CONTENT_TYPES['postWebhook'][0]) { - $request = $this->postWebhookRequest($new_web_hook, $contentType); + public function listWebhooksWithHttpInfo(string $contentType = self::CONTENT_TYPES['listWebhooks'][0]) { + $request = $this->listWebhooksRequest($contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1259,21 +1545,9 @@ public function postWebhookWithHttpInfo($new_web_hook, string $contentType = sel $statusCode = $response->getStatusCode(); switch($statusCode) { - case 201: - return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Webhook', - $request, - $response, - ); - case 400: - return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebhookBadRequest', - $request, - $response, - ); - case 403: + case 200: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Unauthorized', + '\BhrSdk\Model\WebhooksList', $request, $response, ); @@ -1299,25 +1573,24 @@ public function postWebhookWithHttpInfo($new_web_hook, string $contentType = sel } return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Webhook', + '\BhrSdk\Model\WebhooksList', $request, $response, ); } /** - * Operation postWebhookAsync + * Operation listWebhooksAsync * - * Create Webhook + * List Webhooks * - * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhooks'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postWebhookAsync($new_web_hook, string $contentType = self::CONTENT_TYPES['postWebhook'][0]) { - return $this->postWebhookAsyncWithHttpInfo($new_web_hook, $contentType) + public function listWebhooksAsync(string $contentType = self::CONTENT_TYPES['listWebhooks'][0]) { + return $this->listWebhooksAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1326,19 +1599,18 @@ function ($response) { } /** - * Operation postWebhookAsyncWithHttpInfo + * Operation listWebhooksAsyncWithHttpInfo * - * Create Webhook + * List Webhooks * - * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhooks'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postWebhookAsyncWithHttpInfo($new_web_hook, string $contentType = self::CONTENT_TYPES['postWebhook'][0]) { - $returnType = '\BhrSdk\Model\Webhook'; - $request = $this->postWebhookRequest($new_web_hook, $contentType); + public function listWebhooksAsyncWithHttpInfo(string $contentType = self::CONTENT_TYPES['listWebhooks'][0]) { + $returnType = '\BhrSdk\Model\WebhooksList'; + $request = $this->listWebhooksRequest($contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1372,25 +1644,17 @@ function ($exception) { } /** - * Create request for operation 'postWebhook' + * Create request for operation 'listWebhooks' * - * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['postWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['listWebhooks'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postWebhookRequest($new_web_hook, string $contentType = self::CONTENT_TYPES['postWebhook'][0]) { - // PHP 8.0+ only - ApiHelper::validateRequiredParameters( - params: [ - 'new_web_hook' => $new_web_hook, - ], - methodName: 'postWebhook' - ); + public function listWebhooksRequest(string $contentType = self::CONTENT_TYPES['listWebhooks'][0]) { $resourcePath = '/api/v1/webhooks'; - $this->logger?->info('Request method: [POST], URL: ' . $resourcePath); + $this->logger?->info('Request method: [GET], URL: ' . $resourcePath); $queryParams = []; $headerParams = []; @@ -1403,16 +1667,6 @@ public function postWebhookRequest($new_web_hook, string $contentType = self::CO $multipart ); - // for model (json/xml) - if (isset($new_web_hook)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($new_web_hook)); - } else { - $httpBody = is_array($new_web_hook) ? json_encode($new_web_hook) : $new_web_hook; - } - } - // Authentication methods // Basic authentication @@ -1450,7 +1704,7 @@ public function postWebhookRequest($new_web_hook, string $contentType = self::CO $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, is_string($httpBody) ? $httpBody : (string)$httpBody @@ -1458,38 +1712,38 @@ public function postWebhookRequest($new_web_hook, string $contentType = self::CO } /** - * Operation putWebhook + * Operation updateWebhook * * Update Webhook * - * @param string $id {id} is a webhook ID. (required) + * @param int $id The webhook ID to update. (required) * @param \BhrSdk\Model\NewWebHook $new_web_hook new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateWebhook'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \BhrSdk\Model\WebHookResponse|\BhrSdk\Model\WebhookBadRequest|\BhrSdk\Model\Unauthorized1|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError + * @return \BhrSdk\Model\WebHookResponse|\BhrSdk\Model\UpdateWebhookBadRequestResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError */ - public function putWebhook($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['putWebhook'][0]) { - list($response) = $this->putWebhookWithHttpInfo($id, $new_web_hook, $contentType); + public function updateWebhook($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['updateWebhook'][0]) { + list($response) = $this->updateWebhookWithHttpInfo($id, $new_web_hook, $contentType); return $response; } /** - * Operation putWebhookWithHttpInfo + * Operation updateWebhookWithHttpInfo * * Update Webhook * - * @param string $id {id} is a webhook ID. (required) + * @param int $id The webhook ID to update. (required) * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateWebhook'] to see the possible values for this operation * * @throws \BhrSdk\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \BhrSdk\Model\WebHookResponse|\BhrSdk\Model\WebhookBadRequest|\BhrSdk\Model\Unauthorized1|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) + * @return array of \BhrSdk\Model\WebHookResponse|\BhrSdk\Model\UpdateWebhookBadRequestResponse|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError|\BhrSdk\Model\WebhookError, HTTP status code, HTTP response headers (array of strings) */ - public function putWebhookWithHttpInfo($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['putWebhook'][0]) { - $request = $this->putWebhookRequest($id, $new_web_hook, $contentType); + public function updateWebhookWithHttpInfo($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['updateWebhook'][0]) { + $request = $this->updateWebhookRequest($id, $new_web_hook, $contentType); $options = ApiHelper::createHttpClientOption($this->config); // Send request with retry support for timeout errors @@ -1506,13 +1760,13 @@ public function putWebhookWithHttpInfo($id, $new_web_hook, string $contentType = ); case 400: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\WebhookBadRequest', + '\BhrSdk\Model\UpdateWebhookBadRequestResponse', $request, $response, ); case 403: return ApiHelper::handleResponseWithDataType( - '\BhrSdk\Model\Unauthorized1', + '\BhrSdk\Model\WebhookError', $request, $response, ); @@ -1551,19 +1805,19 @@ public function putWebhookWithHttpInfo($id, $new_web_hook, string $contentType = } /** - * Operation putWebhookAsync + * Operation updateWebhookAsync * * Update Webhook * - * @param string $id {id} is a webhook ID. (required) + * @param int $id The webhook ID to update. (required) * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putWebhookAsync($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['putWebhook'][0]) { - return $this->putWebhookAsyncWithHttpInfo($id, $new_web_hook, $contentType) + public function updateWebhookAsync($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['updateWebhook'][0]) { + return $this->updateWebhookAsyncWithHttpInfo($id, $new_web_hook, $contentType) ->then( function ($response) { return $response[0]; @@ -1572,20 +1826,20 @@ function ($response) { } /** - * Operation putWebhookAsyncWithHttpInfo + * Operation updateWebhookAsyncWithHttpInfo * * Update Webhook * - * @param string $id {id} is a webhook ID. (required) + * @param int $id The webhook ID to update. (required) * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putWebhookAsyncWithHttpInfo($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['putWebhook'][0]) { + public function updateWebhookAsyncWithHttpInfo($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['updateWebhook'][0]) { $returnType = '\BhrSdk\Model\WebHookResponse'; - $request = $this->putWebhookRequest($id, $new_web_hook, $contentType); + $request = $this->updateWebhookRequest($id, $new_web_hook, $contentType); return ApiHelper::sendRequestWithRetriesAsync($this->logger, $this->client, $this->config, $request, ApiHelper::createHttpClientOption($this->config)) ->then( @@ -1619,23 +1873,23 @@ function ($exception) { } /** - * Create request for operation 'putWebhook' + * Create request for operation 'updateWebhook' * - * @param string $id {id} is a webhook ID. (required) + * @param int $id The webhook ID to update. (required) * @param \BhrSdk\Model\NewWebHook $new_web_hook (required) - * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['putWebhook'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::CONTENT_TYPES['updateWebhook'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putWebhookRequest($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['putWebhook'][0]) { + public function updateWebhookRequest($id, $new_web_hook, string $contentType = self::CONTENT_TYPES['updateWebhook'][0]) { // PHP 8.0+ only ApiHelper::validateRequiredParameters( params: [ 'id' => $id, 'new_web_hook' => $new_web_hook, ], - methodName: 'putWebhook' + methodName: 'updateWebhook' ); $resourcePath = '/api/v1/webhooks/{id}'; diff --git a/lib/Model/A05b6d5f564f805d688ff2c1e37c3990Request.php b/lib/Model/A05b6d5f564f805d688ff2c1e37c3990Request.php new file mode 100644 index 00000000..5a3e0fe1 --- /dev/null +++ b/lib/Model/A05b6d5f564f805d688ff2c1e37c3990Request.php @@ -0,0 +1,461 @@ +<?php +declare(strict_types=1); +/** + * A05b6d5f564f805d688ff2c1e37c3990Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * A05b6d5f564f805d688ff2c1e37c3990Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class A05b6d5f564f805d688ff2c1e37c3990Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'a05b6d5f564f805d688ff2c1e37c3990_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'template_id' => 'string', + 'assignee_employee_id' => 'string', + 'approval_stage' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'template_id' => null, + 'assignee_employee_id' => null, + 'approval_stage' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'template_id' => false, + 'assignee_employee_id' => false, + 'approval_stage' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_id' => 'templateId', + 'assignee_employee_id' => 'assigneeEmployeeId', + 'approval_stage' => 'approvalStage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_id' => 'setTemplateId', + 'assignee_employee_id' => 'setAssigneeEmployeeId', + 'approval_stage' => 'setApprovalStage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_id' => 'getTemplateId', + 'assignee_employee_id' => 'getAssigneeEmployeeId', + 'approval_stage' => 'getApprovalStage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('template_id', $data ?? [], null); + $this->setIfExists('assignee_employee_id', $data ?? [], null); + $this->setIfExists('approval_stage', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['template_id'] === null) { + $invalidProperties[] = "'template_id' can't be null"; + } + if ($this->container['assignee_employee_id'] === null) { + $invalidProperties[] = "'assignee_employee_id' can't be null"; + } + if ($this->container['approval_stage'] === null) { + $invalidProperties[] = "'approval_stage' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_id + * + * @return string + */ + public function getTemplateId() { + return $this->container['template_id']; + } + + /** + * Sets template_id + * + * @param string $template_id The ID of the template + * + * @return self + */ + public function setTemplateId($template_id) { + if (is_null($template_id)) { + throw new \InvalidArgumentException('non-nullable template_id cannot be null'); + } + $this->container['template_id'] = $template_id; + + return $this; + } + + /** + * Gets assignee_employee_id + * + * @return string + */ + public function getAssigneeEmployeeId() { + return $this->container['assignee_employee_id']; + } + + /** + * Sets assignee_employee_id + * + * @param string $assignee_employee_id The ID of the assignee employee + * + * @return self + */ + public function setAssigneeEmployeeId($assignee_employee_id) { + if (is_null($assignee_employee_id)) { + throw new \InvalidArgumentException('non-nullable assignee_employee_id cannot be null'); + } + $this->container['assignee_employee_id'] = $assignee_employee_id; + + return $this; + } + + /** + * Gets approval_stage + * + * @return int + */ + public function getApprovalStage() { + return $this->container['approval_stage']; + } + + /** + * Sets approval_stage + * + * @param int $approval_stage The current approval stage + * + * @return self + */ + public function setApprovalStage($approval_stage) { + if (is_null($approval_stage)) { + throw new \InvalidArgumentException('non-nullable approval_stage cannot be null'); + } + $this->container['approval_stage'] = $approval_stage; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.php b/lib/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.php new file mode 100644 index 00000000..94bcd07a --- /dev/null +++ b/lib/Model/Ad7871529b2a9c6612f8dd3c62192c08Request.php @@ -0,0 +1,460 @@ +<?php +declare(strict_types=1); +/** + * Ad7871529b2a9c6612f8dd3c62192c08Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Ad7871529b2a9c6612f8dd3c62192c08Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Ad7871529b2a9c6612f8dd3c62192c08Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ad7871529b2a9c6612f8dd3c62192c08_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'pay_band_type' => 'string', + 'pay_bands' => '\BhrSdk\Model\LevelsAndBandsPayBand[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'pay_band_type' => null, + 'pay_bands' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'pay_band_type' => false, + 'pay_bands' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pay_band_type' => 'payBandType', + 'pay_bands' => 'payBands' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pay_band_type' => 'setPayBandType', + 'pay_bands' => 'setPayBands' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pay_band_type' => 'getPayBandType', + 'pay_bands' => 'getPayBands' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const PAY_BAND_TYPE_PERCENT_RANGE = 'percentRange'; + public const PAY_BAND_TYPE_MIN_MID_MAX = 'minMidMax'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPayBandTypeAllowableValues() { + return [ + self::PAY_BAND_TYPE_PERCENT_RANGE, + self::PAY_BAND_TYPE_MIN_MID_MAX, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('pay_band_type', $data ?? [], null); + $this->setIfExists('pay_bands', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['pay_band_type'] === null) { + $invalidProperties[] = "'pay_band_type' can't be null"; + } + $allowedValues = $this->getPayBandTypeAllowableValues(); + if (!is_null($this->container['pay_band_type']) && !in_array($this->container['pay_band_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'pay_band_type', must be one of '%s'", + $this->container['pay_band_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['pay_bands'] === null) { + $invalidProperties[] = "'pay_bands' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets pay_band_type + * + * @return string + */ + public function getPayBandType() { + return $this->container['pay_band_type']; + } + + /** + * Sets pay_band_type + * + * @param string $pay_band_type pay_band_type + * + * @return self + */ + public function setPayBandType($pay_band_type) { + if (is_null($pay_band_type)) { + throw new \InvalidArgumentException('non-nullable pay_band_type cannot be null'); + } + $allowedValues = $this->getPayBandTypeAllowableValues(); + if (!in_array($pay_band_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'pay_band_type', must be one of '%s'", + $pay_band_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['pay_band_type'] = $pay_band_type; + + return $this; + } + + /** + * Gets pay_bands + * + * @return \BhrSdk\Model\LevelsAndBandsPayBand[] + */ + public function getPayBands() { + return $this->container['pay_bands']; + } + + /** + * Sets pay_bands + * + * @param \BhrSdk\Model\LevelsAndBandsPayBand[] $pay_bands pay_bands + * + * @return self + */ + public function setPayBands($pay_bands) { + if (is_null($pay_bands)) { + throw new \InvalidArgumentException('non-nullable pay_bands cannot be null'); + } + $this->container['pay_bands'] = $pay_bands; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddCycleAdminsResponse.php b/lib/Model/AddCycleAdminsResponse.php new file mode 100644 index 00000000..7f83804b --- /dev/null +++ b/lib/Model/AddCycleAdminsResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * AddCycleAdminsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AddCycleAdminsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AddCycleAdminsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AddCycleAdminsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'added' => '\BhrSdk\Model\AddCycleAdminsResponseAddedInner[]', + 'skipped' => '\BhrSdk\Model\AddCycleAdminsResponseSkippedInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'added' => null, + 'skipped' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'added' => false, + 'skipped' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'added' => 'added', + 'skipped' => 'skipped' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'added' => 'setAdded', + 'skipped' => 'setSkipped' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'added' => 'getAdded', + 'skipped' => 'getSkipped' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('added', $data ?? [], null); + $this->setIfExists('skipped', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets added + * + * @return \BhrSdk\Model\AddCycleAdminsResponseAddedInner[]|null + */ + public function getAdded() { + return $this->container['added']; + } + + /** + * Sets added + * + * @param \BhrSdk\Model\AddCycleAdminsResponseAddedInner[]|null $added added + * + * @return self + */ + public function setAdded($added) { + if (is_null($added)) { + throw new \InvalidArgumentException('non-nullable added cannot be null'); + } + $this->container['added'] = $added; + + return $this; + } + + /** + * Gets skipped + * + * @return \BhrSdk\Model\AddCycleAdminsResponseSkippedInner[]|null + */ + public function getSkipped() { + return $this->container['skipped']; + } + + /** + * Sets skipped + * + * @param \BhrSdk\Model\AddCycleAdminsResponseSkippedInner[]|null $skipped skipped + * + * @return self + */ + public function setSkipped($skipped) { + if (is_null($skipped)) { + throw new \InvalidArgumentException('non-nullable skipped cannot be null'); + } + $this->container['skipped'] = $skipped; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddCycleAdminsResponseAddedInner.php b/lib/Model/AddCycleAdminsResponseAddedInner.php new file mode 100644 index 00000000..341c8e11 --- /dev/null +++ b/lib/Model/AddCycleAdminsResponseAddedInner.php @@ -0,0 +1,432 @@ +<?php +declare(strict_types=1); +/** + * AddCycleAdminsResponseAddedInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AddCycleAdminsResponseAddedInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AddCycleAdminsResponseAddedInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AddCycleAdminsResponse_added_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'display_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'display_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'display_name' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'display_name' => 'displayName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'display_name' => 'setDisplayName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'display_name' => 'getDisplayName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('display_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name display_name + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + $this->openApiNullablesSetToNull['display_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['display_name'])) { + unset($nullablesSetToNull['display_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['display_name'] = $display_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddCycleAdminsResponseSkippedInner.php b/lib/Model/AddCycleAdminsResponseSkippedInner.php new file mode 100644 index 00000000..e0ea0e59 --- /dev/null +++ b/lib/Model/AddCycleAdminsResponseSkippedInner.php @@ -0,0 +1,462 @@ +<?php +declare(strict_types=1); +/** + * AddCycleAdminsResponseSkippedInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AddCycleAdminsResponseSkippedInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AddCycleAdminsResponseSkippedInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AddCycleAdminsResponse_skipped_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'reason' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'reason' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'reason' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'reason' => 'reason' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'reason' => 'setReason' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'reason' => 'getReason' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const REASON_ALREADY_ADMIN = 'ALREADY_ADMIN'; + public const REASON_EMPLOYEE_NOT_FOUND = 'EMPLOYEE_NOT_FOUND'; + public const REASON_FULL_ACCOUNT_ADMIN = 'FULL_ACCOUNT_ADMIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getReasonAllowableValues() { + return [ + self::REASON_ALREADY_ADMIN, + self::REASON_EMPLOYEE_NOT_FOUND, + self::REASON_FULL_ACCOUNT_ADMIN, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('reason', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getReasonAllowableValues(); + if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'reason', must be one of '%s'", + $this->container['reason'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets reason + * + * @return string|null + */ + public function getReason() { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason reason + * + * @return self + */ + public function setReason($reason) { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $allowedValues = $this->getReasonAllowableValues(); + if (!in_array($reason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'reason', must be one of '%s'", + $reason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['reason'] = $reason; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddTotalRewardsEmployeesRequest.php b/lib/Model/AddTotalRewardsEmployeesRequest.php new file mode 100644 index 00000000..a3bab81e --- /dev/null +++ b/lib/Model/AddTotalRewardsEmployeesRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * AddTotalRewardsEmployeesRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AddTotalRewardsEmployeesRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AddTotalRewardsEmployeesRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'add_total_rewards_employees_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return int[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[] $employee_ids List of employee IDs to add to Total Rewards. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AdjustTimeOffBalance.php b/lib/Model/AdjustTimeOffBalance.php index d43cd8f8..05277329 100644 --- a/lib/Model/AdjustTimeOffBalance.php +++ b/lib/Model/AdjustTimeOffBalance.php @@ -57,7 +57,7 @@ class AdjustTimeOffBalance implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openApiTypes = [ - 'date' => 'string', + 'date' => '\DateTime', 'time_off_type_id' => 'int', 'amount' => 'float', 'note' => 'string' @@ -71,7 +71,7 @@ class AdjustTimeOffBalance implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'date' => null, + 'date' => 'date', 'time_off_type_id' => null, 'amount' => null, 'note' => null @@ -309,7 +309,7 @@ public function valid() { /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { return $this->container['date']; @@ -318,7 +318,7 @@ public function getDate() { /** * Sets date * - * @param string $date The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD). + * @param \DateTime $date The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD). * * @return self */ diff --git a/lib/Model/AdjustTimeTrackingRequestSchema.php b/lib/Model/AdjustTimeTrackingRequestSchema.php index c755f424..68cb61fa 100644 --- a/lib/Model/AdjustTimeTrackingRequestSchema.php +++ b/lib/Model/AdjustTimeTrackingRequestSchema.php @@ -380,7 +380,7 @@ public function getProjectId() { /** * Sets project_id * - * @param int|null $project_id ID of the project associated with this time tracking record + * @param int|null $project_id project_id * * @return self */ @@ -411,7 +411,7 @@ public function getTaskId() { /** * Sets task_id * - * @param int|null $task_id ID of the task associated with this time tracking record + * @param int|null $task_id task_id * * @return self */ @@ -442,7 +442,7 @@ public function getShiftDifferentialId() { /** * Sets shift_differential_id * - * @param int|null $shift_differential_id ID of the shift differential associated with this time tracking record + * @param int|null $shift_differential_id shift_differential_id * * @return self */ @@ -473,7 +473,7 @@ public function getHolidayId() { /** * Sets holiday_id * - * @param int|null $holiday_id ID of the holiday associated with this time tracking record + * @param int|null $holiday_id holiday_id * * @return self */ diff --git a/lib/Model/AlertTemplateListResponse.php b/lib/Model/AlertTemplateListResponse.php new file mode 100644 index 00000000..524e46ba --- /dev/null +++ b/lib/Model/AlertTemplateListResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * AlertTemplateListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AlertTemplateListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AlertTemplateListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AlertTemplateListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'alerts' => '\BhrSdk\Model\AlertTemplateListResponseAlertsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'alerts' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'alerts' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'alerts' => 'alerts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'alerts' => 'setAlerts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'alerts' => 'getAlerts' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('alerts', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets alerts + * + * @return \BhrSdk\Model\AlertTemplateListResponseAlertsInner[]|null + */ + public function getAlerts() { + return $this->container['alerts']; + } + + /** + * Sets alerts + * + * @param \BhrSdk\Model\AlertTemplateListResponseAlertsInner[]|null $alerts alerts + * + * @return self + */ + public function setAlerts($alerts) { + if (is_null($alerts)) { + throw new \InvalidArgumentException('non-nullable alerts cannot be null'); + } + $this->container['alerts'] = $alerts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AlertTemplateListResponseAlertsInner.php b/lib/Model/AlertTemplateListResponseAlertsInner.php new file mode 100644 index 00000000..5fca05bd --- /dev/null +++ b/lib/Model/AlertTemplateListResponseAlertsInner.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * AlertTemplateListResponseAlertsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AlertTemplateListResponseAlertsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AlertTemplateListResponseAlertsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AlertTemplateListResponse_alerts_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'group_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'group_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'group_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'group_name' => 'groupName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'group_name' => 'setGroupName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'group_name' => 'getGroupName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('group_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Alert template ID (bambooAlertId) + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Display name of the alert + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets group_name + * + * @return string|null + */ + public function getGroupName() { + return $this->container['group_name']; + } + + /** + * Sets group_name + * + * @param string|null $group_name Category group the alert belongs to + * + * @return self + */ + public function setGroupName($group_name) { + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + } + $this->container['group_name'] = $group_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AlignmentOptionsResponse.php b/lib/Model/AlignmentOptionsResponse.php new file mode 100644 index 00000000..eb478b20 --- /dev/null +++ b/lib/Model/AlignmentOptionsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * AlignmentOptionsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AlignmentOptionsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AlignmentOptionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AlignmentOptionsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'aligns_with_options' => '\BhrSdk\Model\AlignmentOptionsResponseAlignsWithOptionsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'aligns_with_options' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'aligns_with_options' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'aligns_with_options' => 'alignsWithOptions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'aligns_with_options' => 'setAlignsWithOptions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'aligns_with_options' => 'getAlignsWithOptions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('aligns_with_options', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets aligns_with_options + * + * @return \BhrSdk\Model\AlignmentOptionsResponseAlignsWithOptionsInner[]|null + */ + public function getAlignsWithOptions() { + return $this->container['aligns_with_options']; + } + + /** + * Sets aligns_with_options + * + * @param \BhrSdk\Model\AlignmentOptionsResponseAlignsWithOptionsInner[]|null $aligns_with_options Array of goals available as alignment targets for the employee. + * + * @return self + */ + public function setAlignsWithOptions($aligns_with_options) { + if (is_null($aligns_with_options)) { + throw new \InvalidArgumentException('non-nullable aligns_with_options cannot be null'); + } + $this->container['aligns_with_options'] = $aligns_with_options; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AlignmentOptionsResponseAlignsWithOptionsInner.php b/lib/Model/AlignmentOptionsResponseAlignsWithOptionsInner.php new file mode 100644 index 00000000..a01862ad --- /dev/null +++ b/lib/Model/AlignmentOptionsResponseAlignsWithOptionsInner.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * AlignmentOptionsResponseAlignsWithOptionsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AlignmentOptionsResponseAlignsWithOptionsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AlignmentOptionsResponseAlignsWithOptionsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AlignmentOptionsResponse_alignsWithOptions_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'title' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'title' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'title' => 'title' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'title' => 'setTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The goal ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title The display title of the goal. + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicantStatus.php b/lib/Model/ApplicantStatus.php new file mode 100644 index 00000000..4ab51e46 --- /dev/null +++ b/lib/Model/ApplicantStatus.php @@ -0,0 +1,592 @@ +<?php +declare(strict_types=1); +/** + * ApplicantStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ApplicantStatus Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ApplicantStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ApplicantStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'code' => 'string', + 'name' => 'string', + 'translated_name' => 'string', + 'description' => 'string', + 'enabled' => 'bool', + 'manageable' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'code' => null, + 'name' => null, + 'translated_name' => null, + 'description' => null, + 'enabled' => null, + 'manageable' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'code' => true, + 'name' => false, + 'translated_name' => false, + 'description' => true, + 'enabled' => false, + 'manageable' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'code' => 'code', + 'name' => 'name', + 'translated_name' => 'translatedName', + 'description' => 'description', + 'enabled' => 'enabled', + 'manageable' => 'manageable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'code' => 'setCode', + 'name' => 'setName', + 'translated_name' => 'setTranslatedName', + 'description' => 'setDescription', + 'enabled' => 'setEnabled', + 'manageable' => 'setManageable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'code' => 'getCode', + 'name' => 'getName', + 'translated_name' => 'getTranslatedName', + 'description' => 'getDescription', + 'enabled' => 'getEnabled', + 'manageable' => 'getManageable' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('translated_name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('manageable', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Status ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + $this->openApiNullablesSetToNull['code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['code'])) { + unset($nullablesSetToNull['code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Status display name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets translated_name + * + * @return string|null + */ + public function getTranslatedName() { + return $this->container['translated_name']; + } + + /** + * Sets translated_name + * + * @param string|null $translated_name Translated display name + * + * @return self + */ + public function setTranslatedName($translated_name) { + if (is_null($translated_name)) { + throw new \InvalidArgumentException('non-nullable translated_name cannot be null'); + } + $this->container['translated_name'] = $translated_name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Whether the status is currently active and selectable + * + * @return self + */ + public function setEnabled($enabled) { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets manageable + * + * @return bool|null + */ + public function getManageable() { + return $this->container['manageable']; + } + + /** + * Sets manageable + * + * @param bool|null $manageable Whether the status can be managed (edited/deleted) by the company + * + * @return self + */ + public function setManageable($manageable) { + if (is_null($manageable)) { + throw new \InvalidArgumentException('non-nullable manageable cannot be null'); + } + $this->container['manageable'] = $manageable; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicationDetails.php b/lib/Model/ApplicationDetails.php index 195c785f..6cf9acca 100644 --- a/lib/Model/ApplicationDetails.php +++ b/lib/Model/ApplicationDetails.php @@ -61,9 +61,10 @@ class ApplicationDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'applied_date' => '\DateTime', 'status' => '\BhrSdk\Model\ApplicationDetailsStatus', 'rating' => 'int', - 'education' => 'object', 'resume_file_id' => 'int', 'cover_letter_file_id' => 'int', + 'attachment_count' => 'int', + 'attachments' => '\BhrSdk\Model\ApplicationDetailsAttachmentsInner[]', 'moved_to' => 'object[]', 'moved_from' => 'object[]', 'also_considered_for_count' => 'int', @@ -74,7 +75,7 @@ class ApplicationDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'email_count' => 'int', 'event_count' => 'int', 'questions_and_answers' => '\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInner[]', - 'application_references' => 'object[]', + 'application_references' => 'string', 'applicant' => '\BhrSdk\Model\ApplicationDetailsApplicant', 'job' => '\BhrSdk\Model\ApplicationDetailsJob' ]; @@ -91,9 +92,10 @@ class ApplicationDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'applied_date' => 'date-time', 'status' => null, 'rating' => null, - 'education' => null, 'resume_file_id' => null, 'cover_letter_file_id' => null, + 'attachment_count' => null, + 'attachments' => null, 'moved_to' => null, 'moved_from' => null, 'also_considered_for_count' => null, @@ -120,11 +122,12 @@ class ApplicationDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'applied_date' => false, 'status' => false, 'rating' => true, - 'education' => false, 'resume_file_id' => true, 'cover_letter_file_id' => true, - 'moved_to' => false, - 'moved_from' => false, + 'attachment_count' => true, + 'attachments' => true, + 'moved_to' => true, + 'moved_from' => true, 'also_considered_for_count' => false, 'duplicate_application_count' => false, 'referred_by' => true, @@ -133,7 +136,7 @@ class ApplicationDetails implements ModelInterface, ArrayAccess, \JsonSerializab 'email_count' => false, 'event_count' => false, 'questions_and_answers' => false, - 'application_references' => false, + 'application_references' => true, 'applicant' => false, 'job' => false ]; @@ -224,9 +227,10 @@ public function isNullableSetToNull(string $property): bool { 'applied_date' => 'appliedDate', 'status' => 'status', 'rating' => 'rating', - 'education' => 'education', 'resume_file_id' => 'resumeFileId', 'cover_letter_file_id' => 'coverLetterFileId', + 'attachment_count' => 'attachmentCount', + 'attachments' => 'attachments', 'moved_to' => 'movedTo', 'moved_from' => 'movedFrom', 'also_considered_for_count' => 'alsoConsideredForCount', @@ -252,9 +256,10 @@ public function isNullableSetToNull(string $property): bool { 'applied_date' => 'setAppliedDate', 'status' => 'setStatus', 'rating' => 'setRating', - 'education' => 'setEducation', 'resume_file_id' => 'setResumeFileId', 'cover_letter_file_id' => 'setCoverLetterFileId', + 'attachment_count' => 'setAttachmentCount', + 'attachments' => 'setAttachments', 'moved_to' => 'setMovedTo', 'moved_from' => 'setMovedFrom', 'also_considered_for_count' => 'setAlsoConsideredForCount', @@ -280,9 +285,10 @@ public function isNullableSetToNull(string $property): bool { 'applied_date' => 'getAppliedDate', 'status' => 'getStatus', 'rating' => 'getRating', - 'education' => 'getEducation', 'resume_file_id' => 'getResumeFileId', 'cover_letter_file_id' => 'getCoverLetterFileId', + 'attachment_count' => 'getAttachmentCount', + 'attachments' => 'getAttachments', 'moved_to' => 'getMovedTo', 'moved_from' => 'getMovedFrom', 'also_considered_for_count' => 'getAlsoConsideredForCount', @@ -353,9 +359,10 @@ public function __construct(?array $data = null) { $this->setIfExists('applied_date', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('rating', $data ?? [], null); - $this->setIfExists('education', $data ?? [], null); $this->setIfExists('resume_file_id', $data ?? [], null); $this->setIfExists('cover_letter_file_id', $data ?? [], null); + $this->setIfExists('attachment_count', $data ?? [], null); + $this->setIfExists('attachments', $data ?? [], null); $this->setIfExists('moved_to', $data ?? [], null); $this->setIfExists('moved_from', $data ?? [], null); $this->setIfExists('also_considered_for_count', $data ?? [], null); @@ -446,7 +453,7 @@ public function getAppliedDate() { /** * Sets applied_date * - * @param \DateTime|null $applied_date Date when the application was submitted + * @param \DateTime|null $applied_date ISO 8601 datetime when the application was submitted * * @return self */ @@ -496,7 +503,7 @@ public function getRating() { /** * Sets rating * - * @param int|null $rating Applicant rating + * @param int|null $rating rating * * @return self */ @@ -515,31 +522,6 @@ public function setRating($rating) { return $this; } - /** - * Gets education - * - * @return object|null - */ - public function getEducation() { - return $this->container['education']; - } - - /** - * Sets education - * - * @param object|null $education Applicant education information - * - * @return self - */ - public function setEducation($education) { - if (is_null($education)) { - throw new \InvalidArgumentException('non-nullable education cannot be null'); - } - $this->container['education'] = $education; - - return $this; - } - /** * Gets resume_file_id * @@ -552,7 +534,7 @@ public function getResumeFileId() { /** * Sets resume_file_id * - * @param int|null $resume_file_id ID of the resume file + * @param int|null $resume_file_id resume_file_id * * @return self */ @@ -583,7 +565,7 @@ public function getCoverLetterFileId() { /** * Sets cover_letter_file_id * - * @param int|null $cover_letter_file_id ID of the cover letter file + * @param int|null $cover_letter_file_id cover_letter_file_id * * @return self */ @@ -602,6 +584,68 @@ public function setCoverLetterFileId($cover_letter_file_id) { return $this; } + /** + * Gets attachment_count + * + * @return int|null + */ + public function getAttachmentCount() { + return $this->container['attachment_count']; + } + + /** + * Sets attachment_count + * + * @param int|null $attachment_count attachment_count + * + * @return self + */ + public function setAttachmentCount($attachment_count) { + if (is_null($attachment_count)) { + $this->openApiNullablesSetToNull['attachment_count'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['attachment_count'])) { + unset($nullablesSetToNull['attachment_count']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['attachment_count'] = $attachment_count; + + return $this; + } + + /** + * Gets attachments + * + * @return \BhrSdk\Model\ApplicationDetailsAttachmentsInner[]|null + */ + public function getAttachments() { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param \BhrSdk\Model\ApplicationDetailsAttachmentsInner[]|null $attachments attachments + * + * @return self + */ + public function setAttachments($attachments) { + if (is_null($attachments)) { + $this->openApiNullablesSetToNull['attachments'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['attachments'])) { + unset($nullablesSetToNull['attachments']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['attachments'] = $attachments; + + return $this; + } + /** * Gets moved_to * @@ -614,13 +658,19 @@ public function getMovedTo() { /** * Sets moved_to * - * @param object[]|null $moved_to Positions the applicant was moved to + * @param object[]|null $moved_to moved_to * * @return self */ public function setMovedTo($moved_to) { if (is_null($moved_to)) { - throw new \InvalidArgumentException('non-nullable moved_to cannot be null'); + $this->openApiNullablesSetToNull['moved_to'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['moved_to'])) { + unset($nullablesSetToNull['moved_to']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['moved_to'] = $moved_to; @@ -639,13 +689,19 @@ public function getMovedFrom() { /** * Sets moved_from * - * @param object[]|null $moved_from Positions the applicant was moved from + * @param object[]|null $moved_from moved_from * * @return self */ public function setMovedFrom($moved_from) { if (is_null($moved_from)) { - throw new \InvalidArgumentException('non-nullable moved_from cannot be null'); + $this->openApiNullablesSetToNull['moved_from'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['moved_from'])) { + unset($nullablesSetToNull['moved_from']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['moved_from'] = $moved_from; @@ -664,7 +720,7 @@ public function getAlsoConsideredForCount() { /** * Sets also_considered_for_count * - * @param int|null $also_considered_for_count Count of other positions this applicant is being considered for + * @param int|null $also_considered_for_count Count of other job openings this applicant is also being considered for * * @return self */ @@ -689,7 +745,7 @@ public function getDuplicateApplicationCount() { /** * Sets duplicate_application_count * - * @param int|null $duplicate_application_count Count of duplicate applications + * @param int|null $duplicate_application_count Count of duplicate applications from this applicant * * @return self */ @@ -714,7 +770,7 @@ public function getReferredBy() { /** * Sets referred_by * - * @param string|null $referred_by Who referred this applicant + * @param string|null $referred_by referred_by * * @return self */ @@ -745,7 +801,7 @@ public function getDesiredSalary() { /** * Sets desired_salary * - * @param string|null $desired_salary Applicant's desired salary + * @param string|null $desired_salary desired_salary * * @return self */ @@ -801,7 +857,7 @@ public function getEmailCount() { /** * Sets email_count * - * @param int|null $email_count Number of emails for this application + * @param int|null $email_count Number of emails sent for this application * * @return self */ @@ -826,7 +882,7 @@ public function getEventCount() { /** * Sets event_count * - * @param int|null $event_count Number of events for this application + * @param int|null $event_count Number of events associated with this application * * @return self */ @@ -851,7 +907,7 @@ public function getQuestionsAndAnswers() { /** * Sets questions_and_answers * - * @param \BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInner[]|null $questions_and_answers Custom questions and answers + * @param \BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInner[]|null $questions_and_answers List of custom application questions and the applicant's answers * * @return self */ @@ -867,7 +923,7 @@ public function setQuestionsAndAnswers($questions_and_answers) { /** * Gets application_references * - * @return object[]|null + * @return string|null */ public function getApplicationReferences() { return $this->container['application_references']; @@ -876,13 +932,19 @@ public function getApplicationReferences() { /** * Sets application_references * - * @param object[]|null $application_references Application references + * @param string|null $application_references application_references * * @return self */ public function setApplicationReferences($application_references) { if (is_null($application_references)) { - throw new \InvalidArgumentException('non-nullable application_references cannot be null'); + $this->openApiNullablesSetToNull['application_references'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['application_references'])) { + unset($nullablesSetToNull['application_references']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['application_references'] = $application_references; diff --git a/lib/Model/ApplicationDetailsApplicant.php b/lib/Model/ApplicationDetailsApplicant.php index 49772cf7..cfaf1a85 100644 --- a/lib/Model/ApplicationDetailsApplicant.php +++ b/lib/Model/ApplicationDetailsApplicant.php @@ -36,7 +36,7 @@ * ApplicationDetailsApplicant Class Doc Comment * * @category Class - * @description Applicant details + * @description Information about the applicant * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -62,8 +62,15 @@ class ApplicationDetailsApplicant implements ModelInterface, ArrayAccess, \JsonS 'first_name' => 'string', 'last_name' => 'string', 'email' => 'string', - 'phone' => 'string', - 'address' => 'object' + 'phone_number' => 'string', + 'avatar' => 'string', + 'source' => 'string', + 'twitter_username' => 'string', + 'address' => 'object', + 'linkedin_url' => 'string', + 'website_url' => 'string', + 'available_start_date' => '\DateTime', + 'education' => 'object' ]; /** @@ -78,8 +85,15 @@ class ApplicationDetailsApplicant implements ModelInterface, ArrayAccess, \JsonS 'first_name' => null, 'last_name' => null, 'email' => null, - 'phone' => null, - 'address' => null + 'phone_number' => null, + 'avatar' => null, + 'source' => null, + 'twitter_username' => null, + 'address' => null, + 'linkedin_url' => null, + 'website_url' => null, + 'available_start_date' => 'date', + 'education' => null ]; /** @@ -93,8 +107,15 @@ class ApplicationDetailsApplicant implements ModelInterface, ArrayAccess, \JsonS 'first_name' => false, 'last_name' => false, 'email' => false, - 'phone' => false, - 'address' => true + 'phone_number' => true, + 'avatar' => true, + 'source' => true, + 'twitter_username' => true, + 'address' => true, + 'linkedin_url' => true, + 'website_url' => true, + 'available_start_date' => true, + 'education' => true ]; /** @@ -183,8 +204,15 @@ public function isNullableSetToNull(string $property): bool { 'first_name' => 'firstName', 'last_name' => 'lastName', 'email' => 'email', - 'phone' => 'phone', - 'address' => 'address' + 'phone_number' => 'phoneNumber', + 'avatar' => 'avatar', + 'source' => 'source', + 'twitter_username' => 'twitterUsername', + 'address' => 'address', + 'linkedin_url' => 'linkedinUrl', + 'website_url' => 'websiteUrl', + 'available_start_date' => 'availableStartDate', + 'education' => 'education' ]; /** @@ -197,8 +225,15 @@ public function isNullableSetToNull(string $property): bool { 'first_name' => 'setFirstName', 'last_name' => 'setLastName', 'email' => 'setEmail', - 'phone' => 'setPhone', - 'address' => 'setAddress' + 'phone_number' => 'setPhoneNumber', + 'avatar' => 'setAvatar', + 'source' => 'setSource', + 'twitter_username' => 'setTwitterUsername', + 'address' => 'setAddress', + 'linkedin_url' => 'setLinkedinUrl', + 'website_url' => 'setWebsiteUrl', + 'available_start_date' => 'setAvailableStartDate', + 'education' => 'setEducation' ]; /** @@ -211,8 +246,15 @@ public function isNullableSetToNull(string $property): bool { 'first_name' => 'getFirstName', 'last_name' => 'getLastName', 'email' => 'getEmail', - 'phone' => 'getPhone', - 'address' => 'getAddress' + 'phone_number' => 'getPhoneNumber', + 'avatar' => 'getAvatar', + 'source' => 'getSource', + 'twitter_username' => 'getTwitterUsername', + 'address' => 'getAddress', + 'linkedin_url' => 'getLinkedinUrl', + 'website_url' => 'getWebsiteUrl', + 'available_start_date' => 'getAvailableStartDate', + 'education' => 'getEducation' ]; /** @@ -270,8 +312,15 @@ public function __construct(?array $data = null) { $this->setIfExists('first_name', $data ?? [], null); $this->setIfExists('last_name', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); - $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('avatar', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('twitter_username', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('linkedin_url', $data ?? [], null); + $this->setIfExists('website_url', $data ?? [], null); + $this->setIfExists('available_start_date', $data ?? [], null); + $this->setIfExists('education', $data ?? [], null); } /** @@ -413,26 +462,125 @@ public function setEmail($email) { } /** - * Gets phone + * Gets phone_number * * @return string|null */ - public function getPhone() { - return $this->container['phone']; + public function getPhoneNumber() { + return $this->container['phone_number']; } /** - * Sets phone + * Sets phone_number * - * @param string|null $phone Phone number + * @param string|null $phone_number phone_number * * @return self */ - public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); + public function setPhoneNumber($phone_number) { + if (is_null($phone_number)) { + $this->openApiNullablesSetToNull['phone_number'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['phone_number'])) { + unset($nullablesSetToNull['phone_number']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets avatar + * + * @return string|null + */ + public function getAvatar() { + return $this->container['avatar']; + } + + /** + * Sets avatar + * + * @param string|null $avatar avatar + * + * @return self + */ + public function setAvatar($avatar) { + if (is_null($avatar)) { + $this->openApiNullablesSetToNull['avatar'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['avatar'])) { + unset($nullablesSetToNull['avatar']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['avatar'] = $avatar; + + return $this; + } + + /** + * Gets source + * + * @return string|null + */ + public function getSource() { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source source + * + * @return self + */ + public function setSource($source) { + if (is_null($source)) { + $this->openApiNullablesSetToNull['source'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source'])) { + unset($nullablesSetToNull['source']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets twitter_username + * + * @return string|null + */ + public function getTwitterUsername() { + return $this->container['twitter_username']; + } + + /** + * Sets twitter_username + * + * @param string|null $twitter_username twitter_username + * + * @return self + */ + public function setTwitterUsername($twitter_username) { + if (is_null($twitter_username)) { + $this->openApiNullablesSetToNull['twitter_username'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['twitter_username'])) { + unset($nullablesSetToNull['twitter_username']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } - $this->container['phone'] = $phone; + $this->container['twitter_username'] = $twitter_username; return $this; } @@ -449,7 +597,7 @@ public function getAddress() { /** * Sets address * - * @param object|null $address Address information + * @param object|null $address address * * @return self */ @@ -467,6 +615,130 @@ public function setAddress($address) { return $this; } + + /** + * Gets linkedin_url + * + * @return string|null + */ + public function getLinkedinUrl() { + return $this->container['linkedin_url']; + } + + /** + * Sets linkedin_url + * + * @param string|null $linkedin_url linkedin_url + * + * @return self + */ + public function setLinkedinUrl($linkedin_url) { + if (is_null($linkedin_url)) { + $this->openApiNullablesSetToNull['linkedin_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['linkedin_url'])) { + unset($nullablesSetToNull['linkedin_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['linkedin_url'] = $linkedin_url; + + return $this; + } + + /** + * Gets website_url + * + * @return string|null + */ + public function getWebsiteUrl() { + return $this->container['website_url']; + } + + /** + * Sets website_url + * + * @param string|null $website_url website_url + * + * @return self + */ + public function setWebsiteUrl($website_url) { + if (is_null($website_url)) { + $this->openApiNullablesSetToNull['website_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['website_url'])) { + unset($nullablesSetToNull['website_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['website_url'] = $website_url; + + return $this; + } + + /** + * Gets available_start_date + * + * @return \DateTime|null + */ + public function getAvailableStartDate() { + return $this->container['available_start_date']; + } + + /** + * Sets available_start_date + * + * @param \DateTime|null $available_start_date available_start_date + * + * @return self + */ + public function setAvailableStartDate($available_start_date) { + if (is_null($available_start_date)) { + $this->openApiNullablesSetToNull['available_start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['available_start_date'])) { + unset($nullablesSetToNull['available_start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['available_start_date'] = $available_start_date; + + return $this; + } + + /** + * Gets education + * + * @return object|null + */ + public function getEducation() { + return $this->container['education']; + } + + /** + * Sets education + * + * @param object|null $education education + * + * @return self + */ + public function setEducation($education) { + if (is_null($education)) { + $this->openApiNullablesSetToNull['education'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['education'])) { + unset($nullablesSetToNull['education']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['education'] = $education; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ApplicationDetailsAttachmentsInner.php b/lib/Model/ApplicationDetailsAttachmentsInner.php new file mode 100644 index 00000000..93739975 --- /dev/null +++ b/lib/Model/ApplicationDetailsAttachmentsInner.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * ApplicationDetailsAttachmentsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ApplicationDetailsAttachmentsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ApplicationDetailsAttachmentsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ApplicationDetails_attachments_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'file_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'file_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'file_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'file_url' => 'fileUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'file_url' => 'setFileUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'file_url' => 'getFileUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('file_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Attachment ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Attachment file name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets file_url + * + * @return string|null + */ + public function getFileUrl() { + return $this->container['file_url']; + } + + /** + * Sets file_url + * + * @param string|null $file_url URL to download the attachment + * + * @return self + */ + public function setFileUrl($file_url) { + if (is_null($file_url)) { + throw new \InvalidArgumentException('non-nullable file_url cannot be null'); + } + $this->container['file_url'] = $file_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicationDetailsJob.php b/lib/Model/ApplicationDetailsJob.php index 77a9ce39..0abd7da5 100644 --- a/lib/Model/ApplicationDetailsJob.php +++ b/lib/Model/ApplicationDetailsJob.php @@ -36,7 +36,7 @@ * ApplicationDetailsJob Class Doc Comment * * @category Class - * @description Job details + * @description Information about the job position applied to * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -59,9 +59,7 @@ class ApplicationDetailsJob implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openApiTypes = [ 'id' => 'int', - 'title' => 'string', - 'department' => 'object', - 'location' => 'object', + 'title' => '\BhrSdk\Model\ApplicationDetailsJobTitle', 'hiring_lead' => 'object' ]; @@ -75,8 +73,6 @@ class ApplicationDetailsJob implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openApiFormats = [ 'id' => null, 'title' => null, - 'department' => null, - 'location' => null, 'hiring_lead' => null ]; @@ -89,9 +85,7 @@ class ApplicationDetailsJob implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openApiNullables = [ 'id' => false, 'title' => false, - 'department' => false, - 'location' => false, - 'hiring_lead' => false + 'hiring_lead' => true ]; /** @@ -178,8 +172,6 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'id' => 'id', 'title' => 'title', - 'department' => 'department', - 'location' => 'location', 'hiring_lead' => 'hiringLead' ]; @@ -191,8 +183,6 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'id' => 'setId', 'title' => 'setTitle', - 'department' => 'setDepartment', - 'location' => 'setLocation', 'hiring_lead' => 'setHiringLead' ]; @@ -204,8 +194,6 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'id' => 'getId', 'title' => 'getTitle', - 'department' => 'getDepartment', - 'location' => 'getLocation', 'hiring_lead' => 'getHiringLead' ]; @@ -262,8 +250,6 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('location', $data ?? [], null); $this->setIfExists('hiring_lead', $data ?? [], null); } @@ -317,7 +303,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Job ID + * @param int|null $id Job opening ID * * @return self */ @@ -333,7 +319,7 @@ public function setId($id) { /** * Gets title * - * @return string|null + * @return \BhrSdk\Model\ApplicationDetailsJobTitle|null */ public function getTitle() { return $this->container['title']; @@ -342,7 +328,7 @@ public function getTitle() { /** * Sets title * - * @param string|null $title Job title + * @param \BhrSdk\Model\ApplicationDetailsJobTitle|null $title title * * @return self */ @@ -355,56 +341,6 @@ public function setTitle($title) { return $this; } - /** - * Gets department - * - * @return object|null - */ - public function getDepartment() { - return $this->container['department']; - } - - /** - * Sets department - * - * @param object|null $department Department information - * - * @return self - */ - public function setDepartment($department) { - if (is_null($department)) { - throw new \InvalidArgumentException('non-nullable department cannot be null'); - } - $this->container['department'] = $department; - - return $this; - } - - /** - * Gets location - * - * @return object|null - */ - public function getLocation() { - return $this->container['location']; - } - - /** - * Sets location - * - * @param object|null $location Location information - * - * @return self - */ - public function setLocation($location) { - if (is_null($location)) { - throw new \InvalidArgumentException('non-nullable location cannot be null'); - } - $this->container['location'] = $location; - - return $this; - } - /** * Gets hiring_lead * @@ -417,13 +353,19 @@ public function getHiringLead() { /** * Sets hiring_lead * - * @param object|null $hiring_lead Hiring lead information + * @param object|null $hiring_lead hiring_lead * * @return self */ public function setHiringLead($hiring_lead) { if (is_null($hiring_lead)) { - throw new \InvalidArgumentException('non-nullable hiring_lead cannot be null'); + $this->openApiNullablesSetToNull['hiring_lead'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hiring_lead'])) { + unset($nullablesSetToNull['hiring_lead']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['hiring_lead'] = $hiring_lead; diff --git a/lib/Model/ApplicationDetailsJobTitle.php b/lib/Model/ApplicationDetailsJobTitle.php new file mode 100644 index 00000000..51e37427 --- /dev/null +++ b/lib/Model/ApplicationDetailsJobTitle.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * ApplicationDetailsJobTitle + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ApplicationDetailsJobTitle Class Doc Comment + * + * @category Class + * @description Job title + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ApplicationDetailsJobTitle implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ApplicationDetails_job_title'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Title text + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicationDetailsQuestionsAndAnswersInner.php b/lib/Model/ApplicationDetailsQuestionsAndAnswersInner.php index b990badf..90a07296 100644 --- a/lib/Model/ApplicationDetailsQuestionsAndAnswersInner.php +++ b/lib/Model/ApplicationDetailsQuestionsAndAnswersInner.php @@ -58,7 +58,12 @@ class ApplicationDetailsQuestionsAndAnswersInner implements ModelInterface, Arra */ protected static $openApiTypes = [ 'question' => '\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInnerQuestion', - 'answer' => '\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInnerAnswer' + 'answer' => '\BhrSdk\Model\ApplicationDetailsQuestionsAndAnswersInnerAnswer', + 'has_revisions' => 'bool', + 'is_archived' => 'bool', + 'archived_date' => '\DateTime', + 'edited_date' => '\DateTime', + 'edited_end_date' => '\DateTime' ]; /** @@ -70,7 +75,12 @@ class ApplicationDetailsQuestionsAndAnswersInner implements ModelInterface, Arra */ protected static $openApiFormats = [ 'question' => null, - 'answer' => null + 'answer' => null, + 'has_revisions' => null, + 'is_archived' => null, + 'archived_date' => 'date-time', + 'edited_date' => 'date-time', + 'edited_end_date' => 'date-time' ]; /** @@ -81,7 +91,12 @@ class ApplicationDetailsQuestionsAndAnswersInner implements ModelInterface, Arra */ protected static array $openApiNullables = [ 'question' => false, - 'answer' => false + 'answer' => false, + 'has_revisions' => true, + 'is_archived' => true, + 'archived_date' => true, + 'edited_date' => true, + 'edited_end_date' => true ]; /** @@ -167,7 +182,12 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'question' => 'question', - 'answer' => 'answer' + 'answer' => 'answer', + 'has_revisions' => 'hasRevisions', + 'is_archived' => 'isArchived', + 'archived_date' => 'archivedDate', + 'edited_date' => 'editedDate', + 'edited_end_date' => 'editedEndDate' ]; /** @@ -177,7 +197,12 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'question' => 'setQuestion', - 'answer' => 'setAnswer' + 'answer' => 'setAnswer', + 'has_revisions' => 'setHasRevisions', + 'is_archived' => 'setIsArchived', + 'archived_date' => 'setArchivedDate', + 'edited_date' => 'setEditedDate', + 'edited_end_date' => 'setEditedEndDate' ]; /** @@ -187,7 +212,12 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'question' => 'getQuestion', - 'answer' => 'getAnswer' + 'answer' => 'getAnswer', + 'has_revisions' => 'getHasRevisions', + 'is_archived' => 'getIsArchived', + 'archived_date' => 'getArchivedDate', + 'edited_date' => 'getEditedDate', + 'edited_end_date' => 'getEditedEndDate' ]; /** @@ -243,6 +273,11 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('question', $data ?? [], null); $this->setIfExists('answer', $data ?? [], null); + $this->setIfExists('has_revisions', $data ?? [], null); + $this->setIfExists('is_archived', $data ?? [], null); + $this->setIfExists('archived_date', $data ?? [], null); + $this->setIfExists('edited_date', $data ?? [], null); + $this->setIfExists('edited_end_date', $data ?? [], null); } /** @@ -332,6 +367,161 @@ public function setAnswer($answer) { return $this; } + + /** + * Gets has_revisions + * + * @return bool|null + */ + public function getHasRevisions() { + return $this->container['has_revisions']; + } + + /** + * Sets has_revisions + * + * @param bool|null $has_revisions has_revisions + * + * @return self + */ + public function setHasRevisions($has_revisions) { + if (is_null($has_revisions)) { + $this->openApiNullablesSetToNull['has_revisions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['has_revisions'])) { + unset($nullablesSetToNull['has_revisions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['has_revisions'] = $has_revisions; + + return $this; + } + + /** + * Gets is_archived + * + * @return bool|null + */ + public function getIsArchived() { + return $this->container['is_archived']; + } + + /** + * Sets is_archived + * + * @param bool|null $is_archived is_archived + * + * @return self + */ + public function setIsArchived($is_archived) { + if (is_null($is_archived)) { + $this->openApiNullablesSetToNull['is_archived'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_archived'])) { + unset($nullablesSetToNull['is_archived']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['is_archived'] = $is_archived; + + return $this; + } + + /** + * Gets archived_date + * + * @return \DateTime|null + */ + public function getArchivedDate() { + return $this->container['archived_date']; + } + + /** + * Sets archived_date + * + * @param \DateTime|null $archived_date archived_date + * + * @return self + */ + public function setArchivedDate($archived_date) { + if (is_null($archived_date)) { + $this->openApiNullablesSetToNull['archived_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['archived_date'])) { + unset($nullablesSetToNull['archived_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['archived_date'] = $archived_date; + + return $this; + } + + /** + * Gets edited_date + * + * @return \DateTime|null + */ + public function getEditedDate() { + return $this->container['edited_date']; + } + + /** + * Sets edited_date + * + * @param \DateTime|null $edited_date edited_date + * + * @return self + */ + public function setEditedDate($edited_date) { + if (is_null($edited_date)) { + $this->openApiNullablesSetToNull['edited_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['edited_date'])) { + unset($nullablesSetToNull['edited_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['edited_date'] = $edited_date; + + return $this; + } + + /** + * Gets edited_end_date + * + * @return \DateTime|null + */ + public function getEditedEndDate() { + return $this->container['edited_end_date']; + } + + /** + * Sets edited_end_date + * + * @param \DateTime|null $edited_end_date edited_end_date + * + * @return self + */ + public function setEditedEndDate($edited_end_date) { + if (is_null($edited_end_date)) { + $this->openApiNullablesSetToNull['edited_end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['edited_end_date'])) { + unset($nullablesSetToNull['edited_end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['edited_end_date'] = $edited_end_date; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ApplicationDetailsStatus.php b/lib/Model/ApplicationDetailsStatus.php index fbd7de8c..2aea49e7 100644 --- a/lib/Model/ApplicationDetailsStatus.php +++ b/lib/Model/ApplicationDetailsStatus.php @@ -60,7 +60,7 @@ class ApplicationDetailsStatus implements ModelInterface, ArrayAccess, \JsonSeri 'id' => 'int', 'label' => 'string', 'date_changed' => '\DateTime', - 'changed_by_user' => 'int' + 'changed_by_user' => 'object' ]; /** @@ -87,7 +87,7 @@ class ApplicationDetailsStatus implements ModelInterface, ArrayAccess, \JsonSeri 'id' => false, 'label' => false, 'date_changed' => false, - 'changed_by_user' => false + 'changed_by_user' => true ]; /** @@ -359,7 +359,7 @@ public function getDateChanged() { /** * Sets date_changed * - * @param \DateTime|null $date_changed Date when status was last changed + * @param \DateTime|null $date_changed ISO 8601 datetime when status was last changed * * @return self */ @@ -375,7 +375,7 @@ public function setDateChanged($date_changed) { /** * Gets changed_by_user * - * @return int|null + * @return object|null */ public function getChangedByUser() { return $this->container['changed_by_user']; @@ -384,13 +384,19 @@ public function getChangedByUser() { /** * Sets changed_by_user * - * @param int|null $changed_by_user ID of the user who changed the status + * @param object|null $changed_by_user changed_by_user * * @return self */ public function setChangedByUser($changed_by_user) { if (is_null($changed_by_user)) { - throw new \InvalidArgumentException('non-nullable changed_by_user cannot be null'); + $this->openApiNullablesSetToNull['changed_by_user'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['changed_by_user'])) { + unset($nullablesSetToNull['changed_by_user']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['changed_by_user'] = $changed_by_user; diff --git a/lib/Model/ApplicationsList.php b/lib/Model/ApplicationsList.php index 0be52373..f94d2fbf 100644 --- a/lib/Model/ApplicationsList.php +++ b/lib/Model/ApplicationsList.php @@ -59,7 +59,7 @@ class ApplicationsList implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openApiTypes = [ 'pagination_complete' => 'bool', 'next_page_url' => 'string', - 'applications' => '\BhrSdk\Model\ApplicationsListApplications' + 'applications' => '\BhrSdk\Model\ApplicationsListApplicationsInner[]' ]; /** @@ -327,7 +327,7 @@ public function getNextPageUrl() { /** * Sets next_page_url * - * @param string|null $next_page_url URL to fetch the next page of results, or null if there are no more results + * @param string|null $next_page_url next_page_url * * @return self */ @@ -349,7 +349,7 @@ public function setNextPageUrl($next_page_url) { /** * Gets applications * - * @return \BhrSdk\Model\ApplicationsListApplications|null + * @return \BhrSdk\Model\ApplicationsListApplicationsInner[]|null */ public function getApplications() { return $this->container['applications']; @@ -358,7 +358,7 @@ public function getApplications() { /** * Sets applications * - * @param \BhrSdk\Model\ApplicationsListApplications|null $applications applications + * @param \BhrSdk\Model\ApplicationsListApplicationsInner[]|null $applications List of application objects * * @return self */ diff --git a/lib/Model/ApplicationsListApplicationsItemsInner.php b/lib/Model/ApplicationsListApplicationsInner.php similarity index 90% rename from lib/Model/ApplicationsListApplicationsItemsInner.php rename to lib/Model/ApplicationsListApplicationsInner.php index 01a3decd..e216d4ab 100644 --- a/lib/Model/ApplicationsListApplicationsItemsInner.php +++ b/lib/Model/ApplicationsListApplicationsInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ApplicationsListApplicationsItemsInner + * ApplicationsListApplicationsInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * ApplicationsListApplicationsItemsInner Class Doc Comment + * ApplicationsListApplicationsInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ApplicationsListApplicationsItemsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class ApplicationsListApplicationsInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class ApplicationsListApplicationsItemsInner implements ModelInterface, ArrayAcc * * @var string */ - protected static $openApiModelName = 'ApplicationsList_applications_items_inner'; + protected static $openApiModelName = 'ApplicationsList_applications_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,10 +59,10 @@ class ApplicationsListApplicationsItemsInner implements ModelInterface, ArrayAcc protected static $openApiTypes = [ 'id' => 'int', 'applied_date' => '\DateTime', - 'status' => '\BhrSdk\Model\ApplicationsListApplicationsItemsInnerStatus', + 'status' => '\BhrSdk\Model\ApplicationsListApplicationsInnerStatus', 'rating' => 'int', - 'applicant' => '\BhrSdk\Model\ApplicationsListApplicationsItemsInnerApplicant', - 'job' => '\BhrSdk\Model\ApplicationsListApplicationsItemsInnerJob' + 'applicant' => '\BhrSdk\Model\ApplicationsListApplicationsInnerApplicant', + 'job' => '\BhrSdk\Model\ApplicationsListApplicationsInnerJob' ]; /** @@ -74,7 +74,7 @@ class ApplicationsListApplicationsItemsInner implements ModelInterface, ArrayAcc */ protected static $openApiFormats = [ 'id' => null, - 'applied_date' => 'date', + 'applied_date' => 'date-time', 'status' => null, 'rating' => null, 'applicant' => null, @@ -348,7 +348,7 @@ public function getAppliedDate() { /** * Sets applied_date * - * @param \DateTime|null $applied_date Date when the application was submitted (yyyy-mm-dd) + * @param \DateTime|null $applied_date ISO 8601 datetime when the application was submitted * * @return self */ @@ -364,7 +364,7 @@ public function setAppliedDate($applied_date) { /** * Gets status * - * @return \BhrSdk\Model\ApplicationsListApplicationsItemsInnerStatus|null + * @return \BhrSdk\Model\ApplicationsListApplicationsInnerStatus|null */ public function getStatus() { return $this->container['status']; @@ -373,7 +373,7 @@ public function getStatus() { /** * Sets status * - * @param \BhrSdk\Model\ApplicationsListApplicationsItemsInnerStatus|null $status status + * @param \BhrSdk\Model\ApplicationsListApplicationsInnerStatus|null $status status * * @return self */ @@ -398,7 +398,7 @@ public function getRating() { /** * Sets rating * - * @param int|null $rating Candidate rating (1-5) or null if not rated + * @param int|null $rating rating * * @return self */ @@ -420,7 +420,7 @@ public function setRating($rating) { /** * Gets applicant * - * @return \BhrSdk\Model\ApplicationsListApplicationsItemsInnerApplicant|null + * @return \BhrSdk\Model\ApplicationsListApplicationsInnerApplicant|null */ public function getApplicant() { return $this->container['applicant']; @@ -429,7 +429,7 @@ public function getApplicant() { /** * Sets applicant * - * @param \BhrSdk\Model\ApplicationsListApplicationsItemsInnerApplicant|null $applicant applicant + * @param \BhrSdk\Model\ApplicationsListApplicationsInnerApplicant|null $applicant applicant * * @return self */ @@ -445,7 +445,7 @@ public function setApplicant($applicant) { /** * Gets job * - * @return \BhrSdk\Model\ApplicationsListApplicationsItemsInnerJob|null + * @return \BhrSdk\Model\ApplicationsListApplicationsInnerJob|null */ public function getJob() { return $this->container['job']; @@ -454,7 +454,7 @@ public function getJob() { /** * Sets job * - * @param \BhrSdk\Model\ApplicationsListApplicationsItemsInnerJob|null $job job + * @param \BhrSdk\Model\ApplicationsListApplicationsInnerJob|null $job job * * @return self */ diff --git a/lib/Model/ApplicationsListApplicationsItemsInnerApplicant.php b/lib/Model/ApplicationsListApplicationsInnerApplicant.php similarity index 95% rename from lib/Model/ApplicationsListApplicationsItemsInnerApplicant.php rename to lib/Model/ApplicationsListApplicationsInnerApplicant.php index 01f79f96..195f77c1 100644 --- a/lib/Model/ApplicationsListApplicationsItemsInnerApplicant.php +++ b/lib/Model/ApplicationsListApplicationsInnerApplicant.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ApplicationsListApplicationsItemsInnerApplicant + * ApplicationsListApplicationsInnerApplicant * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * ApplicationsListApplicationsItemsInnerApplicant Class Doc Comment + * ApplicationsListApplicationsInnerApplicant Class Doc Comment * * @category Class * @description Information about the applicant @@ -42,7 +42,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ApplicationsListApplicationsItemsInnerApplicant implements ModelInterface, ArrayAccess, \JsonSerializable { +class ApplicationsListApplicationsInnerApplicant implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class ApplicationsListApplicationsItemsInnerApplicant implements ModelInterface, * * @var string */ - protected static $openApiModelName = 'ApplicationsList_applications_items_inner_applicant'; + protected static $openApiModelName = 'ApplicationsList_applications_inner_applicant'; /** * Array of property to type mappings. Used for (de)serialization @@ -92,7 +92,7 @@ class ApplicationsListApplicationsItemsInnerApplicant implements ModelInterface, 'id' => false, 'first_name' => false, 'last_name' => false, - 'avatar' => false, + 'avatar' => true, 'email' => false, 'source' => false ]; @@ -399,13 +399,19 @@ public function getAvatar() { /** * Sets avatar * - * @param string|null $avatar URL to applicant's avatar image + * @param string|null $avatar avatar * * @return self */ public function setAvatar($avatar) { if (is_null($avatar)) { - throw new \InvalidArgumentException('non-nullable avatar cannot be null'); + $this->openApiNullablesSetToNull['avatar'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['avatar'])) { + unset($nullablesSetToNull['avatar']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['avatar'] = $avatar; diff --git a/lib/Model/ApplicationsListApplicationsItemsInnerJob.php b/lib/Model/ApplicationsListApplicationsInnerJob.php similarity index 95% rename from lib/Model/ApplicationsListApplicationsItemsInnerJob.php rename to lib/Model/ApplicationsListApplicationsInnerJob.php index 75b68be5..aebbdf04 100644 --- a/lib/Model/ApplicationsListApplicationsItemsInnerJob.php +++ b/lib/Model/ApplicationsListApplicationsInnerJob.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ApplicationsListApplicationsItemsInnerJob + * ApplicationsListApplicationsInnerJob * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * ApplicationsListApplicationsItemsInnerJob Class Doc Comment + * ApplicationsListApplicationsInnerJob Class Doc Comment * * @category Class * @description Information about the job position @@ -42,7 +42,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ApplicationsListApplicationsItemsInnerJob implements ModelInterface, ArrayAccess, \JsonSerializable { +class ApplicationsListApplicationsInnerJob implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class ApplicationsListApplicationsItemsInnerJob implements ModelInterface, Array * * @var string */ - protected static $openApiModelName = 'ApplicationsList_applications_items_inner_job'; + protected static $openApiModelName = 'ApplicationsList_applications_inner_job'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,7 +59,7 @@ class ApplicationsListApplicationsItemsInnerJob implements ModelInterface, Array */ protected static $openApiTypes = [ 'id' => 'int', - 'title' => 'string' + 'title' => '\BhrSdk\Model\ApplicationsListApplicationsInnerJobTitle' ]; /** @@ -312,7 +312,7 @@ public function setId($id) { /** * Gets title * - * @return string|null + * @return \BhrSdk\Model\ApplicationsListApplicationsInnerJobTitle|null */ public function getTitle() { return $this->container['title']; @@ -321,7 +321,7 @@ public function getTitle() { /** * Sets title * - * @param string|null $title Job position title + * @param \BhrSdk\Model\ApplicationsListApplicationsInnerJobTitle|null $title title * * @return self */ diff --git a/lib/Model/ApplicationsListApplicationsInnerJobTitle.php b/lib/Model/ApplicationsListApplicationsInnerJobTitle.php new file mode 100644 index 00000000..9728906d --- /dev/null +++ b/lib/Model/ApplicationsListApplicationsInnerJobTitle.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * ApplicationsListApplicationsInnerJobTitle + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ApplicationsListApplicationsInnerJobTitle Class Doc Comment + * + * @category Class + * @description Job position title + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ApplicationsListApplicationsInnerJobTitle implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ApplicationsList_applications_inner_job_title'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Title text + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicationsListApplicationsItemsInnerStatus.php b/lib/Model/ApplicationsListApplicationsInnerStatus.php similarity index 97% rename from lib/Model/ApplicationsListApplicationsItemsInnerStatus.php rename to lib/Model/ApplicationsListApplicationsInnerStatus.php index 34e3eb02..0e202c8b 100644 --- a/lib/Model/ApplicationsListApplicationsItemsInnerStatus.php +++ b/lib/Model/ApplicationsListApplicationsInnerStatus.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ApplicationsListApplicationsItemsInnerStatus + * ApplicationsListApplicationsInnerStatus * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * ApplicationsListApplicationsItemsInnerStatus Class Doc Comment + * ApplicationsListApplicationsInnerStatus Class Doc Comment * * @category Class * @description Current status of the application @@ -42,7 +42,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ApplicationsListApplicationsItemsInnerStatus implements ModelInterface, ArrayAccess, \JsonSerializable { +class ApplicationsListApplicationsInnerStatus implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class ApplicationsListApplicationsItemsInnerStatus implements ModelInterface, Ar * * @var string */ - protected static $openApiModelName = 'ApplicationsList_applications_items_inner_status'; + protected static $openApiModelName = 'ApplicationsList_applications_inner_status'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/AssignEmployeesToBreakPolicyRequest.php b/lib/Model/AssignEmployeesToBreakPolicyRequest.php new file mode 100644 index 00000000..8a279170 --- /dev/null +++ b/lib/Model/AssignEmployeesToBreakPolicyRequest.php @@ -0,0 +1,399 @@ +<?php +declare(strict_types=1); +/** + * AssignEmployeesToBreakPolicyRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AssignEmployeesToBreakPolicyRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AssignEmployeesToBreakPolicyRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'assign_employees_to_break_policy_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' can't be null"; + } + if ((count($this->container['employee_ids']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_ids', number of items must be greater 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return int[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[] $employee_ids Array of employee IDs to assign to the break policy + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + + if ((count($employee_ids) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_ids when calling AssignEmployeesToBreakPolicyRequest., number of items must be greater than or equal to 1.'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.php b/lib/Model/AssignTimeOffPoliciesRequestInner.php similarity index 93% rename from lib/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.php rename to lib/Model/AssignTimeOffPoliciesRequestInner.php index 59ca0e7d..14bf68ca 100644 --- a/lib/Model/TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner.php +++ b/lib/Model/AssignTimeOffPoliciesRequestInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner + * AssignTimeOffPoliciesRequestInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner Class Doc Comment + * AssignTimeOffPoliciesRequestInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class AssignTimeOffPoliciesRequestInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner implements ModelInte * * @var string */ - protected static $openApiModelName = 'time_off_assign_time_off_policies_for_an_employee_request_inner'; + protected static $openApiModelName = 'assign_time_off_policies_request_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -81,7 +81,7 @@ class TimeOffAssignTimeOffPoliciesForAnEmployeeRequestInner implements ModelInte */ protected static array $openApiNullables = [ 'time_off_policy_id' => false, - 'accrual_start_date' => false + 'accrual_start_date' => true ]; /** @@ -301,7 +301,7 @@ public function getTimeOffPolicyId() { /** * Sets time_off_policy_id * - * @param int $time_off_policy_id time_off_policy_id + * @param int $time_off_policy_id The ID of the time off policy to assign. * * @return self */ @@ -332,7 +332,13 @@ public function getAccrualStartDate() { */ public function setAccrualStartDate($accrual_start_date) { if (is_null($accrual_start_date)) { - throw new \InvalidArgumentException('non-nullable accrual_start_date cannot be null'); + $this->openApiNullablesSetToNull['accrual_start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['accrual_start_date'])) { + unset($nullablesSetToNull['accrual_start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['accrual_start_date'] = $accrual_start_date; diff --git a/lib/Model/AssignedTimeOffPolicy.php b/lib/Model/AssignedTimeOffPolicy.php new file mode 100644 index 00000000..2edfd537 --- /dev/null +++ b/lib/Model/AssignedTimeOffPolicy.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * AssignedTimeOffPolicy + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AssignedTimeOffPolicy Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AssignedTimeOffPolicy implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AssignedTimeOffPolicy'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_policy_id' => 'int', + 'time_off_type_id' => 'int', + 'accrual_start_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_policy_id' => null, + 'time_off_type_id' => null, + 'accrual_start_date' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_policy_id' => false, + 'time_off_type_id' => false, + 'accrual_start_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_policy_id' => 'timeOffPolicyId', + 'time_off_type_id' => 'timeOffTypeId', + 'accrual_start_date' => 'accrualStartDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_policy_id' => 'setTimeOffPolicyId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'accrual_start_date' => 'setAccrualStartDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_policy_id' => 'getTimeOffPolicyId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'accrual_start_date' => 'getAccrualStartDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_policy_id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('accrual_start_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_policy_id + * + * @return int|null + */ + public function getTimeOffPolicyId() { + return $this->container['time_off_policy_id']; + } + + /** + * Sets time_off_policy_id + * + * @param int|null $time_off_policy_id The ID of the assigned time off policy. + * + * @return self + */ + public function setTimeOffPolicyId($time_off_policy_id) { + if (is_null($time_off_policy_id)) { + throw new \InvalidArgumentException('non-nullable time_off_policy_id cannot be null'); + } + $this->container['time_off_policy_id'] = $time_off_policy_id; + + return $this; + } + + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets accrual_start_date + * + * @return \DateTime|null + */ + public function getAccrualStartDate() { + return $this->container['accrual_start_date']; + } + + /** + * Sets accrual_start_date + * + * @param \DateTime|null $accrual_start_date The date accruals started in YYYY-MM-DD format. + * + * @return self + */ + public function setAccrualStartDate($accrual_start_date) { + if (is_null($accrual_start_date)) { + throw new \InvalidArgumentException('non-nullable accrual_start_date cannot be null'); + } + $this->container['accrual_start_date'] = $accrual_start_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AssignedTimeOffPolicyV11.php b/lib/Model/AssignedTimeOffPolicyV11.php new file mode 100644 index 00000000..eb8c2df1 --- /dev/null +++ b/lib/Model/AssignedTimeOffPolicyV11.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * AssignedTimeOffPolicyV11 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AssignedTimeOffPolicyV11 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AssignedTimeOffPolicyV11 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AssignedTimeOffPolicyV1_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_policy_id' => 'int', + 'time_off_type_id' => 'int', + 'accrual_start_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_policy_id' => null, + 'time_off_type_id' => null, + 'accrual_start_date' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_policy_id' => false, + 'time_off_type_id' => false, + 'accrual_start_date' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_policy_id' => 'timeOffPolicyId', + 'time_off_type_id' => 'timeOffTypeId', + 'accrual_start_date' => 'accrualStartDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_policy_id' => 'setTimeOffPolicyId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'accrual_start_date' => 'setAccrualStartDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_policy_id' => 'getTimeOffPolicyId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'accrual_start_date' => 'getAccrualStartDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_policy_id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('accrual_start_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_policy_id + * + * @return int|null + */ + public function getTimeOffPolicyId() { + return $this->container['time_off_policy_id']; + } + + /** + * Sets time_off_policy_id + * + * @param int|null $time_off_policy_id The ID of the assigned time off policy. + * + * @return self + */ + public function setTimeOffPolicyId($time_off_policy_id) { + if (is_null($time_off_policy_id)) { + throw new \InvalidArgumentException('non-nullable time_off_policy_id cannot be null'); + } + $this->container['time_off_policy_id'] = $time_off_policy_id; + + return $this; + } + + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets accrual_start_date + * + * @return \DateTime|null + */ + public function getAccrualStartDate() { + return $this->container['accrual_start_date']; + } + + /** + * Sets accrual_start_date + * + * @param \DateTime|null $accrual_start_date accrual_start_date + * + * @return self + */ + public function setAccrualStartDate($accrual_start_date) { + if (is_null($accrual_start_date)) { + $this->openApiNullablesSetToNull['accrual_start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['accrual_start_date'])) { + unset($nullablesSetToNull['accrual_start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accrual_start_date'] = $accrual_start_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AvailableAction.php b/lib/Model/AvailableAction.php new file mode 100644 index 00000000..4ffd2632 --- /dev/null +++ b/lib/Model/AvailableAction.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * AvailableAction + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * AvailableAction Class Doc Comment + * + * @category Class + * @description Represents an action that can be performed on a resource based on permissions and resource state + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class AvailableAction implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'AvailableAction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string', + 'fields' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null, + 'fields' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false, + 'fields' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href', + 'fields' => 'fields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref', + 'fields' => 'setFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref', + 'fields' => 'getFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $data ?? [], null); + $this->setIfExists('fields', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href The URL for this action + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + + /** + * Gets fields + * + * @return object[]|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param object[]|null $fields fields + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + $this->openApiNullablesSetToNull['fields'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['fields'])) { + unset($nullablesSetToNull['fields']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['fields'] = $fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/InternalServerError.php b/lib/Model/BadRequestV1.php similarity index 96% rename from lib/Model/InternalServerError.php rename to lib/Model/BadRequestV1.php index 3aadc382..bc0d4eef 100644 --- a/lib/Model/InternalServerError.php +++ b/lib/Model/BadRequestV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * InternalServerError + * BadRequestV1 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * InternalServerError Class Doc Comment + * BadRequestV1 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class InternalServerError implements ModelInterface, ArrayAccess, \JsonSerializable { +class BadRequestV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class InternalServerError implements ModelInterface, ArrayAccess, \JsonSerializa * * @var string */ - protected static $openApiModelName = 'InternalServerError'; + protected static $openApiModelName = 'BadRequestV1'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class InternalServerError implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openApiTypes = [ - 'error' => 'string' + 'error' => '\BhrSdk\Model\BadRequestV1Error' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets error * - * @return string|null + * @return \BhrSdk\Model\BadRequestV1Error|null */ public function getError() { return $this->container['error']; @@ -288,7 +288,7 @@ public function getError() { /** * Sets error * - * @param string|null $error error + * @param \BhrSdk\Model\BadRequestV1Error|null $error error * * @return self */ diff --git a/lib/Model/BadRequestV1Error.php b/lib/Model/BadRequestV1Error.php new file mode 100644 index 00000000..c4798033 --- /dev/null +++ b/lib/Model/BadRequestV1Error.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * BadRequestV1Error + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BadRequestV1Error Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BadRequestV1Error implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BadRequestV1_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'int', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return int|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/FieldListFieldsInner.php b/lib/Model/BankHoliday.php similarity index 91% rename from lib/Model/FieldListFieldsInner.php rename to lib/Model/BankHoliday.php index d80a3c02..471a3ff5 100644 --- a/lib/Model/FieldListFieldsInner.php +++ b/lib/Model/BankHoliday.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * FieldListFieldsInner + * BankHoliday * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * FieldListFieldsInner Class Doc Comment + * BankHoliday Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class FieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class BankHoliday implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class FieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializ * * @var string */ - protected static $openApiModelName = 'FieldList_fields_inner'; + protected static $openApiModelName = 'BankHoliday'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,7 +59,7 @@ class FieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openApiTypes = [ 'id' => 'int', 'name' => 'string', - 'alias' => 'string' + 'date' => '\DateTime' ]; /** @@ -72,7 +72,7 @@ class FieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openApiFormats = [ 'id' => null, 'name' => null, - 'alias' => null + 'date' => 'date' ]; /** @@ -84,7 +84,7 @@ class FieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializ protected static array $openApiNullables = [ 'id' => false, 'name' => false, - 'alias' => false + 'date' => false ]; /** @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'alias' => 'alias' + 'date' => 'date' ]; /** @@ -182,7 +182,7 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'alias' => 'setAlias' + 'date' => 'setDate' ]; /** @@ -193,7 +193,7 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'alias' => 'getAlias' + 'date' => 'getDate' ]; /** @@ -249,7 +249,7 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); } /** @@ -302,7 +302,7 @@ public function getId() { /** * Sets id * - * @param int|null $id id + * @param int|null $id Stable bank holiday identifier * * @return self */ @@ -327,7 +327,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Holiday display name * * @return self */ @@ -341,26 +341,26 @@ public function setName($name) { } /** - * Gets alias + * Gets date * - * @return string|null + * @return \DateTime|null */ - public function getAlias() { - return $this->container['alias']; + public function getDate() { + return $this->container['date']; } /** - * Sets alias + * Sets date * - * @param string|null $alias alias + * @param \DateTime|null $date Holiday date in YYYY-MM-DD form * * @return self */ - public function setAlias($alias) { - if (is_null($alias)) { - throw new \InvalidArgumentException('non-nullable alias cannot be null'); + public function setDate($date) { + if (is_null($date)) { + throw new \InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['alias'] = $alias; + $this->container['date'] = $date; return $this; } diff --git a/lib/Model/BenefitCoveragesResponse.php b/lib/Model/BenefitCoveragesResponse.php new file mode 100644 index 00000000..d8d46208 --- /dev/null +++ b/lib/Model/BenefitCoveragesResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * BenefitCoveragesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BenefitCoveragesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BenefitCoveragesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BenefitCoveragesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'benefit_coverages' => '\BhrSdk\Model\BenefitCoveragesResponseBenefitCoveragesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'benefit_coverages' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'benefit_coverages' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'benefit_coverages' => 'Benefit Coverages' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'benefit_coverages' => 'setBenefitCoverages' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'benefit_coverages' => 'getBenefitCoverages' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('benefit_coverages', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets benefit_coverages + * + * @return \BhrSdk\Model\BenefitCoveragesResponseBenefitCoveragesInner[]|null + */ + public function getBenefitCoverages() { + return $this->container['benefit_coverages']; + } + + /** + * Sets benefit_coverages + * + * @param \BhrSdk\Model\BenefitCoveragesResponseBenefitCoveragesInner[]|null $benefit_coverages Array of benefit coverage level objects. + * + * @return self + */ + public function setBenefitCoverages($benefit_coverages) { + if (is_null($benefit_coverages)) { + throw new \InvalidArgumentException('non-nullable benefit_coverages cannot be null'); + } + $this->container['benefit_coverages'] = $benefit_coverages; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BenefitCoveragesResponseBenefitCoveragesInner.php b/lib/Model/BenefitCoveragesResponseBenefitCoveragesInner.php new file mode 100644 index 00000000..405a0bca --- /dev/null +++ b/lib/Model/BenefitCoveragesResponseBenefitCoveragesInner.php @@ -0,0 +1,528 @@ +<?php +declare(strict_types=1); +/** + * BenefitCoveragesResponseBenefitCoveragesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BenefitCoveragesResponseBenefitCoveragesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BenefitCoveragesResponseBenefitCoveragesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BenefitCoveragesResponse_Benefit_Coverages_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'short_name' => 'string', + 'description' => 'string', + 'sort_order' => 'string', + 'benefit_plan_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'short_name' => null, + 'description' => null, + 'sort_order' => null, + 'benefit_plan_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'short_name' => false, + 'description' => true, + 'sort_order' => false, + 'benefit_plan_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'short_name' => 'shortName', + 'description' => 'description', + 'sort_order' => 'sortOrder', + 'benefit_plan_id' => 'benefitPlanId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'short_name' => 'setShortName', + 'description' => 'setDescription', + 'sort_order' => 'setSortOrder', + 'benefit_plan_id' => 'setBenefitPlanId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'short_name' => 'getShortName', + 'description' => 'getDescription', + 'sort_order' => 'getSortOrder', + 'benefit_plan_id' => 'getBenefitPlanId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('short_name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('sort_order', $data ?? [], null); + $this->setIfExists('benefit_plan_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The coverage level ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets short_name + * + * @return string|null + */ + public function getShortName() { + return $this->container['short_name']; + } + + /** + * Sets short_name + * + * @param string|null $short_name The short display name for this coverage level (e.g. \"Employee + Spouse\"). + * + * @return self + */ + public function setShortName($short_name) { + if (is_null($short_name)) { + throw new \InvalidArgumentException('non-nullable short_name cannot be null'); + } + $this->container['short_name'] = $short_name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets sort_order + * + * @return string|null + */ + public function getSortOrder() { + return $this->container['sort_order']; + } + + /** + * Sets sort_order + * + * @param string|null $sort_order The display sort order for this coverage level. + * + * @return self + */ + public function setSortOrder($sort_order) { + if (is_null($sort_order)) { + throw new \InvalidArgumentException('non-nullable sort_order cannot be null'); + } + $this->container['sort_order'] = $sort_order; + + return $this; + } + + /** + * Gets benefit_plan_id + * + * @return string|null + */ + public function getBenefitPlanId() { + return $this->container['benefit_plan_id']; + } + + /** + * Sets benefit_plan_id + * + * @param string|null $benefit_plan_id benefit_plan_id + * + * @return self + */ + public function setBenefitPlanId($benefit_plan_id) { + if (is_null($benefit_plan_id)) { + $this->openApiNullablesSetToNull['benefit_plan_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benefit_plan_id'])) { + unset($nullablesSetToNull['benefit_plan_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benefit_plan_id'] = $benefit_plan_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BenefitDeductionSubType.php b/lib/Model/BenefitDeductionSubType.php new file mode 100644 index 00000000..f4d06b4b --- /dev/null +++ b/lib/Model/BenefitDeductionSubType.php @@ -0,0 +1,810 @@ +<?php +declare(strict_types=1); +/** + * BenefitDeductionSubType + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BenefitDeductionSubType Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BenefitDeductionSubType implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BenefitDeductionSubType'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'deduction_type_name' => 'string', + 'default_deduction_code' => 'string', + 'allowable_benefit_types' => 'string[]', + 'non_benefit_deduction_type' => 'bool', + 'can_be_collected_by_trax' => 'bool', + 'additional_description' => 'string', + 'hide_annual_max' => 'bool', + 'managed_deduction_type' => 'string', + 'sub_types' => 'object[]', + 'sub_type_text' => 'string', + 'deduction_note' => 'string', + 'deduction_note_link' => 'string', + 'deduction_note_link_text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'deduction_type_name' => null, + 'default_deduction_code' => null, + 'allowable_benefit_types' => null, + 'non_benefit_deduction_type' => null, + 'can_be_collected_by_trax' => null, + 'additional_description' => null, + 'hide_annual_max' => null, + 'managed_deduction_type' => null, + 'sub_types' => null, + 'sub_type_text' => null, + 'deduction_note' => null, + 'deduction_note_link' => null, + 'deduction_note_link_text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'deduction_type_name' => false, + 'default_deduction_code' => false, + 'allowable_benefit_types' => false, + 'non_benefit_deduction_type' => false, + 'can_be_collected_by_trax' => false, + 'additional_description' => false, + 'hide_annual_max' => false, + 'managed_deduction_type' => true, + 'sub_types' => false, + 'sub_type_text' => false, + 'deduction_note' => false, + 'deduction_note_link' => false, + 'deduction_note_link_text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'deduction_type_name' => 'deductionTypeName', + 'default_deduction_code' => 'defaultDeductionCode', + 'allowable_benefit_types' => 'allowableBenefitTypes', + 'non_benefit_deduction_type' => 'nonBenefitDeductionType', + 'can_be_collected_by_trax' => 'canBeCollectedByTrax', + 'additional_description' => 'additionalDescription', + 'hide_annual_max' => 'hideAnnualMax', + 'managed_deduction_type' => 'managedDeductionType', + 'sub_types' => 'subTypes', + 'sub_type_text' => 'subTypeText', + 'deduction_note' => 'deductionNote', + 'deduction_note_link' => 'deductionNoteLink', + 'deduction_note_link_text' => 'deductionNoteLinkText' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'deduction_type_name' => 'setDeductionTypeName', + 'default_deduction_code' => 'setDefaultDeductionCode', + 'allowable_benefit_types' => 'setAllowableBenefitTypes', + 'non_benefit_deduction_type' => 'setNonBenefitDeductionType', + 'can_be_collected_by_trax' => 'setCanBeCollectedByTrax', + 'additional_description' => 'setAdditionalDescription', + 'hide_annual_max' => 'setHideAnnualMax', + 'managed_deduction_type' => 'setManagedDeductionType', + 'sub_types' => 'setSubTypes', + 'sub_type_text' => 'setSubTypeText', + 'deduction_note' => 'setDeductionNote', + 'deduction_note_link' => 'setDeductionNoteLink', + 'deduction_note_link_text' => 'setDeductionNoteLinkText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'deduction_type_name' => 'getDeductionTypeName', + 'default_deduction_code' => 'getDefaultDeductionCode', + 'allowable_benefit_types' => 'getAllowableBenefitTypes', + 'non_benefit_deduction_type' => 'getNonBenefitDeductionType', + 'can_be_collected_by_trax' => 'getCanBeCollectedByTrax', + 'additional_description' => 'getAdditionalDescription', + 'hide_annual_max' => 'getHideAnnualMax', + 'managed_deduction_type' => 'getManagedDeductionType', + 'sub_types' => 'getSubTypes', + 'sub_type_text' => 'getSubTypeText', + 'deduction_note' => 'getDeductionNote', + 'deduction_note_link' => 'getDeductionNoteLink', + 'deduction_note_link_text' => 'getDeductionNoteLinkText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('deduction_type_name', $data ?? [], null); + $this->setIfExists('default_deduction_code', $data ?? [], null); + $this->setIfExists('allowable_benefit_types', $data ?? [], null); + $this->setIfExists('non_benefit_deduction_type', $data ?? [], null); + $this->setIfExists('can_be_collected_by_trax', $data ?? [], null); + $this->setIfExists('additional_description', $data ?? [], null); + $this->setIfExists('hide_annual_max', $data ?? [], null); + $this->setIfExists('managed_deduction_type', $data ?? [], null); + $this->setIfExists('sub_types', $data ?? [], null); + $this->setIfExists('sub_type_text', $data ?? [], null); + $this->setIfExists('deduction_note', $data ?? [], null); + $this->setIfExists('deduction_note_link', $data ?? [], null); + $this->setIfExists('deduction_note_link_text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The sub-type deduction type ID (always an integer). + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets deduction_type_name + * + * @return string|null + */ + public function getDeductionTypeName() { + return $this->container['deduction_type_name']; + } + + /** + * Sets deduction_type_name + * + * @param string|null $deduction_type_name The display name of the sub-type. + * + * @return self + */ + public function setDeductionTypeName($deduction_type_name) { + if (is_null($deduction_type_name)) { + throw new \InvalidArgumentException('non-nullable deduction_type_name cannot be null'); + } + $this->container['deduction_type_name'] = $deduction_type_name; + + return $this; + } + + /** + * Gets default_deduction_code + * + * @return string|null + */ + public function getDefaultDeductionCode() { + return $this->container['default_deduction_code']; + } + + /** + * Sets default_deduction_code + * + * @param string|null $default_deduction_code The default payroll deduction code for this sub-type. + * + * @return self + */ + public function setDefaultDeductionCode($default_deduction_code) { + if (is_null($default_deduction_code)) { + throw new \InvalidArgumentException('non-nullable default_deduction_code cannot be null'); + } + $this->container['default_deduction_code'] = $default_deduction_code; + + return $this; + } + + /** + * Gets allowable_benefit_types + * + * @return string[]|null + */ + public function getAllowableBenefitTypes() { + return $this->container['allowable_benefit_types']; + } + + /** + * Sets allowable_benefit_types + * + * @param string[]|null $allowable_benefit_types Benefit plan types this sub-type applies to. + * + * @return self + */ + public function setAllowableBenefitTypes($allowable_benefit_types) { + if (is_null($allowable_benefit_types)) { + throw new \InvalidArgumentException('non-nullable allowable_benefit_types cannot be null'); + } + $this->container['allowable_benefit_types'] = $allowable_benefit_types; + + return $this; + } + + /** + * Gets non_benefit_deduction_type + * + * @return bool|null + */ + public function getNonBenefitDeductionType() { + return $this->container['non_benefit_deduction_type']; + } + + /** + * Sets non_benefit_deduction_type + * + * @param bool|null $non_benefit_deduction_type Whether this is a non-benefit deduction type. + * + * @return self + */ + public function setNonBenefitDeductionType($non_benefit_deduction_type) { + if (is_null($non_benefit_deduction_type)) { + throw new \InvalidArgumentException('non-nullable non_benefit_deduction_type cannot be null'); + } + $this->container['non_benefit_deduction_type'] = $non_benefit_deduction_type; + + return $this; + } + + /** + * Gets can_be_collected_by_trax + * + * @return bool|null + */ + public function getCanBeCollectedByTrax() { + return $this->container['can_be_collected_by_trax']; + } + + /** + * Sets can_be_collected_by_trax + * + * @param bool|null $can_be_collected_by_trax Whether this sub-type can be collected via Trax Payroll. + * + * @return self + */ + public function setCanBeCollectedByTrax($can_be_collected_by_trax) { + if (is_null($can_be_collected_by_trax)) { + throw new \InvalidArgumentException('non-nullable can_be_collected_by_trax cannot be null'); + } + $this->container['can_be_collected_by_trax'] = $can_be_collected_by_trax; + + return $this; + } + + /** + * Gets additional_description + * + * @return string|null + */ + public function getAdditionalDescription() { + return $this->container['additional_description']; + } + + /** + * Sets additional_description + * + * @param string|null $additional_description Additional description for display purposes. + * + * @return self + */ + public function setAdditionalDescription($additional_description) { + if (is_null($additional_description)) { + throw new \InvalidArgumentException('non-nullable additional_description cannot be null'); + } + $this->container['additional_description'] = $additional_description; + + return $this; + } + + /** + * Gets hide_annual_max + * + * @return bool|null + */ + public function getHideAnnualMax() { + return $this->container['hide_annual_max']; + } + + /** + * Sets hide_annual_max + * + * @param bool|null $hide_annual_max Whether the annual maximum field should be hidden. + * + * @return self + */ + public function setHideAnnualMax($hide_annual_max) { + if (is_null($hide_annual_max)) { + throw new \InvalidArgumentException('non-nullable hide_annual_max cannot be null'); + } + $this->container['hide_annual_max'] = $hide_annual_max; + + return $this; + } + + /** + * Gets managed_deduction_type + * + * @return string|null + */ + public function getManagedDeductionType() { + return $this->container['managed_deduction_type']; + } + + /** + * Sets managed_deduction_type + * + * @param string|null $managed_deduction_type managed_deduction_type + * + * @return self + */ + public function setManagedDeductionType($managed_deduction_type) { + if (is_null($managed_deduction_type)) { + $this->openApiNullablesSetToNull['managed_deduction_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['managed_deduction_type'])) { + unset($nullablesSetToNull['managed_deduction_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['managed_deduction_type'] = $managed_deduction_type; + + return $this; + } + + /** + * Gets sub_types + * + * @return object[]|null + */ + public function getSubTypes() { + return $this->container['sub_types']; + } + + /** + * Sets sub_types + * + * @param object[]|null $sub_types Always an empty array for sub-types. + * + * @return self + */ + public function setSubTypes($sub_types) { + if (is_null($sub_types)) { + throw new \InvalidArgumentException('non-nullable sub_types cannot be null'); + } + $this->container['sub_types'] = $sub_types; + + return $this; + } + + /** + * Gets sub_type_text + * + * @return string|null + */ + public function getSubTypeText() { + return $this->container['sub_type_text']; + } + + /** + * Sets sub_type_text + * + * @param string|null $sub_type_text Sub-type selection label. Empty string for leaf types. + * + * @return self + */ + public function setSubTypeText($sub_type_text) { + if (is_null($sub_type_text)) { + throw new \InvalidArgumentException('non-nullable sub_type_text cannot be null'); + } + $this->container['sub_type_text'] = $sub_type_text; + + return $this; + } + + /** + * Gets deduction_note + * + * @return string|null + */ + public function getDeductionNote() { + return $this->container['deduction_note']; + } + + /** + * Sets deduction_note + * + * @param string|null $deduction_note Informational note for this sub-type. + * + * @return self + */ + public function setDeductionNote($deduction_note) { + if (is_null($deduction_note)) { + throw new \InvalidArgumentException('non-nullable deduction_note cannot be null'); + } + $this->container['deduction_note'] = $deduction_note; + + return $this; + } + + /** + * Gets deduction_note_link + * + * @return string|null + */ + public function getDeductionNoteLink() { + return $this->container['deduction_note_link']; + } + + /** + * Sets deduction_note_link + * + * @param string|null $deduction_note_link URL for the deduction note link. + * + * @return self + */ + public function setDeductionNoteLink($deduction_note_link) { + if (is_null($deduction_note_link)) { + throw new \InvalidArgumentException('non-nullable deduction_note_link cannot be null'); + } + $this->container['deduction_note_link'] = $deduction_note_link; + + return $this; + } + + /** + * Gets deduction_note_link_text + * + * @return string|null + */ + public function getDeductionNoteLinkText() { + return $this->container['deduction_note_link_text']; + } + + /** + * Sets deduction_note_link_text + * + * @param string|null $deduction_note_link_text Display text for the deduction note link. + * + * @return self + */ + public function setDeductionNoteLinkText($deduction_note_link_text) { + if (is_null($deduction_note_link_text)) { + throw new \InvalidArgumentException('non-nullable deduction_note_link_text cannot be null'); + } + $this->container['deduction_note_link_text'] = $deduction_note_link_text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BenefitDeductionType.php b/lib/Model/BenefitDeductionType.php new file mode 100644 index 00000000..aac222b0 --- /dev/null +++ b/lib/Model/BenefitDeductionType.php @@ -0,0 +1,810 @@ +<?php +declare(strict_types=1); +/** + * BenefitDeductionType + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BenefitDeductionType Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BenefitDeductionType implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BenefitDeductionType'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => '\BhrSdk\Model\BenefitDeductionTypeId', + 'deduction_type_name' => 'string', + 'default_deduction_code' => 'string', + 'allowable_benefit_types' => 'string[]', + 'non_benefit_deduction_type' => 'bool', + 'can_be_collected_by_trax' => 'bool', + 'additional_description' => 'string', + 'hide_annual_max' => 'bool', + 'managed_deduction_type' => 'string', + 'sub_types' => '\BhrSdk\Model\BenefitDeductionSubType[]', + 'sub_type_text' => 'string', + 'deduction_note' => 'string', + 'deduction_note_link' => 'string', + 'deduction_note_link_text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'deduction_type_name' => null, + 'default_deduction_code' => null, + 'allowable_benefit_types' => null, + 'non_benefit_deduction_type' => null, + 'can_be_collected_by_trax' => null, + 'additional_description' => null, + 'hide_annual_max' => null, + 'managed_deduction_type' => null, + 'sub_types' => null, + 'sub_type_text' => null, + 'deduction_note' => null, + 'deduction_note_link' => null, + 'deduction_note_link_text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'deduction_type_name' => false, + 'default_deduction_code' => false, + 'allowable_benefit_types' => false, + 'non_benefit_deduction_type' => false, + 'can_be_collected_by_trax' => false, + 'additional_description' => false, + 'hide_annual_max' => false, + 'managed_deduction_type' => true, + 'sub_types' => false, + 'sub_type_text' => false, + 'deduction_note' => false, + 'deduction_note_link' => false, + 'deduction_note_link_text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'deduction_type_name' => 'deductionTypeName', + 'default_deduction_code' => 'defaultDeductionCode', + 'allowable_benefit_types' => 'allowableBenefitTypes', + 'non_benefit_deduction_type' => 'nonBenefitDeductionType', + 'can_be_collected_by_trax' => 'canBeCollectedByTrax', + 'additional_description' => 'additionalDescription', + 'hide_annual_max' => 'hideAnnualMax', + 'managed_deduction_type' => 'managedDeductionType', + 'sub_types' => 'subTypes', + 'sub_type_text' => 'subTypeText', + 'deduction_note' => 'deductionNote', + 'deduction_note_link' => 'deductionNoteLink', + 'deduction_note_link_text' => 'deductionNoteLinkText' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'deduction_type_name' => 'setDeductionTypeName', + 'default_deduction_code' => 'setDefaultDeductionCode', + 'allowable_benefit_types' => 'setAllowableBenefitTypes', + 'non_benefit_deduction_type' => 'setNonBenefitDeductionType', + 'can_be_collected_by_trax' => 'setCanBeCollectedByTrax', + 'additional_description' => 'setAdditionalDescription', + 'hide_annual_max' => 'setHideAnnualMax', + 'managed_deduction_type' => 'setManagedDeductionType', + 'sub_types' => 'setSubTypes', + 'sub_type_text' => 'setSubTypeText', + 'deduction_note' => 'setDeductionNote', + 'deduction_note_link' => 'setDeductionNoteLink', + 'deduction_note_link_text' => 'setDeductionNoteLinkText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'deduction_type_name' => 'getDeductionTypeName', + 'default_deduction_code' => 'getDefaultDeductionCode', + 'allowable_benefit_types' => 'getAllowableBenefitTypes', + 'non_benefit_deduction_type' => 'getNonBenefitDeductionType', + 'can_be_collected_by_trax' => 'getCanBeCollectedByTrax', + 'additional_description' => 'getAdditionalDescription', + 'hide_annual_max' => 'getHideAnnualMax', + 'managed_deduction_type' => 'getManagedDeductionType', + 'sub_types' => 'getSubTypes', + 'sub_type_text' => 'getSubTypeText', + 'deduction_note' => 'getDeductionNote', + 'deduction_note_link' => 'getDeductionNoteLink', + 'deduction_note_link_text' => 'getDeductionNoteLinkText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('deduction_type_name', $data ?? [], null); + $this->setIfExists('default_deduction_code', $data ?? [], null); + $this->setIfExists('allowable_benefit_types', $data ?? [], null); + $this->setIfExists('non_benefit_deduction_type', $data ?? [], null); + $this->setIfExists('can_be_collected_by_trax', $data ?? [], null); + $this->setIfExists('additional_description', $data ?? [], null); + $this->setIfExists('hide_annual_max', $data ?? [], null); + $this->setIfExists('managed_deduction_type', $data ?? [], null); + $this->setIfExists('sub_types', $data ?? [], null); + $this->setIfExists('sub_type_text', $data ?? [], null); + $this->setIfExists('deduction_note', $data ?? [], null); + $this->setIfExists('deduction_note_link', $data ?? [], null); + $this->setIfExists('deduction_note_link_text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return \BhrSdk\Model\BenefitDeductionTypeId|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param \BhrSdk\Model\BenefitDeductionTypeId|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets deduction_type_name + * + * @return string|null + */ + public function getDeductionTypeName() { + return $this->container['deduction_type_name']; + } + + /** + * Sets deduction_type_name + * + * @param string|null $deduction_type_name The display name of the deduction type. + * + * @return self + */ + public function setDeductionTypeName($deduction_type_name) { + if (is_null($deduction_type_name)) { + throw new \InvalidArgumentException('non-nullable deduction_type_name cannot be null'); + } + $this->container['deduction_type_name'] = $deduction_type_name; + + return $this; + } + + /** + * Gets default_deduction_code + * + * @return string|null + */ + public function getDefaultDeductionCode() { + return $this->container['default_deduction_code']; + } + + /** + * Sets default_deduction_code + * + * @param string|null $default_deduction_code The default payroll deduction code for this type. + * + * @return self + */ + public function setDefaultDeductionCode($default_deduction_code) { + if (is_null($default_deduction_code)) { + throw new \InvalidArgumentException('non-nullable default_deduction_code cannot be null'); + } + $this->container['default_deduction_code'] = $default_deduction_code; + + return $this; + } + + /** + * Gets allowable_benefit_types + * + * @return string[]|null + */ + public function getAllowableBenefitTypes() { + return $this->container['allowable_benefit_types']; + } + + /** + * Sets allowable_benefit_types + * + * @param string[]|null $allowable_benefit_types The benefit plan types this deduction type can be applied to (e.g. \"health\", \"dental\", \"retirement\"). + * + * @return self + */ + public function setAllowableBenefitTypes($allowable_benefit_types) { + if (is_null($allowable_benefit_types)) { + throw new \InvalidArgumentException('non-nullable allowable_benefit_types cannot be null'); + } + $this->container['allowable_benefit_types'] = $allowable_benefit_types; + + return $this; + } + + /** + * Gets non_benefit_deduction_type + * + * @return bool|null + */ + public function getNonBenefitDeductionType() { + return $this->container['non_benefit_deduction_type']; + } + + /** + * Sets non_benefit_deduction_type + * + * @param bool|null $non_benefit_deduction_type Whether this is a non-benefit deduction type (e.g. garnishments). + * + * @return self + */ + public function setNonBenefitDeductionType($non_benefit_deduction_type) { + if (is_null($non_benefit_deduction_type)) { + throw new \InvalidArgumentException('non-nullable non_benefit_deduction_type cannot be null'); + } + $this->container['non_benefit_deduction_type'] = $non_benefit_deduction_type; + + return $this; + } + + /** + * Gets can_be_collected_by_trax + * + * @return bool|null + */ + public function getCanBeCollectedByTrax() { + return $this->container['can_be_collected_by_trax']; + } + + /** + * Sets can_be_collected_by_trax + * + * @param bool|null $can_be_collected_by_trax Whether this deduction type can be collected via Trax Payroll. + * + * @return self + */ + public function setCanBeCollectedByTrax($can_be_collected_by_trax) { + if (is_null($can_be_collected_by_trax)) { + throw new \InvalidArgumentException('non-nullable can_be_collected_by_trax cannot be null'); + } + $this->container['can_be_collected_by_trax'] = $can_be_collected_by_trax; + + return $this; + } + + /** + * Gets additional_description + * + * @return string|null + */ + public function getAdditionalDescription() { + return $this->container['additional_description']; + } + + /** + * Sets additional_description + * + * @param string|null $additional_description An optional additional description for display purposes. + * + * @return self + */ + public function setAdditionalDescription($additional_description) { + if (is_null($additional_description)) { + throw new \InvalidArgumentException('non-nullable additional_description cannot be null'); + } + $this->container['additional_description'] = $additional_description; + + return $this; + } + + /** + * Gets hide_annual_max + * + * @return bool|null + */ + public function getHideAnnualMax() { + return $this->container['hide_annual_max']; + } + + /** + * Sets hide_annual_max + * + * @param bool|null $hide_annual_max Whether the annual maximum field should be hidden for this deduction type. + * + * @return self + */ + public function setHideAnnualMax($hide_annual_max) { + if (is_null($hide_annual_max)) { + throw new \InvalidArgumentException('non-nullable hide_annual_max cannot be null'); + } + $this->container['hide_annual_max'] = $hide_annual_max; + + return $this; + } + + /** + * Gets managed_deduction_type + * + * @return string|null + */ + public function getManagedDeductionType() { + return $this->container['managed_deduction_type']; + } + + /** + * Sets managed_deduction_type + * + * @param string|null $managed_deduction_type managed_deduction_type + * + * @return self + */ + public function setManagedDeductionType($managed_deduction_type) { + if (is_null($managed_deduction_type)) { + $this->openApiNullablesSetToNull['managed_deduction_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['managed_deduction_type'])) { + unset($nullablesSetToNull['managed_deduction_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['managed_deduction_type'] = $managed_deduction_type; + + return $this; + } + + /** + * Gets sub_types + * + * @return \BhrSdk\Model\BenefitDeductionSubType[]|null + */ + public function getSubTypes() { + return $this->container['sub_types']; + } + + /** + * Sets sub_types + * + * @param \BhrSdk\Model\BenefitDeductionSubType[]|null $sub_types Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types. + * + * @return self + */ + public function setSubTypes($sub_types) { + if (is_null($sub_types)) { + throw new \InvalidArgumentException('non-nullable sub_types cannot be null'); + } + $this->container['sub_types'] = $sub_types; + + return $this; + } + + /** + * Gets sub_type_text + * + * @return string|null + */ + public function getSubTypeText() { + return $this->container['sub_type_text']; + } + + /** + * Sets sub_type_text + * + * @param string|null $sub_type_text A label or question displayed alongside sub-type selection (e.g. \"Reportable on the W-2?\"). Empty string for types without sub-types. + * + * @return self + */ + public function setSubTypeText($sub_type_text) { + if (is_null($sub_type_text)) { + throw new \InvalidArgumentException('non-nullable sub_type_text cannot be null'); + } + $this->container['sub_type_text'] = $sub_type_text; + + return $this; + } + + /** + * Gets deduction_note + * + * @return string|null + */ + public function getDeductionNote() { + return $this->container['deduction_note']; + } + + /** + * Sets deduction_note + * + * @param string|null $deduction_note An informational note to display to the user when configuring this deduction type. + * + * @return self + */ + public function setDeductionNote($deduction_note) { + if (is_null($deduction_note)) { + throw new \InvalidArgumentException('non-nullable deduction_note cannot be null'); + } + $this->container['deduction_note'] = $deduction_note; + + return $this; + } + + /** + * Gets deduction_note_link + * + * @return string|null + */ + public function getDeductionNoteLink() { + return $this->container['deduction_note_link']; + } + + /** + * Sets deduction_note_link + * + * @param string|null $deduction_note_link A URL for a \"learn more\" link associated with the deduction note. + * + * @return self + */ + public function setDeductionNoteLink($deduction_note_link) { + if (is_null($deduction_note_link)) { + throw new \InvalidArgumentException('non-nullable deduction_note_link cannot be null'); + } + $this->container['deduction_note_link'] = $deduction_note_link; + + return $this; + } + + /** + * Gets deduction_note_link_text + * + * @return string|null + */ + public function getDeductionNoteLinkText() { + return $this->container['deduction_note_link_text']; + } + + /** + * Sets deduction_note_link_text + * + * @param string|null $deduction_note_link_text The display text for the deduction note link. + * + * @return self + */ + public function setDeductionNoteLinkText($deduction_note_link_text) { + if (is_null($deduction_note_link_text)) { + throw new \InvalidArgumentException('non-nullable deduction_note_link_text cannot be null'); + } + $this->container['deduction_note_link_text'] = $deduction_note_link_text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BenefitDeductionTypeId.php b/lib/Model/BenefitDeductionTypeId.php new file mode 100644 index 00000000..fab491fa --- /dev/null +++ b/lib/Model/BenefitDeductionTypeId.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * BenefitDeductionTypeId + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BenefitDeductionTypeId Class Doc Comment + * + * @category Class + * @description The deduction type ID. Integer for leaf types (e.g. 1 for 401(k)); string slug for grouped parent types (e.g. \"pretax_subtype\"). + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BenefitDeductionTypeId implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BenefitDeductionType_id'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BudgetBreakdownImportResponse.php b/lib/Model/BudgetBreakdownImportResponse.php new file mode 100644 index 00000000..df9ce7e2 --- /dev/null +++ b/lib/Model/BudgetBreakdownImportResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * BudgetBreakdownImportResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BudgetBreakdownImportResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BudgetBreakdownImportResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BudgetBreakdownImportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BudgetGuidelinesView.php b/lib/Model/BudgetGuidelinesView.php new file mode 100644 index 00000000..e0c93fee --- /dev/null +++ b/lib/Model/BudgetGuidelinesView.php @@ -0,0 +1,535 @@ +<?php +declare(strict_types=1); +/** + * BudgetGuidelinesView + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BudgetGuidelinesView Class Doc Comment + * + * @category Class + * @description Budget guidelines for compensation planning budgets + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BudgetGuidelinesView implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BudgetGuidelinesView'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'use_guidelines' => 'bool', + 'soft_minimum' => 'float', + 'soft_maximum' => 'float', + 'guidelines_warning_errors' => '\BhrSdk\Model\BudgetGuidelinesWarnings', + 'require_comments' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'use_guidelines' => null, + 'soft_minimum' => null, + 'soft_maximum' => null, + 'guidelines_warning_errors' => null, + 'require_comments' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'use_guidelines' => false, + 'soft_minimum' => true, + 'soft_maximum' => true, + 'guidelines_warning_errors' => true, + 'require_comments' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'use_guidelines' => 'useGuidelines', + 'soft_minimum' => 'softMinimum', + 'soft_maximum' => 'softMaximum', + 'guidelines_warning_errors' => 'guidelinesWarningErrors', + 'require_comments' => 'requireComments' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'use_guidelines' => 'setUseGuidelines', + 'soft_minimum' => 'setSoftMinimum', + 'soft_maximum' => 'setSoftMaximum', + 'guidelines_warning_errors' => 'setGuidelinesWarningErrors', + 'require_comments' => 'setRequireComments' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'use_guidelines' => 'getUseGuidelines', + 'soft_minimum' => 'getSoftMinimum', + 'soft_maximum' => 'getSoftMaximum', + 'guidelines_warning_errors' => 'getGuidelinesWarningErrors', + 'require_comments' => 'getRequireComments' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('use_guidelines', $data ?? [], null); + $this->setIfExists('soft_minimum', $data ?? [], null); + $this->setIfExists('soft_maximum', $data ?? [], null); + $this->setIfExists('guidelines_warning_errors', $data ?? [], null); + $this->setIfExists('require_comments', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets use_guidelines + * + * @return bool|null + */ + public function getUseGuidelines() { + return $this->container['use_guidelines']; + } + + /** + * Sets use_guidelines + * + * @param bool|null $use_guidelines Whether to use budget guidelines + * + * @return self + */ + public function setUseGuidelines($use_guidelines) { + if (is_null($use_guidelines)) { + throw new \InvalidArgumentException('non-nullable use_guidelines cannot be null'); + } + $this->container['use_guidelines'] = $use_guidelines; + + return $this; + } + + /** + * Gets soft_minimum + * + * @return float|null + */ + public function getSoftMinimum() { + return $this->container['soft_minimum']; + } + + /** + * Sets soft_minimum + * + * @param float|null $soft_minimum soft_minimum + * + * @return self + */ + public function setSoftMinimum($soft_minimum) { + if (is_null($soft_minimum)) { + $this->openApiNullablesSetToNull['soft_minimum'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_minimum'])) { + unset($nullablesSetToNull['soft_minimum']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_minimum'] = $soft_minimum; + + return $this; + } + + /** + * Gets soft_maximum + * + * @return float|null + */ + public function getSoftMaximum() { + return $this->container['soft_maximum']; + } + + /** + * Sets soft_maximum + * + * @param float|null $soft_maximum soft_maximum + * + * @return self + */ + public function setSoftMaximum($soft_maximum) { + if (is_null($soft_maximum)) { + $this->openApiNullablesSetToNull['soft_maximum'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_maximum'])) { + unset($nullablesSetToNull['soft_maximum']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_maximum'] = $soft_maximum; + + return $this; + } + + /** + * Gets guidelines_warning_errors + * + * @return \BhrSdk\Model\BudgetGuidelinesWarnings|null + */ + public function getGuidelinesWarningErrors() { + return $this->container['guidelines_warning_errors']; + } + + /** + * Sets guidelines_warning_errors + * + * @param \BhrSdk\Model\BudgetGuidelinesWarnings|null $guidelines_warning_errors Budget guidelines warning errors + * + * @return self + */ + public function setGuidelinesWarningErrors($guidelines_warning_errors) { + if (is_null($guidelines_warning_errors)) { + $this->openApiNullablesSetToNull['guidelines_warning_errors'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['guidelines_warning_errors'])) { + unset($nullablesSetToNull['guidelines_warning_errors']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['guidelines_warning_errors'] = $guidelines_warning_errors; + + return $this; + } + + /** + * Gets require_comments + * + * @return bool|null + */ + public function getRequireComments() { + return $this->container['require_comments']; + } + + /** + * Sets require_comments + * + * @param bool|null $require_comments Whether a comment is required for recommendations outside of guidelines + * + * @return self + */ + public function setRequireComments($require_comments) { + if (is_null($require_comments)) { + throw new \InvalidArgumentException('non-nullable require_comments cannot be null'); + } + $this->container['require_comments'] = $require_comments; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/BudgetGuidelinesWarnings.php b/lib/Model/BudgetGuidelinesWarnings.php new file mode 100644 index 00000000..792c7245 --- /dev/null +++ b/lib/Model/BudgetGuidelinesWarnings.php @@ -0,0 +1,433 @@ +<?php +declare(strict_types=1); +/** + * BudgetGuidelinesWarnings + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * BudgetGuidelinesWarnings Class Doc Comment + * + * @category Class + * @description Warning messages for saved budget guidelines + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class BudgetGuidelinesWarnings implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'BudgetGuidelinesWarnings'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'soft_minimum_warning_message' => 'string', + 'soft_maximum_warning_message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'soft_minimum_warning_message' => null, + 'soft_maximum_warning_message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'soft_minimum_warning_message' => true, + 'soft_maximum_warning_message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'soft_minimum_warning_message' => 'softMinimumWarningMessage', + 'soft_maximum_warning_message' => 'softMaximumWarningMessage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'soft_minimum_warning_message' => 'setSoftMinimumWarningMessage', + 'soft_maximum_warning_message' => 'setSoftMaximumWarningMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'soft_minimum_warning_message' => 'getSoftMinimumWarningMessage', + 'soft_maximum_warning_message' => 'getSoftMaximumWarningMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('soft_minimum_warning_message', $data ?? [], null); + $this->setIfExists('soft_maximum_warning_message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets soft_minimum_warning_message + * + * @return string|null + */ + public function getSoftMinimumWarningMessage() { + return $this->container['soft_minimum_warning_message']; + } + + /** + * Sets soft_minimum_warning_message + * + * @param string|null $soft_minimum_warning_message soft_minimum_warning_message + * + * @return self + */ + public function setSoftMinimumWarningMessage($soft_minimum_warning_message) { + if (is_null($soft_minimum_warning_message)) { + $this->openApiNullablesSetToNull['soft_minimum_warning_message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_minimum_warning_message'])) { + unset($nullablesSetToNull['soft_minimum_warning_message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_minimum_warning_message'] = $soft_minimum_warning_message; + + return $this; + } + + /** + * Gets soft_maximum_warning_message + * + * @return string|null + */ + public function getSoftMaximumWarningMessage() { + return $this->container['soft_maximum_warning_message']; + } + + /** + * Sets soft_maximum_warning_message + * + * @param string|null $soft_maximum_warning_message soft_maximum_warning_message + * + * @return self + */ + public function setSoftMaximumWarningMessage($soft_maximum_warning_message) { + if (is_null($soft_maximum_warning_message)) { + $this->openApiNullablesSetToNull['soft_maximum_warning_message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_maximum_warning_message'])) { + unset($nullablesSetToNull['soft_maximum_warning_message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_maximum_warning_message'] = $soft_maximum_warning_message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/C79f9c5950f983e59d2626faa30c00a1Request.php b/lib/Model/C79f9c5950f983e59d2626faa30c00a1Request.php new file mode 100644 index 00000000..02f5b6a1 --- /dev/null +++ b/lib/Model/C79f9c5950f983e59d2626faa30c00a1Request.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * C79f9c5950f983e59d2626faa30c00a1Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * C79f9c5950f983e59d2626faa30c00a1Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class C79f9c5950f983e59d2626faa30c00a1Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'c79f9c5950f983e59d2626faa30c00a1_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message_text' => 'string', + 'subject_text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message_text' => null, + 'subject_text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message_text' => false, + 'subject_text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message_text' => 'messageText', + 'subject_text' => 'subjectText' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message_text' => 'setMessageText', + 'subject_text' => 'setSubjectText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message_text' => 'getMessageText', + 'subject_text' => 'getSubjectText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message_text', $data ?? [], null); + $this->setIfExists('subject_text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['message_text'] === null) { + $invalidProperties[] = "'message_text' can't be null"; + } + if ($this->container['subject_text'] === null) { + $invalidProperties[] = "'subject_text' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message_text + * + * @return string + */ + public function getMessageText() { + return $this->container['message_text']; + } + + /** + * Sets message_text + * + * @param string $message_text The email body template text + * + * @return self + */ + public function setMessageText($message_text) { + if (is_null($message_text)) { + throw new \InvalidArgumentException('non-nullable message_text cannot be null'); + } + $this->container['message_text'] = $message_text; + + return $this; + } + + /** + * Gets subject_text + * + * @return string + */ + public function getSubjectText() { + return $this->container['subject_text']; + } + + /** + * Sets subject_text + * + * @param string $subject_text The email subject template text + * + * @return self + */ + public function setSubjectText($subject_text) { + if (is_null($subject_text)) { + throw new \InvalidArgumentException('non-nullable subject_text cannot be null'); + } + $this->container['subject_text'] = $subject_text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.php b/lib/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.php new file mode 100644 index 00000000..bbaed723 --- /dev/null +++ b/lib/Model/C7c32ed5278ac67e2e518bf7484a75dcRequest.php @@ -0,0 +1,423 @@ +<?php +declare(strict_types=1); +/** + * C7c32ed5278ac67e2e518bf7484a75dcRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * C7c32ed5278ac67e2e518bf7484a75dcRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class C7c32ed5278ac67e2e518bf7484a75dcRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'c7c32ed5278ac67e2e518bf7484a75dc_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'string[]', + 'notify_admins' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null, + 'notify_admins' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false, + 'notify_admins' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds', + 'notify_admins' => 'notifyAdmins' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds', + 'notify_admins' => 'setNotifyAdmins' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds', + 'notify_admins' => 'getNotifyAdmins' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('notify_admins', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return string[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param string[] $employee_ids Array of employee IDs to add as cycle admins + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets notify_admins + * + * @return bool|null + */ + public function getNotifyAdmins() { + return $this->container['notify_admins']; + } + + /** + * Sets notify_admins + * + * @param bool|null $notify_admins Whether to send email notifications to new admins + * + * @return self + */ + public function setNotifyAdmins($notify_admins) { + if (is_null($notify_admins)) { + throw new \InvalidArgumentException('non-nullable notify_admins cannot be null'); + } + $this->container['notify_admins'] = $notify_admins; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/HiringLeadsList.php b/lib/Model/CanCreateGoalsResponse.php similarity index 89% rename from lib/Model/HiringLeadsList.php rename to lib/Model/CanCreateGoalsResponse.php index 7be0a3c4..1129c246 100644 --- a/lib/Model/HiringLeadsList.php +++ b/lib/Model/CanCreateGoalsResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * HiringLeadsList + * CanCreateGoalsResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * HiringLeadsList Class Doc Comment + * CanCreateGoalsResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class HiringLeadsList implements ModelInterface, ArrayAccess, \JsonSerializable { +class CanCreateGoalsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class HiringLeadsList implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openApiModelName = 'HiringLeadsList'; + protected static $openApiModelName = 'CanCreateGoalsResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class HiringLeadsList implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openApiTypes = [ - 'hiring_lead' => '\BhrSdk\Model\HiringLead' + 'can_create_goals' => 'bool' ]; /** @@ -68,7 +68,7 @@ class HiringLeadsList implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'hiring_lead' => null + 'can_create_goals' => null ]; /** @@ -78,7 +78,7 @@ class HiringLeadsList implements ModelInterface, ArrayAccess, \JsonSerializable * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'hiring_lead' => false + 'can_create_goals' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'hiring_lead' => 'hiringLead' + 'can_create_goals' => 'canCreateGoals' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'hiring_lead' => 'setHiringLead' + 'can_create_goals' => 'setCanCreateGoals' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'hiring_lead' => 'getHiringLead' + 'can_create_goals' => 'getCanCreateGoals' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('hiring_lead', $data ?? [], null); + $this->setIfExists('can_create_goals', $data ?? [], null); } /** @@ -277,26 +277,26 @@ public function valid() { } /** - * Gets hiring_lead + * Gets can_create_goals * - * @return \BhrSdk\Model\HiringLead|null + * @return bool|null */ - public function getHiringLead() { - return $this->container['hiring_lead']; + public function getCanCreateGoals() { + return $this->container['can_create_goals']; } /** - * Sets hiring_lead + * Sets can_create_goals * - * @param \BhrSdk\Model\HiringLead|null $hiring_lead hiring_lead + * @param bool|null $can_create_goals Whether the API user can create a goal for this employee. * * @return self */ - public function setHiringLead($hiring_lead) { - if (is_null($hiring_lead)) { - throw new \InvalidArgumentException('non-nullable hiring_lead cannot be null'); + public function setCanCreateGoals($can_create_goals) { + if (is_null($can_create_goals)) { + throw new \InvalidArgumentException('non-nullable can_create_goals cannot be null'); } - $this->container['hiring_lead'] = $hiring_lead; + $this->container['can_create_goals'] = $can_create_goals; return $this; } diff --git a/lib/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.php b/lib/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.php new file mode 100644 index 00000000..80e1cb81 --- /dev/null +++ b/lib/Model/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * Cf87b8e09a001b6fb81dfce6c20ab9e3Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Cf87b8e09a001b6fb81dfce6c20ab9e3Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Cf87b8e09a001b6fb81dfce6c20ab9e3Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'cf87b8e09a001b6fb81dfce6c20ab9e3_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'assignees' => 'string[]', + 'flow_data' => 'array<string,mixed>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'assignees' => null, + 'flow_data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'assignees' => false, + 'flow_data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'assignees' => 'assignees', + 'flow_data' => 'flowData' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'assignees' => 'setAssignees', + 'flow_data' => 'setFlowData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'assignees' => 'getAssignees', + 'flow_data' => 'getFlowData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('assignees', $data ?? [], null); + $this->setIfExists('flow_data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['assignees'] === null) { + $invalidProperties[] = "'assignees' can't be null"; + } + if ($this->container['flow_data'] === null) { + $invalidProperties[] = "'flow_data' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets assignees + * + * @return string[] + */ + public function getAssignees() { + return $this->container['assignees']; + } + + /** + * Sets assignees + * + * @param string[] $assignees Array of assignee employee IDs + * + * @return self + */ + public function setAssignees($assignees) { + if (is_null($assignees)) { + throw new \InvalidArgumentException('non-nullable assignees cannot be null'); + } + $this->container['assignees'] = $assignees; + + return $this; + } + + /** + * Gets flow_data + * + * @return array<string,mixed> + */ + public function getFlowData() { + return $this->container['flow_data']; + } + + /** + * Sets flow_data + * + * @param array<string,mixed> $flow_data Flow data for the approval + * + * @return self + */ + public function setFlowData($flow_data) { + if (is_null($flow_data)) { + throw new \InvalidArgumentException('non-nullable flow_data cannot be null'); + } + $this->container['flow_data'] = $flow_data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeIdsResponse.php b/lib/Model/ChangedEmployeeIdsResponse.php new file mode 100644 index 00000000..505dc819 --- /dev/null +++ b/lib/Model/ChangedEmployeeIdsResponse.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeIdsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeIdsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeIdsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeIdsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'latest' => '\DateTime', + 'employees' => 'array<string,\BhrSdk\Model\ChangedEmployeeIdsResponseEmployeesValue>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'latest' => 'date-time', + 'employees' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'latest' => false, + 'employees' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'latest' => 'latest', + 'employees' => 'employees' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'latest' => 'setLatest', + 'employees' => 'setEmployees' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'latest' => 'getLatest', + 'employees' => 'getEmployees' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('latest', $data ?? [], null); + $this->setIfExists('employees', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['latest'] === null) { + $invalidProperties[] = "'latest' can't be null"; + } + if ($this->container['employees'] === null) { + $invalidProperties[] = "'employees' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets latest + * + * @return \DateTime + */ + public function getLatest() { + return $this->container['latest']; + } + + /** + * Sets latest + * + * @param \DateTime $latest The latest last-changed timestamp among the returned employees. + * + * @return self + */ + public function setLatest($latest) { + if (is_null($latest)) { + throw new \InvalidArgumentException('non-nullable latest cannot be null'); + } + $this->container['latest'] = $latest; + + return $this; + } + + /** + * Gets employees + * + * @return array<string,\BhrSdk\Model\ChangedEmployeeIdsResponseEmployeesValue> + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param array<string,\BhrSdk\Model\ChangedEmployeeIdsResponseEmployeesValue> $employees Map of employee IDs to change metadata for each changed employee. + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeIdsResponseEmployeesValue.php b/lib/Model/ChangedEmployeeIdsResponseEmployeesValue.php new file mode 100644 index 00000000..5147e324 --- /dev/null +++ b/lib/Model/ChangedEmployeeIdsResponseEmployeesValue.php @@ -0,0 +1,488 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeIdsResponseEmployeesValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeIdsResponseEmployeesValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeIdsResponseEmployeesValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeIdsResponse_employees_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'action' => 'string', + 'last_changed' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'action' => null, + 'last_changed' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'action' => false, + 'last_changed' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'action' => 'action', + 'last_changed' => 'lastChanged' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'action' => 'setAction', + 'last_changed' => 'setLastChanged' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'action' => 'getAction', + 'last_changed' => 'getLastChanged' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const ACTION_INSERTED = 'Inserted'; + public const ACTION_UPDATED = 'Updated'; + public const ACTION_DELETED = 'Deleted'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActionAllowableValues() { + return [ + self::ACTION_INSERTED, + self::ACTION_UPDATED, + self::ACTION_DELETED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('last_changed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getActionAllowableValues(); + if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'action', must be one of '%s'", + $this->container['action'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The employee ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets action + * + * @return string|null + */ + public function getAction() { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string|null $action The type of change: Inserted, Updated, or Deleted. + * + * @return self + */ + public function setAction($action) { + if (is_null($action)) { + throw new \InvalidArgumentException('non-nullable action cannot be null'); + } + $allowedValues = $this->getActionAllowableValues(); + if (!in_array($action, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'action', must be one of '%s'", + $action, + implode("', '", $allowedValues) + ) + ); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets last_changed + * + * @return \DateTime|null + */ + public function getLastChanged() { + return $this->container['last_changed']; + } + + /** + * Sets last_changed + * + * @param \DateTime|null $last_changed ISO 8601 timestamp of the last change. + * + * @return self + */ + public function setLastChanged($last_changed) { + if (is_null($last_changed)) { + throw new \InvalidArgumentException('non-nullable last_changed cannot be null'); + } + $this->container['last_changed'] = $last_changed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeTableDataResponse.php b/lib/Model/ChangedEmployeeTableDataResponse.php new file mode 100644 index 00000000..4b2a710f --- /dev/null +++ b/lib/Model/ChangedEmployeeTableDataResponse.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeTableDataResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeTableDataResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeTableDataResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeTableDataResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'table' => 'string', + 'employees' => 'array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValue>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'table' => null, + 'employees' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'table' => false, + 'employees' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'table' => 'table', + 'employees' => 'employees' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'table' => 'setTable', + 'employees' => 'setEmployees' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'table' => 'getTable', + 'employees' => 'getEmployees' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('table', $data ?? [], null); + $this->setIfExists('employees', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['table'] === null) { + $invalidProperties[] = "'table' can't be null"; + } + if ($this->container['employees'] === null) { + $invalidProperties[] = "'employees' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets table + * + * @return string + */ + public function getTable() { + return $this->container['table']; + } + + /** + * Sets table + * + * @param string $table The requested table name. + * + * @return self + */ + public function setTable($table) { + if (is_null($table)) { + throw new \InvalidArgumentException('non-nullable table cannot be null'); + } + $this->container['table'] = $table; + + return $this; + } + + /** + * Gets employees + * + * @return array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValue> + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValue> $employees Map of employee IDs to changed table data for that employee. + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeTableDataResponseEmployeesValue.php b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValue.php new file mode 100644 index 00000000..88d604b6 --- /dev/null +++ b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValue.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeTableDataResponseEmployeesValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeTableDataResponseEmployeesValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeTableDataResponseEmployeesValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeTableDataResponse_employees_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'last_changed' => '\DateTime', + 'rows' => 'array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue>[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'last_changed' => 'date-time', + 'rows' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'last_changed' => false, + 'rows' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'last_changed' => 'lastChanged', + 'rows' => 'rows' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'last_changed' => 'setLastChanged', + 'rows' => 'setRows' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'last_changed' => 'getLastChanged', + 'rows' => 'getRows' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('last_changed', $data ?? [], null); + $this->setIfExists('rows', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets last_changed + * + * @return \DateTime|null + */ + public function getLastChanged() { + return $this->container['last_changed']; + } + + /** + * Sets last_changed + * + * @param \DateTime|null $last_changed ISO 8601 timestamp of the last change for this employee. + * + * @return self + */ + public function setLastChanged($last_changed) { + if (is_null($last_changed)) { + throw new \InvalidArgumentException('non-nullable last_changed cannot be null'); + } + $this->container['last_changed'] = $last_changed; + + return $this; + } + + /** + * Gets rows + * + * @return array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue>[]|null + */ + public function getRows() { + return $this->container['rows']; + } + + /** + * Sets rows + * + * @param array<string,\BhrSdk\Model\ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue>[]|null $rows The table rows for this employee. + * + * @return self + */ + public function setRows($rows) { + if (is_null($rows)) { + throw new \InvalidArgumentException('non-nullable rows cannot be null'); + } + $this->container['rows'] = $rows; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.php b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.php new file mode 100644 index 00000000..7e050843 --- /dev/null +++ b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeTableDataResponse_employees_value_rows_inner_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.php b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.php new file mode 100644 index 00000000..77695e6f --- /dev/null +++ b/lib/Model/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ChangedEmployeeTableDataResponse_employees_value_rows_inner_value_anyOf_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ClockEntrySchema.php b/lib/Model/ClockEntrySchema.php index fa839898..8355e5fa 100644 --- a/lib/Model/ClockEntrySchema.php +++ b/lib/Model/ClockEntrySchema.php @@ -65,7 +65,8 @@ class ClockEntrySchema implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => 'int', 'project_id' => 'int', 'task_id' => 'int', - 'note' => 'string' + 'note' => 'string', + 'break_id' => 'string' ]; /** @@ -83,7 +84,8 @@ class ClockEntrySchema implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => null, 'project_id' => null, 'task_id' => null, - 'note' => null + 'note' => null, + 'break_id' => 'uuid' ]; /** @@ -100,7 +102,8 @@ class ClockEntrySchema implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => false, 'project_id' => false, 'task_id' => false, - 'note' => false + 'note' => false, + 'break_id' => true ]; /** @@ -192,7 +195,8 @@ public function isNullableSetToNull(string $property): bool { 'id' => 'id', 'project_id' => 'projectId', 'task_id' => 'taskId', - 'note' => 'note' + 'note' => 'note', + 'break_id' => 'breakId' ]; /** @@ -208,7 +212,8 @@ public function isNullableSetToNull(string $property): bool { 'id' => 'setId', 'project_id' => 'setProjectId', 'task_id' => 'setTaskId', - 'note' => 'setNote' + 'note' => 'setNote', + 'break_id' => 'setBreakId' ]; /** @@ -224,7 +229,8 @@ public function isNullableSetToNull(string $property): bool { 'id' => 'getId', 'project_id' => 'getProjectId', 'task_id' => 'getTaskId', - 'note' => 'getNote' + 'note' => 'getNote', + 'break_id' => 'getBreakId' ]; /** @@ -286,6 +292,7 @@ public function __construct(?array $data = null) { $this->setIfExists('project_id', $data ?? [], null); $this->setIfExists('task_id', $data ?? [], null); $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('break_id', $data ?? [], null); } /** @@ -555,6 +562,37 @@ public function setNote($note) { return $this; } + + /** + * Gets break_id + * + * @return string|null + */ + public function getBreakId() { + return $this->container['break_id']; + } + + /** + * Sets break_id + * + * @param string|null $break_id break_id + * + * @return self + */ + public function setBreakId($break_id) { + if (is_null($break_id)) { + $this->openApiNullablesSetToNull['break_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['break_id'])) { + unset($nullablesSetToNull['break_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['break_id'] = $break_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ClockInRequestSchema.php b/lib/Model/ClockInRequestSchema.php index 98de5314..753da5e4 100644 --- a/lib/Model/ClockInRequestSchema.php +++ b/lib/Model/ClockInRequestSchema.php @@ -63,7 +63,9 @@ class ClockInRequestSchema implements ModelInterface, ArrayAccess, \JsonSerializ 'note' => 'string', 'date' => '\DateTime', 'start' => 'string', - 'timezone' => 'string' + 'timezone' => 'string', + 'break_id' => 'string', + 'offline' => 'bool' ]; /** @@ -79,7 +81,9 @@ class ClockInRequestSchema implements ModelInterface, ArrayAccess, \JsonSerializ 'note' => null, 'date' => 'date', 'start' => null, - 'timezone' => null + 'timezone' => null, + 'break_id' => 'uuid', + 'offline' => null ]; /** @@ -94,7 +98,9 @@ class ClockInRequestSchema implements ModelInterface, ArrayAccess, \JsonSerializ 'note' => true, 'date' => true, 'start' => true, - 'timezone' => true + 'timezone' => true, + 'break_id' => true, + 'offline' => false ]; /** @@ -184,7 +190,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'note', 'date' => 'date', 'start' => 'start', - 'timezone' => 'timezone' + 'timezone' => 'timezone', + 'break_id' => 'breakId', + 'offline' => 'offline' ]; /** @@ -198,7 +206,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'setNote', 'date' => 'setDate', 'start' => 'setStart', - 'timezone' => 'setTimezone' + 'timezone' => 'setTimezone', + 'break_id' => 'setBreakId', + 'offline' => 'setOffline' ]; /** @@ -212,7 +222,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'getNote', 'date' => 'getDate', 'start' => 'getStart', - 'timezone' => 'getTimezone' + 'timezone' => 'getTimezone', + 'break_id' => 'getBreakId', + 'offline' => 'getOffline' ]; /** @@ -272,6 +284,8 @@ public function __construct(?array $data = null) { $this->setIfExists('date', $data ?? [], null); $this->setIfExists('start', $data ?? [], null); $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('break_id', $data ?? [], null); + $this->setIfExists('offline', $data ?? [], null); } /** @@ -328,7 +342,7 @@ public function getProjectId() { /** * Sets project_id * - * @param int|null $project_id ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified. + * @param int|null $project_id project_id * * @return self */ @@ -359,7 +373,7 @@ public function getTaskId() { /** * Sets task_id * - * @param int|null $task_id ID of the time tracking task that should be associated with the timesheet entry. + * @param int|null $task_id task_id * * @return self */ @@ -390,7 +404,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note The note that should be associated with the timesheet entry + * @param string|null $note note * * @return self */ @@ -421,7 +435,7 @@ public function getDate() { /** * Sets date * - * @param \DateTime|null $date Date for the timesheet entry. Must be in YYYY-MM-DD format. + * @param \DateTime|null $date date * * @return self */ @@ -452,7 +466,7 @@ public function getStart() { /** * Sets start * - * @param string|null $start The time for the clock in. In 24 hour format HH:MM + * @param string|null $start start * * @return self */ @@ -488,7 +502,7 @@ public function getTimezone() { /** * Sets timezone * - * @param string|null $timezone The timezone associated with the clock in. + * @param string|null $timezone timezone * * @return self */ @@ -506,6 +520,62 @@ public function setTimezone($timezone) { return $this; } + + /** + * Gets break_id + * + * @return string|null + */ + public function getBreakId() { + return $this->container['break_id']; + } + + /** + * Sets break_id + * + * @param string|null $break_id break_id + * + * @return self + */ + public function setBreakId($break_id) { + if (is_null($break_id)) { + $this->openApiNullablesSetToNull['break_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['break_id'])) { + unset($nullablesSetToNull['break_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['break_id'] = $break_id; + + return $this; + } + + /** + * Gets offline + * + * @return bool|null + */ + public function getOffline() { + return $this->container['offline']; + } + + /** + * Sets offline + * + * @param bool|null $offline Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later. + * + * @return self + */ + public function setOffline($offline) { + if (is_null($offline)) { + throw new \InvalidArgumentException('non-nullable offline cannot be null'); + } + $this->container['offline'] = $offline; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CloseGoalRequest.php b/lib/Model/CloseGoalRequest.php new file mode 100644 index 00000000..95bd55a8 --- /dev/null +++ b/lib/Model/CloseGoalRequest.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * CloseGoalRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CloseGoalRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CloseGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'close_goal_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'comment' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'comment' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'comment' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'comment' => 'comment' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'comment' => 'setComment' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'comment' => 'getComment' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('comment', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets comment + * + * @return string|null + */ + public function getComment() { + return $this->container['comment']; + } + + /** + * Sets comment + * + * @param string|null $comment comment + * + * @return self + */ + public function setComment($comment) { + if (is_null($comment)) { + $this->openApiNullablesSetToNull['comment'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['comment'])) { + unset($nullablesSetToNull['comment']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['comment'] = $comment; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyAlertDataObject.php b/lib/Model/CompanyAlertDataObject.php new file mode 100644 index 00000000..daaf9246 --- /dev/null +++ b/lib/Model/CompanyAlertDataObject.php @@ -0,0 +1,1184 @@ +<?php +declare(strict_types=1); +/** + * CompanyAlertDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyAlertDataObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyAlertDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyAlertDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'bamboo_alert_id' => 'int', + 'schedule' => 'string', + 'due_within' => 'int', + 'due_interval' => 'string', + 'send_to_employee' => 'bool', + 'send_to_manager' => 'bool', + 'send_to_admin' => 'bool', + 'editor_user_id' => 'int', + 'last_edited' => 'mixed', + 'custom_message' => 'string', + 'custom_subject' => 'string', + 'group_by' => 'string', + 'limit_training_to_required' => 'bool', + 'run_at_time' => 'string', + 'run_at_time_zone' => 'string', + 'include_position' => 'bool', + 'include_location' => 'bool', + 'additional_recipient_emails' => 'string[]', + 'employee_ids' => 'string[]', + 'list_value_ids' => 'int[]', + 'filter_list_value_ids' => 'int[]', + 'user_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'bamboo_alert_id' => null, + 'schedule' => null, + 'due_within' => null, + 'due_interval' => null, + 'send_to_employee' => null, + 'send_to_manager' => null, + 'send_to_admin' => null, + 'editor_user_id' => null, + 'last_edited' => null, + 'custom_message' => null, + 'custom_subject' => null, + 'group_by' => null, + 'limit_training_to_required' => null, + 'run_at_time' => null, + 'run_at_time_zone' => null, + 'include_position' => null, + 'include_location' => null, + 'additional_recipient_emails' => null, + 'employee_ids' => null, + 'list_value_ids' => null, + 'filter_list_value_ids' => null, + 'user_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'bamboo_alert_id' => false, + 'schedule' => false, + 'due_within' => true, + 'due_interval' => true, + 'send_to_employee' => false, + 'send_to_manager' => false, + 'send_to_admin' => false, + 'editor_user_id' => true, + 'last_edited' => true, + 'custom_message' => true, + 'custom_subject' => true, + 'group_by' => true, + 'limit_training_to_required' => false, + 'run_at_time' => true, + 'run_at_time_zone' => true, + 'include_position' => false, + 'include_location' => false, + 'additional_recipient_emails' => false, + 'employee_ids' => false, + 'list_value_ids' => false, + 'filter_list_value_ids' => false, + 'user_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'bamboo_alert_id' => 'bambooAlertId', + 'schedule' => 'schedule', + 'due_within' => 'dueWithin', + 'due_interval' => 'dueInterval', + 'send_to_employee' => 'sendToEmployee', + 'send_to_manager' => 'sendToManager', + 'send_to_admin' => 'sendToAdmin', + 'editor_user_id' => 'editorUserId', + 'last_edited' => 'lastEdited', + 'custom_message' => 'customMessage', + 'custom_subject' => 'customSubject', + 'group_by' => 'groupBy', + 'limit_training_to_required' => 'limitTrainingToRequired', + 'run_at_time' => 'runAtTime', + 'run_at_time_zone' => 'runAtTimeZone', + 'include_position' => 'includePosition', + 'include_location' => 'includeLocation', + 'additional_recipient_emails' => 'additionalRecipientEmails', + 'employee_ids' => 'employeeIds', + 'list_value_ids' => 'listValueIds', + 'filter_list_value_ids' => 'filterListValueIds', + 'user_ids' => 'userIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'bamboo_alert_id' => 'setBambooAlertId', + 'schedule' => 'setSchedule', + 'due_within' => 'setDueWithin', + 'due_interval' => 'setDueInterval', + 'send_to_employee' => 'setSendToEmployee', + 'send_to_manager' => 'setSendToManager', + 'send_to_admin' => 'setSendToAdmin', + 'editor_user_id' => 'setEditorUserId', + 'last_edited' => 'setLastEdited', + 'custom_message' => 'setCustomMessage', + 'custom_subject' => 'setCustomSubject', + 'group_by' => 'setGroupBy', + 'limit_training_to_required' => 'setLimitTrainingToRequired', + 'run_at_time' => 'setRunAtTime', + 'run_at_time_zone' => 'setRunAtTimeZone', + 'include_position' => 'setIncludePosition', + 'include_location' => 'setIncludeLocation', + 'additional_recipient_emails' => 'setAdditionalRecipientEmails', + 'employee_ids' => 'setEmployeeIds', + 'list_value_ids' => 'setListValueIds', + 'filter_list_value_ids' => 'setFilterListValueIds', + 'user_ids' => 'setUserIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'bamboo_alert_id' => 'getBambooAlertId', + 'schedule' => 'getSchedule', + 'due_within' => 'getDueWithin', + 'due_interval' => 'getDueInterval', + 'send_to_employee' => 'getSendToEmployee', + 'send_to_manager' => 'getSendToManager', + 'send_to_admin' => 'getSendToAdmin', + 'editor_user_id' => 'getEditorUserId', + 'last_edited' => 'getLastEdited', + 'custom_message' => 'getCustomMessage', + 'custom_subject' => 'getCustomSubject', + 'group_by' => 'getGroupBy', + 'limit_training_to_required' => 'getLimitTrainingToRequired', + 'run_at_time' => 'getRunAtTime', + 'run_at_time_zone' => 'getRunAtTimeZone', + 'include_position' => 'getIncludePosition', + 'include_location' => 'getIncludeLocation', + 'additional_recipient_emails' => 'getAdditionalRecipientEmails', + 'employee_ids' => 'getEmployeeIds', + 'list_value_ids' => 'getListValueIds', + 'filter_list_value_ids' => 'getFilterListValueIds', + 'user_ids' => 'getUserIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SCHEDULE_DAILY = 'daily'; + public const SCHEDULE_WEEKLY = 'weekly'; + public const SCHEDULE_MONTHLY = 'monthly'; + public const SCHEDULE_QUARTERLY = 'quarterly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getScheduleAllowableValues() { + return [ + self::SCHEDULE_DAILY, + self::SCHEDULE_WEEKLY, + self::SCHEDULE_MONTHLY, + self::SCHEDULE_QUARTERLY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('bamboo_alert_id', $data ?? [], null); + $this->setIfExists('schedule', $data ?? [], null); + $this->setIfExists('due_within', $data ?? [], null); + $this->setIfExists('due_interval', $data ?? [], null); + $this->setIfExists('send_to_employee', $data ?? [], null); + $this->setIfExists('send_to_manager', $data ?? [], null); + $this->setIfExists('send_to_admin', $data ?? [], null); + $this->setIfExists('editor_user_id', $data ?? [], null); + $this->setIfExists('last_edited', $data ?? [], null); + $this->setIfExists('custom_message', $data ?? [], null); + $this->setIfExists('custom_subject', $data ?? [], null); + $this->setIfExists('group_by', $data ?? [], null); + $this->setIfExists('limit_training_to_required', $data ?? [], null); + $this->setIfExists('run_at_time', $data ?? [], null); + $this->setIfExists('run_at_time_zone', $data ?? [], null); + $this->setIfExists('include_position', $data ?? [], null); + $this->setIfExists('include_location', $data ?? [], null); + $this->setIfExists('additional_recipient_emails', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('list_value_ids', $data ?? [], null); + $this->setIfExists('filter_list_value_ids', $data ?? [], null); + $this->setIfExists('user_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getScheduleAllowableValues(); + if (!is_null($this->container['schedule']) && !in_array($this->container['schedule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'schedule', must be one of '%s'", + $this->container['schedule'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The unique identifier of the company alert. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets bamboo_alert_id + * + * @return int|null + */ + public function getBambooAlertId() { + return $this->container['bamboo_alert_id']; + } + + /** + * Sets bamboo_alert_id + * + * @param int|null $bamboo_alert_id The unique identifier of the Bamboo alert. + * + * @return self + */ + public function setBambooAlertId($bamboo_alert_id) { + if (is_null($bamboo_alert_id)) { + throw new \InvalidArgumentException('non-nullable bamboo_alert_id cannot be null'); + } + $this->container['bamboo_alert_id'] = $bamboo_alert_id; + + return $this; + } + + /** + * Gets schedule + * + * @return string|null + */ + public function getSchedule() { + return $this->container['schedule']; + } + + /** + * Sets schedule + * + * @param string|null $schedule The schedule for the company alert. + * + * @return self + */ + public function setSchedule($schedule) { + if (is_null($schedule)) { + throw new \InvalidArgumentException('non-nullable schedule cannot be null'); + } + $allowedValues = $this->getScheduleAllowableValues(); + if (!in_array($schedule, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'schedule', must be one of '%s'", + $schedule, + implode("', '", $allowedValues) + ) + ); + } + $this->container['schedule'] = $schedule; + + return $this; + } + + /** + * Gets due_within + * + * @return int|null + */ + public function getDueWithin() { + return $this->container['due_within']; + } + + /** + * Sets due_within + * + * @param int|null $due_within due_within + * + * @return self + */ + public function setDueWithin($due_within) { + if (is_null($due_within)) { + $this->openApiNullablesSetToNull['due_within'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['due_within'])) { + unset($nullablesSetToNull['due_within']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['due_within'] = $due_within; + + return $this; + } + + /** + * Gets due_interval + * + * @return string|null + */ + public function getDueInterval() { + return $this->container['due_interval']; + } + + /** + * Sets due_interval + * + * @param string|null $due_interval due_interval + * + * @return self + */ + public function setDueInterval($due_interval) { + if (is_null($due_interval)) { + $this->openApiNullablesSetToNull['due_interval'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['due_interval'])) { + unset($nullablesSetToNull['due_interval']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['due_interval'] = $due_interval; + + return $this; + } + + /** + * Gets send_to_employee + * + * @return bool|null + */ + public function getSendToEmployee() { + return $this->container['send_to_employee']; + } + + /** + * Sets send_to_employee + * + * @param bool|null $send_to_employee Whether the alert should be sent to employees. + * + * @return self + */ + public function setSendToEmployee($send_to_employee) { + if (is_null($send_to_employee)) { + throw new \InvalidArgumentException('non-nullable send_to_employee cannot be null'); + } + $this->container['send_to_employee'] = $send_to_employee; + + return $this; + } + + /** + * Gets send_to_manager + * + * @return bool|null + */ + public function getSendToManager() { + return $this->container['send_to_manager']; + } + + /** + * Sets send_to_manager + * + * @param bool|null $send_to_manager Whether the alert should be sent to managers. + * + * @return self + */ + public function setSendToManager($send_to_manager) { + if (is_null($send_to_manager)) { + throw new \InvalidArgumentException('non-nullable send_to_manager cannot be null'); + } + $this->container['send_to_manager'] = $send_to_manager; + + return $this; + } + + /** + * Gets send_to_admin + * + * @return bool|null + */ + public function getSendToAdmin() { + return $this->container['send_to_admin']; + } + + /** + * Sets send_to_admin + * + * @param bool|null $send_to_admin Whether the alert should be sent to admins. + * + * @return self + */ + public function setSendToAdmin($send_to_admin) { + if (is_null($send_to_admin)) { + throw new \InvalidArgumentException('non-nullable send_to_admin cannot be null'); + } + $this->container['send_to_admin'] = $send_to_admin; + + return $this; + } + + /** + * Gets editor_user_id + * + * @return int|null + */ + public function getEditorUserId() { + return $this->container['editor_user_id']; + } + + /** + * Sets editor_user_id + * + * @param int|null $editor_user_id editor_user_id + * + * @return self + */ + public function setEditorUserId($editor_user_id) { + if (is_null($editor_user_id)) { + $this->openApiNullablesSetToNull['editor_user_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['editor_user_id'])) { + unset($nullablesSetToNull['editor_user_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['editor_user_id'] = $editor_user_id; + + return $this; + } + + /** + * Gets last_edited + * + * @return mixed|null + */ + public function getLastEdited() { + return $this->container['last_edited']; + } + + /** + * Sets last_edited + * + * @param mixed|null $last_edited The last edited date of the company alert. + * + * @return self + */ + public function setLastEdited($last_edited) { + if (is_null($last_edited)) { + $this->openApiNullablesSetToNull['last_edited'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_edited'])) { + unset($nullablesSetToNull['last_edited']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_edited'] = $last_edited; + + return $this; + } + + /** + * Gets custom_message + * + * @return string|null + */ + public function getCustomMessage() { + return $this->container['custom_message']; + } + + /** + * Sets custom_message + * + * @param string|null $custom_message custom_message + * + * @return self + */ + public function setCustomMessage($custom_message) { + if (is_null($custom_message)) { + $this->openApiNullablesSetToNull['custom_message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['custom_message'])) { + unset($nullablesSetToNull['custom_message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['custom_message'] = $custom_message; + + return $this; + } + + /** + * Gets custom_subject + * + * @return string|null + */ + public function getCustomSubject() { + return $this->container['custom_subject']; + } + + /** + * Sets custom_subject + * + * @param string|null $custom_subject custom_subject + * + * @return self + */ + public function setCustomSubject($custom_subject) { + if (is_null($custom_subject)) { + $this->openApiNullablesSetToNull['custom_subject'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['custom_subject'])) { + unset($nullablesSetToNull['custom_subject']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['custom_subject'] = $custom_subject; + + return $this; + } + + /** + * Gets group_by + * + * @return string|null + */ + public function getGroupBy() { + return $this->container['group_by']; + } + + /** + * Sets group_by + * + * @param string|null $group_by group_by + * + * @return self + */ + public function setGroupBy($group_by) { + if (is_null($group_by)) { + $this->openApiNullablesSetToNull['group_by'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['group_by'])) { + unset($nullablesSetToNull['group_by']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group_by'] = $group_by; + + return $this; + } + + /** + * Gets limit_training_to_required + * + * @return bool|null + */ + public function getLimitTrainingToRequired() { + return $this->container['limit_training_to_required']; + } + + /** + * Sets limit_training_to_required + * + * @param bool|null $limit_training_to_required Whether the training should be limited to required training. + * + * @return self + */ + public function setLimitTrainingToRequired($limit_training_to_required) { + if (is_null($limit_training_to_required)) { + throw new \InvalidArgumentException('non-nullable limit_training_to_required cannot be null'); + } + $this->container['limit_training_to_required'] = $limit_training_to_required; + + return $this; + } + + /** + * Gets run_at_time + * + * @return string|null + */ + public function getRunAtTime() { + return $this->container['run_at_time']; + } + + /** + * Sets run_at_time + * + * @param string|null $run_at_time run_at_time + * + * @return self + */ + public function setRunAtTime($run_at_time) { + if (is_null($run_at_time)) { + $this->openApiNullablesSetToNull['run_at_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['run_at_time'])) { + unset($nullablesSetToNull['run_at_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['run_at_time'] = $run_at_time; + + return $this; + } + + /** + * Gets run_at_time_zone + * + * @return string|null + */ + public function getRunAtTimeZone() { + return $this->container['run_at_time_zone']; + } + + /** + * Sets run_at_time_zone + * + * @param string|null $run_at_time_zone run_at_time_zone + * + * @return self + */ + public function setRunAtTimeZone($run_at_time_zone) { + if (is_null($run_at_time_zone)) { + $this->openApiNullablesSetToNull['run_at_time_zone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['run_at_time_zone'])) { + unset($nullablesSetToNull['run_at_time_zone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['run_at_time_zone'] = $run_at_time_zone; + + return $this; + } + + /** + * Gets include_position + * + * @return bool|null + */ + public function getIncludePosition() { + return $this->container['include_position']; + } + + /** + * Sets include_position + * + * @param bool|null $include_position Whether the alert should include position. + * + * @return self + */ + public function setIncludePosition($include_position) { + if (is_null($include_position)) { + throw new \InvalidArgumentException('non-nullable include_position cannot be null'); + } + $this->container['include_position'] = $include_position; + + return $this; + } + + /** + * Gets include_location + * + * @return bool|null + */ + public function getIncludeLocation() { + return $this->container['include_location']; + } + + /** + * Sets include_location + * + * @param bool|null $include_location Whether the alert should include location. + * + * @return self + */ + public function setIncludeLocation($include_location) { + if (is_null($include_location)) { + throw new \InvalidArgumentException('non-nullable include_location cannot be null'); + } + $this->container['include_location'] = $include_location; + + return $this; + } + + /** + * Gets additional_recipient_emails + * + * @return string[]|null + */ + public function getAdditionalRecipientEmails() { + return $this->container['additional_recipient_emails']; + } + + /** + * Sets additional_recipient_emails + * + * @param string[]|null $additional_recipient_emails The additional recipient emails for the company alert. + * + * @return self + */ + public function setAdditionalRecipientEmails($additional_recipient_emails) { + if (is_null($additional_recipient_emails)) { + throw new \InvalidArgumentException('non-nullable additional_recipient_emails cannot be null'); + } + $this->container['additional_recipient_emails'] = $additional_recipient_emails; + + return $this; + } + + /** + * Gets employee_ids + * + * @return string[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param string[]|null $employee_ids The employee IDs for the company alert. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets list_value_ids + * + * @return int[]|null + */ + public function getListValueIds() { + return $this->container['list_value_ids']; + } + + /** + * Sets list_value_ids + * + * @param int[]|null $list_value_ids The list value IDs for the company alert. + * + * @return self + */ + public function setListValueIds($list_value_ids) { + if (is_null($list_value_ids)) { + throw new \InvalidArgumentException('non-nullable list_value_ids cannot be null'); + } + $this->container['list_value_ids'] = $list_value_ids; + + return $this; + } + + /** + * Gets filter_list_value_ids + * + * @return int[]|null + */ + public function getFilterListValueIds() { + return $this->container['filter_list_value_ids']; + } + + /** + * Sets filter_list_value_ids + * + * @param int[]|null $filter_list_value_ids The filter list value IDs for the company alert. + * + * @return self + */ + public function setFilterListValueIds($filter_list_value_ids) { + if (is_null($filter_list_value_ids)) { + throw new \InvalidArgumentException('non-nullable filter_list_value_ids cannot be null'); + } + $this->container['filter_list_value_ids'] = $filter_list_value_ids; + + return $this; + } + + /** + * Gets user_ids + * + * @return int[]|null + */ + public function getUserIds() { + return $this->container['user_ids']; + } + + /** + * Sets user_ids + * + * @param int[]|null $user_ids The user IDs for the company alert. + * + * @return self + */ + public function setUserIds($user_ids) { + if (is_null($user_ids)) { + throw new \InvalidArgumentException('non-nullable user_ids cannot be null'); + } + $this->container['user_ids'] = $user_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyBenefitSummary.php b/lib/Model/CompanyBenefitSummary.php new file mode 100644 index 00000000..f97d9696 --- /dev/null +++ b/lib/Model/CompanyBenefitSummary.php @@ -0,0 +1,771 @@ +<?php +declare(strict_types=1); +/** + * CompanyBenefitSummary + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyBenefitSummary Class Doc Comment + * + * @category Class + * @description A summary representation of a company benefit plan as returned by the list endpoint. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyBenefitSummary implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyBenefitSummary'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'type' => 'string', + 'benefit_vendor_id' => 'string', + 'deduction_type_id' => 'string', + 'company_deduction_id' => 'string', + 'start_date' => '\DateTime', + 'end_date' => '\DateTime', + 'allows_catch_up' => 'bool', + 'allows_super_catch_up' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'type' => null, + 'benefit_vendor_id' => null, + 'deduction_type_id' => null, + 'company_deduction_id' => null, + 'start_date' => 'date', + 'end_date' => 'date', + 'allows_catch_up' => null, + 'allows_super_catch_up' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'type' => false, + 'benefit_vendor_id' => true, + 'deduction_type_id' => true, + 'company_deduction_id' => true, + 'start_date' => true, + 'end_date' => true, + 'allows_catch_up' => true, + 'allows_super_catch_up' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'type' => 'type', + 'benefit_vendor_id' => 'benefitVendorId', + 'deduction_type_id' => 'deductionTypeId', + 'company_deduction_id' => 'companyDeductionId', + 'start_date' => 'startDate', + 'end_date' => 'endDate', + 'allows_catch_up' => 'allowsCatchUp', + 'allows_super_catch_up' => 'allowsSuperCatchUp' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'type' => 'setType', + 'benefit_vendor_id' => 'setBenefitVendorId', + 'deduction_type_id' => 'setDeductionTypeId', + 'company_deduction_id' => 'setCompanyDeductionId', + 'start_date' => 'setStartDate', + 'end_date' => 'setEndDate', + 'allows_catch_up' => 'setAllowsCatchUp', + 'allows_super_catch_up' => 'setAllowsSuperCatchUp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'type' => 'getType', + 'benefit_vendor_id' => 'getBenefitVendorId', + 'deduction_type_id' => 'getDeductionTypeId', + 'company_deduction_id' => 'getCompanyDeductionId', + 'start_date' => 'getStartDate', + 'end_date' => 'getEndDate', + 'allows_catch_up' => 'getAllowsCatchUp', + 'allows_super_catch_up' => 'getAllowsSuperCatchUp' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_HEALTH = 'health'; + public const TYPE_DENTAL = 'dental'; + public const TYPE_VISION = 'vision'; + public const TYPE_RETIREMENT = 'retirement'; + public const TYPE_HSA = 'hsa'; + public const TYPE_FLEX = 'flex'; + public const TYPE_LIFE = 'life'; + public const TYPE_DISABILITY = 'disability'; + public const TYPE_REIMBURSEMENT = 'reimbursement'; + public const TYPE_SUPPLEMENTAL = 'supplemental'; + public const TYPE_OTHER = 'other'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_HEALTH, + self::TYPE_DENTAL, + self::TYPE_VISION, + self::TYPE_RETIREMENT, + self::TYPE_HSA, + self::TYPE_FLEX, + self::TYPE_LIFE, + self::TYPE_DISABILITY, + self::TYPE_REIMBURSEMENT, + self::TYPE_SUPPLEMENTAL, + self::TYPE_OTHER, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('benefit_vendor_id', $data ?? [], null); + $this->setIfExists('deduction_type_id', $data ?? [], null); + $this->setIfExists('company_deduction_id', $data ?? [], null); + $this->setIfExists('start_date', $data ?? [], null); + $this->setIfExists('end_date', $data ?? [], null); + $this->setIfExists('allows_catch_up', $data ?? [], null); + $this->setIfExists('allows_super_catch_up', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the company benefit plan. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the company benefit plan. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The benefit category type. + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets benefit_vendor_id + * + * @return string|null + */ + public function getBenefitVendorId() { + return $this->container['benefit_vendor_id']; + } + + /** + * Sets benefit_vendor_id + * + * @param string|null $benefit_vendor_id benefit_vendor_id + * + * @return self + */ + public function setBenefitVendorId($benefit_vendor_id) { + if (is_null($benefit_vendor_id)) { + $this->openApiNullablesSetToNull['benefit_vendor_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benefit_vendor_id'])) { + unset($nullablesSetToNull['benefit_vendor_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benefit_vendor_id'] = $benefit_vendor_id; + + return $this; + } + + /** + * Gets deduction_type_id + * + * @return string|null + */ + public function getDeductionTypeId() { + return $this->container['deduction_type_id']; + } + + /** + * Sets deduction_type_id + * + * @param string|null $deduction_type_id deduction_type_id + * + * @return self + */ + public function setDeductionTypeId($deduction_type_id) { + if (is_null($deduction_type_id)) { + $this->openApiNullablesSetToNull['deduction_type_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deduction_type_id'])) { + unset($nullablesSetToNull['deduction_type_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deduction_type_id'] = $deduction_type_id; + + return $this; + } + + /** + * Gets company_deduction_id + * + * @return string|null + */ + public function getCompanyDeductionId() { + return $this->container['company_deduction_id']; + } + + /** + * Sets company_deduction_id + * + * @param string|null $company_deduction_id company_deduction_id + * + * @return self + */ + public function setCompanyDeductionId($company_deduction_id) { + if (is_null($company_deduction_id)) { + $this->openApiNullablesSetToNull['company_deduction_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_deduction_id'])) { + unset($nullablesSetToNull['company_deduction_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_deduction_id'] = $company_deduction_id; + + return $this; + } + + /** + * Gets start_date + * + * @return \DateTime|null + */ + public function getStartDate() { + return $this->container['start_date']; + } + + /** + * Sets start_date + * + * @param \DateTime|null $start_date start_date + * + * @return self + */ + public function setStartDate($start_date) { + if (is_null($start_date)) { + $this->openApiNullablesSetToNull['start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['start_date'])) { + unset($nullablesSetToNull['start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['start_date'] = $start_date; + + return $this; + } + + /** + * Gets end_date + * + * @return \DateTime|null + */ + public function getEndDate() { + return $this->container['end_date']; + } + + /** + * Sets end_date + * + * @param \DateTime|null $end_date end_date + * + * @return self + */ + public function setEndDate($end_date) { + if (is_null($end_date)) { + $this->openApiNullablesSetToNull['end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['end_date'])) { + unset($nullablesSetToNull['end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['end_date'] = $end_date; + + return $this; + } + + /** + * Gets allows_catch_up + * + * @return bool|null + */ + public function getAllowsCatchUp() { + return $this->container['allows_catch_up']; + } + + /** + * Sets allows_catch_up + * + * @param bool|null $allows_catch_up allows_catch_up + * + * @return self + */ + public function setAllowsCatchUp($allows_catch_up) { + if (is_null($allows_catch_up)) { + $this->openApiNullablesSetToNull['allows_catch_up'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['allows_catch_up'])) { + unset($nullablesSetToNull['allows_catch_up']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['allows_catch_up'] = $allows_catch_up; + + return $this; + } + + /** + * Gets allows_super_catch_up + * + * @return bool|null + */ + public function getAllowsSuperCatchUp() { + return $this->container['allows_super_catch_up']; + } + + /** + * Sets allows_super_catch_up + * + * @param bool|null $allows_super_catch_up allows_super_catch_up + * + * @return self + */ + public function setAllowsSuperCatchUp($allows_super_catch_up) { + if (is_null($allows_super_catch_up)) { + $this->openApiNullablesSetToNull['allows_super_catch_up'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['allows_super_catch_up'])) { + unset($nullablesSetToNull['allows_super_catch_up']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['allows_super_catch_up'] = $allows_super_catch_up; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyBenefitsListResponse.php b/lib/Model/CompanyBenefitsListResponse.php new file mode 100644 index 00000000..e13450eb --- /dev/null +++ b/lib/Model/CompanyBenefitsListResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * CompanyBenefitsListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyBenefitsListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyBenefitsListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyBenefitsListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_benefits' => '\BhrSdk\Model\CompanyBenefitSummary[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_benefits' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_benefits' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_benefits' => 'companyBenefits' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_benefits' => 'setCompanyBenefits' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_benefits' => 'getCompanyBenefits' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_benefits', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_benefits + * + * @return \BhrSdk\Model\CompanyBenefitSummary[]|null + */ + public function getCompanyBenefits() { + return $this->container['company_benefits']; + } + + /** + * Sets company_benefits + * + * @param \BhrSdk\Model\CompanyBenefitSummary[]|null $company_benefits List of company benefit plan summaries. + * + * @return self + */ + public function setCompanyBenefits($company_benefits) { + if (is_null($company_benefits)) { + throw new \InvalidArgumentException('non-nullable company_benefits cannot be null'); + } + $this->container['company_benefits'] = $company_benefits; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyDeletedWebhookPayload.php b/lib/Model/CompanyDeletedWebhookPayload.php new file mode 100644 index 00000000..ef165d5c --- /dev/null +++ b/lib/Model/CompanyDeletedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * CompanyDeletedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyDeletedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when a company is deleted. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyDeletedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyDeletedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_COMPANY_DELETED = 'company.deleted'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_COMPANY_DELETED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyFileUpdate.php b/lib/Model/CompanyFileUpdate.php index 49a512b9..0d3d2531 100644 --- a/lib/Model/CompanyFileUpdate.php +++ b/lib/Model/CompanyFileUpdate.php @@ -233,6 +233,21 @@ public function getModelName() { return self::$openApiModelName; } + public const SHARE_WITH_EMPLOYEE_YES = 'yes'; + public const SHARE_WITH_EMPLOYEE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeeAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEE_YES, + self::SHARE_WITH_EMPLOYEE_NO, + ]; + } + /** * Associative array for storing property values * @@ -277,6 +292,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!is_null($this->container['share_with_employee']) && !in_array($this->container['share_with_employee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employee', must be one of '%s'", + $this->container['share_with_employee'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -302,7 +326,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name The new display name for the file. * * @return self */ @@ -327,7 +351,7 @@ public function getCategoryId() { /** * Sets category_id * - * @param string|null $category_id category_id + * @param string|null $category_id The ID of the category (file section) to move the file to. * * @return self */ @@ -352,7 +376,7 @@ public function getShareWithEmployee() { /** * Sets share_with_employee * - * @param string|null $share_with_employee share_with_employee + * @param string|null $share_with_employee Whether the file is shared with employees. * * @return self */ @@ -360,6 +384,16 @@ public function setShareWithEmployee($share_with_employee) { if (is_null($share_with_employee)) { throw new \InvalidArgumentException('non-nullable share_with_employee cannot be null'); } + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!in_array($share_with_employee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employee', must be one of '%s'", + $share_with_employee, + implode("', '", $allowedValues) + ) + ); + } $this->container['share_with_employee'] = $share_with_employee; return $this; diff --git a/lib/Model/CompanyFilesResponse.php b/lib/Model/CompanyFilesResponse.php new file mode 100644 index 00000000..4a64a332 --- /dev/null +++ b/lib/Model/CompanyFilesResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * CompanyFilesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyFilesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyFilesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyFilesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'categories' => '\BhrSdk\Model\CompanyFilesResponseCategoriesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'categories' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'categories' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'categories' => 'categories' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'categories' => 'setCategories' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'categories' => 'getCategories' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('categories', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets categories + * + * @return \BhrSdk\Model\CompanyFilesResponseCategoriesInner[]|null + */ + public function getCategories() { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param \BhrSdk\Model\CompanyFilesResponseCategoriesInner[]|null $categories List of company file categories. + * + * @return self + */ + public function setCategories($categories) { + if (is_null($categories)) { + throw new \InvalidArgumentException('non-nullable categories cannot be null'); + } + $this->container['categories'] = $categories; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyFilesResponseCategoriesInner.php b/lib/Model/CompanyFilesResponseCategoriesInner.php new file mode 100644 index 00000000..ddff8bbf --- /dev/null +++ b/lib/Model/CompanyFilesResponseCategoriesInner.php @@ -0,0 +1,518 @@ +<?php +declare(strict_types=1); +/** + * CompanyFilesResponseCategoriesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyFilesResponseCategoriesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyFilesResponseCategoriesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyFilesResponse_categories_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'can_upload_files' => 'string', + 'files' => '\BhrSdk\Model\CompanyFilesResponseCategoriesInnerFilesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'can_upload_files' => null, + 'files' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'can_upload_files' => false, + 'files' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'can_upload_files' => 'canUploadFiles', + 'files' => 'files' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'can_upload_files' => 'setCanUploadFiles', + 'files' => 'setFiles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'can_upload_files' => 'getCanUploadFiles', + 'files' => 'getFiles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const CAN_UPLOAD_FILES_YES = 'yes'; + public const CAN_UPLOAD_FILES_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanUploadFilesAllowableValues() { + return [ + self::CAN_UPLOAD_FILES_YES, + self::CAN_UPLOAD_FILES_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('can_upload_files', $data ?? [], null); + $this->setIfExists('files', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!is_null($this->container['can_upload_files']) && !in_array($this->container['can_upload_files'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_upload_files', must be one of '%s'", + $this->container['can_upload_files'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Category ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Category display name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets can_upload_files + * + * @return string|null + */ + public function getCanUploadFiles() { + return $this->container['can_upload_files']; + } + + /** + * Sets can_upload_files + * + * @param string|null $can_upload_files Whether the requesting user can upload files to this category. + * + * @return self + */ + public function setCanUploadFiles($can_upload_files) { + if (is_null($can_upload_files)) { + throw new \InvalidArgumentException('non-nullable can_upload_files cannot be null'); + } + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!in_array($can_upload_files, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_upload_files', must be one of '%s'", + $can_upload_files, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_upload_files'] = $can_upload_files; + + return $this; + } + + /** + * Gets files + * + * @return \BhrSdk\Model\CompanyFilesResponseCategoriesInnerFilesInner[]|null + */ + public function getFiles() { + return $this->container['files']; + } + + /** + * Sets files + * + * @param \BhrSdk\Model\CompanyFilesResponseCategoriesInnerFilesInner[]|null $files Files visible to the requesting user in this category. + * + * @return self + */ + public function setFiles($files) { + if (is_null($files)) { + throw new \InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyFilesResponseCategoriesInnerFilesInner.php b/lib/Model/CompanyFilesResponseCategoriesInnerFilesInner.php new file mode 100644 index 00000000..5da8af01 --- /dev/null +++ b/lib/Model/CompanyFilesResponseCategoriesInnerFilesInner.php @@ -0,0 +1,744 @@ +<?php +declare(strict_types=1); +/** + * CompanyFilesResponseCategoriesInnerFilesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyFilesResponseCategoriesInnerFilesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyFilesResponseCategoriesInnerFilesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyFilesResponse_categories_inner_files_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'original_file_name' => 'string', + 'size' => 'string', + 'date_created' => 'string', + 'created_by' => 'string', + 'share_with_employees' => 'string', + 'can_rename_file' => 'string', + 'can_delete_file' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'original_file_name' => null, + 'size' => null, + 'date_created' => null, + 'created_by' => null, + 'share_with_employees' => null, + 'can_rename_file' => null, + 'can_delete_file' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'original_file_name' => false, + 'size' => false, + 'date_created' => false, + 'created_by' => false, + 'share_with_employees' => false, + 'can_rename_file' => false, + 'can_delete_file' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'original_file_name' => 'originalFileName', + 'size' => 'size', + 'date_created' => 'dateCreated', + 'created_by' => 'createdBy', + 'share_with_employees' => 'shareWithEmployees', + 'can_rename_file' => 'canRenameFile', + 'can_delete_file' => 'canDeleteFile' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'original_file_name' => 'setOriginalFileName', + 'size' => 'setSize', + 'date_created' => 'setDateCreated', + 'created_by' => 'setCreatedBy', + 'share_with_employees' => 'setShareWithEmployees', + 'can_rename_file' => 'setCanRenameFile', + 'can_delete_file' => 'setCanDeleteFile' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'original_file_name' => 'getOriginalFileName', + 'size' => 'getSize', + 'date_created' => 'getDateCreated', + 'created_by' => 'getCreatedBy', + 'share_with_employees' => 'getShareWithEmployees', + 'can_rename_file' => 'getCanRenameFile', + 'can_delete_file' => 'getCanDeleteFile' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SHARE_WITH_EMPLOYEES_YES = 'yes'; + public const SHARE_WITH_EMPLOYEES_NO = 'no'; + public const CAN_RENAME_FILE_YES = 'yes'; + public const CAN_RENAME_FILE_NO = 'no'; + public const CAN_DELETE_FILE_YES = 'yes'; + public const CAN_DELETE_FILE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeesAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEES_YES, + self::SHARE_WITH_EMPLOYEES_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanRenameFileAllowableValues() { + return [ + self::CAN_RENAME_FILE_YES, + self::CAN_RENAME_FILE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanDeleteFileAllowableValues() { + return [ + self::CAN_DELETE_FILE_YES, + self::CAN_DELETE_FILE_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('original_file_name', $data ?? [], null); + $this->setIfExists('size', $data ?? [], null); + $this->setIfExists('date_created', $data ?? [], null); + $this->setIfExists('created_by', $data ?? [], null); + $this->setIfExists('share_with_employees', $data ?? [], null); + $this->setIfExists('can_rename_file', $data ?? [], null); + $this->setIfExists('can_delete_file', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getShareWithEmployeesAllowableValues(); + if (!is_null($this->container['share_with_employees']) && !in_array($this->container['share_with_employees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employees', must be one of '%s'", + $this->container['share_with_employees'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!is_null($this->container['can_rename_file']) && !in_array($this->container['can_rename_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_rename_file', must be one of '%s'", + $this->container['can_rename_file'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!is_null($this->container['can_delete_file']) && !in_array($this->container['can_delete_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_delete_file', must be one of '%s'", + $this->container['can_delete_file'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id File ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name File display name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets original_file_name + * + * @return string|null + */ + public function getOriginalFileName() { + return $this->container['original_file_name']; + } + + /** + * Sets original_file_name + * + * @param string|null $original_file_name Original uploaded filename including extension. + * + * @return self + */ + public function setOriginalFileName($original_file_name) { + if (is_null($original_file_name)) { + throw new \InvalidArgumentException('non-nullable original_file_name cannot be null'); + } + $this->container['original_file_name'] = $original_file_name; + + return $this; + } + + /** + * Gets size + * + * @return string|null + */ + public function getSize() { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string|null $size File size in bytes. + * + * @return self + */ + public function setSize($size) { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets date_created + * + * @return string|null + */ + public function getDateCreated() { + return $this->container['date_created']; + } + + /** + * Sets date_created + * + * @param string|null $date_created Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`). + * + * @return self + */ + public function setDateCreated($date_created) { + if (is_null($date_created)) { + throw new \InvalidArgumentException('non-nullable date_created cannot be null'); + } + $this->container['date_created'] = $date_created; + + return $this; + } + + /** + * Gets created_by + * + * @return string|null + */ + public function getCreatedBy() { + return $this->container['created_by']; + } + + /** + * Sets created_by + * + * @param string|null $created_by Full name of the user who uploaded the file. + * + * @return self + */ + public function setCreatedBy($created_by) { + if (is_null($created_by)) { + throw new \InvalidArgumentException('non-nullable created_by cannot be null'); + } + $this->container['created_by'] = $created_by; + + return $this; + } + + /** + * Gets share_with_employees + * + * @return string|null + */ + public function getShareWithEmployees() { + return $this->container['share_with_employees']; + } + + /** + * Sets share_with_employees + * + * @param string|null $share_with_employees Whether the file is shared with all employees. + * + * @return self + */ + public function setShareWithEmployees($share_with_employees) { + if (is_null($share_with_employees)) { + throw new \InvalidArgumentException('non-nullable share_with_employees cannot be null'); + } + $allowedValues = $this->getShareWithEmployeesAllowableValues(); + if (!in_array($share_with_employees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employees', must be one of '%s'", + $share_with_employees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['share_with_employees'] = $share_with_employees; + + return $this; + } + + /** + * Gets can_rename_file + * + * @return string|null + */ + public function getCanRenameFile() { + return $this->container['can_rename_file']; + } + + /** + * Sets can_rename_file + * + * @param string|null $can_rename_file Whether the requesting user can rename this file. + * + * @return self + */ + public function setCanRenameFile($can_rename_file) { + if (is_null($can_rename_file)) { + throw new \InvalidArgumentException('non-nullable can_rename_file cannot be null'); + } + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!in_array($can_rename_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_rename_file', must be one of '%s'", + $can_rename_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_rename_file'] = $can_rename_file; + + return $this; + } + + /** + * Gets can_delete_file + * + * @return string|null + */ + public function getCanDeleteFile() { + return $this->container['can_delete_file']; + } + + /** + * Sets can_delete_file + * + * @param string|null $can_delete_file Whether the requesting user can delete this file. + * + * @return self + */ + public function setCanDeleteFile($can_delete_file) { + if (is_null($can_delete_file)) { + throw new \InvalidArgumentException('non-nullable can_delete_file cannot be null'); + } + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!in_array($can_delete_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_delete_file', must be one of '%s'", + $can_delete_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_delete_file'] = $can_delete_file; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyIndustryDataObject.php b/lib/Model/CompanyIndustryDataObject.php new file mode 100644 index 00000000..738cf2b0 --- /dev/null +++ b/lib/Model/CompanyIndustryDataObject.php @@ -0,0 +1,509 @@ +<?php +declare(strict_types=1); +/** + * CompanyIndustryDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyIndustryDataObject Class Doc Comment + * + * @category Class + * @description Company's enabled industry. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyIndustryDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyIndustryDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'industry_id' => 'int', + 'added_by_customer' => 'bool', + 'added_by_user_id' => 'int', + 'added_ymdt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'industry_id' => null, + 'added_by_customer' => null, + 'added_by_user_id' => null, + 'added_ymdt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'industry_id' => false, + 'added_by_customer' => false, + 'added_by_user_id' => true, + 'added_ymdt' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'industry_id' => 'industryId', + 'added_by_customer' => 'addedByCustomer', + 'added_by_user_id' => 'addedByUserId', + 'added_ymdt' => 'addedYmdt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'industry_id' => 'setIndustryId', + 'added_by_customer' => 'setAddedByCustomer', + 'added_by_user_id' => 'setAddedByUserId', + 'added_ymdt' => 'setAddedYmdt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'industry_id' => 'getIndustryId', + 'added_by_customer' => 'getAddedByCustomer', + 'added_by_user_id' => 'getAddedByUserId', + 'added_ymdt' => 'getAddedYmdt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('industry_id', $data ?? [], null); + $this->setIfExists('added_by_customer', $data ?? [], null); + $this->setIfExists('added_by_user_id', $data ?? [], null); + $this->setIfExists('added_ymdt', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['industry_id'] === null) { + $invalidProperties[] = "'industry_id' can't be null"; + } + if ($this->container['added_by_customer'] === null) { + $invalidProperties[] = "'added_by_customer' can't be null"; + } + if ($this->container['added_by_user_id'] === null) { + $invalidProperties[] = "'added_by_user_id' can't be null"; + } + if ($this->container['added_ymdt'] === null) { + $invalidProperties[] = "'added_ymdt' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets industry_id + * + * @return int + */ + public function getIndustryId() { + return $this->container['industry_id']; + } + + /** + * Sets industry_id + * + * @param int $industry_id The company's industry id. + * + * @return self + */ + public function setIndustryId($industry_id) { + if (is_null($industry_id)) { + throw new \InvalidArgumentException('non-nullable industry_id cannot be null'); + } + $this->container['industry_id'] = $industry_id; + + return $this; + } + + /** + * Gets added_by_customer + * + * @return bool + */ + public function getAddedByCustomer() { + return $this->container['added_by_customer']; + } + + /** + * Sets added_by_customer + * + * @param bool $added_by_customer If the industry was added by the customer. + * + * @return self + */ + public function setAddedByCustomer($added_by_customer) { + if (is_null($added_by_customer)) { + throw new \InvalidArgumentException('non-nullable added_by_customer cannot be null'); + } + $this->container['added_by_customer'] = $added_by_customer; + + return $this; + } + + /** + * Gets added_by_user_id + * + * @return int + */ + public function getAddedByUserId() { + return $this->container['added_by_user_id']; + } + + /** + * Sets added_by_user_id + * + * @param int $added_by_user_id added_by_user_id + * + * @return self + */ + public function setAddedByUserId($added_by_user_id) { + if (is_null($added_by_user_id)) { + $this->openApiNullablesSetToNull['added_by_user_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['added_by_user_id'])) { + unset($nullablesSetToNull['added_by_user_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['added_by_user_id'] = $added_by_user_id; + + return $this; + } + + /** + * Gets added_ymdt + * + * @return string + */ + public function getAddedYmdt() { + return $this->container['added_ymdt']; + } + + /** + * Sets added_ymdt + * + * @param string $added_ymdt added_ymdt + * + * @return self + */ + public function setAddedYmdt($added_ymdt) { + if (is_null($added_ymdt)) { + $this->openApiNullablesSetToNull['added_ymdt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['added_ymdt'])) { + unset($nullablesSetToNull['added_ymdt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['added_ymdt'] = $added_ymdt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyInformation.php b/lib/Model/CompanyInformation.php index 31bab9b4..f96a385a 100644 --- a/lib/Model/CompanyInformation.php +++ b/lib/Model/CompanyInformation.php @@ -309,7 +309,7 @@ public function getLegalName() { /** * Sets legal_name * - * @param string|null $legal_name The legal name of the company + * @param string|null $legal_name The legal name of the company. * * @return self */ @@ -334,7 +334,7 @@ public function getDisplayName() { /** * Sets display_name * - * @param string|null $display_name The display name of the company + * @param string|null $display_name The display name of the company. * * @return self */ @@ -384,7 +384,7 @@ public function getPhone() { /** * Sets phone * - * @param string|null $phone The phone number of the company + * @param string|null $phone The primary contact phone number of the company. * * @return self */ diff --git a/lib/Model/CompanyInformationAddress.php b/lib/Model/CompanyInformationAddress.php index 58f6102a..ee54a779 100644 --- a/lib/Model/CompanyInformationAddress.php +++ b/lib/Model/CompanyInformationAddress.php @@ -36,6 +36,7 @@ * CompanyInformationAddress Class Doc Comment * * @category Class + * @description The primary address of the company. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -316,7 +317,7 @@ public function getLine1() { /** * Sets line1 * - * @param string|null $line1 The first line of the address + * @param string|null $line1 The first line of the address. * * @return self */ @@ -341,7 +342,7 @@ public function getLine2() { /** * Sets line2 * - * @param string|null $line2 The second line of the address + * @param string|null $line2 The second line of the address. May be an empty string. * * @return self */ @@ -366,7 +367,7 @@ public function getCity() { /** * Sets city * - * @param string|null $city The city of the address + * @param string|null $city The city. * * @return self */ @@ -391,7 +392,7 @@ public function getState() { /** * Sets state * - * @param string|null $state The state of the address + * @param string|null $state The state or province abbreviation. * * @return self */ @@ -416,7 +417,7 @@ public function getZip() { /** * Sets zip * - * @param string|null $zip The zip code of the address + * @param string|null $zip The ZIP or postal code. * * @return self */ diff --git a/lib/Model/CompanyIntegrationsUpdatedWebhookPayload.php b/lib/Model/CompanyIntegrationsUpdatedWebhookPayload.php new file mode 100644 index 00000000..34db9b67 --- /dev/null +++ b/lib/Model/CompanyIntegrationsUpdatedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * CompanyIntegrationsUpdatedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyIntegrationsUpdatedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when company integrations are updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyIntegrationsUpdatedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyIntegrationsUpdatedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_COMPANY_INTEGRATIONS_UPDATED = 'company-integrations.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_COMPANY_INTEGRATIONS_UPDATED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyIntegrationsUpdatedWebhookPayloadData.php b/lib/Model/CompanyIntegrationsUpdatedWebhookPayloadData.php new file mode 100644 index 00000000..30aaea81 --- /dev/null +++ b/lib/Model/CompanyIntegrationsUpdatedWebhookPayloadData.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * CompanyIntegrationsUpdatedWebhookPayloadData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyIntegrationsUpdatedWebhookPayloadData Class Doc Comment + * + * @category Class + * @description Event data containing company information + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyIntegrationsUpdatedWebhookPayloadData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyIntegrationsUpdatedWebhookPayload_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_id' => 'companyId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_id' => 'setCompanyId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_id' => 'getCompanyId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_id + * + * @return string|null + */ + public function getCompanyId() { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string|null $company_id The company ID + * + * @return self + */ + public function setCompanyId($company_id) { + if (is_null($company_id)) { + throw new \InvalidArgumentException('non-nullable company_id cannot be null'); + } + $this->container['company_id'] = $company_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyProfileData.php b/lib/Model/CompanyProfileData.php new file mode 100644 index 00000000..2baf3aba --- /dev/null +++ b/lib/Model/CompanyProfileData.php @@ -0,0 +1,692 @@ +<?php +declare(strict_types=1); +/** + * CompanyProfileData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyProfileData Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyProfileData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyProfileData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'subdomain' => 'string', + 'legal_name' => 'string', + 'display_name' => 'string', + 'address' => '\BhrSdk\Model\CompanyProfileDataAddress', + 'phone' => 'string', + 'status' => 'string', + 'termination_date' => 'string', + 'industry_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'subdomain' => null, + 'legal_name' => null, + 'display_name' => null, + 'address' => null, + 'phone' => null, + 'status' => null, + 'termination_date' => null, + 'industry_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'subdomain' => true, + 'legal_name' => true, + 'display_name' => true, + 'address' => false, + 'phone' => true, + 'status' => true, + 'termination_date' => true, + 'industry_code' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'subdomain' => 'subdomain', + 'legal_name' => 'legalName', + 'display_name' => 'displayName', + 'address' => 'address', + 'phone' => 'phone', + 'status' => 'status', + 'termination_date' => 'terminationDate', + 'industry_code' => 'industryCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'subdomain' => 'setSubdomain', + 'legal_name' => 'setLegalName', + 'display_name' => 'setDisplayName', + 'address' => 'setAddress', + 'phone' => 'setPhone', + 'status' => 'setStatus', + 'termination_date' => 'setTerminationDate', + 'industry_code' => 'setIndustryCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'subdomain' => 'getSubdomain', + 'legal_name' => 'getLegalName', + 'display_name' => 'getDisplayName', + 'address' => 'getAddress', + 'phone' => 'getPhone', + 'status' => 'getStatus', + 'termination_date' => 'getTerminationDate', + 'industry_code' => 'getIndustryCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('subdomain', $data ?? [], null); + $this->setIfExists('legal_name', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('termination_date', $data ?? [], null); + $this->setIfExists('industry_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets subdomain + * + * @return string|null + */ + public function getSubdomain() { + return $this->container['subdomain']; + } + + /** + * Sets subdomain + * + * @param string|null $subdomain subdomain + * + * @return self + */ + public function setSubdomain($subdomain) { + if (is_null($subdomain)) { + $this->openApiNullablesSetToNull['subdomain'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['subdomain'])) { + unset($nullablesSetToNull['subdomain']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['subdomain'] = $subdomain; + + return $this; + } + + /** + * Gets legal_name + * + * @return string|null + */ + public function getLegalName() { + return $this->container['legal_name']; + } + + /** + * Sets legal_name + * + * @param string|null $legal_name legal_name + * + * @return self + */ + public function setLegalName($legal_name) { + if (is_null($legal_name)) { + $this->openApiNullablesSetToNull['legal_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['legal_name'])) { + unset($nullablesSetToNull['legal_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['legal_name'] = $legal_name; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name display_name + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + $this->openApiNullablesSetToNull['display_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['display_name'])) { + unset($nullablesSetToNull['display_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets address + * + * @return \BhrSdk\Model\CompanyProfileDataAddress|null + */ + public function getAddress() { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \BhrSdk\Model\CompanyProfileDataAddress|null $address address + * + * @return self + */ + public function setAddress($address) { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets phone + * + * @return string|null + */ + public function getPhone() { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string|null $phone phone + * + * @return self + */ + public function setPhone($phone) { + if (is_null($phone)) { + $this->openApiNullablesSetToNull['phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['phone'])) { + unset($nullablesSetToNull['phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + $this->openApiNullablesSetToNull['status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['status'])) { + unset($nullablesSetToNull['status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets termination_date + * + * @return string|null + */ + public function getTerminationDate() { + return $this->container['termination_date']; + } + + /** + * Sets termination_date + * + * @param string|null $termination_date termination_date + * + * @return self + */ + public function setTerminationDate($termination_date) { + if (is_null($termination_date)) { + $this->openApiNullablesSetToNull['termination_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_date'])) { + unset($nullablesSetToNull['termination_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_date'] = $termination_date; + + return $this; + } + + /** + * Gets industry_code + * + * @return string|null + */ + public function getIndustryCode() { + return $this->container['industry_code']; + } + + /** + * Sets industry_code + * + * @param string|null $industry_code industry_code + * + * @return self + */ + public function setIndustryCode($industry_code) { + if (is_null($industry_code)) { + $this->openApiNullablesSetToNull['industry_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['industry_code'])) { + unset($nullablesSetToNull['industry_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['industry_code'] = $industry_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyProfileDataAddress.php b/lib/Model/CompanyProfileDataAddress.php new file mode 100644 index 00000000..84c6e013 --- /dev/null +++ b/lib/Model/CompanyProfileDataAddress.php @@ -0,0 +1,546 @@ +<?php +declare(strict_types=1); +/** + * CompanyProfileDataAddress + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyProfileDataAddress Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyProfileDataAddress implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyProfileData_address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'line1' => 'string', + 'line2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'line1' => null, + 'line2' => null, + 'city' => null, + 'state' => null, + 'zip' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'line1' => true, + 'line2' => true, + 'city' => true, + 'state' => true, + 'zip' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'line1' => 'line1', + 'line2' => 'line2', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'line1' => 'setLine1', + 'line2' => 'setLine2', + 'city' => 'setCity', + 'state' => 'setState', + 'zip' => 'setZip' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'line1' => 'getLine1', + 'line2' => 'getLine2', + 'city' => 'getCity', + 'state' => 'getState', + 'zip' => 'getZip' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('line1', $data ?? [], null); + $this->setIfExists('line2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zip', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1() { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 line1 + * + * @return self + */ + public function setLine1($line1) { + if (is_null($line1)) { + $this->openApiNullablesSetToNull['line1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['line1'])) { + unset($nullablesSetToNull['line1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2() { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 line2 + * + * @return self + */ + public function setLine2($line2) { + if (is_null($line2)) { + $this->openApiNullablesSetToNull['line2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['line2'])) { + unset($nullablesSetToNull['line2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line2'] = $line2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state state + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + $this->openApiNullablesSetToNull['state'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state'])) { + unset($nullablesSetToNull['state']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zip + * + * @return string|null + */ + public function getZip() { + return $this->container['zip']; + } + + /** + * Sets zip + * + * @param string|null $zip zip + * + * @return self + */ + public function setZip($zip) { + if (is_null($zip)) { + $this->openApiNullablesSetToNull['zip'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zip'])) { + unset($nullablesSetToNull['zip']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zip'] = $zip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyProfileIntegrations.php b/lib/Model/CompanyProfileIntegrations.php new file mode 100644 index 00000000..0a932595 --- /dev/null +++ b/lib/Model/CompanyProfileIntegrations.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * CompanyProfileIntegrations + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyProfileIntegrations Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyProfileIntegrations implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyProfileIntegrations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'integrations' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'integrations' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'integrations' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'integrations' => 'integrations' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'integrations' => 'setIntegrations' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'integrations' => 'getIntegrations' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('integrations', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets integrations + * + * @return string[]|null + */ + public function getIntegrations() { + return $this->container['integrations']; + } + + /** + * Sets integrations + * + * @param string[]|null $integrations List of installed integration identifiers. + * + * @return self + */ + public function setIntegrations($integrations) { + if (is_null($integrations)) { + throw new \InvalidArgumentException('non-nullable integrations cannot be null'); + } + $this->container['integrations'] = $integrations; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompanyUpdatedWebhookPayload.php b/lib/Model/CompanyUpdatedWebhookPayload.php new file mode 100644 index 00000000..71e85b16 --- /dev/null +++ b/lib/Model/CompanyUpdatedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * CompanyUpdatedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompanyUpdatedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when a company is updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompanyUpdatedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompanyUpdatedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_COMPANY_UPDATED = 'company.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_COMPANY_UPDATED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\CompanyIntegrationsUpdatedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkDetailEmployee.php b/lib/Model/CompensationBenchmarkDetailEmployee.php new file mode 100644 index 00000000..bc324c89 --- /dev/null +++ b/lib/Model/CompensationBenchmarkDetailEmployee.php @@ -0,0 +1,876 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkDetailEmployee + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkDetailEmployee Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkDetailEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkDetailEmployee'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'job_title' => '\BhrSdk\Model\CompensationBenchmarkDetailEmployeeJobTitle', + 'location' => 'object', + 'salary' => '\BhrSdk\Model\CompensationBenchmarkDetailEmployeeSalary', + 'variance_from_pay_band' => 'object', + 'years_at_company' => 'int', + 'range_penetration' => 'float', + 'compa_ratio' => 'float', + 'compa_ratio_status' => 'string', + 'photo_url' => 'string', + 'country' => 'string', + 'is_remote' => 'bool', + 'currency_conversion_failed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'job_title' => null, + 'location' => null, + 'salary' => null, + 'variance_from_pay_band' => null, + 'years_at_company' => null, + 'range_penetration' => null, + 'compa_ratio' => null, + 'compa_ratio_status' => null, + 'photo_url' => null, + 'country' => null, + 'is_remote' => null, + 'currency_conversion_failed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'name' => true, + 'job_title' => false, + 'location' => true, + 'salary' => false, + 'variance_from_pay_band' => true, + 'years_at_company' => true, + 'range_penetration' => true, + 'compa_ratio' => true, + 'compa_ratio_status' => true, + 'photo_url' => true, + 'country' => true, + 'is_remote' => true, + 'currency_conversion_failed' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'job_title' => 'jobTitle', + 'location' => 'location', + 'salary' => 'salary', + 'variance_from_pay_band' => 'varianceFromPayBand', + 'years_at_company' => 'yearsAtCompany', + 'range_penetration' => 'rangePenetration', + 'compa_ratio' => 'compaRatio', + 'compa_ratio_status' => 'compaRatioStatus', + 'photo_url' => 'photoUrl', + 'country' => 'country', + 'is_remote' => 'isRemote', + 'currency_conversion_failed' => 'currencyConversionFailed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'job_title' => 'setJobTitle', + 'location' => 'setLocation', + 'salary' => 'setSalary', + 'variance_from_pay_band' => 'setVarianceFromPayBand', + 'years_at_company' => 'setYearsAtCompany', + 'range_penetration' => 'setRangePenetration', + 'compa_ratio' => 'setCompaRatio', + 'compa_ratio_status' => 'setCompaRatioStatus', + 'photo_url' => 'setPhotoUrl', + 'country' => 'setCountry', + 'is_remote' => 'setIsRemote', + 'currency_conversion_failed' => 'setCurrencyConversionFailed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'job_title' => 'getJobTitle', + 'location' => 'getLocation', + 'salary' => 'getSalary', + 'variance_from_pay_band' => 'getVarianceFromPayBand', + 'years_at_company' => 'getYearsAtCompany', + 'range_penetration' => 'getRangePenetration', + 'compa_ratio' => 'getCompaRatio', + 'compa_ratio_status' => 'getCompaRatioStatus', + 'photo_url' => 'getPhotoUrl', + 'country' => 'getCountry', + 'is_remote' => 'getIsRemote', + 'currency_conversion_failed' => 'getCurrencyConversionFailed' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('salary', $data ?? [], null); + $this->setIfExists('variance_from_pay_band', $data ?? [], null); + $this->setIfExists('years_at_company', $data ?? [], null); + $this->setIfExists('range_penetration', $data ?? [], null); + $this->setIfExists('compa_ratio', $data ?? [], null); + $this->setIfExists('compa_ratio_status', $data ?? [], null); + $this->setIfExists('photo_url', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('is_remote', $data ?? [], null); + $this->setIfExists('currency_conversion_failed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets job_title + * + * @return \BhrSdk\Model\CompensationBenchmarkDetailEmployeeJobTitle|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param \BhrSdk\Model\CompensationBenchmarkDetailEmployeeJobTitle|null $job_title job_title + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + throw new \InvalidArgumentException('non-nullable job_title cannot be null'); + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets location + * + * @return object|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param object|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets salary + * + * @return \BhrSdk\Model\CompensationBenchmarkDetailEmployeeSalary|null + */ + public function getSalary() { + return $this->container['salary']; + } + + /** + * Sets salary + * + * @param \BhrSdk\Model\CompensationBenchmarkDetailEmployeeSalary|null $salary salary + * + * @return self + */ + public function setSalary($salary) { + if (is_null($salary)) { + throw new \InvalidArgumentException('non-nullable salary cannot be null'); + } + $this->container['salary'] = $salary; + + return $this; + } + + /** + * Gets variance_from_pay_band + * + * @return object|null + */ + public function getVarianceFromPayBand() { + return $this->container['variance_from_pay_band']; + } + + /** + * Sets variance_from_pay_band + * + * @param object|null $variance_from_pay_band variance_from_pay_band + * + * @return self + */ + public function setVarianceFromPayBand($variance_from_pay_band) { + if (is_null($variance_from_pay_band)) { + $this->openApiNullablesSetToNull['variance_from_pay_band'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['variance_from_pay_band'])) { + unset($nullablesSetToNull['variance_from_pay_band']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['variance_from_pay_band'] = $variance_from_pay_band; + + return $this; + } + + /** + * Gets years_at_company + * + * @return int|null + */ + public function getYearsAtCompany() { + return $this->container['years_at_company']; + } + + /** + * Sets years_at_company + * + * @param int|null $years_at_company years_at_company + * + * @return self + */ + public function setYearsAtCompany($years_at_company) { + if (is_null($years_at_company)) { + $this->openApiNullablesSetToNull['years_at_company'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['years_at_company'])) { + unset($nullablesSetToNull['years_at_company']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['years_at_company'] = $years_at_company; + + return $this; + } + + /** + * Gets range_penetration + * + * @return float|null + */ + public function getRangePenetration() { + return $this->container['range_penetration']; + } + + /** + * Sets range_penetration + * + * @param float|null $range_penetration range_penetration + * + * @return self + */ + public function setRangePenetration($range_penetration) { + if (is_null($range_penetration)) { + $this->openApiNullablesSetToNull['range_penetration'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['range_penetration'])) { + unset($nullablesSetToNull['range_penetration']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['range_penetration'] = $range_penetration; + + return $this; + } + + /** + * Gets compa_ratio + * + * @return float|null + */ + public function getCompaRatio() { + return $this->container['compa_ratio']; + } + + /** + * Sets compa_ratio + * + * @param float|null $compa_ratio compa_ratio + * + * @return self + */ + public function setCompaRatio($compa_ratio) { + if (is_null($compa_ratio)) { + $this->openApiNullablesSetToNull['compa_ratio'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compa_ratio'])) { + unset($nullablesSetToNull['compa_ratio']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compa_ratio'] = $compa_ratio; + + return $this; + } + + /** + * Gets compa_ratio_status + * + * @return string|null + */ + public function getCompaRatioStatus() { + return $this->container['compa_ratio_status']; + } + + /** + * Sets compa_ratio_status + * + * @param string|null $compa_ratio_status compa_ratio_status + * + * @return self + */ + public function setCompaRatioStatus($compa_ratio_status) { + if (is_null($compa_ratio_status)) { + $this->openApiNullablesSetToNull['compa_ratio_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compa_ratio_status'])) { + unset($nullablesSetToNull['compa_ratio_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compa_ratio_status'] = $compa_ratio_status; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + $this->openApiNullablesSetToNull['country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country'])) { + unset($nullablesSetToNull['country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets is_remote + * + * @return bool|null + */ + public function getIsRemote() { + return $this->container['is_remote']; + } + + /** + * Sets is_remote + * + * @param bool|null $is_remote is_remote + * + * @return self + */ + public function setIsRemote($is_remote) { + if (is_null($is_remote)) { + $this->openApiNullablesSetToNull['is_remote'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_remote'])) { + unset($nullablesSetToNull['is_remote']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['is_remote'] = $is_remote; + + return $this; + } + + /** + * Gets currency_conversion_failed + * + * @return bool|null + */ + public function getCurrencyConversionFailed() { + return $this->container['currency_conversion_failed']; + } + + /** + * Sets currency_conversion_failed + * + * @param bool|null $currency_conversion_failed currency_conversion_failed + * + * @return self + */ + public function setCurrencyConversionFailed($currency_conversion_failed) { + if (is_null($currency_conversion_failed)) { + $this->openApiNullablesSetToNull['currency_conversion_failed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_conversion_failed'])) { + unset($nullablesSetToNull['currency_conversion_failed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_conversion_failed'] = $currency_conversion_failed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkDetailEmployeeJobTitle.php b/lib/Model/CompensationBenchmarkDetailEmployeeJobTitle.php new file mode 100644 index 00000000..36e7a548 --- /dev/null +++ b/lib/Model/CompensationBenchmarkDetailEmployeeJobTitle.php @@ -0,0 +1,470 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkDetailEmployeeJobTitle + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkDetailEmployeeJobTitle Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkDetailEmployeeJobTitle implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkDetailEmployee_jobTitle'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'value' => 'string', + 'job_title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'value' => null, + 'job_title' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'value' => true, + 'job_title' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'value' => 'value', + 'job_title' => 'jobTitle' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'value' => 'setValue', + 'job_title' => 'setJobTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'value' => 'getValue', + 'job_title' => 'getJobTitle' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('job_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value value + * + * @return self + */ + public function setValue($value) { + if (is_null($value)) { + $this->openApiNullablesSetToNull['value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['value'])) { + unset($nullablesSetToNull['value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title job_title + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + $this->openApiNullablesSetToNull['job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title'])) { + unset($nullablesSetToNull['job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title'] = $job_title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkDetailEmployeeSalary.php b/lib/Model/CompensationBenchmarkDetailEmployeeSalary.php new file mode 100644 index 00000000..d6dfac3f --- /dev/null +++ b/lib/Model/CompensationBenchmarkDetailEmployeeSalary.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkDetailEmployeeSalary + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkDetailEmployeeSalary Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkDetailEmployeeSalary implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkDetailEmployee_salary'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'amount' => 'float', + 'currency_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'amount' => null, + 'currency_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'amount' => false, + 'currency_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'currency_code' => 'currencyCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'currency_code' => 'setCurrencyCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'currency_code' => 'getCurrencyCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('currency_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + throw new \InvalidArgumentException('non-nullable currency_code cannot be null'); + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkDetails.php b/lib/Model/CompensationBenchmarkDetails.php new file mode 100644 index 00000000..dbe06cd3 --- /dev/null +++ b/lib/Model/CompensationBenchmarkDetails.php @@ -0,0 +1,686 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkDetails + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkDetails Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkDetails implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_id' => 'string', + 'job_title' => 'string', + 'location_id' => 'string', + 'location' => 'string', + 'mercer_benchmark_details' => 'object', + 'company_pay_range' => 'object', + 'internal_job_pay_band' => 'object', + 'benchmark_values' => '\BhrSdk\Model\CompensationBenchmarkDetailsBenchmarkValuesInner[]', + 'employees' => '\BhrSdk\Model\CompensationBenchmarkDetailEmployee[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_id' => null, + 'job_title' => null, + 'location_id' => null, + 'location' => null, + 'mercer_benchmark_details' => null, + 'company_pay_range' => null, + 'internal_job_pay_band' => null, + 'benchmark_values' => null, + 'employees' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_id' => true, + 'job_title' => true, + 'location_id' => true, + 'location' => true, + 'mercer_benchmark_details' => true, + 'company_pay_range' => true, + 'internal_job_pay_band' => true, + 'benchmark_values' => false, + 'employees' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_id' => 'jobId', + 'job_title' => 'jobTitle', + 'location_id' => 'locationId', + 'location' => 'location', + 'mercer_benchmark_details' => 'mercerBenchmarkDetails', + 'company_pay_range' => 'companyPayRange', + 'internal_job_pay_band' => 'internalJobPayBand', + 'benchmark_values' => 'benchmarkValues', + 'employees' => 'employees' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_id' => 'setJobId', + 'job_title' => 'setJobTitle', + 'location_id' => 'setLocationId', + 'location' => 'setLocation', + 'mercer_benchmark_details' => 'setMercerBenchmarkDetails', + 'company_pay_range' => 'setCompanyPayRange', + 'internal_job_pay_band' => 'setInternalJobPayBand', + 'benchmark_values' => 'setBenchmarkValues', + 'employees' => 'setEmployees' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_id' => 'getJobId', + 'job_title' => 'getJobTitle', + 'location_id' => 'getLocationId', + 'location' => 'getLocation', + 'mercer_benchmark_details' => 'getMercerBenchmarkDetails', + 'company_pay_range' => 'getCompanyPayRange', + 'internal_job_pay_band' => 'getInternalJobPayBand', + 'benchmark_values' => 'getBenchmarkValues', + 'employees' => 'getEmployees' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_id', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('mercer_benchmark_details', $data ?? [], null); + $this->setIfExists('company_pay_range', $data ?? [], null); + $this->setIfExists('internal_job_pay_band', $data ?? [], null); + $this->setIfExists('benchmark_values', $data ?? [], null); + $this->setIfExists('employees', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_id + * + * @return string|null + */ + public function getJobId() { + return $this->container['job_id']; + } + + /** + * Sets job_id + * + * @param string|null $job_id job_id + * + * @return self + */ + public function setJobId($job_id) { + if (is_null($job_id)) { + $this->openApiNullablesSetToNull['job_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_id'])) { + unset($nullablesSetToNull['job_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_id'] = $job_id; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title job_title + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + $this->openApiNullablesSetToNull['job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title'])) { + unset($nullablesSetToNull['job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets location_id + * + * @return string|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param string|null $location_id location_id + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + $this->openApiNullablesSetToNull['location_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location_id'])) { + unset($nullablesSetToNull['location_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets mercer_benchmark_details + * + * @return object|null + */ + public function getMercerBenchmarkDetails() { + return $this->container['mercer_benchmark_details']; + } + + /** + * Sets mercer_benchmark_details + * + * @param object|null $mercer_benchmark_details mercer_benchmark_details + * + * @return self + */ + public function setMercerBenchmarkDetails($mercer_benchmark_details) { + if (is_null($mercer_benchmark_details)) { + $this->openApiNullablesSetToNull['mercer_benchmark_details'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['mercer_benchmark_details'])) { + unset($nullablesSetToNull['mercer_benchmark_details']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mercer_benchmark_details'] = $mercer_benchmark_details; + + return $this; + } + + /** + * Gets company_pay_range + * + * @return object|null + */ + public function getCompanyPayRange() { + return $this->container['company_pay_range']; + } + + /** + * Sets company_pay_range + * + * @param object|null $company_pay_range company_pay_range + * + * @return self + */ + public function setCompanyPayRange($company_pay_range) { + if (is_null($company_pay_range)) { + $this->openApiNullablesSetToNull['company_pay_range'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_pay_range'])) { + unset($nullablesSetToNull['company_pay_range']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_pay_range'] = $company_pay_range; + + return $this; + } + + /** + * Gets internal_job_pay_band + * + * @return object|null + */ + public function getInternalJobPayBand() { + return $this->container['internal_job_pay_band']; + } + + /** + * Sets internal_job_pay_band + * + * @param object|null $internal_job_pay_band internal_job_pay_band + * + * @return self + */ + public function setInternalJobPayBand($internal_job_pay_band) { + if (is_null($internal_job_pay_band)) { + $this->openApiNullablesSetToNull['internal_job_pay_band'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['internal_job_pay_band'])) { + unset($nullablesSetToNull['internal_job_pay_band']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['internal_job_pay_band'] = $internal_job_pay_band; + + return $this; + } + + /** + * Gets benchmark_values + * + * @return \BhrSdk\Model\CompensationBenchmarkDetailsBenchmarkValuesInner[]|null + */ + public function getBenchmarkValues() { + return $this->container['benchmark_values']; + } + + /** + * Sets benchmark_values + * + * @param \BhrSdk\Model\CompensationBenchmarkDetailsBenchmarkValuesInner[]|null $benchmark_values All saved benchmarks for this job/location. Empty when no benchmarks exist. + * + * @return self + */ + public function setBenchmarkValues($benchmark_values) { + if (is_null($benchmark_values)) { + throw new \InvalidArgumentException('non-nullable benchmark_values cannot be null'); + } + $this->container['benchmark_values'] = $benchmark_values; + + return $this; + } + + /** + * Gets employees + * + * @return \BhrSdk\Model\CompensationBenchmarkDetailEmployee[]|null + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param \BhrSdk\Model\CompensationBenchmarkDetailEmployee[]|null $employees employees + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.php b/lib/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.php new file mode 100644 index 00000000..8ca76dff --- /dev/null +++ b/lib/Model/CompensationBenchmarkDetailsBenchmarkValuesInner.php @@ -0,0 +1,812 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkDetailsBenchmarkValuesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkDetailsBenchmarkValuesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkDetailsBenchmarkValuesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkDetails_benchmarkValues_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'job_title' => 'string', + 'last_edited' => 'string', + 'source_color_code' => 'string', + 'source_date' => 'string', + 'created_ymdt' => 'string', + 'updated_ymdt' => 'string', + 'data_year' => 'string', + 'median' => 'float', + 'min' => 'float', + 'max' => 'float', + 'currency_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'job_title' => null, + 'last_edited' => null, + 'source_color_code' => null, + 'source_date' => null, + 'created_ymdt' => null, + 'updated_ymdt' => null, + 'data_year' => null, + 'median' => null, + 'min' => null, + 'max' => null, + 'currency_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'job_title' => true, + 'last_edited' => true, + 'source_color_code' => true, + 'source_date' => true, + 'created_ymdt' => true, + 'updated_ymdt' => true, + 'data_year' => true, + 'median' => true, + 'min' => true, + 'max' => true, + 'currency_code' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'job_title' => 'jobTitle', + 'last_edited' => 'lastEdited', + 'source_color_code' => 'sourceColorCode', + 'source_date' => 'sourceDate', + 'created_ymdt' => 'createdYmdt', + 'updated_ymdt' => 'updatedYmdt', + 'data_year' => 'dataYear', + 'median' => 'median', + 'min' => 'min', + 'max' => 'max', + 'currency_code' => 'currencyCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'job_title' => 'setJobTitle', + 'last_edited' => 'setLastEdited', + 'source_color_code' => 'setSourceColorCode', + 'source_date' => 'setSourceDate', + 'created_ymdt' => 'setCreatedYmdt', + 'updated_ymdt' => 'setUpdatedYmdt', + 'data_year' => 'setDataYear', + 'median' => 'setMedian', + 'min' => 'setMin', + 'max' => 'setMax', + 'currency_code' => 'setCurrencyCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'job_title' => 'getJobTitle', + 'last_edited' => 'getLastEdited', + 'source_color_code' => 'getSourceColorCode', + 'source_date' => 'getSourceDate', + 'created_ymdt' => 'getCreatedYmdt', + 'updated_ymdt' => 'getUpdatedYmdt', + 'data_year' => 'getDataYear', + 'median' => 'getMedian', + 'min' => 'getMin', + 'max' => 'getMax', + 'currency_code' => 'getCurrencyCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('last_edited', $data ?? [], null); + $this->setIfExists('source_color_code', $data ?? [], null); + $this->setIfExists('source_date', $data ?? [], null); + $this->setIfExists('created_ymdt', $data ?? [], null); + $this->setIfExists('updated_ymdt', $data ?? [], null); + $this->setIfExists('data_year', $data ?? [], null); + $this->setIfExists('median', $data ?? [], null); + $this->setIfExists('min', $data ?? [], null); + $this->setIfExists('max', $data ?? [], null); + $this->setIfExists('currency_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title job_title + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + $this->openApiNullablesSetToNull['job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title'])) { + unset($nullablesSetToNull['job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets last_edited + * + * @return string|null + */ + public function getLastEdited() { + return $this->container['last_edited']; + } + + /** + * Sets last_edited + * + * @param string|null $last_edited last_edited + * + * @return self + */ + public function setLastEdited($last_edited) { + if (is_null($last_edited)) { + $this->openApiNullablesSetToNull['last_edited'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_edited'])) { + unset($nullablesSetToNull['last_edited']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_edited'] = $last_edited; + + return $this; + } + + /** + * Gets source_color_code + * + * @return string|null + */ + public function getSourceColorCode() { + return $this->container['source_color_code']; + } + + /** + * Sets source_color_code + * + * @param string|null $source_color_code source_color_code + * + * @return self + */ + public function setSourceColorCode($source_color_code) { + if (is_null($source_color_code)) { + $this->openApiNullablesSetToNull['source_color_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_color_code'])) { + unset($nullablesSetToNull['source_color_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_color_code'] = $source_color_code; + + return $this; + } + + /** + * Gets source_date + * + * @return string|null + */ + public function getSourceDate() { + return $this->container['source_date']; + } + + /** + * Sets source_date + * + * @param string|null $source_date source_date + * + * @return self + */ + public function setSourceDate($source_date) { + if (is_null($source_date)) { + $this->openApiNullablesSetToNull['source_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_date'])) { + unset($nullablesSetToNull['source_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_date'] = $source_date; + + return $this; + } + + /** + * Gets created_ymdt + * + * @return string|null + */ + public function getCreatedYmdt() { + return $this->container['created_ymdt']; + } + + /** + * Sets created_ymdt + * + * @param string|null $created_ymdt created_ymdt + * + * @return self + */ + public function setCreatedYmdt($created_ymdt) { + if (is_null($created_ymdt)) { + $this->openApiNullablesSetToNull['created_ymdt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_ymdt'])) { + unset($nullablesSetToNull['created_ymdt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_ymdt'] = $created_ymdt; + + return $this; + } + + /** + * Gets updated_ymdt + * + * @return string|null + */ + public function getUpdatedYmdt() { + return $this->container['updated_ymdt']; + } + + /** + * Sets updated_ymdt + * + * @param string|null $updated_ymdt updated_ymdt + * + * @return self + */ + public function setUpdatedYmdt($updated_ymdt) { + if (is_null($updated_ymdt)) { + $this->openApiNullablesSetToNull['updated_ymdt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_ymdt'])) { + unset($nullablesSetToNull['updated_ymdt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_ymdt'] = $updated_ymdt; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year data_year + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + $this->openApiNullablesSetToNull['data_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['data_year'])) { + unset($nullablesSetToNull['data_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data_year'] = $data_year; + + return $this; + } + + /** + * Gets median + * + * @return float|null + */ + public function getMedian() { + return $this->container['median']; + } + + /** + * Sets median + * + * @param float|null $median median + * + * @return self + */ + public function setMedian($median) { + if (is_null($median)) { + $this->openApiNullablesSetToNull['median'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['median'])) { + unset($nullablesSetToNull['median']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['median'] = $median; + + return $this; + } + + /** + * Gets min + * + * @return float|null + */ + public function getMin() { + return $this->container['min']; + } + + /** + * Sets min + * + * @param float|null $min min + * + * @return self + */ + public function setMin($min) { + if (is_null($min)) { + $this->openApiNullablesSetToNull['min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['min'])) { + unset($nullablesSetToNull['min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min'] = $min; + + return $this; + } + + /** + * Gets max + * + * @return float|null + */ + public function getMax() { + return $this->container['max']; + } + + /** + * Sets max + * + * @param float|null $max max + * + * @return self + */ + public function setMax($max) { + if (is_null($max)) { + $this->openApiNullablesSetToNull['max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['max'])) { + unset($nullablesSetToNull['max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkJobLocationEmployee.php b/lib/Model/CompensationBenchmarkJobLocationEmployee.php new file mode 100644 index 00000000..3c98b29b --- /dev/null +++ b/lib/Model/CompensationBenchmarkJobLocationEmployee.php @@ -0,0 +1,692 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkJobLocationEmployee + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkJobLocationEmployee Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkJobLocationEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkJobLocationEmployee'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'salary' => '\BhrSdk\Model\CompensationBenchmarkJobLocationEmployeeSalary', + 'photo_url' => 'string', + 'manager_name' => 'string', + 'manager_title' => 'string', + 'division' => 'object', + 'department' => 'object', + 'currency_conversion_failed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'salary' => null, + 'photo_url' => null, + 'manager_name' => null, + 'manager_title' => null, + 'division' => null, + 'department' => null, + 'currency_conversion_failed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'name' => true, + 'salary' => false, + 'photo_url' => true, + 'manager_name' => true, + 'manager_title' => true, + 'division' => true, + 'department' => true, + 'currency_conversion_failed' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'salary' => 'salary', + 'photo_url' => 'photoUrl', + 'manager_name' => 'managerName', + 'manager_title' => 'managerTitle', + 'division' => 'division', + 'department' => 'department', + 'currency_conversion_failed' => 'currencyConversionFailed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'salary' => 'setSalary', + 'photo_url' => 'setPhotoUrl', + 'manager_name' => 'setManagerName', + 'manager_title' => 'setManagerTitle', + 'division' => 'setDivision', + 'department' => 'setDepartment', + 'currency_conversion_failed' => 'setCurrencyConversionFailed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'salary' => 'getSalary', + 'photo_url' => 'getPhotoUrl', + 'manager_name' => 'getManagerName', + 'manager_title' => 'getManagerTitle', + 'division' => 'getDivision', + 'department' => 'getDepartment', + 'currency_conversion_failed' => 'getCurrencyConversionFailed' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('salary', $data ?? [], null); + $this->setIfExists('photo_url', $data ?? [], null); + $this->setIfExists('manager_name', $data ?? [], null); + $this->setIfExists('manager_title', $data ?? [], null); + $this->setIfExists('division', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('currency_conversion_failed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets salary + * + * @return \BhrSdk\Model\CompensationBenchmarkJobLocationEmployeeSalary|null + */ + public function getSalary() { + return $this->container['salary']; + } + + /** + * Sets salary + * + * @param \BhrSdk\Model\CompensationBenchmarkJobLocationEmployeeSalary|null $salary salary + * + * @return self + */ + public function setSalary($salary) { + if (is_null($salary)) { + throw new \InvalidArgumentException('non-nullable salary cannot be null'); + } + $this->container['salary'] = $salary; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + + /** + * Gets manager_name + * + * @return string|null + */ + public function getManagerName() { + return $this->container['manager_name']; + } + + /** + * Sets manager_name + * + * @param string|null $manager_name manager_name + * + * @return self + */ + public function setManagerName($manager_name) { + if (is_null($manager_name)) { + $this->openApiNullablesSetToNull['manager_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['manager_name'])) { + unset($nullablesSetToNull['manager_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['manager_name'] = $manager_name; + + return $this; + } + + /** + * Gets manager_title + * + * @return string|null + */ + public function getManagerTitle() { + return $this->container['manager_title']; + } + + /** + * Sets manager_title + * + * @param string|null $manager_title manager_title + * + * @return self + */ + public function setManagerTitle($manager_title) { + if (is_null($manager_title)) { + $this->openApiNullablesSetToNull['manager_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['manager_title'])) { + unset($nullablesSetToNull['manager_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['manager_title'] = $manager_title; + + return $this; + } + + /** + * Gets division + * + * @return object|null + */ + public function getDivision() { + return $this->container['division']; + } + + /** + * Sets division + * + * @param object|null $division division + * + * @return self + */ + public function setDivision($division) { + if (is_null($division)) { + $this->openApiNullablesSetToNull['division'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['division'])) { + unset($nullablesSetToNull['division']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['division'] = $division; + + return $this; + } + + /** + * Gets department + * + * @return object|null + */ + public function getDepartment() { + return $this->container['department']; + } + + /** + * Sets department + * + * @param object|null $department department + * + * @return self + */ + public function setDepartment($department) { + if (is_null($department)) { + $this->openApiNullablesSetToNull['department'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department'])) { + unset($nullablesSetToNull['department']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets currency_conversion_failed + * + * @return bool|null + */ + public function getCurrencyConversionFailed() { + return $this->container['currency_conversion_failed']; + } + + /** + * Sets currency_conversion_failed + * + * @param bool|null $currency_conversion_failed currency_conversion_failed + * + * @return self + */ + public function setCurrencyConversionFailed($currency_conversion_failed) { + if (is_null($currency_conversion_failed)) { + $this->openApiNullablesSetToNull['currency_conversion_failed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_conversion_failed'])) { + unset($nullablesSetToNull['currency_conversion_failed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_conversion_failed'] = $currency_conversion_failed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkJobLocationEmployeeSalary.php b/lib/Model/CompensationBenchmarkJobLocationEmployeeSalary.php new file mode 100644 index 00000000..d1e7fcda --- /dev/null +++ b/lib/Model/CompensationBenchmarkJobLocationEmployeeSalary.php @@ -0,0 +1,432 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkJobLocationEmployeeSalary + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkJobLocationEmployeeSalary Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkJobLocationEmployeeSalary implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkJobLocationEmployee_salary'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'amount' => 'float', + 'currency_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'amount' => null, + 'currency_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'amount' => true, + 'currency_code' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'currency_code' => 'currencyCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'currency_code' => 'setCurrencyCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'currency_code' => 'getCurrencyCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('currency_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + $this->openApiNullablesSetToNull['amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['amount'])) { + unset($nullablesSetToNull['amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkJobLocationPair.php b/lib/Model/CompensationBenchmarkJobLocationPair.php new file mode 100644 index 00000000..981d9dfb --- /dev/null +++ b/lib/Model/CompensationBenchmarkJobLocationPair.php @@ -0,0 +1,566 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkJobLocationPair + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkJobLocationPair Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkJobLocationPair implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkJobLocationPair'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_details' => '\BhrSdk\Model\CompensationBenchmarkJobLocationPairJobDetails', + 'location_details' => 'object', + 'is_remote' => 'bool', + 'benchmarks' => '\BhrSdk\Model\CompensationBenchmarkOverview[]', + 'employees' => '\BhrSdk\Model\CompensationBenchmarkJobLocationEmployee[]', + 'internal_job_pay_band' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_details' => null, + 'location_details' => null, + 'is_remote' => null, + 'benchmarks' => null, + 'employees' => null, + 'internal_job_pay_band' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_details' => false, + 'location_details' => true, + 'is_remote' => true, + 'benchmarks' => false, + 'employees' => false, + 'internal_job_pay_band' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_details' => 'jobDetails', + 'location_details' => 'locationDetails', + 'is_remote' => 'isRemote', + 'benchmarks' => 'benchmarks', + 'employees' => 'employees', + 'internal_job_pay_band' => 'internalJobPayBand' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_details' => 'setJobDetails', + 'location_details' => 'setLocationDetails', + 'is_remote' => 'setIsRemote', + 'benchmarks' => 'setBenchmarks', + 'employees' => 'setEmployees', + 'internal_job_pay_band' => 'setInternalJobPayBand' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_details' => 'getJobDetails', + 'location_details' => 'getLocationDetails', + 'is_remote' => 'getIsRemote', + 'benchmarks' => 'getBenchmarks', + 'employees' => 'getEmployees', + 'internal_job_pay_band' => 'getInternalJobPayBand' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_details', $data ?? [], null); + $this->setIfExists('location_details', $data ?? [], null); + $this->setIfExists('is_remote', $data ?? [], null); + $this->setIfExists('benchmarks', $data ?? [], null); + $this->setIfExists('employees', $data ?? [], null); + $this->setIfExists('internal_job_pay_band', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_details + * + * @return \BhrSdk\Model\CompensationBenchmarkJobLocationPairJobDetails|null + */ + public function getJobDetails() { + return $this->container['job_details']; + } + + /** + * Sets job_details + * + * @param \BhrSdk\Model\CompensationBenchmarkJobLocationPairJobDetails|null $job_details job_details + * + * @return self + */ + public function setJobDetails($job_details) { + if (is_null($job_details)) { + throw new \InvalidArgumentException('non-nullable job_details cannot be null'); + } + $this->container['job_details'] = $job_details; + + return $this; + } + + /** + * Gets location_details + * + * @return object|null + */ + public function getLocationDetails() { + return $this->container['location_details']; + } + + /** + * Sets location_details + * + * @param object|null $location_details location_details + * + * @return self + */ + public function setLocationDetails($location_details) { + if (is_null($location_details)) { + $this->openApiNullablesSetToNull['location_details'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location_details'])) { + unset($nullablesSetToNull['location_details']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location_details'] = $location_details; + + return $this; + } + + /** + * Gets is_remote + * + * @return bool|null + */ + public function getIsRemote() { + return $this->container['is_remote']; + } + + /** + * Sets is_remote + * + * @param bool|null $is_remote is_remote + * + * @return self + */ + public function setIsRemote($is_remote) { + if (is_null($is_remote)) { + $this->openApiNullablesSetToNull['is_remote'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_remote'])) { + unset($nullablesSetToNull['is_remote']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['is_remote'] = $is_remote; + + return $this; + } + + /** + * Gets benchmarks + * + * @return \BhrSdk\Model\CompensationBenchmarkOverview[]|null + */ + public function getBenchmarks() { + return $this->container['benchmarks']; + } + + /** + * Sets benchmarks + * + * @param \BhrSdk\Model\CompensationBenchmarkOverview[]|null $benchmarks Saved benchmarks attached to this job/location. Empty when none are configured. + * + * @return self + */ + public function setBenchmarks($benchmarks) { + if (is_null($benchmarks)) { + throw new \InvalidArgumentException('non-nullable benchmarks cannot be null'); + } + $this->container['benchmarks'] = $benchmarks; + + return $this; + } + + /** + * Gets employees + * + * @return \BhrSdk\Model\CompensationBenchmarkJobLocationEmployee[]|null + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param \BhrSdk\Model\CompensationBenchmarkJobLocationEmployee[]|null $employees employees + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + + /** + * Gets internal_job_pay_band + * + * @return object|null + */ + public function getInternalJobPayBand() { + return $this->container['internal_job_pay_band']; + } + + /** + * Sets internal_job_pay_band + * + * @param object|null $internal_job_pay_band internal_job_pay_band + * + * @return self + */ + public function setInternalJobPayBand($internal_job_pay_band) { + if (is_null($internal_job_pay_band)) { + $this->openApiNullablesSetToNull['internal_job_pay_band'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['internal_job_pay_band'])) { + unset($nullablesSetToNull['internal_job_pay_band']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['internal_job_pay_band'] = $internal_job_pay_band; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkJobLocationPairJobDetails.php b/lib/Model/CompensationBenchmarkJobLocationPairJobDetails.php new file mode 100644 index 00000000..93357346 --- /dev/null +++ b/lib/Model/CompensationBenchmarkJobLocationPairJobDetails.php @@ -0,0 +1,432 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkJobLocationPairJobDetails + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkJobLocationPairJobDetails Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkJobLocationPairJobDetails implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkJobLocationPair_jobDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'title' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'title' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'title' => 'title' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'title' => 'setTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + $this->openApiNullablesSetToNull['title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['title'])) { + unset($nullablesSetToNull['title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkOverview.php b/lib/Model/CompensationBenchmarkOverview.php new file mode 100644 index 00000000..b46a18c1 --- /dev/null +++ b/lib/Model/CompensationBenchmarkOverview.php @@ -0,0 +1,578 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkOverview + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkOverview Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkOverview implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkOverview'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'values' => '\BhrSdk\Model\CompensationBenchmarkOverviewValues', + 'source_id' => 'string', + 'source_color' => 'string', + 'is_mercer' => 'bool', + 'data_year' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'values' => null, + 'source_id' => null, + 'source_color' => null, + 'is_mercer' => null, + 'data_year' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'values' => false, + 'source_id' => true, + 'source_color' => true, + 'is_mercer' => true, + 'data_year' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'values' => 'values', + 'source_id' => 'sourceId', + 'source_color' => 'sourceColor', + 'is_mercer' => 'isMercer', + 'data_year' => 'dataYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'values' => 'setValues', + 'source_id' => 'setSourceId', + 'source_color' => 'setSourceColor', + 'is_mercer' => 'setIsMercer', + 'data_year' => 'setDataYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'values' => 'getValues', + 'source_id' => 'getSourceId', + 'source_color' => 'getSourceColor', + 'is_mercer' => 'getIsMercer', + 'data_year' => 'getDataYear' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('values', $data ?? [], null); + $this->setIfExists('source_id', $data ?? [], null); + $this->setIfExists('source_color', $data ?? [], null); + $this->setIfExists('is_mercer', $data ?? [], null); + $this->setIfExists('data_year', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets values + * + * @return \BhrSdk\Model\CompensationBenchmarkOverviewValues|null + */ + public function getValues() { + return $this->container['values']; + } + + /** + * Sets values + * + * @param \BhrSdk\Model\CompensationBenchmarkOverviewValues|null $values values + * + * @return self + */ + public function setValues($values) { + if (is_null($values)) { + throw new \InvalidArgumentException('non-nullable values cannot be null'); + } + $this->container['values'] = $values; + + return $this; + } + + /** + * Gets source_id + * + * @return string|null + */ + public function getSourceId() { + return $this->container['source_id']; + } + + /** + * Sets source_id + * + * @param string|null $source_id source_id + * + * @return self + */ + public function setSourceId($source_id) { + if (is_null($source_id)) { + $this->openApiNullablesSetToNull['source_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_id'])) { + unset($nullablesSetToNull['source_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_id'] = $source_id; + + return $this; + } + + /** + * Gets source_color + * + * @return string|null + */ + public function getSourceColor() { + return $this->container['source_color']; + } + + /** + * Sets source_color + * + * @param string|null $source_color source_color + * + * @return self + */ + public function setSourceColor($source_color) { + if (is_null($source_color)) { + $this->openApiNullablesSetToNull['source_color'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_color'])) { + unset($nullablesSetToNull['source_color']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_color'] = $source_color; + + return $this; + } + + /** + * Gets is_mercer + * + * @return bool|null + */ + public function getIsMercer() { + return $this->container['is_mercer']; + } + + /** + * Sets is_mercer + * + * @param bool|null $is_mercer is_mercer + * + * @return self + */ + public function setIsMercer($is_mercer) { + if (is_null($is_mercer)) { + $this->openApiNullablesSetToNull['is_mercer'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_mercer'])) { + unset($nullablesSetToNull['is_mercer']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['is_mercer'] = $is_mercer; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year data_year + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + $this->openApiNullablesSetToNull['data_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['data_year'])) { + unset($nullablesSetToNull['data_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data_year'] = $data_year; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkOverviewValues.php b/lib/Model/CompensationBenchmarkOverviewValues.php new file mode 100644 index 00000000..362b07f8 --- /dev/null +++ b/lib/Model/CompensationBenchmarkOverviewValues.php @@ -0,0 +1,660 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkOverviewValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkOverviewValues Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkOverviewValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkOverview_values'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'median' => 'float', + 'min' => 'float', + 'max' => 'float', + 'currency_code' => 'string', + 'original_median' => 'float', + 'original_min' => 'float', + 'original_max' => 'float', + 'original_currency_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'median' => null, + 'min' => null, + 'max' => null, + 'currency_code' => null, + 'original_median' => null, + 'original_min' => null, + 'original_max' => null, + 'original_currency_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'median' => true, + 'min' => true, + 'max' => true, + 'currency_code' => true, + 'original_median' => true, + 'original_min' => true, + 'original_max' => true, + 'original_currency_code' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'median' => 'median', + 'min' => 'min', + 'max' => 'max', + 'currency_code' => 'currencyCode', + 'original_median' => 'originalMedian', + 'original_min' => 'originalMin', + 'original_max' => 'originalMax', + 'original_currency_code' => 'originalCurrencyCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'median' => 'setMedian', + 'min' => 'setMin', + 'max' => 'setMax', + 'currency_code' => 'setCurrencyCode', + 'original_median' => 'setOriginalMedian', + 'original_min' => 'setOriginalMin', + 'original_max' => 'setOriginalMax', + 'original_currency_code' => 'setOriginalCurrencyCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'median' => 'getMedian', + 'min' => 'getMin', + 'max' => 'getMax', + 'currency_code' => 'getCurrencyCode', + 'original_median' => 'getOriginalMedian', + 'original_min' => 'getOriginalMin', + 'original_max' => 'getOriginalMax', + 'original_currency_code' => 'getOriginalCurrencyCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('median', $data ?? [], null); + $this->setIfExists('min', $data ?? [], null); + $this->setIfExists('max', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('original_median', $data ?? [], null); + $this->setIfExists('original_min', $data ?? [], null); + $this->setIfExists('original_max', $data ?? [], null); + $this->setIfExists('original_currency_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets median + * + * @return float|null + */ + public function getMedian() { + return $this->container['median']; + } + + /** + * Sets median + * + * @param float|null $median median + * + * @return self + */ + public function setMedian($median) { + if (is_null($median)) { + $this->openApiNullablesSetToNull['median'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['median'])) { + unset($nullablesSetToNull['median']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['median'] = $median; + + return $this; + } + + /** + * Gets min + * + * @return float|null + */ + public function getMin() { + return $this->container['min']; + } + + /** + * Sets min + * + * @param float|null $min min + * + * @return self + */ + public function setMin($min) { + if (is_null($min)) { + $this->openApiNullablesSetToNull['min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['min'])) { + unset($nullablesSetToNull['min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min'] = $min; + + return $this; + } + + /** + * Gets max + * + * @return float|null + */ + public function getMax() { + return $this->container['max']; + } + + /** + * Sets max + * + * @param float|null $max max + * + * @return self + */ + public function setMax($max) { + if (is_null($max)) { + $this->openApiNullablesSetToNull['max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['max'])) { + unset($nullablesSetToNull['max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets original_median + * + * @return float|null + */ + public function getOriginalMedian() { + return $this->container['original_median']; + } + + /** + * Sets original_median + * + * @param float|null $original_median original_median + * + * @return self + */ + public function setOriginalMedian($original_median) { + if (is_null($original_median)) { + $this->openApiNullablesSetToNull['original_median'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_median'])) { + unset($nullablesSetToNull['original_median']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_median'] = $original_median; + + return $this; + } + + /** + * Gets original_min + * + * @return float|null + */ + public function getOriginalMin() { + return $this->container['original_min']; + } + + /** + * Sets original_min + * + * @param float|null $original_min original_min + * + * @return self + */ + public function setOriginalMin($original_min) { + if (is_null($original_min)) { + $this->openApiNullablesSetToNull['original_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_min'])) { + unset($nullablesSetToNull['original_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_min'] = $original_min; + + return $this; + } + + /** + * Gets original_max + * + * @return float|null + */ + public function getOriginalMax() { + return $this->container['original_max']; + } + + /** + * Sets original_max + * + * @param float|null $original_max original_max + * + * @return self + */ + public function setOriginalMax($original_max) { + if (is_null($original_max)) { + $this->openApiNullablesSetToNull['original_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_max'])) { + unset($nullablesSetToNull['original_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_max'] = $original_max; + + return $this; + } + + /** + * Gets original_currency_code + * + * @return string|null + */ + public function getOriginalCurrencyCode() { + return $this->container['original_currency_code']; + } + + /** + * Sets original_currency_code + * + * @param string|null $original_currency_code original_currency_code + * + * @return self + */ + public function setOriginalCurrencyCode($original_currency_code) { + if (is_null($original_currency_code)) { + $this->openApiNullablesSetToNull['original_currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_currency_code'])) { + unset($nullablesSetToNull['original_currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_currency_code'] = $original_currency_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkSource.php b/lib/Model/CompensationBenchmarkSource.php new file mode 100644 index 00000000..637d234c --- /dev/null +++ b/lib/Model/CompensationBenchmarkSource.php @@ -0,0 +1,534 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkSource + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkSource Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkSource implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarkSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'sort' => 'string', + 'count' => 'string', + 'color_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'sort' => null, + 'count' => null, + 'color_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'name' => true, + 'sort' => false, + 'count' => false, + 'color_code' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'sort' => 'sort', + 'count' => 'count', + 'color_code' => 'colorCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'sort' => 'setSort', + 'count' => 'setCount', + 'color_code' => 'setColorCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'sort' => 'getSort', + 'count' => 'getCount', + 'color_code' => 'getColorCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('sort', $data ?? [], null); + $this->setIfExists('count', $data ?? [], null); + $this->setIfExists('color_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets sort + * + * @return string|null + */ + public function getSort() { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param string|null $sort Sort order position, returned as a numeric string. + * + * @return self + */ + public function setSort($sort) { + if (is_null($sort)) { + throw new \InvalidArgumentException('non-nullable sort cannot be null'); + } + $this->container['sort'] = $sort; + + return $this; + } + + /** + * Gets count + * + * @return string|null + */ + public function getCount() { + return $this->container['count']; + } + + /** + * Sets count + * + * @param string|null $count Number of benchmarks attached to this source, returned as a numeric string. + * + * @return self + */ + public function setCount($count) { + if (is_null($count)) { + throw new \InvalidArgumentException('non-nullable count cannot be null'); + } + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets color_code + * + * @return string|null + */ + public function getColorCode() { + return $this->container['color_code']; + } + + /** + * Sets color_code + * + * @param string|null $color_code color_code + * + * @return self + */ + public function setColorCode($color_code) { + if (is_null($color_code)) { + $this->openApiNullablesSetToNull['color_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['color_code'])) { + unset($nullablesSetToNull['color_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['color_code'] = $color_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarkingColumnMap.php b/lib/Model/CompensationBenchmarkingColumnMap.php new file mode 100644 index 00000000..8e3dc2f5 --- /dev/null +++ b/lib/Model/CompensationBenchmarkingColumnMap.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkingColumnMap + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarkingColumnMap Class Doc Comment + * + * @category Class + * @description Schema for compensation benchmarking column map + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarkingColumnMap implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarking-ColumnMap'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'expected_column_key' => 'string', + 'column_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'expected_column_key' => null, + 'column_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'expected_column_key' => true, + 'column_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'expected_column_key' => 'expectedColumnKey', + 'column_name' => 'columnName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'expected_column_key' => 'setExpectedColumnKey', + 'column_name' => 'setColumnName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'expected_column_key' => 'getExpectedColumnKey', + 'column_name' => 'getColumnName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('expected_column_key', $data ?? [], null); + $this->setIfExists('column_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets expected_column_key + * + * @return string|null + */ + public function getExpectedColumnKey() { + return $this->container['expected_column_key']; + } + + /** + * Sets expected_column_key + * + * @param string|null $expected_column_key expected_column_key + * + * @return self + */ + public function setExpectedColumnKey($expected_column_key) { + if (is_null($expected_column_key)) { + $this->openApiNullablesSetToNull['expected_column_key'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['expected_column_key'])) { + unset($nullablesSetToNull['expected_column_key']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expected_column_key'] = $expected_column_key; + + return $this; + } + + /** + * Gets column_name + * + * @return string|null + */ + public function getColumnName() { + return $this->container['column_name']; + } + + /** + * Sets column_name + * + * @param string|null $column_name Column name + * + * @return self + */ + public function setColumnName($column_name) { + if (is_null($column_name)) { + throw new \InvalidArgumentException('non-nullable column_name cannot be null'); + } + $this->container['column_name'] = $column_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationBenchmarksList.php b/lib/Model/CompensationBenchmarksList.php new file mode 100644 index 00000000..1d67c066 --- /dev/null +++ b/lib/Model/CompensationBenchmarksList.php @@ -0,0 +1,502 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarksList + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationBenchmarksList Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationBenchmarksList implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationBenchmarksList'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_location_pairs' => '\BhrSdk\Model\CompensationBenchmarkJobLocationPair[]', + 'dismiss_review_banner' => 'bool', + 'dismiss_add_location_banner' => 'bool', + 'dismiss_mercer_data_info_banner' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_location_pairs' => null, + 'dismiss_review_banner' => null, + 'dismiss_add_location_banner' => null, + 'dismiss_mercer_data_info_banner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_location_pairs' => false, + 'dismiss_review_banner' => true, + 'dismiss_add_location_banner' => true, + 'dismiss_mercer_data_info_banner' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_location_pairs' => 'jobLocationPairs', + 'dismiss_review_banner' => 'dismissReviewBanner', + 'dismiss_add_location_banner' => 'dismissAddLocationBanner', + 'dismiss_mercer_data_info_banner' => 'dismissMercerDataInfoBanner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_location_pairs' => 'setJobLocationPairs', + 'dismiss_review_banner' => 'setDismissReviewBanner', + 'dismiss_add_location_banner' => 'setDismissAddLocationBanner', + 'dismiss_mercer_data_info_banner' => 'setDismissMercerDataInfoBanner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_location_pairs' => 'getJobLocationPairs', + 'dismiss_review_banner' => 'getDismissReviewBanner', + 'dismiss_add_location_banner' => 'getDismissAddLocationBanner', + 'dismiss_mercer_data_info_banner' => 'getDismissMercerDataInfoBanner' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_location_pairs', $data ?? [], null); + $this->setIfExists('dismiss_review_banner', $data ?? [], null); + $this->setIfExists('dismiss_add_location_banner', $data ?? [], null); + $this->setIfExists('dismiss_mercer_data_info_banner', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_location_pairs + * + * @return \BhrSdk\Model\CompensationBenchmarkJobLocationPair[]|null + */ + public function getJobLocationPairs() { + return $this->container['job_location_pairs']; + } + + /** + * Sets job_location_pairs + * + * @param \BhrSdk\Model\CompensationBenchmarkJobLocationPair[]|null $job_location_pairs job_location_pairs + * + * @return self + */ + public function setJobLocationPairs($job_location_pairs) { + if (is_null($job_location_pairs)) { + throw new \InvalidArgumentException('non-nullable job_location_pairs cannot be null'); + } + $this->container['job_location_pairs'] = $job_location_pairs; + + return $this; + } + + /** + * Gets dismiss_review_banner + * + * @return bool|null + */ + public function getDismissReviewBanner() { + return $this->container['dismiss_review_banner']; + } + + /** + * Sets dismiss_review_banner + * + * @param bool|null $dismiss_review_banner dismiss_review_banner + * + * @return self + */ + public function setDismissReviewBanner($dismiss_review_banner) { + if (is_null($dismiss_review_banner)) { + $this->openApiNullablesSetToNull['dismiss_review_banner'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['dismiss_review_banner'])) { + unset($nullablesSetToNull['dismiss_review_banner']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['dismiss_review_banner'] = $dismiss_review_banner; + + return $this; + } + + /** + * Gets dismiss_add_location_banner + * + * @return bool|null + */ + public function getDismissAddLocationBanner() { + return $this->container['dismiss_add_location_banner']; + } + + /** + * Sets dismiss_add_location_banner + * + * @param bool|null $dismiss_add_location_banner dismiss_add_location_banner + * + * @return self + */ + public function setDismissAddLocationBanner($dismiss_add_location_banner) { + if (is_null($dismiss_add_location_banner)) { + $this->openApiNullablesSetToNull['dismiss_add_location_banner'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['dismiss_add_location_banner'])) { + unset($nullablesSetToNull['dismiss_add_location_banner']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['dismiss_add_location_banner'] = $dismiss_add_location_banner; + + return $this; + } + + /** + * Gets dismiss_mercer_data_info_banner + * + * @return bool|null + */ + public function getDismissMercerDataInfoBanner() { + return $this->container['dismiss_mercer_data_info_banner']; + } + + /** + * Sets dismiss_mercer_data_info_banner + * + * @param bool|null $dismiss_mercer_data_info_banner dismiss_mercer_data_info_banner + * + * @return self + */ + public function setDismissMercerDataInfoBanner($dismiss_mercer_data_info_banner) { + if (is_null($dismiss_mercer_data_info_banner)) { + $this->openApiNullablesSetToNull['dismiss_mercer_data_info_banner'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['dismiss_mercer_data_info_banner'])) { + unset($nullablesSetToNull['dismiss_mercer_data_info_banner']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['dismiss_mercer_data_info_banner'] = $dismiss_mercer_data_info_banner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponse.php b/lib/Model/CompensationEquitySettingsResponse.php new file mode 100644 index 00000000..ea8fe9dd --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponse.php @@ -0,0 +1,680 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'calculation_type' => 'string', + 'company_valuation' => '\BhrSdk\Model\CompensationEquitySettingsResponseCompanyValuation', + 'outstanding_shares' => '\BhrSdk\Model\CompensationEquitySettingsResponseOutstandingShares', + 'price_per_share' => '\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare', + 'currency_code' => 'string', + 'slider_min' => '\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin', + 'slider_max' => '\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin', + 'vesting_conditions' => '\BhrSdk\Model\CompensationEquitySettingsResponseVestingConditions', + 'disclaimers' => '\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'calculation_type' => null, + 'company_valuation' => null, + 'outstanding_shares' => null, + 'price_per_share' => null, + 'currency_code' => null, + 'slider_min' => null, + 'slider_max' => null, + 'vesting_conditions' => null, + 'disclaimers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'calculation_type' => true, + 'company_valuation' => false, + 'outstanding_shares' => false, + 'price_per_share' => true, + 'currency_code' => true, + 'slider_min' => true, + 'slider_max' => true, + 'vesting_conditions' => false, + 'disclaimers' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'calculation_type' => 'calculationType', + 'company_valuation' => 'companyValuation', + 'outstanding_shares' => 'outstandingShares', + 'price_per_share' => 'pricePerShare', + 'currency_code' => 'currencyCode', + 'slider_min' => 'sliderMin', + 'slider_max' => 'sliderMax', + 'vesting_conditions' => 'vestingConditions', + 'disclaimers' => 'disclaimers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'calculation_type' => 'setCalculationType', + 'company_valuation' => 'setCompanyValuation', + 'outstanding_shares' => 'setOutstandingShares', + 'price_per_share' => 'setPricePerShare', + 'currency_code' => 'setCurrencyCode', + 'slider_min' => 'setSliderMin', + 'slider_max' => 'setSliderMax', + 'vesting_conditions' => 'setVestingConditions', + 'disclaimers' => 'setDisclaimers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'calculation_type' => 'getCalculationType', + 'company_valuation' => 'getCompanyValuation', + 'outstanding_shares' => 'getOutstandingShares', + 'price_per_share' => 'getPricePerShare', + 'currency_code' => 'getCurrencyCode', + 'slider_min' => 'getSliderMin', + 'slider_max' => 'getSliderMax', + 'vesting_conditions' => 'getVestingConditions', + 'disclaimers' => 'getDisclaimers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('calculation_type', $data ?? [], null); + $this->setIfExists('company_valuation', $data ?? [], null); + $this->setIfExists('outstanding_shares', $data ?? [], null); + $this->setIfExists('price_per_share', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('slider_min', $data ?? [], null); + $this->setIfExists('slider_max', $data ?? [], null); + $this->setIfExists('vesting_conditions', $data ?? [], null); + $this->setIfExists('disclaimers', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets calculation_type + * + * @return string|null + */ + public function getCalculationType() { + return $this->container['calculation_type']; + } + + /** + * Sets calculation_type + * + * @param string|null $calculation_type calculation_type + * + * @return self + */ + public function setCalculationType($calculation_type) { + if (is_null($calculation_type)) { + $this->openApiNullablesSetToNull['calculation_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['calculation_type'])) { + unset($nullablesSetToNull['calculation_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['calculation_type'] = $calculation_type; + + return $this; + } + + /** + * Gets company_valuation + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseCompanyValuation|null + */ + public function getCompanyValuation() { + return $this->container['company_valuation']; + } + + /** + * Sets company_valuation + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseCompanyValuation|null $company_valuation company_valuation + * + * @return self + */ + public function setCompanyValuation($company_valuation) { + if (is_null($company_valuation)) { + throw new \InvalidArgumentException('non-nullable company_valuation cannot be null'); + } + $this->container['company_valuation'] = $company_valuation; + + return $this; + } + + /** + * Gets outstanding_shares + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseOutstandingShares|null + */ + public function getOutstandingShares() { + return $this->container['outstanding_shares']; + } + + /** + * Sets outstanding_shares + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseOutstandingShares|null $outstanding_shares outstanding_shares + * + * @return self + */ + public function setOutstandingShares($outstanding_shares) { + if (is_null($outstanding_shares)) { + throw new \InvalidArgumentException('non-nullable outstanding_shares cannot be null'); + } + $this->container['outstanding_shares'] = $outstanding_shares; + + return $this; + } + + /** + * Gets price_per_share + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null + */ + public function getPricePerShare() { + return $this->container['price_per_share']; + } + + /** + * Sets price_per_share + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null $price_per_share price_per_share + * + * @return self + */ + public function setPricePerShare($price_per_share) { + if (is_null($price_per_share)) { + $this->openApiNullablesSetToNull['price_per_share'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['price_per_share'])) { + unset($nullablesSetToNull['price_per_share']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['price_per_share'] = $price_per_share; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets slider_min + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null + */ + public function getSliderMin() { + return $this->container['slider_min']; + } + + /** + * Sets slider_min + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null $slider_min slider_min + * + * @return self + */ + public function setSliderMin($slider_min) { + if (is_null($slider_min)) { + $this->openApiNullablesSetToNull['slider_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['slider_min'])) { + unset($nullablesSetToNull['slider_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['slider_min'] = $slider_min; + + return $this; + } + + /** + * Gets slider_max + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null + */ + public function getSliderMax() { + return $this->container['slider_max']; + } + + /** + * Sets slider_max + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null $slider_max slider_max + * + * @return self + */ + public function setSliderMax($slider_max) { + if (is_null($slider_max)) { + $this->openApiNullablesSetToNull['slider_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['slider_max'])) { + unset($nullablesSetToNull['slider_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['slider_max'] = $slider_max; + + return $this; + } + + /** + * Gets vesting_conditions + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseVestingConditions|null + */ + public function getVestingConditions() { + return $this->container['vesting_conditions']; + } + + /** + * Sets vesting_conditions + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseVestingConditions|null $vesting_conditions vesting_conditions + * + * @return self + */ + public function setVestingConditions($vesting_conditions) { + if (is_null($vesting_conditions)) { + throw new \InvalidArgumentException('non-nullable vesting_conditions cannot be null'); + } + $this->container['vesting_conditions'] = $vesting_conditions; + + return $this; + } + + /** + * Gets disclaimers + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null + */ + public function getDisclaimers() { + return $this->container['disclaimers']; + } + + /** + * Sets disclaimers + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null $disclaimers disclaimers + * + * @return self + */ + public function setDisclaimers($disclaimers) { + if (is_null($disclaimers)) { + $this->openApiNullablesSetToNull['disclaimers'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['disclaimers'])) { + unset($nullablesSetToNull['disclaimers']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disclaimers'] = $disclaimers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponseCompanyValuation.php b/lib/Model/CompensationEquitySettingsResponseCompanyValuation.php new file mode 100644 index 00000000..bfc5d5b6 --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponseCompanyValuation.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponseCompanyValuation + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponseCompanyValuation Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponseCompanyValuation implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_companyValuation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponseDisclaimers.php b/lib/Model/CompensationEquitySettingsResponseDisclaimers.php new file mode 100644 index 00000000..783311cd --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponseDisclaimers.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponseDisclaimers + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponseDisclaimers Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponseDisclaimers implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_disclaimers'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponseOutstandingShares.php b/lib/Model/CompensationEquitySettingsResponseOutstandingShares.php new file mode 100644 index 00000000..38320099 --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponseOutstandingShares.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponseOutstandingShares + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponseOutstandingShares Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponseOutstandingShares implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_outstandingShares'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponsePricePerShare.php b/lib/Model/CompensationEquitySettingsResponsePricePerShare.php new file mode 100644 index 00000000..01d500c0 --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponsePricePerShare.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponsePricePerShare + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponsePricePerShare Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponsePricePerShare implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_pricePerShare'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponseSliderMin.php b/lib/Model/CompensationEquitySettingsResponseSliderMin.php new file mode 100644 index 00000000..b823edda --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponseSliderMin.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponseSliderMin + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponseSliderMin Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponseSliderMin implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_sliderMin'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsResponseVestingConditions.php b/lib/Model/CompensationEquitySettingsResponseVestingConditions.php new file mode 100644 index 00000000..bd4c1669 --- /dev/null +++ b/lib/Model/CompensationEquitySettingsResponseVestingConditions.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsResponseVestingConditions + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsResponseVestingConditions Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsResponseVestingConditions implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsResponse_vestingConditions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationEquitySettingsUpdateRequest.php b/lib/Model/CompensationEquitySettingsUpdateRequest.php new file mode 100644 index 00000000..9254cbbe --- /dev/null +++ b/lib/Model/CompensationEquitySettingsUpdateRequest.php @@ -0,0 +1,698 @@ +<?php +declare(strict_types=1); +/** + * CompensationEquitySettingsUpdateRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationEquitySettingsUpdateRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationEquitySettingsUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationEquitySettingsUpdateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'calculation_type' => 'string', + 'company_valuation' => '\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare', + 'outstanding_shares' => '\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin', + 'price_per_share' => '\BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare', + 'currency_code' => 'string', + 'slider_min' => '\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin', + 'slider_max' => '\BhrSdk\Model\CompensationEquitySettingsResponseSliderMin', + 'vesting_conditions' => '\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers', + 'disclaimers' => '\BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'calculation_type' => null, + 'company_valuation' => null, + 'outstanding_shares' => null, + 'price_per_share' => null, + 'currency_code' => null, + 'slider_min' => null, + 'slider_max' => null, + 'vesting_conditions' => null, + 'disclaimers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'calculation_type' => true, + 'company_valuation' => true, + 'outstanding_shares' => true, + 'price_per_share' => true, + 'currency_code' => true, + 'slider_min' => true, + 'slider_max' => true, + 'vesting_conditions' => true, + 'disclaimers' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'calculation_type' => 'calculationType', + 'company_valuation' => 'companyValuation', + 'outstanding_shares' => 'outstandingShares', + 'price_per_share' => 'pricePerShare', + 'currency_code' => 'currencyCode', + 'slider_min' => 'sliderMin', + 'slider_max' => 'sliderMax', + 'vesting_conditions' => 'vestingConditions', + 'disclaimers' => 'disclaimers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'calculation_type' => 'setCalculationType', + 'company_valuation' => 'setCompanyValuation', + 'outstanding_shares' => 'setOutstandingShares', + 'price_per_share' => 'setPricePerShare', + 'currency_code' => 'setCurrencyCode', + 'slider_min' => 'setSliderMin', + 'slider_max' => 'setSliderMax', + 'vesting_conditions' => 'setVestingConditions', + 'disclaimers' => 'setDisclaimers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'calculation_type' => 'getCalculationType', + 'company_valuation' => 'getCompanyValuation', + 'outstanding_shares' => 'getOutstandingShares', + 'price_per_share' => 'getPricePerShare', + 'currency_code' => 'getCurrencyCode', + 'slider_min' => 'getSliderMin', + 'slider_max' => 'getSliderMax', + 'vesting_conditions' => 'getVestingConditions', + 'disclaimers' => 'getDisclaimers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('calculation_type', $data ?? [], null); + $this->setIfExists('company_valuation', $data ?? [], null); + $this->setIfExists('outstanding_shares', $data ?? [], null); + $this->setIfExists('price_per_share', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('slider_min', $data ?? [], null); + $this->setIfExists('slider_max', $data ?? [], null); + $this->setIfExists('vesting_conditions', $data ?? [], null); + $this->setIfExists('disclaimers', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets calculation_type + * + * @return string|null + */ + public function getCalculationType() { + return $this->container['calculation_type']; + } + + /** + * Sets calculation_type + * + * @param string|null $calculation_type calculation_type + * + * @return self + */ + public function setCalculationType($calculation_type) { + if (is_null($calculation_type)) { + $this->openApiNullablesSetToNull['calculation_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['calculation_type'])) { + unset($nullablesSetToNull['calculation_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['calculation_type'] = $calculation_type; + + return $this; + } + + /** + * Gets company_valuation + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null + */ + public function getCompanyValuation() { + return $this->container['company_valuation']; + } + + /** + * Sets company_valuation + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null $company_valuation company_valuation + * + * @return self + */ + public function setCompanyValuation($company_valuation) { + if (is_null($company_valuation)) { + $this->openApiNullablesSetToNull['company_valuation'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_valuation'])) { + unset($nullablesSetToNull['company_valuation']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_valuation'] = $company_valuation; + + return $this; + } + + /** + * Gets outstanding_shares + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null + */ + public function getOutstandingShares() { + return $this->container['outstanding_shares']; + } + + /** + * Sets outstanding_shares + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null $outstanding_shares outstanding_shares + * + * @return self + */ + public function setOutstandingShares($outstanding_shares) { + if (is_null($outstanding_shares)) { + $this->openApiNullablesSetToNull['outstanding_shares'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['outstanding_shares'])) { + unset($nullablesSetToNull['outstanding_shares']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['outstanding_shares'] = $outstanding_shares; + + return $this; + } + + /** + * Gets price_per_share + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null + */ + public function getPricePerShare() { + return $this->container['price_per_share']; + } + + /** + * Sets price_per_share + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponsePricePerShare|null $price_per_share price_per_share + * + * @return self + */ + public function setPricePerShare($price_per_share) { + if (is_null($price_per_share)) { + $this->openApiNullablesSetToNull['price_per_share'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['price_per_share'])) { + unset($nullablesSetToNull['price_per_share']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['price_per_share'] = $price_per_share; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets slider_min + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null + */ + public function getSliderMin() { + return $this->container['slider_min']; + } + + /** + * Sets slider_min + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null $slider_min slider_min + * + * @return self + */ + public function setSliderMin($slider_min) { + if (is_null($slider_min)) { + $this->openApiNullablesSetToNull['slider_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['slider_min'])) { + unset($nullablesSetToNull['slider_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['slider_min'] = $slider_min; + + return $this; + } + + /** + * Gets slider_max + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null + */ + public function getSliderMax() { + return $this->container['slider_max']; + } + + /** + * Sets slider_max + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseSliderMin|null $slider_max slider_max + * + * @return self + */ + public function setSliderMax($slider_max) { + if (is_null($slider_max)) { + $this->openApiNullablesSetToNull['slider_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['slider_max'])) { + unset($nullablesSetToNull['slider_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['slider_max'] = $slider_max; + + return $this; + } + + /** + * Gets vesting_conditions + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null + */ + public function getVestingConditions() { + return $this->container['vesting_conditions']; + } + + /** + * Sets vesting_conditions + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null $vesting_conditions vesting_conditions + * + * @return self + */ + public function setVestingConditions($vesting_conditions) { + if (is_null($vesting_conditions)) { + $this->openApiNullablesSetToNull['vesting_conditions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vesting_conditions'])) { + unset($nullablesSetToNull['vesting_conditions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vesting_conditions'] = $vesting_conditions; + + return $this; + } + + /** + * Gets disclaimers + * + * @return \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null + */ + public function getDisclaimers() { + return $this->container['disclaimers']; + } + + /** + * Sets disclaimers + * + * @param \BhrSdk\Model\CompensationEquitySettingsResponseDisclaimers|null $disclaimers disclaimers + * + * @return self + */ + public function setDisclaimers($disclaimers) { + if (is_null($disclaimers)) { + $this->openApiNullablesSetToNull['disclaimers'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['disclaimers'])) { + unset($nullablesSetToNull['disclaimers']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disclaimers'] = $disclaimers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationPlanningCycleAdminsResponse.php b/lib/Model/CompensationPlanningCycleAdminsResponse.php new file mode 100644 index 00000000..2e8d30e0 --- /dev/null +++ b/lib/Model/CompensationPlanningCycleAdminsResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningCycleAdminsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationPlanningCycleAdminsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationPlanningCycleAdminsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationPlanningCycleAdminsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'admins' => '\BhrSdk\Model\CompensationPlanningCycleAdminsResponseAdminsInner[]', + 'is_full_admin' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'admins' => null, + 'is_full_admin' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'admins' => false, + 'is_full_admin' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'admins' => 'admins', + 'is_full_admin' => 'isFullAdmin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'admins' => 'setAdmins', + 'is_full_admin' => 'setIsFullAdmin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'admins' => 'getAdmins', + 'is_full_admin' => 'getIsFullAdmin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('admins', $data ?? [], null); + $this->setIfExists('is_full_admin', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets admins + * + * @return \BhrSdk\Model\CompensationPlanningCycleAdminsResponseAdminsInner[]|null + */ + public function getAdmins() { + return $this->container['admins']; + } + + /** + * Sets admins + * + * @param \BhrSdk\Model\CompensationPlanningCycleAdminsResponseAdminsInner[]|null $admins List of admins for the cycle + * + * @return self + */ + public function setAdmins($admins) { + if (is_null($admins)) { + throw new \InvalidArgumentException('non-nullable admins cannot be null'); + } + $this->container['admins'] = $admins; + + return $this; + } + + /** + * Gets is_full_admin + * + * @return bool|null + */ + public function getIsFullAdmin() { + return $this->container['is_full_admin']; + } + + /** + * Sets is_full_admin + * + * @param bool|null $is_full_admin Whether the requesting user is a full compensation plan admin + * + * @return self + */ + public function setIsFullAdmin($is_full_admin) { + if (is_null($is_full_admin)) { + throw new \InvalidArgumentException('non-nullable is_full_admin cannot be null'); + } + $this->container['is_full_admin'] = $is_full_admin; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationPlanningCycleAdminsResponseAdminsInner.php b/lib/Model/CompensationPlanningCycleAdminsResponseAdminsInner.php new file mode 100644 index 00000000..f85a244e --- /dev/null +++ b/lib/Model/CompensationPlanningCycleAdminsResponseAdminsInner.php @@ -0,0 +1,728 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningCycleAdminsResponseAdminsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationPlanningCycleAdminsResponseAdminsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationPlanningCycleAdminsResponseAdminsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationPlanningCycleAdminsResponse_admins_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'display_name' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'job_title' => 'string', + 'photo_url' => 'string', + 'admin_type' => 'string', + 'is_removable' => 'bool', + 'added_at' => '\DateTime', + 'added_by_employee_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'display_name' => null, + 'first_name' => null, + 'last_name' => null, + 'job_title' => null, + 'photo_url' => null, + 'admin_type' => null, + 'is_removable' => null, + 'added_at' => 'date-time', + 'added_by_employee_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'display_name' => false, + 'first_name' => false, + 'last_name' => false, + 'job_title' => false, + 'photo_url' => false, + 'admin_type' => false, + 'is_removable' => false, + 'added_at' => true, + 'added_by_employee_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'display_name' => 'displayName', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'job_title' => 'jobTitle', + 'photo_url' => 'photoUrl', + 'admin_type' => 'adminType', + 'is_removable' => 'isRemovable', + 'added_at' => 'addedAt', + 'added_by_employee_id' => 'addedByEmployeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'display_name' => 'setDisplayName', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'job_title' => 'setJobTitle', + 'photo_url' => 'setPhotoUrl', + 'admin_type' => 'setAdminType', + 'is_removable' => 'setIsRemovable', + 'added_at' => 'setAddedAt', + 'added_by_employee_id' => 'setAddedByEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'display_name' => 'getDisplayName', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'job_title' => 'getJobTitle', + 'photo_url' => 'getPhotoUrl', + 'admin_type' => 'getAdminType', + 'is_removable' => 'getIsRemovable', + 'added_at' => 'getAddedAt', + 'added_by_employee_id' => 'getAddedByEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const ADMIN_TYPE_FULL_ACCOUNT_ADMIN = 'FULL_ACCOUNT_ADMIN'; + public const ADMIN_TYPE_CYCLE_ADMIN = 'CYCLE_ADMIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdminTypeAllowableValues() { + return [ + self::ADMIN_TYPE_FULL_ACCOUNT_ADMIN, + self::ADMIN_TYPE_CYCLE_ADMIN, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('photo_url', $data ?? [], null); + $this->setIfExists('admin_type', $data ?? [], null); + $this->setIfExists('is_removable', $data ?? [], null); + $this->setIfExists('added_at', $data ?? [], null); + $this->setIfExists('added_by_employee_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAdminTypeAllowableValues(); + if (!is_null($this->container['admin_type']) && !in_array($this->container['admin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'admin_type', must be one of '%s'", + $this->container['admin_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name Display name of the admin + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name First name of the admin + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + throw new \InvalidArgumentException('non-nullable first_name cannot be null'); + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name Last name of the admin + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title Job title of the admin + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + throw new \InvalidArgumentException('non-nullable job_title cannot be null'); + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url URL to the admin profile photo + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + throw new \InvalidArgumentException('non-nullable photo_url cannot be null'); + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + + /** + * Gets admin_type + * + * @return string|null + */ + public function getAdminType() { + return $this->container['admin_type']; + } + + /** + * Sets admin_type + * + * @param string|null $admin_type Type of admin + * + * @return self + */ + public function setAdminType($admin_type) { + if (is_null($admin_type)) { + throw new \InvalidArgumentException('non-nullable admin_type cannot be null'); + } + $allowedValues = $this->getAdminTypeAllowableValues(); + if (!in_array($admin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'admin_type', must be one of '%s'", + $admin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['admin_type'] = $admin_type; + + return $this; + } + + /** + * Gets is_removable + * + * @return bool|null + */ + public function getIsRemovable() { + return $this->container['is_removable']; + } + + /** + * Sets is_removable + * + * @param bool|null $is_removable Whether this admin can be removed from the cycle + * + * @return self + */ + public function setIsRemovable($is_removable) { + if (is_null($is_removable)) { + throw new \InvalidArgumentException('non-nullable is_removable cannot be null'); + } + $this->container['is_removable'] = $is_removable; + + return $this; + } + + /** + * Gets added_at + * + * @return \DateTime|null + */ + public function getAddedAt() { + return $this->container['added_at']; + } + + /** + * Sets added_at + * + * @param \DateTime|null $added_at added_at + * + * @return self + */ + public function setAddedAt($added_at) { + if (is_null($added_at)) { + $this->openApiNullablesSetToNull['added_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['added_at'])) { + unset($nullablesSetToNull['added_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['added_at'] = $added_at; + + return $this; + } + + /** + * Gets added_by_employee_id + * + * @return string|null + */ + public function getAddedByEmployeeId() { + return $this->container['added_by_employee_id']; + } + + /** + * Sets added_by_employee_id + * + * @param string|null $added_by_employee_id added_by_employee_id + * + * @return self + */ + public function setAddedByEmployeeId($added_by_employee_id) { + if (is_null($added_by_employee_id)) { + $this->openApiNullablesSetToNull['added_by_employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['added_by_employee_id'])) { + unset($nullablesSetToNull['added_by_employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['added_by_employee_id'] = $added_by_employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationPlanningCycleCompleteResponse.php b/lib/Model/CompensationPlanningCycleCompleteResponse.php new file mode 100644 index 00000000..c93f8958 --- /dev/null +++ b/lib/Model/CompensationPlanningCycleCompleteResponse.php @@ -0,0 +1,502 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningCycleCompleteResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationPlanningCycleCompleteResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationPlanningCycleCompleteResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationPlanningCycleCompleteResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'cycle_id' => 'int', + 'updated_employees_count' => 'int', + 'cycle_closed_email_error' => 'string', + 'errors' => '\BhrSdk\Model\CompensationPlanningCycleCompleteResponseErrorsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'cycle_id' => null, + 'updated_employees_count' => null, + 'cycle_closed_email_error' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'cycle_id' => true, + 'updated_employees_count' => true, + 'cycle_closed_email_error' => true, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cycle_id' => 'cycleId', + 'updated_employees_count' => 'updatedEmployeesCount', + 'cycle_closed_email_error' => 'cycleClosedEmailError', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cycle_id' => 'setCycleId', + 'updated_employees_count' => 'setUpdatedEmployeesCount', + 'cycle_closed_email_error' => 'setCycleClosedEmailError', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cycle_id' => 'getCycleId', + 'updated_employees_count' => 'getUpdatedEmployeesCount', + 'cycle_closed_email_error' => 'getCycleClosedEmailError', + 'errors' => 'getErrors' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('cycle_id', $data ?? [], null); + $this->setIfExists('updated_employees_count', $data ?? [], null); + $this->setIfExists('cycle_closed_email_error', $data ?? [], null); + $this->setIfExists('errors', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets cycle_id + * + * @return int|null + */ + public function getCycleId() { + return $this->container['cycle_id']; + } + + /** + * Sets cycle_id + * + * @param int|null $cycle_id cycle_id + * + * @return self + */ + public function setCycleId($cycle_id) { + if (is_null($cycle_id)) { + $this->openApiNullablesSetToNull['cycle_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['cycle_id'])) { + unset($nullablesSetToNull['cycle_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cycle_id'] = $cycle_id; + + return $this; + } + + /** + * Gets updated_employees_count + * + * @return int|null + */ + public function getUpdatedEmployeesCount() { + return $this->container['updated_employees_count']; + } + + /** + * Sets updated_employees_count + * + * @param int|null $updated_employees_count updated_employees_count + * + * @return self + */ + public function setUpdatedEmployeesCount($updated_employees_count) { + if (is_null($updated_employees_count)) { + $this->openApiNullablesSetToNull['updated_employees_count'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_employees_count'])) { + unset($nullablesSetToNull['updated_employees_count']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_employees_count'] = $updated_employees_count; + + return $this; + } + + /** + * Gets cycle_closed_email_error + * + * @return string|null + */ + public function getCycleClosedEmailError() { + return $this->container['cycle_closed_email_error']; + } + + /** + * Sets cycle_closed_email_error + * + * @param string|null $cycle_closed_email_error cycle_closed_email_error + * + * @return self + */ + public function setCycleClosedEmailError($cycle_closed_email_error) { + if (is_null($cycle_closed_email_error)) { + $this->openApiNullablesSetToNull['cycle_closed_email_error'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['cycle_closed_email_error'])) { + unset($nullablesSetToNull['cycle_closed_email_error']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cycle_closed_email_error'] = $cycle_closed_email_error; + + return $this; + } + + /** + * Gets errors + * + * @return \BhrSdk\Model\CompensationPlanningCycleCompleteResponseErrorsInner[]|null + */ + public function getErrors() { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \BhrSdk\Model\CompensationPlanningCycleCompleteResponseErrorsInner[]|null $errors errors + * + * @return self + */ + public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationPlanningCycleCompleteResponseErrorsInner.php b/lib/Model/CompensationPlanningCycleCompleteResponseErrorsInner.php new file mode 100644 index 00000000..5c6e8073 --- /dev/null +++ b/lib/Model/CompensationPlanningCycleCompleteResponseErrorsInner.php @@ -0,0 +1,432 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningCycleCompleteResponseErrorsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationPlanningCycleCompleteResponseErrorsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationPlanningCycleCompleteResponseErrorsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationPlanningCycleCompleteResponse_errors_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationToolsDataObject.php b/lib/Model/CompensationToolsDataObject.php new file mode 100644 index 00000000..f0b373b0 --- /dev/null +++ b/lib/Model/CompensationToolsDataObject.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * CompensationToolsDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationToolsDataObject Class Doc Comment + * + * @category Class + * @description Schema for the compensation tools list. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationToolsDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationToolsDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'levels_and_bands' => 'bool', + 'compensation_benchmarking' => 'bool', + 'compensation_planning' => 'bool', + 'total_rewards' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'levels_and_bands' => null, + 'compensation_benchmarking' => null, + 'compensation_planning' => null, + 'total_rewards' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'levels_and_bands' => false, + 'compensation_benchmarking' => false, + 'compensation_planning' => false, + 'total_rewards' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'levels_and_bands' => 'levelsAndBands', + 'compensation_benchmarking' => 'compensationBenchmarking', + 'compensation_planning' => 'compensationPlanning', + 'total_rewards' => 'totalRewards' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'levels_and_bands' => 'setLevelsAndBands', + 'compensation_benchmarking' => 'setCompensationBenchmarking', + 'compensation_planning' => 'setCompensationPlanning', + 'total_rewards' => 'setTotalRewards' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'levels_and_bands' => 'getLevelsAndBands', + 'compensation_benchmarking' => 'getCompensationBenchmarking', + 'compensation_planning' => 'getCompensationPlanning', + 'total_rewards' => 'getTotalRewards' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('levels_and_bands', $data ?? [], null); + $this->setIfExists('compensation_benchmarking', $data ?? [], null); + $this->setIfExists('compensation_planning', $data ?? [], null); + $this->setIfExists('total_rewards', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets levels_and_bands + * + * @return bool|null + */ + public function getLevelsAndBands() { + return $this->container['levels_and_bands']; + } + + /** + * Sets levels_and_bands + * + * @param bool|null $levels_and_bands Has access to Levels & Bands tool + * + * @return self + */ + public function setLevelsAndBands($levels_and_bands) { + if (is_null($levels_and_bands)) { + throw new \InvalidArgumentException('non-nullable levels_and_bands cannot be null'); + } + $this->container['levels_and_bands'] = $levels_and_bands; + + return $this; + } + + /** + * Gets compensation_benchmarking + * + * @return bool|null + */ + public function getCompensationBenchmarking() { + return $this->container['compensation_benchmarking']; + } + + /** + * Sets compensation_benchmarking + * + * @param bool|null $compensation_benchmarking Has access to Compensation Benchmarking tool + * + * @return self + */ + public function setCompensationBenchmarking($compensation_benchmarking) { + if (is_null($compensation_benchmarking)) { + throw new \InvalidArgumentException('non-nullable compensation_benchmarking cannot be null'); + } + $this->container['compensation_benchmarking'] = $compensation_benchmarking; + + return $this; + } + + /** + * Gets compensation_planning + * + * @return bool|null + */ + public function getCompensationPlanning() { + return $this->container['compensation_planning']; + } + + /** + * Sets compensation_planning + * + * @param bool|null $compensation_planning Has access to Compensation Planning tool + * + * @return self + */ + public function setCompensationPlanning($compensation_planning) { + if (is_null($compensation_planning)) { + throw new \InvalidArgumentException('non-nullable compensation_planning cannot be null'); + } + $this->container['compensation_planning'] = $compensation_planning; + + return $this; + } + + /** + * Gets total_rewards + * + * @return bool|null + */ + public function getTotalRewards() { + return $this->container['total_rewards']; + } + + /** + * Sets total_rewards + * + * @param bool|null $total_rewards Has access to Total Rewards tool + * + * @return self + */ + public function setTotalRewards($total_rewards) { + if (is_null($total_rewards)) { + throw new \InvalidArgumentException('non-nullable total_rewards cannot be null'); + } + $this->container['total_rewards'] = $total_rewards; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationToolsResponse.php b/lib/Model/CompensationToolsResponse.php new file mode 100644 index 00000000..2a31f58f --- /dev/null +++ b/lib/Model/CompensationToolsResponse.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * CompensationToolsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationToolsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationToolsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationToolsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'success' => 'bool', + 'tools' => '\BhrSdk\Model\CompensationToolsDataObject', + 'upsell' => '\BhrSdk\Model\CompensationUpsellData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'success' => null, + 'tools' => null, + 'upsell' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'success' => true, + 'tools' => false, + 'upsell' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'success' => 'success', + 'tools' => 'tools', + 'upsell' => 'upsell' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'tools' => 'setTools', + 'upsell' => 'setUpsell' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'tools' => 'getTools', + 'upsell' => 'getUpsell' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('tools', $data ?? [], null); + $this->setIfExists('upsell', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets success + * + * @return bool|null + */ + public function getSuccess() { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool|null $success success + * + * @return self + */ + public function setSuccess($success) { + if (is_null($success)) { + $this->openApiNullablesSetToNull['success'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['success'])) { + unset($nullablesSetToNull['success']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets tools + * + * @return \BhrSdk\Model\CompensationToolsDataObject|null + */ + public function getTools() { + return $this->container['tools']; + } + + /** + * Sets tools + * + * @param \BhrSdk\Model\CompensationToolsDataObject|null $tools tools + * + * @return self + */ + public function setTools($tools) { + if (is_null($tools)) { + throw new \InvalidArgumentException('non-nullable tools cannot be null'); + } + $this->container['tools'] = $tools; + + return $this; + } + + /** + * Gets upsell + * + * @return \BhrSdk\Model\CompensationUpsellData|null + */ + public function getUpsell() { + return $this->container['upsell']; + } + + /** + * Sets upsell + * + * @param \BhrSdk\Model\CompensationUpsellData|null $upsell upsell + * + * @return self + */ + public function setUpsell($upsell) { + if (is_null($upsell)) { + throw new \InvalidArgumentException('non-nullable upsell cannot be null'); + } + $this->container['upsell'] = $upsell; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompensationUpsellData.php b/lib/Model/CompensationUpsellData.php new file mode 100644 index 00000000..f74ba8f9 --- /dev/null +++ b/lib/Model/CompensationUpsellData.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * CompensationUpsellData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompensationUpsellData Class Doc Comment + * + * @category Class + * @description Schema for the compensation upsell data. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompensationUpsellData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompensationUpsellData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'account_owner_name' => 'string', + 'can_request_demo' => 'bool', + 'user_permissions' => '\BhrSdk\Model\UserPermissionData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'account_owner_name' => null, + 'can_request_demo' => null, + 'user_permissions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'account_owner_name' => false, + 'can_request_demo' => false, + 'user_permissions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'account_owner_name' => 'accountOwnerName', + 'can_request_demo' => 'canRequestDemo', + 'user_permissions' => 'userPermissions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account_owner_name' => 'setAccountOwnerName', + 'can_request_demo' => 'setCanRequestDemo', + 'user_permissions' => 'setUserPermissions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account_owner_name' => 'getAccountOwnerName', + 'can_request_demo' => 'getCanRequestDemo', + 'user_permissions' => 'getUserPermissions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('account_owner_name', $data ?? [], null); + $this->setIfExists('can_request_demo', $data ?? [], null); + $this->setIfExists('user_permissions', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets account_owner_name + * + * @return string|null + */ + public function getAccountOwnerName() { + return $this->container['account_owner_name']; + } + + /** + * Sets account_owner_name + * + * @param string|null $account_owner_name Account owner name + * + * @return self + */ + public function setAccountOwnerName($account_owner_name) { + if (is_null($account_owner_name)) { + throw new \InvalidArgumentException('non-nullable account_owner_name cannot be null'); + } + $this->container['account_owner_name'] = $account_owner_name; + + return $this; + } + + /** + * Gets can_request_demo + * + * @return bool|null + */ + public function getCanRequestDemo() { + return $this->container['can_request_demo']; + } + + /** + * Sets can_request_demo + * + * @param bool|null $can_request_demo Whether user can request a demo + * + * @return self + */ + public function setCanRequestDemo($can_request_demo) { + if (is_null($can_request_demo)) { + throw new \InvalidArgumentException('non-nullable can_request_demo cannot be null'); + } + $this->container['can_request_demo'] = $can_request_demo; + + return $this; + } + + /** + * Gets user_permissions + * + * @return \BhrSdk\Model\UserPermissionData|null + */ + public function getUserPermissions() { + return $this->container['user_permissions']; + } + + /** + * Sets user_permissions + * + * @param \BhrSdk\Model\UserPermissionData|null $user_permissions User permissions + * + * @return self + */ + public function setUserPermissions($user_permissions) { + if (is_null($user_permissions)) { + throw new \InvalidArgumentException('non-nullable user_permissions cannot be null'); + } + $this->container['user_permissions'] = $user_permissions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CompletedQuestionsAndResponseDataObject.php b/lib/Model/CompletedQuestionsAndResponseDataObject.php new file mode 100644 index 00000000..e56a5925 --- /dev/null +++ b/lib/Model/CompletedQuestionsAndResponseDataObject.php @@ -0,0 +1,613 @@ +<?php +declare(strict_types=1); +/** + * CompletedQuestionsAndResponseDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CompletedQuestionsAndResponseDataObject Class Doc Comment + * + * @category Class + * @description Data object for completed questions and responses + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CompletedQuestionsAndResponseDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CompletedQuestionsAndResponseDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'question' => 'string', + 'is_required' => 'bool', + 'archived' => 'bool', + 'sort_order' => 'int', + 'employee_id' => 'int', + 'employee_personal_question_id' => 'int', + 'employee_response' => 'string', + 'hidden' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'question' => null, + 'is_required' => null, + 'archived' => null, + 'sort_order' => null, + 'employee_id' => null, + 'employee_personal_question_id' => null, + 'employee_response' => null, + 'hidden' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'question' => false, + 'is_required' => false, + 'archived' => false, + 'sort_order' => false, + 'employee_id' => false, + 'employee_personal_question_id' => false, + 'employee_response' => false, + 'hidden' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'question' => 'question', + 'is_required' => 'isRequired', + 'archived' => 'archived', + 'sort_order' => 'sortOrder', + 'employee_id' => 'employeeId', + 'employee_personal_question_id' => 'employeePersonalQuestionId', + 'employee_response' => 'employeeResponse', + 'hidden' => 'hidden' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'question' => 'setQuestion', + 'is_required' => 'setIsRequired', + 'archived' => 'setArchived', + 'sort_order' => 'setSortOrder', + 'employee_id' => 'setEmployeeId', + 'employee_personal_question_id' => 'setEmployeePersonalQuestionId', + 'employee_response' => 'setEmployeeResponse', + 'hidden' => 'setHidden' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'question' => 'getQuestion', + 'is_required' => 'getIsRequired', + 'archived' => 'getArchived', + 'sort_order' => 'getSortOrder', + 'employee_id' => 'getEmployeeId', + 'employee_personal_question_id' => 'getEmployeePersonalQuestionId', + 'employee_response' => 'getEmployeeResponse', + 'hidden' => 'getHidden' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('question', $data ?? [], null); + $this->setIfExists('is_required', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('sort_order', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('employee_personal_question_id', $data ?? [], null); + $this->setIfExists('employee_response', $data ?? [], null); + $this->setIfExists('hidden', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets question + * + * @return string|null + */ + public function getQuestion() { + return $this->container['question']; + } + + /** + * Sets question + * + * @param string|null $question The question that was completed + * + * @return self + */ + public function setQuestion($question) { + if (is_null($question)) { + throw new \InvalidArgumentException('non-nullable question cannot be null'); + } + $this->container['question'] = $question; + + return $this; + } + + /** + * Gets is_required + * + * @return bool|null + */ + public function getIsRequired() { + return $this->container['is_required']; + } + + /** + * Sets is_required + * + * @param bool|null $is_required Indicates if the question is required + * + * @return self + */ + public function setIsRequired($is_required) { + if (is_null($is_required)) { + throw new \InvalidArgumentException('non-nullable is_required cannot be null'); + } + $this->container['is_required'] = $is_required; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Indicates if the question is archived + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets sort_order + * + * @return int|null + */ + public function getSortOrder() { + return $this->container['sort_order']; + } + + /** + * Sets sort_order + * + * @param int|null $sort_order The sort order of the question + * + * @return self + */ + public function setSortOrder($sort_order) { + if (is_null($sort_order)) { + throw new \InvalidArgumentException('non-nullable sort_order cannot be null'); + } + $this->container['sort_order'] = $sort_order; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The employee ID associated with the question + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets employee_personal_question_id + * + * @return int|null + */ + public function getEmployeePersonalQuestionId() { + return $this->container['employee_personal_question_id']; + } + + /** + * Sets employee_personal_question_id + * + * @param int|null $employee_personal_question_id The employee personal question ID associated with the question + * + * @return self + */ + public function setEmployeePersonalQuestionId($employee_personal_question_id) { + if (is_null($employee_personal_question_id)) { + throw new \InvalidArgumentException('non-nullable employee_personal_question_id cannot be null'); + } + $this->container['employee_personal_question_id'] = $employee_personal_question_id; + + return $this; + } + + /** + * Gets employee_response + * + * @return string|null + */ + public function getEmployeeResponse() { + return $this->container['employee_response']; + } + + /** + * Sets employee_response + * + * @param string|null $employee_response The response to the question + * + * @return self + */ + public function setEmployeeResponse($employee_response) { + if (is_null($employee_response)) { + throw new \InvalidArgumentException('non-nullable employee_response cannot be null'); + } + $this->container['employee_response'] = $employee_response; + + return $this; + } + + /** + * Gets hidden + * + * @return bool|null + */ + public function getHidden() { + return $this->container['hidden']; + } + + /** + * Sets hidden + * + * @param bool|null $hidden Indicates if the question is hidden + * + * @return self + */ + public function setHidden($hidden) { + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + } + $this->container['hidden'] = $hidden; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ConversionRateDataObject.php b/lib/Model/ConversionRateDataObject.php new file mode 100644 index 00000000..4cc5671f --- /dev/null +++ b/lib/Model/ConversionRateDataObject.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * ConversionRateDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ConversionRateDataObject Class Doc Comment + * + * @category Class + * @description Represents a currency conversion rate from a source to a target currency. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ConversionRateDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ConversionRateDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'currency_name' => 'string', + 'currency_code' => 'string', + 'conversion_rate' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'currency_name' => null, + 'currency_code' => null, + 'conversion_rate' => 'float' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'currency_name' => false, + 'currency_code' => false, + 'conversion_rate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'currency_name' => 'currencyName', + 'currency_code' => 'currencyCode', + 'conversion_rate' => 'conversionRate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency_name' => 'setCurrencyName', + 'currency_code' => 'setCurrencyCode', + 'conversion_rate' => 'setConversionRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency_name' => 'getCurrencyName', + 'currency_code' => 'getCurrencyCode', + 'conversion_rate' => 'getConversionRate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('currency_name', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('conversion_rate', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets currency_name + * + * @return string|null + */ + public function getCurrencyName() { + return $this->container['currency_name']; + } + + /** + * Sets currency_name + * + * @param string|null $currency_name The full name of the target currency. + * + * @return self + */ + public function setCurrencyName($currency_name) { + if (is_null($currency_name)) { + throw new \InvalidArgumentException('non-nullable currency_name cannot be null'); + } + $this->container['currency_name'] = $currency_name; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code The code of the target currency (e.g. USD, EUR, JPY). + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + throw new \InvalidArgumentException('non-nullable currency_code cannot be null'); + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets conversion_rate + * + * @return float|null + */ + public function getConversionRate() { + return $this->container['conversion_rate']; + } + + /** + * Sets conversion_rate + * + * @param float|null $conversion_rate The numeric conversion rate to the target currency. + * + * @return self + */ + public function setConversionRate($conversion_rate) { + if (is_null($conversion_rate)) { + throw new \InvalidArgumentException('non-nullable conversion_rate cannot be null'); + } + $this->container['conversion_rate'] = $conversion_rate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CountriesOptionsResponse.php b/lib/Model/CountriesOptionsResponse.php new file mode 100644 index 00000000..db7b13e7 --- /dev/null +++ b/lib/Model/CountriesOptionsResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * CountriesOptionsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CountriesOptionsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CountriesOptionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CountriesOptionsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'iso_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'iso_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'iso_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'iso_code' => 'isoCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'iso_code' => 'setIsoCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'iso_code' => 'getIsoCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('iso_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits). + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Full display name of the country + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets iso_code + * + * @return string|null + */ + public function getIsoCode() { + return $this->container['iso_code']; + } + + /** + * Sets iso_code + * + * @param string|null $iso_code iso_code + * + * @return self + */ + public function setIsoCode($iso_code) { + if (is_null($iso_code)) { + throw new \InvalidArgumentException('non-nullable iso_code cannot be null'); + } + $this->container['iso_code'] = $iso_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CountrySchema.php b/lib/Model/CountrySchema.php index 6535a869..5e7f0fcc 100644 --- a/lib/Model/CountrySchema.php +++ b/lib/Model/CountrySchema.php @@ -36,7 +36,7 @@ * CountrySchema Class Doc Comment * * @category Class - * @description Schema for country data + * @description A country in the list returned by the Get Countries endpoint * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -85,7 +85,7 @@ class CountrySchema implements ModelInterface, ArrayAccess, \JsonSerializable { protected static array $openApiNullables = [ 'id' => false, 'name' => false, - 'iso_code' => false + 'iso_code' => true ]; /** @@ -303,7 +303,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Unique identifier for the country + * @param int|null $id Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits). * * @return self */ @@ -328,7 +328,7 @@ public function getName() { /** * Sets name * - * @param string|null $name Full name of the country + * @param string|null $name Full display name of the country * * @return self */ @@ -353,13 +353,19 @@ public function getIsoCode() { /** * Sets iso_code * - * @param string|null $iso_code ISO code for the country + * @param string|null $iso_code iso_code * * @return self */ public function setIsoCode($iso_code) { if (is_null($iso_code)) { - throw new \InvalidArgumentException('non-nullable iso_code cannot be null'); + $this->openApiNullablesSetToNull['iso_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['iso_code'])) { + unset($nullablesSetToNull['iso_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['iso_code'] = $iso_code; diff --git a/lib/Model/PostApplicationCommentRequest.php b/lib/Model/CreateApplicationCommentRequest.php similarity index 95% rename from lib/Model/PostApplicationCommentRequest.php rename to lib/Model/CreateApplicationCommentRequest.php index dd8cecf1..447a9e4b 100644 --- a/lib/Model/PostApplicationCommentRequest.php +++ b/lib/Model/CreateApplicationCommentRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PostApplicationCommentRequest + * CreateApplicationCommentRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PostApplicationCommentRequest Class Doc Comment + * CreateApplicationCommentRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PostApplicationCommentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateApplicationCommentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PostApplicationCommentRequest implements ModelInterface, ArrayAccess, \Jso * * @var string */ - protected static $openApiModelName = 'post_application_comment_request'; + protected static $openApiModelName = 'create_application_comment_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -270,9 +270,6 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } if ($this->container['comment'] === null) { $invalidProperties[] = "'comment' can't be null"; } @@ -292,7 +289,7 @@ public function valid() { /** * Gets type * - * @return string + * @return string|null */ public function getType() { return $this->container['type']; @@ -301,7 +298,7 @@ public function getType() { /** * Sets type * - * @param string $type Always the value \"comment\". + * @param string|null $type The comment type. Defaults to `comment` if omitted. * * @return self */ diff --git a/lib/Model/CreateCandidateResponse.php b/lib/Model/CreateCandidateResponse.php new file mode 100644 index 00000000..0f22996f --- /dev/null +++ b/lib/Model/CreateCandidateResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * CreateCandidateResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateCandidateResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateCandidateResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreateCandidateResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'result' => 'string', + 'candidate_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'result' => null, + 'candidate_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'result' => false, + 'candidate_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'result' => 'result', + 'candidate_id' => 'candidateId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult', + 'candidate_id' => 'setCandidateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult', + 'candidate_id' => 'getCandidateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('candidate_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets result + * + * @return string|null + */ + public function getResult() { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result Always 'success' on a successful request + * + * @return self + */ + public function setResult($result) { + if (is_null($result)) { + throw new \InvalidArgumentException('non-nullable result cannot be null'); + } + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets candidate_id + * + * @return int|null + */ + public function getCandidateId() { + return $this->container['candidate_id']; + } + + /** + * Sets candidate_id + * + * @param int|null $candidate_id The ID of the newly created candidate + * + * @return self + */ + public function setCandidateId($candidate_id) { + if (is_null($candidate_id)) { + throw new \InvalidArgumentException('non-nullable candidate_id cannot be null'); + } + $this->container['candidate_id'] = $candidate_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreateCommentResponse.php b/lib/Model/CreateCommentResponse.php new file mode 100644 index 00000000..9e132c9f --- /dev/null +++ b/lib/Model/CreateCommentResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * CreateCommentResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateCommentResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreateCommentResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of comment created, e.g. 'comment' + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The ID of the newly created comment + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreateCompensationBenchmarkRequest.php b/lib/Model/CreateCompensationBenchmarkRequest.php new file mode 100644 index 00000000..d1db8f0f --- /dev/null +++ b/lib/Model/CreateCompensationBenchmarkRequest.php @@ -0,0 +1,1103 @@ +<?php +declare(strict_types=1); +/** + * CreateCompensationBenchmarkRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateCompensationBenchmarkRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateCompensationBenchmarkRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreateCompensationBenchmarkRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_title_id' => 'string', + 'job_location_id' => 'string', + 'currency_code' => 'string', + 'mjl_job_code' => 'string', + 'benchmark_value' => 'float', + 'benchmark_min' => 'float', + 'benchmark_max' => 'float', + 'benchmark_source' => 'string', + 'external_job_title' => 'string', + 'external_location' => 'string', + 'external_level' => 'string', + 'external_job_description' => 'string', + 'companies_surveyed' => 'int', + 'employees_surveyed' => 'int', + 'source_id' => 'string', + 'source_date' => 'string', + 'data_year' => 'string', + 'external_country' => 'string', + 'external_secondary_location' => 'string', + 'external_company_size' => 'string', + 'external_industry' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_title_id' => null, + 'job_location_id' => null, + 'currency_code' => null, + 'mjl_job_code' => null, + 'benchmark_value' => null, + 'benchmark_min' => null, + 'benchmark_max' => null, + 'benchmark_source' => null, + 'external_job_title' => null, + 'external_location' => null, + 'external_level' => null, + 'external_job_description' => null, + 'companies_surveyed' => null, + 'employees_surveyed' => null, + 'source_id' => null, + 'source_date' => null, + 'data_year' => null, + 'external_country' => null, + 'external_secondary_location' => null, + 'external_company_size' => null, + 'external_industry' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_title_id' => false, + 'job_location_id' => false, + 'currency_code' => false, + 'mjl_job_code' => false, + 'benchmark_value' => false, + 'benchmark_min' => false, + 'benchmark_max' => false, + 'benchmark_source' => false, + 'external_job_title' => true, + 'external_location' => true, + 'external_level' => true, + 'external_job_description' => true, + 'companies_surveyed' => true, + 'employees_surveyed' => true, + 'source_id' => false, + 'source_date' => false, + 'data_year' => false, + 'external_country' => true, + 'external_secondary_location' => true, + 'external_company_size' => true, + 'external_industry' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_title_id' => 'jobTitleId', + 'job_location_id' => 'jobLocationId', + 'currency_code' => 'currencyCode', + 'mjl_job_code' => 'mjlJobCode', + 'benchmark_value' => 'benchmarkValue', + 'benchmark_min' => 'benchmarkMin', + 'benchmark_max' => 'benchmarkMax', + 'benchmark_source' => 'benchmarkSource', + 'external_job_title' => 'externalJobTitle', + 'external_location' => 'externalLocation', + 'external_level' => 'externalLevel', + 'external_job_description' => 'externalJobDescription', + 'companies_surveyed' => 'companiesSurveyed', + 'employees_surveyed' => 'employeesSurveyed', + 'source_id' => 'sourceId', + 'source_date' => 'sourceDate', + 'data_year' => 'dataYear', + 'external_country' => 'externalCountry', + 'external_secondary_location' => 'externalSecondaryLocation', + 'external_company_size' => 'externalCompanySize', + 'external_industry' => 'externalIndustry' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_title_id' => 'setJobTitleId', + 'job_location_id' => 'setJobLocationId', + 'currency_code' => 'setCurrencyCode', + 'mjl_job_code' => 'setMjlJobCode', + 'benchmark_value' => 'setBenchmarkValue', + 'benchmark_min' => 'setBenchmarkMin', + 'benchmark_max' => 'setBenchmarkMax', + 'benchmark_source' => 'setBenchmarkSource', + 'external_job_title' => 'setExternalJobTitle', + 'external_location' => 'setExternalLocation', + 'external_level' => 'setExternalLevel', + 'external_job_description' => 'setExternalJobDescription', + 'companies_surveyed' => 'setCompaniesSurveyed', + 'employees_surveyed' => 'setEmployeesSurveyed', + 'source_id' => 'setSourceId', + 'source_date' => 'setSourceDate', + 'data_year' => 'setDataYear', + 'external_country' => 'setExternalCountry', + 'external_secondary_location' => 'setExternalSecondaryLocation', + 'external_company_size' => 'setExternalCompanySize', + 'external_industry' => 'setExternalIndustry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_title_id' => 'getJobTitleId', + 'job_location_id' => 'getJobLocationId', + 'currency_code' => 'getCurrencyCode', + 'mjl_job_code' => 'getMjlJobCode', + 'benchmark_value' => 'getBenchmarkValue', + 'benchmark_min' => 'getBenchmarkMin', + 'benchmark_max' => 'getBenchmarkMax', + 'benchmark_source' => 'getBenchmarkSource', + 'external_job_title' => 'getExternalJobTitle', + 'external_location' => 'getExternalLocation', + 'external_level' => 'getExternalLevel', + 'external_job_description' => 'getExternalJobDescription', + 'companies_surveyed' => 'getCompaniesSurveyed', + 'employees_surveyed' => 'getEmployeesSurveyed', + 'source_id' => 'getSourceId', + 'source_date' => 'getSourceDate', + 'data_year' => 'getDataYear', + 'external_country' => 'getExternalCountry', + 'external_secondary_location' => 'getExternalSecondaryLocation', + 'external_company_size' => 'getExternalCompanySize', + 'external_industry' => 'getExternalIndustry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('job_location_id', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('mjl_job_code', $data ?? [], null); + $this->setIfExists('benchmark_value', $data ?? [], null); + $this->setIfExists('benchmark_min', $data ?? [], null); + $this->setIfExists('benchmark_max', $data ?? [], null); + $this->setIfExists('benchmark_source', $data ?? [], null); + $this->setIfExists('external_job_title', $data ?? [], null); + $this->setIfExists('external_location', $data ?? [], null); + $this->setIfExists('external_level', $data ?? [], null); + $this->setIfExists('external_job_description', $data ?? [], null); + $this->setIfExists('companies_surveyed', $data ?? [], null); + $this->setIfExists('employees_surveyed', $data ?? [], null); + $this->setIfExists('source_id', $data ?? [], null); + $this->setIfExists('source_date', $data ?? [], null); + $this->setIfExists('data_year', $data ?? [], null); + $this->setIfExists('external_country', $data ?? [], null); + $this->setIfExists('external_secondary_location', $data ?? [], null); + $this->setIfExists('external_company_size', $data ?? [], null); + $this->setIfExists('external_industry', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['job_title_id'] === null) { + $invalidProperties[] = "'job_title_id' can't be null"; + } + if ($this->container['currency_code'] === null) { + $invalidProperties[] = "'currency_code' can't be null"; + } + if ($this->container['benchmark_value'] === null) { + $invalidProperties[] = "'benchmark_value' can't be null"; + } + if ($this->container['benchmark_min'] === null) { + $invalidProperties[] = "'benchmark_min' can't be null"; + } + if ($this->container['benchmark_max'] === null) { + $invalidProperties[] = "'benchmark_max' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_title_id + * + * @return string + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param string $job_title_id ID of the company job title the benchmark applies to. + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + throw new \InvalidArgumentException('non-nullable job_title_id cannot be null'); + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets job_location_id + * + * @return string|null + */ + public function getJobLocationId() { + return $this->container['job_location_id']; + } + + /** + * Sets job_location_id + * + * @param string|null $job_location_id Optional job location ID to scope the benchmark to a specific location. + * + * @return self + */ + public function setJobLocationId($job_location_id) { + if (is_null($job_location_id)) { + throw new \InvalidArgumentException('non-nullable job_location_id cannot be null'); + } + $this->container['job_location_id'] = $job_location_id; + + return $this; + } + + /** + * Gets currency_code + * + * @return string + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string $currency_code ISO 4217 currency code for the benchmark values. + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + throw new \InvalidArgumentException('non-nullable currency_code cannot be null'); + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets mjl_job_code + * + * @return string|null + */ + public function getMjlJobCode() { + return $this->container['mjl_job_code']; + } + + /** + * Sets mjl_job_code + * + * @param string|null $mjl_job_code Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`. + * + * @return self + */ + public function setMjlJobCode($mjl_job_code) { + if (is_null($mjl_job_code)) { + throw new \InvalidArgumentException('non-nullable mjl_job_code cannot be null'); + } + $this->container['mjl_job_code'] = $mjl_job_code; + + return $this; + } + + /** + * Gets benchmark_value + * + * @return float + */ + public function getBenchmarkValue() { + return $this->container['benchmark_value']; + } + + /** + * Sets benchmark_value + * + * @param float $benchmark_value Benchmark median value. + * + * @return self + */ + public function setBenchmarkValue($benchmark_value) { + if (is_null($benchmark_value)) { + throw new \InvalidArgumentException('non-nullable benchmark_value cannot be null'); + } + $this->container['benchmark_value'] = $benchmark_value; + + return $this; + } + + /** + * Gets benchmark_min + * + * @return float + */ + public function getBenchmarkMin() { + return $this->container['benchmark_min']; + } + + /** + * Sets benchmark_min + * + * @param float $benchmark_min Benchmark minimum value. + * + * @return self + */ + public function setBenchmarkMin($benchmark_min) { + if (is_null($benchmark_min)) { + throw new \InvalidArgumentException('non-nullable benchmark_min cannot be null'); + } + $this->container['benchmark_min'] = $benchmark_min; + + return $this; + } + + /** + * Gets benchmark_max + * + * @return float + */ + public function getBenchmarkMax() { + return $this->container['benchmark_max']; + } + + /** + * Sets benchmark_max + * + * @param float $benchmark_max Benchmark maximum value. + * + * @return self + */ + public function setBenchmarkMax($benchmark_max) { + if (is_null($benchmark_max)) { + throw new \InvalidArgumentException('non-nullable benchmark_max cannot be null'); + } + $this->container['benchmark_max'] = $benchmark_max; + + return $this; + } + + /** + * Gets benchmark_source + * + * @return string|null + */ + public function getBenchmarkSource() { + return $this->container['benchmark_source']; + } + + /** + * Sets benchmark_source + * + * @param string|null $benchmark_source Free-text label describing where the benchmark came from. + * + * @return self + */ + public function setBenchmarkSource($benchmark_source) { + if (is_null($benchmark_source)) { + throw new \InvalidArgumentException('non-nullable benchmark_source cannot be null'); + } + $this->container['benchmark_source'] = $benchmark_source; + + return $this; + } + + /** + * Gets external_job_title + * + * @return string|null + */ + public function getExternalJobTitle() { + return $this->container['external_job_title']; + } + + /** + * Sets external_job_title + * + * @param string|null $external_job_title external_job_title + * + * @return self + */ + public function setExternalJobTitle($external_job_title) { + if (is_null($external_job_title)) { + $this->openApiNullablesSetToNull['external_job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_title'])) { + unset($nullablesSetToNull['external_job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_title'] = $external_job_title; + + return $this; + } + + /** + * Gets external_location + * + * @return string|null + */ + public function getExternalLocation() { + return $this->container['external_location']; + } + + /** + * Sets external_location + * + * @param string|null $external_location external_location + * + * @return self + */ + public function setExternalLocation($external_location) { + if (is_null($external_location)) { + $this->openApiNullablesSetToNull['external_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_location'])) { + unset($nullablesSetToNull['external_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_location'] = $external_location; + + return $this; + } + + /** + * Gets external_level + * + * @return string|null + */ + public function getExternalLevel() { + return $this->container['external_level']; + } + + /** + * Sets external_level + * + * @param string|null $external_level external_level + * + * @return self + */ + public function setExternalLevel($external_level) { + if (is_null($external_level)) { + $this->openApiNullablesSetToNull['external_level'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_level'])) { + unset($nullablesSetToNull['external_level']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_level'] = $external_level; + + return $this; + } + + /** + * Gets external_job_description + * + * @return string|null + */ + public function getExternalJobDescription() { + return $this->container['external_job_description']; + } + + /** + * Sets external_job_description + * + * @param string|null $external_job_description external_job_description + * + * @return self + */ + public function setExternalJobDescription($external_job_description) { + if (is_null($external_job_description)) { + $this->openApiNullablesSetToNull['external_job_description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_description'])) { + unset($nullablesSetToNull['external_job_description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_description'] = $external_job_description; + + return $this; + } + + /** + * Gets companies_surveyed + * + * @return int|null + */ + public function getCompaniesSurveyed() { + return $this->container['companies_surveyed']; + } + + /** + * Sets companies_surveyed + * + * @param int|null $companies_surveyed companies_surveyed + * + * @return self + */ + public function setCompaniesSurveyed($companies_surveyed) { + if (is_null($companies_surveyed)) { + $this->openApiNullablesSetToNull['companies_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['companies_surveyed'])) { + unset($nullablesSetToNull['companies_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['companies_surveyed'] = $companies_surveyed; + + return $this; + } + + /** + * Gets employees_surveyed + * + * @return int|null + */ + public function getEmployeesSurveyed() { + return $this->container['employees_surveyed']; + } + + /** + * Sets employees_surveyed + * + * @param int|null $employees_surveyed employees_surveyed + * + * @return self + */ + public function setEmployeesSurveyed($employees_surveyed) { + if (is_null($employees_surveyed)) { + $this->openApiNullablesSetToNull['employees_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employees_surveyed'])) { + unset($nullablesSetToNull['employees_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employees_surveyed'] = $employees_surveyed; + + return $this; + } + + /** + * Gets source_id + * + * @return string|null + */ + public function getSourceId() { + return $this->container['source_id']; + } + + /** + * Sets source_id + * + * @param string|null $source_id ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`. + * + * @return self + */ + public function setSourceId($source_id) { + if (is_null($source_id)) { + throw new \InvalidArgumentException('non-nullable source_id cannot be null'); + } + $this->container['source_id'] = $source_id; + + return $this; + } + + /** + * Gets source_date + * + * @return string|null + */ + public function getSourceDate() { + return $this->container['source_date']; + } + + /** + * Sets source_date + * + * @param string|null $source_date Date the benchmark source data applies to. + * + * @return self + */ + public function setSourceDate($source_date) { + if (is_null($source_date)) { + throw new \InvalidArgumentException('non-nullable source_date cannot be null'); + } + $this->container['source_date'] = $source_date; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year Year of the underlying survey data. + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + throw new \InvalidArgumentException('non-nullable data_year cannot be null'); + } + $this->container['data_year'] = $data_year; + + return $this; + } + + /** + * Gets external_country + * + * @return string|null + */ + public function getExternalCountry() { + return $this->container['external_country']; + } + + /** + * Sets external_country + * + * @param string|null $external_country external_country + * + * @return self + */ + public function setExternalCountry($external_country) { + if (is_null($external_country)) { + $this->openApiNullablesSetToNull['external_country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_country'])) { + unset($nullablesSetToNull['external_country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_country'] = $external_country; + + return $this; + } + + /** + * Gets external_secondary_location + * + * @return string|null + */ + public function getExternalSecondaryLocation() { + return $this->container['external_secondary_location']; + } + + /** + * Sets external_secondary_location + * + * @param string|null $external_secondary_location external_secondary_location + * + * @return self + */ + public function setExternalSecondaryLocation($external_secondary_location) { + if (is_null($external_secondary_location)) { + $this->openApiNullablesSetToNull['external_secondary_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_secondary_location'])) { + unset($nullablesSetToNull['external_secondary_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_secondary_location'] = $external_secondary_location; + + return $this; + } + + /** + * Gets external_company_size + * + * @return string|null + */ + public function getExternalCompanySize() { + return $this->container['external_company_size']; + } + + /** + * Sets external_company_size + * + * @param string|null $external_company_size external_company_size + * + * @return self + */ + public function setExternalCompanySize($external_company_size) { + if (is_null($external_company_size)) { + $this->openApiNullablesSetToNull['external_company_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_company_size'])) { + unset($nullablesSetToNull['external_company_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_company_size'] = $external_company_size; + + return $this; + } + + /** + * Gets external_industry + * + * @return string|null + */ + public function getExternalIndustry() { + return $this->container['external_industry']; + } + + /** + * Sets external_industry + * + * @param string|null $external_industry external_industry + * + * @return self + */ + public function setExternalIndustry($external_industry) { + if (is_null($external_industry)) { + $this->openApiNullablesSetToNull['external_industry'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_industry'])) { + unset($nullablesSetToNull['external_industry']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_industry'] = $external_industry; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreateCompensationBenchmarkSourceRequest.php b/lib/Model/CreateCompensationBenchmarkSourceRequest.php new file mode 100644 index 00000000..c24a3bf4 --- /dev/null +++ b/lib/Model/CreateCompensationBenchmarkSourceRequest.php @@ -0,0 +1,423 @@ +<?php +declare(strict_types=1); +/** + * CreateCompensationBenchmarkSourceRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateCompensationBenchmarkSourceRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateCompensationBenchmarkSourceRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreateCompensationBenchmarkSourceRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'color_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'color_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'color_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'color_code' => 'colorCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'color_code' => 'setColorCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'color_code' => 'getColorCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('color_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Display name for the new benchmark source. Cannot be empty or equal to `mercer`. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets color_code + * + * @return string|null + */ + public function getColorCode() { + return $this->container['color_code']; + } + + /** + * Sets color_code + * + * @param string|null $color_code Optional hex color used to display the source in the UI. + * + * @return self + */ + public function setColorCode($color_code) { + if (is_null($color_code)) { + throw new \InvalidArgumentException('non-nullable color_code cannot be null'); + } + $this->container['color_code'] = $color_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddNewEmployeeTrainingRecordRequest.php b/lib/Model/CreateEmployeeTrainingRecordRequest.php similarity index 94% rename from lib/Model/AddNewEmployeeTrainingRecordRequest.php rename to lib/Model/CreateEmployeeTrainingRecordRequest.php index 83676848..4c75c16a 100644 --- a/lib/Model/AddNewEmployeeTrainingRecordRequest.php +++ b/lib/Model/CreateEmployeeTrainingRecordRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * AddNewEmployeeTrainingRecordRequest + * CreateEmployeeTrainingRecordRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * AddNewEmployeeTrainingRecordRequest Class Doc Comment + * CreateEmployeeTrainingRecordRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class AddNewEmployeeTrainingRecordRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateEmployeeTrainingRecordRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class AddNewEmployeeTrainingRecordRequest implements ModelInterface, ArrayAccess * * @var string */ - protected static $openApiModelName = 'add_new_employee_training_record_request'; + protected static $openApiModelName = 'create_employee_training_record_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class AddNewEmployeeTrainingRecordRequest implements ModelInterface, ArrayAccess */ protected static $openApiTypes = [ 'completed' => 'string', - 'cost' => '\BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost', + 'cost' => '\BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost', 'instructor' => 'string', 'hours' => 'float', 'credits' => 'float', @@ -352,7 +352,7 @@ public function setCompleted($completed) { /** * Gets cost * - * @return \BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost|null + * @return \BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost|null */ public function getCost() { return $this->container['cost']; @@ -361,7 +361,7 @@ public function getCost() { /** * Sets cost * - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost|null $cost cost + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost|null $cost cost * * @return self */ @@ -386,7 +386,7 @@ public function getInstructor() { /** * Sets instructor * - * @param string|null $instructor instructor + * @param string|null $instructor Name of the training instructor. * * @return self */ @@ -411,7 +411,7 @@ public function getHours() { /** * Sets hours * - * @param float|null $hours hours + * @param float|null $hours Number of hours for the training. * * @return self */ @@ -436,7 +436,7 @@ public function getCredits() { /** * Sets credits * - * @param float|null $credits credits + * @param float|null $credits Credits earned for the training. * * @return self */ @@ -461,7 +461,7 @@ public function getNotes() { /** * Sets notes * - * @param string|null $notes notes + * @param string|null $notes Optional notes about the training record. * * @return self */ @@ -486,7 +486,7 @@ public function getType() { /** * Sets type * - * @param int $type This must be an existing training type id. + * @param int $type This must be an existing training type ID. * * @return self */ diff --git a/lib/Model/AddNewEmployeeTrainingRecordRequestCost.php b/lib/Model/CreateEmployeeTrainingRecordRequestCost.php similarity index 89% rename from lib/Model/AddNewEmployeeTrainingRecordRequestCost.php rename to lib/Model/CreateEmployeeTrainingRecordRequestCost.php index 74041079..4a92a030 100644 --- a/lib/Model/AddNewEmployeeTrainingRecordRequestCost.php +++ b/lib/Model/CreateEmployeeTrainingRecordRequestCost.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * AddNewEmployeeTrainingRecordRequestCost + * CreateEmployeeTrainingRecordRequestCost * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * AddNewEmployeeTrainingRecordRequestCost Class Doc Comment + * CreateEmployeeTrainingRecordRequestCost Class Doc Comment * * @category Class + * @description Optional cost for the training record. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class AddNewEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class AddNewEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAc * * @var string */ - protected static $openApiModelName = 'add_new_employee_training_record_request_cost'; + protected static $openApiModelName = 'create_employee_training_record_request_cost'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +59,7 @@ class AddNewEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAc */ protected static $openApiTypes = [ 'currency' => 'string', - 'cost' => 'float' + 'amount' => 'string' ]; /** @@ -70,7 +71,7 @@ class AddNewEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAc */ protected static $openApiFormats = [ 'currency' => null, - 'cost' => null + 'amount' => null ]; /** @@ -81,7 +82,7 @@ class AddNewEmployeeTrainingRecordRequestCost implements ModelInterface, ArrayAc */ protected static array $openApiNullables = [ 'currency' => false, - 'cost' => false + 'amount' => false ]; /** @@ -167,7 +168,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'currency' => 'currency', - 'cost' => 'cost' + 'amount' => 'amount' ]; /** @@ -177,7 +178,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'currency' => 'setCurrency', - 'cost' => 'setCost' + 'amount' => 'setAmount' ]; /** @@ -187,7 +188,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'currency' => 'getCurrency', - 'cost' => 'getCost' + 'amount' => 'getAmount' ]; /** @@ -242,7 +243,7 @@ public function getModelName() { */ public function __construct(?array $data = null) { $this->setIfExists('currency', $data ?? [], null); - $this->setIfExists('cost', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); } /** @@ -295,7 +296,7 @@ public function getCurrency() { /** * Sets currency * - * @param string|null $currency currency + * @param string|null $currency ISO 4217 currency code (e.g. 'USD'). * * @return self */ @@ -309,26 +310,26 @@ public function setCurrency($currency) { } /** - * Gets cost + * Gets amount * - * @return float|null + * @return string|null */ - public function getCost() { - return $this->container['cost']; + public function getAmount() { + return $this->container['amount']; } /** - * Sets cost + * Sets amount * - * @param float|null $cost cost + * @param string|null $amount Monetary amount as a decimal string (e.g. '100.00'). * * @return self */ - public function setCost($cost) { - if (is_null($cost)) { - throw new \InvalidArgumentException('non-nullable cost cannot be null'); + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['cost'] = $cost; + $this->container['amount'] = $amount; return $this; } diff --git a/lib/Model/CreateGoalCommentRequest.php b/lib/Model/CreateGoalCommentRequest.php new file mode 100644 index 00000000..dffba8b3 --- /dev/null +++ b/lib/Model/CreateGoalCommentRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * CreateGoalCommentRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateGoalCommentRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateGoalCommentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'create_goal_comment_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets text + * + * @return string + */ + public function getText() { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text The text content of the comment. + * + * @return self + */ + public function setText($text) { + if (is_null($text)) { + throw new \InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PostGoalRequest.php b/lib/Model/CreateGoalRequest.php similarity index 90% rename from lib/Model/PostGoalRequest.php rename to lib/Model/CreateGoalRequest.php index 868e9f79..47f17425 100644 --- a/lib/Model/PostGoalRequest.php +++ b/lib/Model/CreateGoalRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PostGoalRequest + * CreateGoalRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PostGoalRequest Class Doc Comment + * CreateGoalRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PostGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PostGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openApiModelName = 'post_goal_request'; + protected static $openApiModelName = 'create_goal_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -64,7 +64,7 @@ class PostGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'completion_date' => '\DateTime', 'shared_with_employee_ids' => 'int[]', 'aligns_with_option_id' => 'int', - 'milestones' => '\BhrSdk\Model\PostGoalRequestMilestonesInner[]' + 'milestones' => '\BhrSdk\Model\CreateGoalRequestMilestonesInner[]' ]; /** @@ -99,7 +99,7 @@ class PostGoalRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'completion_date' => true, 'shared_with_employee_ids' => false, 'aligns_with_option_id' => true, - 'milestones' => true + 'milestones' => false ]; /** @@ -318,14 +318,11 @@ public function listInvalidProperties() { if ($this->container['due_date'] === null) { $invalidProperties[] = "'due_date' can't be null"; } - if ($this->container['percent_complete'] === null) { - $invalidProperties[] = "'percent_complete' can't be null"; - } - if (($this->container['percent_complete'] > 100)) { + if (!is_null($this->container['percent_complete']) && ($this->container['percent_complete'] > 100)) { $invalidProperties[] = "invalid value for 'percent_complete', must be smaller than or equal to 100."; } - if (($this->container['percent_complete'] < 0)) { + if (!is_null($this->container['percent_complete']) && ($this->container['percent_complete'] < 0)) { $invalidProperties[] = "invalid value for 'percent_complete', must be bigger than or equal to 0."; } @@ -423,7 +420,7 @@ public function setDueDate($due_date) { /** * Gets percent_complete * - * @return int + * @return int|null */ public function getPercentComplete() { return $this->container['percent_complete']; @@ -432,7 +429,7 @@ public function getPercentComplete() { /** * Sets percent_complete * - * @param int $percent_complete The percentage of completion for the goal (0-100) + * @param int|null $percent_complete Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`. * * @return self */ @@ -442,10 +439,10 @@ public function setPercentComplete($percent_complete) { } if (($percent_complete > 100)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PostGoalRequest., must be smaller than or equal to 100.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling CreateGoalRequest., must be smaller than or equal to 100.'); } if (($percent_complete < 0)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PostGoalRequest., must be bigger than or equal to 0.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling CreateGoalRequest., must be bigger than or equal to 0.'); } $this->container['percent_complete'] = $percent_complete; @@ -465,7 +462,7 @@ public function getCompletionDate() { /** * Sets completion_date * - * @param \DateTime|null $completion_date The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. + * @param \DateTime|null $completion_date completion_date * * @return self */ @@ -521,7 +518,7 @@ public function getAlignsWithOptionId() { /** * Sets aligns_with_option_id * - * @param int|null $aligns_with_option_id ID of the option this goal aligns with + * @param int|null $aligns_with_option_id aligns_with_option_id * * @return self */ @@ -543,7 +540,7 @@ public function setAlignsWithOptionId($aligns_with_option_id) { /** * Gets milestones * - * @return \BhrSdk\Model\PostGoalRequestMilestonesInner[]|null + * @return \BhrSdk\Model\CreateGoalRequestMilestonesInner[]|null */ public function getMilestones() { return $this->container['milestones']; @@ -552,19 +549,13 @@ public function getMilestones() { /** * Sets milestones * - * @param \BhrSdk\Model\PostGoalRequestMilestonesInner[]|null $milestones List of milestones for this goal + * @param \BhrSdk\Model\CreateGoalRequestMilestonesInner[]|null $milestones Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal. * * @return self */ public function setMilestones($milestones) { if (is_null($milestones)) { - $this->openApiNullablesSetToNull['milestones'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['milestones'])) { - unset($nullablesSetToNull['milestones']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable milestones cannot be null'); } $this->container['milestones'] = $milestones; diff --git a/lib/Model/PutGoalV11RequestMilestonesInner.php b/lib/Model/CreateGoalRequestMilestonesInner.php similarity index 97% rename from lib/Model/PutGoalV11RequestMilestonesInner.php rename to lib/Model/CreateGoalRequestMilestonesInner.php index 637b7665..5a34ef3b 100644 --- a/lib/Model/PutGoalV11RequestMilestonesInner.php +++ b/lib/Model/CreateGoalRequestMilestonesInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PutGoalV11RequestMilestonesInner + * CreateGoalRequestMilestonesInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PutGoalV11RequestMilestonesInner Class Doc Comment + * CreateGoalRequestMilestonesInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PutGoalV11RequestMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateGoalRequestMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PutGoalV11RequestMilestonesInner implements ModelInterface, ArrayAccess, \ * * @var string */ - protected static $openApiModelName = 'put_goal_v1_1_request_milestones_inner'; + protected static $openApiModelName = 'create_goal_request_milestones_inner'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/CreateJobOpeningResponse.php b/lib/Model/CreateJobOpeningResponse.php new file mode 100644 index 00000000..86c06650 --- /dev/null +++ b/lib/Model/CreateJobOpeningResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * CreateJobOpeningResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateJobOpeningResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateJobOpeningResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreateJobOpeningResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'result' => 'string', + 'job_opening_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'result' => null, + 'job_opening_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'result' => false, + 'job_opening_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'result' => 'result', + 'job_opening_id' => 'jobOpeningId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult', + 'job_opening_id' => 'setJobOpeningId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult', + 'job_opening_id' => 'getJobOpeningId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('job_opening_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets result + * + * @return string|null + */ + public function getResult() { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result Always 'success' on a successful request + * + * @return self + */ + public function setResult($result) { + if (is_null($result)) { + throw new \InvalidArgumentException('non-nullable result cannot be null'); + } + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets job_opening_id + * + * @return string|null + */ + public function getJobOpeningId() { + return $this->container['job_opening_id']; + } + + /** + * Sets job_opening_id + * + * @param string|null $job_opening_id The ID of the newly created job opening + * + * @return self + */ + public function setJobOpeningId($job_opening_id) { + if (is_null($job_opening_id)) { + throw new \InvalidArgumentException('non-nullable job_opening_id cannot be null'); + } + $this->container['job_opening_id'] = $job_opening_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreateLocationRequest.php b/lib/Model/CreateLocationRequest.php new file mode 100644 index 00000000..88d19602 --- /dev/null +++ b/lib/Model/CreateLocationRequest.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * CreateLocationRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateLocationRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateLocationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'create_location_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'label' => 'string', + 'archived' => 'bool', + 'address' => '\BhrSdk\Model\CreateLocationRequestAddress' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'label' => null, + 'archived' => null, + 'address' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'label' => false, + 'archived' => false, + 'address' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'label' => 'label', + 'archived' => 'archived', + 'address' => 'address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'label' => 'setLabel', + 'archived' => 'setArchived', + 'address' => 'setAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'label' => 'getLabel', + 'archived' => 'getArchived', + 'address' => 'getAddress' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], false); + $this->setIfExists('address', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label Display name for the location + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Whether the location is archived + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets address + * + * @return \BhrSdk\Model\CreateLocationRequestAddress + */ + public function getAddress() { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \BhrSdk\Model\CreateLocationRequestAddress $address address + * + * @return self + */ + public function setAddress($address) { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreateLocationRequestAddress.php b/lib/Model/CreateLocationRequestAddress.php new file mode 100644 index 00000000..1ac6dd83 --- /dev/null +++ b/lib/Model/CreateLocationRequestAddress.php @@ -0,0 +1,664 @@ +<?php +declare(strict_types=1); +/** + * CreateLocationRequestAddress + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreateLocationRequestAddress Class Doc Comment + * + * @category Class + * @description Address details for the location. When remoteLocation is true, none are required and must be null or omitted + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreateLocationRequestAddress implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'create_location_request_address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'state_id' => 'string', + 'zipcode' => 'string', + 'country_id' => 'string', + 'timezone' => 'string', + 'remote_location' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'address1' => null, + 'address2' => null, + 'city' => null, + 'state_id' => null, + 'zipcode' => null, + 'country_id' => null, + 'timezone' => null, + 'remote_location' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'address1' => true, + 'address2' => true, + 'city' => true, + 'state_id' => true, + 'zipcode' => true, + 'country_id' => true, + 'timezone' => true, + 'remote_location' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address1' => 'address1', + 'address2' => 'address2', + 'city' => 'city', + 'state_id' => 'stateId', + 'zipcode' => 'zipcode', + 'country_id' => 'countryId', + 'timezone' => 'timezone', + 'remote_location' => 'remoteLocation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address1' => 'setAddress1', + 'address2' => 'setAddress2', + 'city' => 'setCity', + 'state_id' => 'setStateId', + 'zipcode' => 'setZipcode', + 'country_id' => 'setCountryId', + 'timezone' => 'setTimezone', + 'remote_location' => 'setRemoteLocation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address1' => 'getAddress1', + 'address2' => 'getAddress2', + 'city' => 'getCity', + 'state_id' => 'getStateId', + 'zipcode' => 'getZipcode', + 'country_id' => 'getCountryId', + 'timezone' => 'getTimezone', + 'remote_location' => 'getRemoteLocation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('address1', $data ?? [], null); + $this->setIfExists('address2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state_id', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('remote_location', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['remote_location'] === null) { + $invalidProperties[] = "'remote_location' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets address1 + * + * @return string|null + */ + public function getAddress1() { + return $this->container['address1']; + } + + /** + * Sets address1 + * + * @param string|null $address1 address1 + * + * @return self + */ + public function setAddress1($address1) { + if (is_null($address1)) { + $this->openApiNullablesSetToNull['address1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address1'])) { + unset($nullablesSetToNull['address1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address1'] = $address1; + + return $this; + } + + /** + * Gets address2 + * + * @return string|null + */ + public function getAddress2() { + return $this->container['address2']; + } + + /** + * Sets address2 + * + * @param string|null $address2 address2 + * + * @return self + */ + public function setAddress2($address2) { + if (is_null($address2)) { + $this->openApiNullablesSetToNull['address2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address2'])) { + unset($nullablesSetToNull['address2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address2'] = $address2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state_id + * + * @return string|null + */ + public function getStateId() { + return $this->container['state_id']; + } + + /** + * Sets state_id + * + * @param string|null $state_id state_id + * + * @return self + */ + public function setStateId($state_id) { + if (is_null($state_id)) { + $this->openApiNullablesSetToNull['state_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state_id'])) { + unset($nullablesSetToNull['state_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state_id'] = $state_id; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode zipcode + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + $this->openApiNullablesSetToNull['zipcode'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zipcode'])) { + unset($nullablesSetToNull['zipcode']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zipcode'] = $zipcode; + + return $this; + } + + /** + * Gets country_id + * + * @return string|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param string|null $country_id country_id + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + $this->openApiNullablesSetToNull['country_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country_id'])) { + unset($nullablesSetToNull['country_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + $this->openApiNullablesSetToNull['timezone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['timezone'])) { + unset($nullablesSetToNull['timezone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets remote_location + * + * @return bool + */ + public function getRemoteLocation() { + return $this->container['remote_location']; + } + + /** + * Sets remote_location + * + * @param bool $remote_location remote_location + * + * @return self + */ + public function setRemoteLocation($remote_location) { + if (is_null($remote_location)) { + $this->openApiNullablesSetToNull['remote_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['remote_location'])) { + unset($nullablesSetToNull['remote_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['remote_location'] = $remote_location; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddTrainingCategoryRequest.php b/lib/Model/CreateTrainingCategoryRequest.php similarity index 97% rename from lib/Model/AddTrainingCategoryRequest.php rename to lib/Model/CreateTrainingCategoryRequest.php index f0e62f23..00285434 100644 --- a/lib/Model/AddTrainingCategoryRequest.php +++ b/lib/Model/CreateTrainingCategoryRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * AddTrainingCategoryRequest + * CreateTrainingCategoryRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * AddTrainingCategoryRequest Class Doc Comment + * CreateTrainingCategoryRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class AddTrainingCategoryRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateTrainingCategoryRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class AddTrainingCategoryRequest implements ModelInterface, ArrayAccess, \JsonSe * * @var string */ - protected static $openApiModelName = 'add_training_category_request'; + protected static $openApiModelName = 'create_training_category_request'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/AddTrainingTypeRequest.php b/lib/Model/CreateTrainingTypeRequest.php similarity index 96% rename from lib/Model/AddTrainingTypeRequest.php rename to lib/Model/CreateTrainingTypeRequest.php index 80cf5c5e..02cd8837 100644 --- a/lib/Model/AddTrainingTypeRequest.php +++ b/lib/Model/CreateTrainingTypeRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * AddTrainingTypeRequest + * CreateTrainingTypeRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * AddTrainingTypeRequest Class Doc Comment + * CreateTrainingTypeRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class AddTrainingTypeRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateTrainingTypeRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class AddTrainingTypeRequest implements ModelInterface, ArrayAccess, \JsonSerial * * @var string */ - protected static $openApiModelName = 'add_training_type_request'; + protected static $openApiModelName = 'create_training_type_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -60,7 +60,7 @@ class AddTrainingTypeRequest implements ModelInterface, ArrayAccess, \JsonSerial 'name' => 'string', 'frequency' => 'int', 'renewable' => 'bool', - 'category' => '\BhrSdk\Model\AddTrainingTypeRequestCategory', + 'category' => '\BhrSdk\Model\CreateTrainingTypeRequestCategory', 'required' => 'bool', 'due_from_hire_date' => 'int', 'link_url' => 'string', @@ -322,9 +322,6 @@ public function listInvalidProperties() { if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['required'] === null) { - $invalidProperties[] = "'required' can't be null"; - } return $invalidProperties; } @@ -416,7 +413,7 @@ public function setRenewable($renewable) { /** * Gets category * - * @return \BhrSdk\Model\AddTrainingTypeRequestCategory|null + * @return \BhrSdk\Model\CreateTrainingTypeRequestCategory|null */ public function getCategory() { return $this->container['category']; @@ -425,7 +422,7 @@ public function getCategory() { /** * Sets category * - * @param \BhrSdk\Model\AddTrainingTypeRequestCategory|null $category category + * @param \BhrSdk\Model\CreateTrainingTypeRequestCategory|null $category category * * @return self */ @@ -441,7 +438,7 @@ public function setCategory($category) { /** * Gets required * - * @return bool + * @return bool|null */ public function getRequired() { return $this->container['required']; @@ -450,7 +447,7 @@ public function getRequired() { /** * Sets required * - * @param bool $required Is this a required training? + * @param bool|null $required Is this a required training? * * @return self */ diff --git a/lib/Model/TimeTrackingRecordSchemaShiftDifferential.php b/lib/Model/CreateTrainingTypeRequestCategory.php similarity index 94% rename from lib/Model/TimeTrackingRecordSchemaShiftDifferential.php rename to lib/Model/CreateTrainingTypeRequestCategory.php index c58a8705..bd69d7be 100644 --- a/lib/Model/TimeTrackingRecordSchemaShiftDifferential.php +++ b/lib/Model/CreateTrainingTypeRequestCategory.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TimeTrackingRecordSchemaShiftDifferential + * CreateTrainingTypeRequestCategory * * PHP version 8.1 * @@ -33,16 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * TimeTrackingRecordSchemaShiftDifferential Class Doc Comment + * CreateTrainingTypeRequestCategory Class Doc Comment * * @category Class - * @description Shift differential information associated with this time tracking record + * @description The category is optional and you can pass either a category id or a category name. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TimeTrackingRecordSchemaShiftDifferential implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class TimeTrackingRecordSchemaShiftDifferential implements ModelInterface, Array * * @var string */ - protected static $openApiModelName = 'TimeTrackingRecordSchema_shiftDifferential'; + protected static $openApiModelName = 'create_training_type_request_category'; /** * Array of property to type mappings. Used for (de)serialization @@ -296,7 +296,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Shift Differential information + * @param int|null $id Category ID * * @return self */ @@ -321,7 +321,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Category Name * * @return self */ diff --git a/lib/Model/Unauthorized.php b/lib/Model/CreateWebhookBadRequestResponse.php similarity index 95% rename from lib/Model/Unauthorized.php rename to lib/Model/CreateWebhookBadRequestResponse.php index e53a6006..402fc639 100644 --- a/lib/Model/Unauthorized.php +++ b/lib/Model/CreateWebhookBadRequestResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * Unauthorized + * CreateWebhookBadRequestResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * Unauthorized Class Doc Comment + * CreateWebhookBadRequestResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class Unauthorized implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreateWebhookBadRequestResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class Unauthorized implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'Unauthorized'; + protected static $openApiModelName = 'CreateWebhookBadRequestResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class Unauthorized implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'errors' => '\BhrSdk\Model\UnauthorizedErrorsInner[]' + 'errors' => '\BhrSdk\Model\WebhookErrorErrors' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets errors * - * @return \BhrSdk\Model\UnauthorizedErrorsInner[]|null + * @return \BhrSdk\Model\WebhookErrorErrors|null */ public function getErrors() { return $this->container['errors']; @@ -288,7 +288,7 @@ public function getErrors() { /** * Sets errors * - * @param \BhrSdk\Model\UnauthorizedErrorsInner[]|null $errors errors + * @param \BhrSdk\Model\WebhookErrorErrors|null $errors errors * * @return self */ diff --git a/lib/Model/CreatedCompensationBenchmark.php b/lib/Model/CreatedCompensationBenchmark.php new file mode 100644 index 00000000..311a0e33 --- /dev/null +++ b/lib/Model/CreatedCompensationBenchmark.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * CreatedCompensationBenchmark + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedCompensationBenchmark Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedCompensationBenchmark implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedCompensationBenchmark'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'saved_benchmark' => '\BhrSdk\Model\CreatedCompensationBenchmarkSavedBenchmark', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'saved_benchmark' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'saved_benchmark' => false, + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'saved_benchmark' => 'savedBenchmark', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'saved_benchmark' => 'setSavedBenchmark', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'saved_benchmark' => 'getSavedBenchmark', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('saved_benchmark', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets saved_benchmark + * + * @return \BhrSdk\Model\CreatedCompensationBenchmarkSavedBenchmark|null + */ + public function getSavedBenchmark() { + return $this->container['saved_benchmark']; + } + + /** + * Sets saved_benchmark + * + * @param \BhrSdk\Model\CreatedCompensationBenchmarkSavedBenchmark|null $saved_benchmark saved_benchmark + * + * @return self + */ + public function setSavedBenchmark($saved_benchmark) { + if (is_null($saved_benchmark)) { + throw new \InvalidArgumentException('non-nullable saved_benchmark cannot be null'); + } + $this->container['saved_benchmark'] = $saved_benchmark; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreatedCompensationBenchmarkSavedBenchmark.php b/lib/Model/CreatedCompensationBenchmarkSavedBenchmark.php new file mode 100644 index 00000000..dedfb871 --- /dev/null +++ b/lib/Model/CreatedCompensationBenchmarkSavedBenchmark.php @@ -0,0 +1,1180 @@ +<?php +declare(strict_types=1); +/** + * CreatedCompensationBenchmarkSavedBenchmark + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedCompensationBenchmarkSavedBenchmark Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedCompensationBenchmarkSavedBenchmark implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedCompensationBenchmark_savedBenchmark'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'job_title_id' => 'string', + 'job_location_id' => 'string', + 'mercer_job_code' => 'string', + 'benchmark_source' => 'string', + 'currency_code' => 'string', + 'benchmark_value' => 'float', + 'benchmark_min' => 'float', + 'benchmark_max' => 'float', + 'external_job_title' => 'string', + 'external_location' => 'string', + 'external_level' => 'string', + 'external_job_description' => 'string', + 'companies_surveyed' => 'int', + 'employees_surveyed' => 'int', + 'source_id' => 'string', + 'source_date' => 'string', + 'data_year' => 'string', + 'external_country' => 'string', + 'external_secondary_location' => 'string', + 'external_company_size' => 'string', + 'external_industry' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'job_title_id' => null, + 'job_location_id' => null, + 'mercer_job_code' => null, + 'benchmark_source' => null, + 'currency_code' => null, + 'benchmark_value' => null, + 'benchmark_min' => null, + 'benchmark_max' => null, + 'external_job_title' => null, + 'external_location' => null, + 'external_level' => null, + 'external_job_description' => null, + 'companies_surveyed' => null, + 'employees_surveyed' => null, + 'source_id' => null, + 'source_date' => null, + 'data_year' => null, + 'external_country' => null, + 'external_secondary_location' => null, + 'external_company_size' => null, + 'external_industry' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'job_title_id' => false, + 'job_location_id' => true, + 'mercer_job_code' => true, + 'benchmark_source' => true, + 'currency_code' => true, + 'benchmark_value' => true, + 'benchmark_min' => true, + 'benchmark_max' => true, + 'external_job_title' => true, + 'external_location' => true, + 'external_level' => true, + 'external_job_description' => true, + 'companies_surveyed' => true, + 'employees_surveyed' => true, + 'source_id' => true, + 'source_date' => true, + 'data_year' => true, + 'external_country' => true, + 'external_secondary_location' => true, + 'external_company_size' => true, + 'external_industry' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'job_title_id' => 'jobTitleId', + 'job_location_id' => 'jobLocationId', + 'mercer_job_code' => 'mercerJobCode', + 'benchmark_source' => 'benchmarkSource', + 'currency_code' => 'currencyCode', + 'benchmark_value' => 'benchmarkValue', + 'benchmark_min' => 'benchmarkMin', + 'benchmark_max' => 'benchmarkMax', + 'external_job_title' => 'externalJobTitle', + 'external_location' => 'externalLocation', + 'external_level' => 'externalLevel', + 'external_job_description' => 'externalJobDescription', + 'companies_surveyed' => 'companiesSurveyed', + 'employees_surveyed' => 'employeesSurveyed', + 'source_id' => 'sourceId', + 'source_date' => 'sourceDate', + 'data_year' => 'dataYear', + 'external_country' => 'externalCountry', + 'external_secondary_location' => 'externalSecondaryLocation', + 'external_company_size' => 'externalCompanySize', + 'external_industry' => 'externalIndustry' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'job_title_id' => 'setJobTitleId', + 'job_location_id' => 'setJobLocationId', + 'mercer_job_code' => 'setMercerJobCode', + 'benchmark_source' => 'setBenchmarkSource', + 'currency_code' => 'setCurrencyCode', + 'benchmark_value' => 'setBenchmarkValue', + 'benchmark_min' => 'setBenchmarkMin', + 'benchmark_max' => 'setBenchmarkMax', + 'external_job_title' => 'setExternalJobTitle', + 'external_location' => 'setExternalLocation', + 'external_level' => 'setExternalLevel', + 'external_job_description' => 'setExternalJobDescription', + 'companies_surveyed' => 'setCompaniesSurveyed', + 'employees_surveyed' => 'setEmployeesSurveyed', + 'source_id' => 'setSourceId', + 'source_date' => 'setSourceDate', + 'data_year' => 'setDataYear', + 'external_country' => 'setExternalCountry', + 'external_secondary_location' => 'setExternalSecondaryLocation', + 'external_company_size' => 'setExternalCompanySize', + 'external_industry' => 'setExternalIndustry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'job_title_id' => 'getJobTitleId', + 'job_location_id' => 'getJobLocationId', + 'mercer_job_code' => 'getMercerJobCode', + 'benchmark_source' => 'getBenchmarkSource', + 'currency_code' => 'getCurrencyCode', + 'benchmark_value' => 'getBenchmarkValue', + 'benchmark_min' => 'getBenchmarkMin', + 'benchmark_max' => 'getBenchmarkMax', + 'external_job_title' => 'getExternalJobTitle', + 'external_location' => 'getExternalLocation', + 'external_level' => 'getExternalLevel', + 'external_job_description' => 'getExternalJobDescription', + 'companies_surveyed' => 'getCompaniesSurveyed', + 'employees_surveyed' => 'getEmployeesSurveyed', + 'source_id' => 'getSourceId', + 'source_date' => 'getSourceDate', + 'data_year' => 'getDataYear', + 'external_country' => 'getExternalCountry', + 'external_secondary_location' => 'getExternalSecondaryLocation', + 'external_company_size' => 'getExternalCompanySize', + 'external_industry' => 'getExternalIndustry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('job_location_id', $data ?? [], null); + $this->setIfExists('mercer_job_code', $data ?? [], null); + $this->setIfExists('benchmark_source', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('benchmark_value', $data ?? [], null); + $this->setIfExists('benchmark_min', $data ?? [], null); + $this->setIfExists('benchmark_max', $data ?? [], null); + $this->setIfExists('external_job_title', $data ?? [], null); + $this->setIfExists('external_location', $data ?? [], null); + $this->setIfExists('external_level', $data ?? [], null); + $this->setIfExists('external_job_description', $data ?? [], null); + $this->setIfExists('companies_surveyed', $data ?? [], null); + $this->setIfExists('employees_surveyed', $data ?? [], null); + $this->setIfExists('source_id', $data ?? [], null); + $this->setIfExists('source_date', $data ?? [], null); + $this->setIfExists('data_year', $data ?? [], null); + $this->setIfExists('external_country', $data ?? [], null); + $this->setIfExists('external_secondary_location', $data ?? [], null); + $this->setIfExists('external_company_size', $data ?? [], null); + $this->setIfExists('external_industry', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets job_title_id + * + * @return string|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param string|null $job_title_id job_title_id + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + throw new \InvalidArgumentException('non-nullable job_title_id cannot be null'); + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets job_location_id + * + * @return string|null + */ + public function getJobLocationId() { + return $this->container['job_location_id']; + } + + /** + * Sets job_location_id + * + * @param string|null $job_location_id job_location_id + * + * @return self + */ + public function setJobLocationId($job_location_id) { + if (is_null($job_location_id)) { + $this->openApiNullablesSetToNull['job_location_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_location_id'])) { + unset($nullablesSetToNull['job_location_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_location_id'] = $job_location_id; + + return $this; + } + + /** + * Gets mercer_job_code + * + * @return string|null + */ + public function getMercerJobCode() { + return $this->container['mercer_job_code']; + } + + /** + * Sets mercer_job_code + * + * @param string|null $mercer_job_code mercer_job_code + * + * @return self + */ + public function setMercerJobCode($mercer_job_code) { + if (is_null($mercer_job_code)) { + $this->openApiNullablesSetToNull['mercer_job_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['mercer_job_code'])) { + unset($nullablesSetToNull['mercer_job_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mercer_job_code'] = $mercer_job_code; + + return $this; + } + + /** + * Gets benchmark_source + * + * @return string|null + */ + public function getBenchmarkSource() { + return $this->container['benchmark_source']; + } + + /** + * Sets benchmark_source + * + * @param string|null $benchmark_source benchmark_source + * + * @return self + */ + public function setBenchmarkSource($benchmark_source) { + if (is_null($benchmark_source)) { + $this->openApiNullablesSetToNull['benchmark_source'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_source'])) { + unset($nullablesSetToNull['benchmark_source']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_source'] = $benchmark_source; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets benchmark_value + * + * @return float|null + */ + public function getBenchmarkValue() { + return $this->container['benchmark_value']; + } + + /** + * Sets benchmark_value + * + * @param float|null $benchmark_value benchmark_value + * + * @return self + */ + public function setBenchmarkValue($benchmark_value) { + if (is_null($benchmark_value)) { + $this->openApiNullablesSetToNull['benchmark_value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_value'])) { + unset($nullablesSetToNull['benchmark_value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_value'] = $benchmark_value; + + return $this; + } + + /** + * Gets benchmark_min + * + * @return float|null + */ + public function getBenchmarkMin() { + return $this->container['benchmark_min']; + } + + /** + * Sets benchmark_min + * + * @param float|null $benchmark_min benchmark_min + * + * @return self + */ + public function setBenchmarkMin($benchmark_min) { + if (is_null($benchmark_min)) { + $this->openApiNullablesSetToNull['benchmark_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_min'])) { + unset($nullablesSetToNull['benchmark_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_min'] = $benchmark_min; + + return $this; + } + + /** + * Gets benchmark_max + * + * @return float|null + */ + public function getBenchmarkMax() { + return $this->container['benchmark_max']; + } + + /** + * Sets benchmark_max + * + * @param float|null $benchmark_max benchmark_max + * + * @return self + */ + public function setBenchmarkMax($benchmark_max) { + if (is_null($benchmark_max)) { + $this->openApiNullablesSetToNull['benchmark_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_max'])) { + unset($nullablesSetToNull['benchmark_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_max'] = $benchmark_max; + + return $this; + } + + /** + * Gets external_job_title + * + * @return string|null + */ + public function getExternalJobTitle() { + return $this->container['external_job_title']; + } + + /** + * Sets external_job_title + * + * @param string|null $external_job_title external_job_title + * + * @return self + */ + public function setExternalJobTitle($external_job_title) { + if (is_null($external_job_title)) { + $this->openApiNullablesSetToNull['external_job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_title'])) { + unset($nullablesSetToNull['external_job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_title'] = $external_job_title; + + return $this; + } + + /** + * Gets external_location + * + * @return string|null + */ + public function getExternalLocation() { + return $this->container['external_location']; + } + + /** + * Sets external_location + * + * @param string|null $external_location external_location + * + * @return self + */ + public function setExternalLocation($external_location) { + if (is_null($external_location)) { + $this->openApiNullablesSetToNull['external_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_location'])) { + unset($nullablesSetToNull['external_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_location'] = $external_location; + + return $this; + } + + /** + * Gets external_level + * + * @return string|null + */ + public function getExternalLevel() { + return $this->container['external_level']; + } + + /** + * Sets external_level + * + * @param string|null $external_level external_level + * + * @return self + */ + public function setExternalLevel($external_level) { + if (is_null($external_level)) { + $this->openApiNullablesSetToNull['external_level'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_level'])) { + unset($nullablesSetToNull['external_level']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_level'] = $external_level; + + return $this; + } + + /** + * Gets external_job_description + * + * @return string|null + */ + public function getExternalJobDescription() { + return $this->container['external_job_description']; + } + + /** + * Sets external_job_description + * + * @param string|null $external_job_description external_job_description + * + * @return self + */ + public function setExternalJobDescription($external_job_description) { + if (is_null($external_job_description)) { + $this->openApiNullablesSetToNull['external_job_description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_description'])) { + unset($nullablesSetToNull['external_job_description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_description'] = $external_job_description; + + return $this; + } + + /** + * Gets companies_surveyed + * + * @return int|null + */ + public function getCompaniesSurveyed() { + return $this->container['companies_surveyed']; + } + + /** + * Sets companies_surveyed + * + * @param int|null $companies_surveyed companies_surveyed + * + * @return self + */ + public function setCompaniesSurveyed($companies_surveyed) { + if (is_null($companies_surveyed)) { + $this->openApiNullablesSetToNull['companies_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['companies_surveyed'])) { + unset($nullablesSetToNull['companies_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['companies_surveyed'] = $companies_surveyed; + + return $this; + } + + /** + * Gets employees_surveyed + * + * @return int|null + */ + public function getEmployeesSurveyed() { + return $this->container['employees_surveyed']; + } + + /** + * Sets employees_surveyed + * + * @param int|null $employees_surveyed employees_surveyed + * + * @return self + */ + public function setEmployeesSurveyed($employees_surveyed) { + if (is_null($employees_surveyed)) { + $this->openApiNullablesSetToNull['employees_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employees_surveyed'])) { + unset($nullablesSetToNull['employees_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employees_surveyed'] = $employees_surveyed; + + return $this; + } + + /** + * Gets source_id + * + * @return string|null + */ + public function getSourceId() { + return $this->container['source_id']; + } + + /** + * Sets source_id + * + * @param string|null $source_id source_id + * + * @return self + */ + public function setSourceId($source_id) { + if (is_null($source_id)) { + $this->openApiNullablesSetToNull['source_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_id'])) { + unset($nullablesSetToNull['source_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_id'] = $source_id; + + return $this; + } + + /** + * Gets source_date + * + * @return string|null + */ + public function getSourceDate() { + return $this->container['source_date']; + } + + /** + * Sets source_date + * + * @param string|null $source_date source_date + * + * @return self + */ + public function setSourceDate($source_date) { + if (is_null($source_date)) { + $this->openApiNullablesSetToNull['source_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_date'])) { + unset($nullablesSetToNull['source_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_date'] = $source_date; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year data_year + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + $this->openApiNullablesSetToNull['data_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['data_year'])) { + unset($nullablesSetToNull['data_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data_year'] = $data_year; + + return $this; + } + + /** + * Gets external_country + * + * @return string|null + */ + public function getExternalCountry() { + return $this->container['external_country']; + } + + /** + * Sets external_country + * + * @param string|null $external_country external_country + * + * @return self + */ + public function setExternalCountry($external_country) { + if (is_null($external_country)) { + $this->openApiNullablesSetToNull['external_country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_country'])) { + unset($nullablesSetToNull['external_country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_country'] = $external_country; + + return $this; + } + + /** + * Gets external_secondary_location + * + * @return string|null + */ + public function getExternalSecondaryLocation() { + return $this->container['external_secondary_location']; + } + + /** + * Sets external_secondary_location + * + * @param string|null $external_secondary_location external_secondary_location + * + * @return self + */ + public function setExternalSecondaryLocation($external_secondary_location) { + if (is_null($external_secondary_location)) { + $this->openApiNullablesSetToNull['external_secondary_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_secondary_location'])) { + unset($nullablesSetToNull['external_secondary_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_secondary_location'] = $external_secondary_location; + + return $this; + } + + /** + * Gets external_company_size + * + * @return string|null + */ + public function getExternalCompanySize() { + return $this->container['external_company_size']; + } + + /** + * Sets external_company_size + * + * @param string|null $external_company_size external_company_size + * + * @return self + */ + public function setExternalCompanySize($external_company_size) { + if (is_null($external_company_size)) { + $this->openApiNullablesSetToNull['external_company_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_company_size'])) { + unset($nullablesSetToNull['external_company_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_company_size'] = $external_company_size; + + return $this; + } + + /** + * Gets external_industry + * + * @return string|null + */ + public function getExternalIndustry() { + return $this->container['external_industry']; + } + + /** + * Sets external_industry + * + * @param string|null $external_industry external_industry + * + * @return self + */ + public function setExternalIndustry($external_industry) { + if (is_null($external_industry)) { + $this->openApiNullablesSetToNull['external_industry'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_industry'])) { + unset($nullablesSetToNull['external_industry']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_industry'] = $external_industry; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreatedCompensationBenchmarkSource.php b/lib/Model/CreatedCompensationBenchmarkSource.php new file mode 100644 index 00000000..4d559f2d --- /dev/null +++ b/lib/Model/CreatedCompensationBenchmarkSource.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * CreatedCompensationBenchmarkSource + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedCompensationBenchmarkSource Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedCompensationBenchmarkSource implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedCompensationBenchmarkSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id ID of the newly created benchmark source. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreatedTimeOffRequest.php b/lib/Model/CreatedTimeOffRequest.php new file mode 100644 index 00000000..6bab6c6c --- /dev/null +++ b/lib/Model/CreatedTimeOffRequest.php @@ -0,0 +1,944 @@ +<?php +declare(strict_types=1); +/** + * CreatedTimeOffRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedTimeOffRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedTimeOffRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedTimeOffRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'name' => 'string', + 'start' => '\DateTime', + 'end' => '\DateTime', + 'created' => '\DateTime', + 'status' => '\BhrSdk\Model\CreatedTimeOffRequestStatus', + 'type' => '\BhrSdk\Model\CreatedTimeOffRequestType', + 'amount' => '\BhrSdk\Model\CreatedTimeOffRequestAmount', + 'dates' => 'array<string,float>', + 'notes' => '\BhrSdk\Model\CreatedTimeOffRequestNotes', + 'comments' => 'object[]', + 'approvers' => 'array[]', + 'actions' => 'array<string,bool>', + 'overlapping_requests' => 'object[]', + 'policy_type' => 'string', + 'used_year_to_date' => 'float', + 'balance_on_date_of_request' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'name' => null, + 'start' => 'date', + 'end' => 'date', + 'created' => 'date', + 'status' => null, + 'type' => null, + 'amount' => null, + 'dates' => null, + 'notes' => null, + 'comments' => null, + 'approvers' => null, + 'actions' => null, + 'overlapping_requests' => null, + 'policy_type' => null, + 'used_year_to_date' => null, + 'balance_on_date_of_request' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'name' => false, + 'start' => false, + 'end' => false, + 'created' => false, + 'status' => false, + 'type' => false, + 'amount' => false, + 'dates' => false, + 'notes' => false, + 'comments' => false, + 'approvers' => false, + 'actions' => false, + 'overlapping_requests' => false, + 'policy_type' => false, + 'used_year_to_date' => true, + 'balance_on_date_of_request' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'name' => 'name', + 'start' => 'start', + 'end' => 'end', + 'created' => 'created', + 'status' => 'status', + 'type' => 'type', + 'amount' => 'amount', + 'dates' => 'dates', + 'notes' => 'notes', + 'comments' => 'comments', + 'approvers' => 'approvers', + 'actions' => 'actions', + 'overlapping_requests' => 'overlappingRequests', + 'policy_type' => 'policyType', + 'used_year_to_date' => 'usedYearToDate', + 'balance_on_date_of_request' => 'balanceOnDateOfRequest' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'name' => 'setName', + 'start' => 'setStart', + 'end' => 'setEnd', + 'created' => 'setCreated', + 'status' => 'setStatus', + 'type' => 'setType', + 'amount' => 'setAmount', + 'dates' => 'setDates', + 'notes' => 'setNotes', + 'comments' => 'setComments', + 'approvers' => 'setApprovers', + 'actions' => 'setActions', + 'overlapping_requests' => 'setOverlappingRequests', + 'policy_type' => 'setPolicyType', + 'used_year_to_date' => 'setUsedYearToDate', + 'balance_on_date_of_request' => 'setBalanceOnDateOfRequest' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'name' => 'getName', + 'start' => 'getStart', + 'end' => 'getEnd', + 'created' => 'getCreated', + 'status' => 'getStatus', + 'type' => 'getType', + 'amount' => 'getAmount', + 'dates' => 'getDates', + 'notes' => 'getNotes', + 'comments' => 'getComments', + 'approvers' => 'getApprovers', + 'actions' => 'getActions', + 'overlapping_requests' => 'getOverlappingRequests', + 'policy_type' => 'getPolicyType', + 'used_year_to_date' => 'getUsedYearToDate', + 'balance_on_date_of_request' => 'getBalanceOnDateOfRequest' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('created', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('dates', $data ?? [], null); + $this->setIfExists('notes', $data ?? [], null); + $this->setIfExists('comments', $data ?? [], null); + $this->setIfExists('approvers', $data ?? [], null); + $this->setIfExists('actions', $data ?? [], null); + $this->setIfExists('overlapping_requests', $data ?? [], null); + $this->setIfExists('policy_type', $data ?? [], null); + $this->setIfExists('used_year_to_date', $data ?? [], null); + $this->setIfExists('balance_on_date_of_request', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The newly created time off request ID. Use this to chain follow-up operations such as approving, canceling, or superseding the request. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The ID of the employee the request was created for. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The employee's full name. Only present when the employee record could be loaded. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime|null + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime|null $start The start date of the request in YYYY-MM-DD format. + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime|null + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime|null $end The end date of the request in YYYY-MM-DD format. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime|null + */ + public function getCreated() { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime|null $created The date the request was created in YYYY-MM-DD format (company timezone). + * + * @return self + */ + public function setCreated($created) { + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); + } + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets status + * + * @return \BhrSdk\Model\CreatedTimeOffRequestStatus|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \BhrSdk\Model\CreatedTimeOffRequestStatus|null $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return \BhrSdk\Model\CreatedTimeOffRequestType|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \BhrSdk\Model\CreatedTimeOffRequestType|null $type type + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets amount + * + * @return \BhrSdk\Model\CreatedTimeOffRequestAmount|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \BhrSdk\Model\CreatedTimeOffRequestAmount|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets dates + * + * @return array<string,float>|null + */ + public function getDates() { + return $this->container['dates']; + } + + /** + * Sets dates + * + * @param array<string,float>|null $dates A map of dates (YYYY-MM-DD) to daily amounts. Only present when daily details were attached to the request. + * + * @return self + */ + public function setDates($dates) { + if (is_null($dates)) { + throw new \InvalidArgumentException('non-nullable dates cannot be null'); + } + $this->container['dates'] = $dates; + + return $this; + } + + /** + * Gets notes + * + * @return \BhrSdk\Model\CreatedTimeOffRequestNotes|null + */ + public function getNotes() { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param \BhrSdk\Model\CreatedTimeOffRequestNotes|null $notes notes + * + * @return self + */ + public function setNotes($notes) { + if (is_null($notes)) { + throw new \InvalidArgumentException('non-nullable notes cannot be null'); + } + $this->container['notes'] = $notes; + + return $this; + } + + /** + * Gets comments + * + * @return object[]|null + */ + public function getComments() { + return $this->container['comments']; + } + + /** + * Sets comments + * + * @param object[]|null $comments Comments attached to the request. Always present; empty array when no comments exist. + * + * @return self + */ + public function setComments($comments) { + if (is_null($comments)) { + throw new \InvalidArgumentException('non-nullable comments cannot be null'); + } + $this->container['comments'] = $comments; + + return $this; + } + + /** + * Gets approvers + * + * @return array[]|null + */ + public function getApprovers() { + return $this->container['approvers']; + } + + /** + * Sets approvers + * + * @param array[]|null $approvers The approval chain for this request. Only present when the request has approvers. + * + * @return self + */ + public function setApprovers($approvers) { + if (is_null($approvers)) { + throw new \InvalidArgumentException('non-nullable approvers cannot be null'); + } + $this->container['approvers'] = $approvers; + + return $this; + } + + /** + * Gets actions + * + * @return array<string,bool>|null + */ + public function getActions() { + return $this->container['actions']; + } + + /** + * Sets actions + * + * @param array<string,bool>|null $actions Actions the current user can perform on this request. Only present when PTO action permissions are available. Keys are restricted to `view`, `edit`, `cancel`, `approve`, `deny`, `bypass`; values are booleans. + * + * @return self + */ + public function setActions($actions) { + if (is_null($actions)) { + throw new \InvalidArgumentException('non-nullable actions cannot be null'); + } + $this->container['actions'] = $actions; + + return $this; + } + + /** + * Gets overlapping_requests + * + * @return object[]|null + */ + public function getOverlappingRequests() { + return $this->container['overlapping_requests']; + } + + /** + * Sets overlapping_requests + * + * @param object[]|null $overlapping_requests Other existing time off requests whose date ranges overlap this request. Only present when overlap data was loaded with the request. + * + * @return self + */ + public function setOverlappingRequests($overlapping_requests) { + if (is_null($overlapping_requests)) { + throw new \InvalidArgumentException('non-nullable overlapping_requests cannot be null'); + } + $this->container['overlapping_requests'] = $overlapping_requests; + + return $this; + } + + /** + * Gets policy_type + * + * @return string|null + */ + public function getPolicyType() { + return $this->container['policy_type']; + } + + /** + * Sets policy_type + * + * @param string|null $policy_type The policy type backing this request (e.g. accruing, manual, unlimited). + * + * @return self + */ + public function setPolicyType($policy_type) { + if (is_null($policy_type)) { + throw new \InvalidArgumentException('non-nullable policy_type cannot be null'); + } + $this->container['policy_type'] = $policy_type; + + return $this; + } + + /** + * Gets used_year_to_date + * + * @return float|null + */ + public function getUsedYearToDate() { + return $this->container['used_year_to_date']; + } + + /** + * Sets used_year_to_date + * + * @param float|null $used_year_to_date used_year_to_date + * + * @return self + */ + public function setUsedYearToDate($used_year_to_date) { + if (is_null($used_year_to_date)) { + $this->openApiNullablesSetToNull['used_year_to_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['used_year_to_date'])) { + unset($nullablesSetToNull['used_year_to_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['used_year_to_date'] = $used_year_to_date; + + return $this; + } + + /** + * Gets balance_on_date_of_request + * + * @return float|null + */ + public function getBalanceOnDateOfRequest() { + return $this->container['balance_on_date_of_request']; + } + + /** + * Sets balance_on_date_of_request + * + * @param float|null $balance_on_date_of_request balance_on_date_of_request + * + * @return self + */ + public function setBalanceOnDateOfRequest($balance_on_date_of_request) { + if (is_null($balance_on_date_of_request)) { + $this->openApiNullablesSetToNull['balance_on_date_of_request'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['balance_on_date_of_request'])) { + unset($nullablesSetToNull['balance_on_date_of_request']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['balance_on_date_of_request'] = $balance_on_date_of_request; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DataRequestAggregationsInner.php b/lib/Model/CreatedTimeOffRequestAmount.php similarity index 78% rename from lib/Model/DataRequestAggregationsInner.php rename to lib/Model/CreatedTimeOffRequestAmount.php index 6fa24351..cee8cc66 100644 --- a/lib/Model/DataRequestAggregationsInner.php +++ b/lib/Model/CreatedTimeOffRequestAmount.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * DataRequestAggregationsInner + * CreatedTimeOffRequestAmount * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * DataRequestAggregationsInner Class Doc Comment + * CreatedTimeOffRequestAmount Class Doc Comment * * @category Class + * @description The amount of time off requested. Only present when the underlying time off type record could be loaded. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class DataRequestAggregationsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class CreatedTimeOffRequestAmount implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class DataRequestAggregationsInner implements ModelInterface, ArrayAccess, \Json * * @var string */ - protected static $openApiModelName = 'DataRequest_aggregations_inner'; + protected static $openApiModelName = 'CreatedTimeOffRequest_amount'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,8 +58,8 @@ class DataRequestAggregationsInner implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openApiTypes = [ - 'field' => 'string', - 'aggregation' => 'string' + 'unit' => 'string', + 'amount' => 'float' ]; /** @@ -69,8 +70,8 @@ class DataRequestAggregationsInner implements ModelInterface, ArrayAccess, \Json * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'field' => null, - 'aggregation' => null + 'unit' => null, + 'amount' => null ]; /** @@ -80,8 +81,8 @@ class DataRequestAggregationsInner implements ModelInterface, ArrayAccess, \Json * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'field' => false, - 'aggregation' => false + 'unit' => false, + 'amount' => false ]; /** @@ -166,8 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'field' => 'field', - 'aggregation' => 'aggregation' + 'unit' => 'unit', + 'amount' => 'amount' ]; /** @@ -176,8 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'field' => 'setField', - 'aggregation' => 'setAggregation' + 'unit' => 'setUnit', + 'amount' => 'setAmount' ]; /** @@ -186,8 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'field' => 'getField', - 'aggregation' => 'getAggregation' + 'unit' => 'getUnit', + 'amount' => 'getAmount' ]; /** @@ -227,24 +228,18 @@ public function getModelName() { return self::$openApiModelName; } - public const AGGREGATION_COUNT = 'count'; - public const AGGREGATION_SUM = 'sum'; - public const AGGREGATION_AVG = 'avg'; - public const AGGREGATION_MIN = 'min'; - public const AGGREGATION_MAX = 'max'; + public const UNIT_HOURS = 'hours'; + public const UNIT_DAYS = 'days'; /** * Gets allowable values of the enum * * @return string[] */ - public function getAggregationAllowableValues() { + public function getUnitAllowableValues() { return [ - self::AGGREGATION_COUNT, - self::AGGREGATION_SUM, - self::AGGREGATION_AVG, - self::AGGREGATION_MIN, - self::AGGREGATION_MAX, + self::UNIT_HOURS, + self::UNIT_DAYS, ]; } @@ -262,8 +257,8 @@ public function getAggregationAllowableValues() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('field', $data ?? [], null); - $this->setIfExists('aggregation', $data ?? [], null); + $this->setIfExists('unit', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); } /** @@ -291,11 +286,11 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getAggregationAllowableValues(); - if (!is_null($this->container['aggregation']) && !in_array($this->container['aggregation'], $allowedValues, true)) { + $allowedValues = $this->getUnitAllowableValues(); + if (!is_null($this->container['unit']) && !in_array($this->container['unit'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'aggregation', must be one of '%s'", - $this->container['aggregation'], + "invalid value '%s' for 'unit', must be one of '%s'", + $this->container['unit'], implode("', '", $allowedValues) ); } @@ -314,61 +309,61 @@ public function valid() { } /** - * Gets field + * Gets unit * * @return string|null */ - public function getField() { - return $this->container['field']; + public function getUnit() { + return $this->container['unit']; } /** - * Sets field + * Sets unit * - * @param string|null $field field + * @param string|null $unit The unit of measurement. * * @return self */ - public function setField($field) { - if (is_null($field)) { - throw new \InvalidArgumentException('non-nullable field cannot be null'); + public function setUnit($unit) { + if (is_null($unit)) { + throw new \InvalidArgumentException('non-nullable unit cannot be null'); } - $this->container['field'] = $field; + $allowedValues = $this->getUnitAllowableValues(); + if (!in_array($unit, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'unit', must be one of '%s'", + $unit, + implode("', '", $allowedValues) + ) + ); + } + $this->container['unit'] = $unit; return $this; } /** - * Gets aggregation + * Gets amount * - * @return string|null + * @return float|null */ - public function getAggregation() { - return $this->container['aggregation']; + public function getAmount() { + return $this->container['amount']; } /** - * Sets aggregation + * Sets amount * - * @param string|null $aggregation aggregation + * @param float|null $amount The total amount requested. * * @return self */ - public function setAggregation($aggregation) { - if (is_null($aggregation)) { - throw new \InvalidArgumentException('non-nullable aggregation cannot be null'); - } - $allowedValues = $this->getAggregationAllowableValues(); - if (!in_array($aggregation, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'aggregation', must be one of '%s'", - $aggregation, - implode("', '", $allowedValues) - ) - ); + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['aggregation'] = $aggregation; + $this->container['amount'] = $amount; return $this; } diff --git a/lib/Model/CreatedTimeOffRequestNotes.php b/lib/Model/CreatedTimeOffRequestNotes.php new file mode 100644 index 00000000..d33951c7 --- /dev/null +++ b/lib/Model/CreatedTimeOffRequestNotes.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * CreatedTimeOffRequestNotes + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedTimeOffRequestNotes Class Doc Comment + * + * @category Class + * @description Notes from employee and/or manager. The object is always present; the `employee` and `manager` keys are each included only when a non-empty note was provided. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedTimeOffRequestNotes implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedTimeOffRequest_notes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee' => 'string', + 'manager' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee' => null, + 'manager' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee' => false, + 'manager' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee' => 'employee', + 'manager' => 'manager' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee' => 'setEmployee', + 'manager' => 'setManager' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee' => 'getEmployee', + 'manager' => 'getManager' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('manager', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee + * + * @return string|null + */ + public function getEmployee() { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param string|null $employee Note from the employee. + * + * @return self + */ + public function setEmployee($employee) { + if (is_null($employee)) { + throw new \InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + + /** + * Gets manager + * + * @return string|null + */ + public function getManager() { + return $this->container['manager']; + } + + /** + * Sets manager + * + * @param string|null $manager Note from the manager. + * + * @return self + */ + public function setManager($manager) { + if (is_null($manager)) { + throw new \InvalidArgumentException('non-nullable manager cannot be null'); + } + $this->container['manager'] = $manager; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreatedTimeOffRequestStatus.php b/lib/Model/CreatedTimeOffRequestStatus.php new file mode 100644 index 00000000..86438e93 --- /dev/null +++ b/lib/Model/CreatedTimeOffRequestStatus.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * CreatedTimeOffRequestStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedTimeOffRequestStatus Class Doc Comment + * + * @category Class + * @description The current status of the request. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedTimeOffRequestStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedTimeOffRequest_status'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string', + 'last_changed' => 'string', + 'last_changed_by_user_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null, + 'last_changed' => null, + 'last_changed_by_user_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false, + 'last_changed' => false, + 'last_changed_by_user_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'last_changed' => 'lastChanged', + 'last_changed_by_user_id' => 'lastChangedByUserId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'last_changed' => 'setLastChanged', + 'last_changed_by_user_id' => 'setLastChangedByUserId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'last_changed' => 'getLastChanged', + 'last_changed_by_user_id' => 'getLastChangedByUserId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('last_changed', $data ?? [], null); + $this->setIfExists('last_changed_by_user_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status value (e.g. `approved`, `denied`, `requested`). + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets last_changed + * + * @return string|null + */ + public function getLastChanged() { + return $this->container['last_changed']; + } + + /** + * Sets last_changed + * + * @param string|null $last_changed The date and time the status was last changed, formatted as `YYYY-MM-DD HH:MM:SS` in the company timezone. + * + * @return self + */ + public function setLastChanged($last_changed) { + if (is_null($last_changed)) { + throw new \InvalidArgumentException('non-nullable last_changed cannot be null'); + } + $this->container['last_changed'] = $last_changed; + + return $this; + } + + /** + * Gets last_changed_by_user_id + * + * @return int|null + */ + public function getLastChangedByUserId() { + return $this->container['last_changed_by_user_id']; + } + + /** + * Sets last_changed_by_user_id + * + * @param int|null $last_changed_by_user_id The user ID who last changed the status. + * + * @return self + */ + public function setLastChangedByUserId($last_changed_by_user_id) { + if (is_null($last_changed_by_user_id)) { + throw new \InvalidArgumentException('non-nullable last_changed_by_user_id cannot be null'); + } + $this->container['last_changed_by_user_id'] = $last_changed_by_user_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CreatedTimeOffRequestType.php b/lib/Model/CreatedTimeOffRequestType.php new file mode 100644 index 00000000..68def456 --- /dev/null +++ b/lib/Model/CreatedTimeOffRequestType.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * CreatedTimeOffRequestType + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CreatedTimeOffRequestType Class Doc Comment + * + * @category Class + * @description The time off type for this request. Only present when the underlying time off type record could be loaded. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CreatedTimeOffRequestType implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CreatedTimeOffRequest_type'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The time off type ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The time off type name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CurrencyConversionsResponse.php b/lib/Model/CurrencyConversionsResponse.php new file mode 100644 index 00000000..e2b54574 --- /dev/null +++ b/lib/Model/CurrencyConversionsResponse.php @@ -0,0 +1,484 @@ +<?php +declare(strict_types=1); +/** + * CurrencyConversionsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * CurrencyConversionsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class CurrencyConversionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'CurrencyConversionsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'base_currency' => 'string', + 'last_updated' => '\DateTime', + 'next_update' => '\DateTime', + 'rates' => 'array<string,float>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'base_currency' => null, + 'last_updated' => 'date-time', + 'next_update' => 'date-time', + 'rates' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'base_currency' => false, + 'last_updated' => false, + 'next_update' => false, + 'rates' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'base_currency' => 'baseCurrency', + 'last_updated' => 'lastUpdated', + 'next_update' => 'nextUpdate', + 'rates' => 'rates' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'base_currency' => 'setBaseCurrency', + 'last_updated' => 'setLastUpdated', + 'next_update' => 'setNextUpdate', + 'rates' => 'setRates' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'base_currency' => 'getBaseCurrency', + 'last_updated' => 'getLastUpdated', + 'next_update' => 'getNextUpdate', + 'rates' => 'getRates' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('base_currency', $data ?? [], null); + $this->setIfExists('last_updated', $data ?? [], null); + $this->setIfExists('next_update', $data ?? [], null); + $this->setIfExists('rates', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets base_currency + * + * @return string|null + */ + public function getBaseCurrency() { + return $this->container['base_currency']; + } + + /** + * Sets base_currency + * + * @param string|null $base_currency ISO 4217 base currency code + * + * @return self + */ + public function setBaseCurrency($base_currency) { + if (is_null($base_currency)) { + throw new \InvalidArgumentException('non-nullable base_currency cannot be null'); + } + $this->container['base_currency'] = $base_currency; + + return $this; + } + + /** + * Gets last_updated + * + * @return \DateTime|null + */ + public function getLastUpdated() { + return $this->container['last_updated']; + } + + /** + * Sets last_updated + * + * @param \DateTime|null $last_updated ISO 8601 UTC timestamp of the last rate update + * + * @return self + */ + public function setLastUpdated($last_updated) { + if (is_null($last_updated)) { + throw new \InvalidArgumentException('non-nullable last_updated cannot be null'); + } + $this->container['last_updated'] = $last_updated; + + return $this; + } + + /** + * Gets next_update + * + * @return \DateTime|null + */ + public function getNextUpdate() { + return $this->container['next_update']; + } + + /** + * Sets next_update + * + * @param \DateTime|null $next_update ISO 8601 UTC timestamp of the next scheduled rate update + * + * @return self + */ + public function setNextUpdate($next_update) { + if (is_null($next_update)) { + throw new \InvalidArgumentException('non-nullable next_update cannot be null'); + } + $this->container['next_update'] = $next_update; + + return $this; + } + + /** + * Gets rates + * + * @return array<string,float>|null + */ + public function getRates() { + return $this->container['rates']; + } + + /** + * Sets rates + * + * @param array<string,float>|null $rates Map of ISO 4217 currency codes to numeric conversion rates relative to the base currency + * + * @return self + */ + public function setRates($rates) { + if (is_null($rates)) { + throw new \InvalidArgumentException('non-nullable rates cannot be null'); + } + $this->container['rates'] = $rates; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/CursorPagesResponse.php b/lib/Model/CursorPagesResponse.php index 698066fd..b116f661 100644 --- a/lib/Model/CursorPagesResponse.php +++ b/lib/Model/CursorPagesResponse.php @@ -312,7 +312,7 @@ public function getLimit() { /** * Sets limit * - * @param int $limit Maximum number of items per page + * @param int $limit limit * * @return self */ @@ -343,7 +343,7 @@ public function getNextCursor() { /** * Sets next_cursor * - * @param string $next_cursor Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter. + * @param string $next_cursor next_cursor * * @return self */ @@ -374,7 +374,7 @@ public function getPrevCursor() { /** * Sets prev_cursor * - * @param string $prev_cursor Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter. + * @param string $prev_cursor prev_cursor * * @return self */ diff --git a/lib/Model/CursorPaginationQueryObject.php b/lib/Model/CursorPaginationQueryObject.php index 11d919ae..38fa669e 100644 --- a/lib/Model/CursorPaginationQueryObject.php +++ b/lib/Model/CursorPaginationQueryObject.php @@ -277,6 +277,14 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['limit']) && ($this->container['limit'] > 100)) { + $invalidProperties[] = "invalid value for 'limit', must be smaller than or equal to 100."; + } + + if (!is_null($this->container['limit']) && ($this->container['limit'] < 1)) { + $invalidProperties[] = "invalid value for 'limit', must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -302,7 +310,7 @@ public function getBefore() { /** * Sets before * - * @param string|null $before before + * @param string|null $before Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward. * * @return self */ @@ -327,7 +335,7 @@ public function getAfter() { /** * Sets after * - * @param string|null $after after + * @param string|null $after Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward. * * @return self */ @@ -360,6 +368,14 @@ public function setLimit($limit) { if (is_null($limit)) { throw new \InvalidArgumentException('non-nullable limit cannot be null'); } + + if (($limit > 100)) { + throw new \InvalidArgumentException('invalid value for $limit when calling CursorPaginationQueryObject., must be smaller than or equal to 100.'); + } + if (($limit < 1)) { + throw new \InvalidArgumentException('invalid value for $limit when calling CursorPaginationQueryObject., must be bigger than or equal to 1.'); + } + $this->container['limit'] = $limit; return $this; diff --git a/lib/Model/Dacd313af2106213fc4696175941ce65Request.php b/lib/Model/Dacd313af2106213fc4696175941ce65Request.php new file mode 100644 index 00000000..85e30f0f --- /dev/null +++ b/lib/Model/Dacd313af2106213fc4696175941ce65Request.php @@ -0,0 +1,464 @@ +<?php +declare(strict_types=1); +/** + * Dacd313af2106213fc4696175941ce65Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Dacd313af2106213fc4696175941ce65Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Dacd313af2106213fc4696175941ce65Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'dacd313af2106213fc4696175941ce65_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'use_guidelines' => 'bool', + 'soft_min' => 'float', + 'soft_max' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'use_guidelines' => null, + 'soft_min' => null, + 'soft_max' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'use_guidelines' => false, + 'soft_min' => true, + 'soft_max' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'use_guidelines' => 'useGuidelines', + 'soft_min' => 'softMin', + 'soft_max' => 'softMax' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'use_guidelines' => 'setUseGuidelines', + 'soft_min' => 'setSoftMin', + 'soft_max' => 'setSoftMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'use_guidelines' => 'getUseGuidelines', + 'soft_min' => 'getSoftMin', + 'soft_max' => 'getSoftMax' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('use_guidelines', $data ?? [], null); + $this->setIfExists('soft_min', $data ?? [], null); + $this->setIfExists('soft_max', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets use_guidelines + * + * @return bool|null + */ + public function getUseGuidelines() { + return $this->container['use_guidelines']; + } + + /** + * Sets use_guidelines + * + * @param bool|null $use_guidelines use_guidelines + * + * @return self + */ + public function setUseGuidelines($use_guidelines) { + if (is_null($use_guidelines)) { + throw new \InvalidArgumentException('non-nullable use_guidelines cannot be null'); + } + $this->container['use_guidelines'] = $use_guidelines; + + return $this; + } + + /** + * Gets soft_min + * + * @return float|null + */ + public function getSoftMin() { + return $this->container['soft_min']; + } + + /** + * Sets soft_min + * + * @param float|null $soft_min soft_min + * + * @return self + */ + public function setSoftMin($soft_min) { + if (is_null($soft_min)) { + $this->openApiNullablesSetToNull['soft_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_min'])) { + unset($nullablesSetToNull['soft_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_min'] = $soft_min; + + return $this; + } + + /** + * Gets soft_max + * + * @return float|null + */ + public function getSoftMax() { + return $this->container['soft_max']; + } + + /** + * Sets soft_max + * + * @param float|null $soft_max soft_max + * + * @return self + */ + public function setSoftMax($soft_max) { + if (is_null($soft_max)) { + $this->openApiNullablesSetToNull['soft_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['soft_max'])) { + unset($nullablesSetToNull['soft_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['soft_max'] = $soft_max; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DataRequest.php b/lib/Model/DataRequest.php index 8d139a3c..92b84678 100644 --- a/lib/Model/DataRequest.php +++ b/lib/Model/DataRequest.php @@ -58,7 +58,7 @@ class DataRequest implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiTypes = [ 'fields' => 'string[]', - 'aggregations' => '\BhrSdk\Model\DataRequestAggregationsInner[]', + 'aggregations' => '\BhrSdk\Model\DataRequestAggregations', 'sort_by' => '\BhrSdk\Model\DataRequestSortByInner[]', 'filters' => '\BhrSdk\Model\DataRequestFilters', 'group_by' => 'string[]', @@ -326,7 +326,7 @@ public function getFields() { /** * Sets fields * - * @param string[] $fields fields + * @param string[] $fields Field names to include in each returned record. Use \"Get Fields from Dataset\" to discover available names. * * @return self */ @@ -342,7 +342,7 @@ public function setFields($fields) { /** * Gets aggregations * - * @return \BhrSdk\Model\DataRequestAggregationsInner[]|null + * @return \BhrSdk\Model\DataRequestAggregations|null */ public function getAggregations() { return $this->container['aggregations']; @@ -351,7 +351,7 @@ public function getAggregations() { /** * Sets aggregations * - * @param \BhrSdk\Model\DataRequestAggregationsInner[]|null $aggregations aggregations + * @param \BhrSdk\Model\DataRequestAggregations|null $aggregations aggregations * * @return self */ @@ -376,7 +376,7 @@ public function getSortBy() { /** * Sets sort_by * - * @param \BhrSdk\Model\DataRequestSortByInner[]|null $sort_by sort_by + * @param \BhrSdk\Model\DataRequestSortByInner[]|null $sort_by Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field. * * @return self */ @@ -426,7 +426,7 @@ public function getGroupBy() { /** * Sets group_by * - * @param string[]|null $group_by group_by + * @param string[]|null $group_by Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array. * * @return self */ @@ -451,7 +451,7 @@ public function getShowHistory() { /** * Sets show_history * - * @param string[]|null $show_history show_history + * @param string[]|null $show_history Entity names of historical table fields whose history rows should be included. Entity names are returned by \"Get Fields from Dataset\". * * @return self */ diff --git a/lib/Model/DataRequestAggregations.php b/lib/Model/DataRequestAggregations.php new file mode 100644 index 00000000..e657d630 --- /dev/null +++ b/lib/Model/DataRequestAggregations.php @@ -0,0 +1,469 @@ +<?php +declare(strict_types=1); +/** + * DataRequestAggregations + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DataRequestAggregations Class Doc Comment + * + * @category Class + * @description Aggregation configuration. Set `defaultAggregation` to apply one aggregation type to every requested field, or use `overridingAggregations` to target specific fields. Both may be combined. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DataRequestAggregations implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DataRequest_aggregations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'default_aggregation' => 'string', + 'overriding_aggregations' => 'array<string,string>[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'default_aggregation' => null, + 'overriding_aggregations' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'default_aggregation' => true, + 'overriding_aggregations' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'default_aggregation' => 'defaultAggregation', + 'overriding_aggregations' => 'overridingAggregations' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'default_aggregation' => 'setDefaultAggregation', + 'overriding_aggregations' => 'setOverridingAggregations' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'default_aggregation' => 'getDefaultAggregation', + 'overriding_aggregations' => 'getOverridingAggregations' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const DEFAULT_AGGREGATION_COUNT = 'count'; + public const DEFAULT_AGGREGATION_COUNT_UNIQUE = 'count_unique'; + public const DEFAULT_AGGREGATION_SUM = 'sum'; + public const DEFAULT_AGGREGATION_AVG = 'avg'; + public const DEFAULT_AGGREGATION_MIN = 'min'; + public const DEFAULT_AGGREGATION_MAX = 'max'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDefaultAggregationAllowableValues() { + return [ + self::DEFAULT_AGGREGATION_COUNT, + self::DEFAULT_AGGREGATION_COUNT_UNIQUE, + self::DEFAULT_AGGREGATION_SUM, + self::DEFAULT_AGGREGATION_AVG, + self::DEFAULT_AGGREGATION_MIN, + self::DEFAULT_AGGREGATION_MAX, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('default_aggregation', $data ?? [], null); + $this->setIfExists('overriding_aggregations', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getDefaultAggregationAllowableValues(); + if (!is_null($this->container['default_aggregation']) && !in_array($this->container['default_aggregation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'default_aggregation', must be one of '%s'", + $this->container['default_aggregation'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets default_aggregation + * + * @return string|null + */ + public function getDefaultAggregation() { + return $this->container['default_aggregation']; + } + + /** + * Sets default_aggregation + * + * @param string|null $default_aggregation default_aggregation + * + * @return self + */ + public function setDefaultAggregation($default_aggregation) { + if (is_null($default_aggregation)) { + $this->openApiNullablesSetToNull['default_aggregation'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['default_aggregation'])) { + unset($nullablesSetToNull['default_aggregation']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getDefaultAggregationAllowableValues(); + if (!is_null($default_aggregation) && !in_array($default_aggregation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'default_aggregation', must be one of '%s'", + $default_aggregation, + implode("', '", $allowedValues) + ) + ); + } + $this->container['default_aggregation'] = $default_aggregation; + + return $this; + } + + /** + * Gets overriding_aggregations + * + * @return array<string,string>[]|null + */ + public function getOverridingAggregations() { + return $this->container['overriding_aggregations']; + } + + /** + * Sets overriding_aggregations + * + * @param array<string,string>[]|null $overriding_aggregations Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type. + * + * @return self + */ + public function setOverridingAggregations($overriding_aggregations) { + if (is_null($overriding_aggregations)) { + throw new \InvalidArgumentException('non-nullable overriding_aggregations cannot be null'); + } + $this->container['overriding_aggregations'] = $overriding_aggregations; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DataRequestFilters.php b/lib/Model/DataRequestFilters.php index 8f3542a2..5ef59f10 100644 --- a/lib/Model/DataRequestFilters.php +++ b/lib/Model/DataRequestFilters.php @@ -36,6 +36,7 @@ * DataRequestFilters Class Doc Comment * * @category Class + * @description Filter configuration. Combine multiple conditions with a `match` strategy. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -227,6 +228,21 @@ public function getModelName() { return self::$openApiModelName; } + public const MATCH_ALL = 'all'; + public const MATCH_ANY = 'any'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMatchAllowableValues() { + return [ + self::MATCH_ALL, + self::MATCH_ANY, + ]; + } + /** * Associative array for storing property values * @@ -270,6 +286,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getMatchAllowableValues(); + if (!is_null($this->container['match']) && !in_array($this->container['match'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'match', must be one of '%s'", + $this->container['match'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -295,7 +320,7 @@ public function getMatch() { /** * Sets match * - * @param string|null $match match + * @param string|null $match Logical operator for combining filters: `all` (AND) or `any` (OR). * * @return self */ @@ -303,6 +328,16 @@ public function setMatch($match) { if (is_null($match)) { throw new \InvalidArgumentException('non-nullable match cannot be null'); } + $allowedValues = $this->getMatchAllowableValues(); + if (!in_array($match, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'match', must be one of '%s'", + $match, + implode("', '", $allowedValues) + ) + ); + } $this->container['match'] = $match; return $this; @@ -320,7 +355,7 @@ public function getFilters() { /** * Sets filters * - * @param \BhrSdk\Model\DataRequestFiltersFiltersInner[]|null $filters filters + * @param \BhrSdk\Model\DataRequestFiltersFiltersInner[]|null $filters Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array. * * @return self */ diff --git a/lib/Model/DataRequestFiltersFiltersInner.php b/lib/Model/DataRequestFiltersFiltersInner.php index 810bc0a1..6e2f2547 100644 --- a/lib/Model/DataRequestFiltersFiltersInner.php +++ b/lib/Model/DataRequestFiltersFiltersInner.php @@ -356,7 +356,7 @@ public function getField() { /** * Sets field * - * @param string|null $field field + * @param string|null $field Field name to filter on. * * @return self */ @@ -381,7 +381,7 @@ public function getOperator() { /** * Sets operator * - * @param string|null $operator operator + * @param string|null $operator Comparison operator. Available operators depend on field type (see endpoint description). * * @return self */ diff --git a/lib/Model/DataRequestSortByInner.php b/lib/Model/DataRequestSortByInner.php index 0788d390..dcb2af5f 100644 --- a/lib/Model/DataRequestSortByInner.php +++ b/lib/Model/DataRequestSortByInner.php @@ -58,7 +58,8 @@ class DataRequestSortByInner implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openApiTypes = [ 'field' => 'string', - 'sort' => 'string' + 'sort' => 'string', + 'aggregation_type' => 'string' ]; /** @@ -70,7 +71,8 @@ class DataRequestSortByInner implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openApiFormats = [ 'field' => null, - 'sort' => null + 'sort' => null, + 'aggregation_type' => null ]; /** @@ -81,7 +83,8 @@ class DataRequestSortByInner implements ModelInterface, ArrayAccess, \JsonSerial */ protected static array $openApiNullables = [ 'field' => false, - 'sort' => false + 'sort' => false, + 'aggregation_type' => false ]; /** @@ -167,7 +170,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'field' => 'field', - 'sort' => 'sort' + 'sort' => 'sort', + 'aggregation_type' => 'aggregationType' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'field' => 'setField', - 'sort' => 'setSort' + 'sort' => 'setSort', + 'aggregation_type' => 'setAggregationType' ]; /** @@ -187,7 +192,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'field' => 'getField', - 'sort' => 'getSort' + 'sort' => 'getSort', + 'aggregation_type' => 'getAggregationType' ]; /** @@ -229,6 +235,12 @@ public function getModelName() { public const SORT_ASC = 'asc'; public const SORT_DESC = 'desc'; + public const AGGREGATION_TYPE_COUNT = 'count'; + public const AGGREGATION_TYPE_COUNT_UNIQUE = 'count_unique'; + public const AGGREGATION_TYPE_SUM = 'sum'; + public const AGGREGATION_TYPE_AVG = 'avg'; + public const AGGREGATION_TYPE_MIN = 'min'; + public const AGGREGATION_TYPE_MAX = 'max'; /** * Gets allowable values of the enum @@ -242,6 +254,22 @@ public function getSortAllowableValues() { ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAggregationTypeAllowableValues() { + return [ + self::AGGREGATION_TYPE_COUNT, + self::AGGREGATION_TYPE_COUNT_UNIQUE, + self::AGGREGATION_TYPE_SUM, + self::AGGREGATION_TYPE_AVG, + self::AGGREGATION_TYPE_MIN, + self::AGGREGATION_TYPE_MAX, + ]; + } + /** * Associative array for storing property values * @@ -258,6 +286,7 @@ public function getSortAllowableValues() { public function __construct(?array $data = null) { $this->setIfExists('field', $data ?? [], null); $this->setIfExists('sort', $data ?? [], null); + $this->setIfExists('aggregation_type', $data ?? [], null); } /** @@ -294,6 +323,15 @@ public function listInvalidProperties() { ); } + $allowedValues = $this->getAggregationTypeAllowableValues(); + if (!is_null($this->container['aggregation_type']) && !in_array($this->container['aggregation_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'aggregation_type', must be one of '%s'", + $this->container['aggregation_type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -319,7 +357,7 @@ public function getField() { /** * Sets field * - * @param string|null $field field + * @param string|null $field Field name to sort by. * * @return self */ @@ -344,7 +382,7 @@ public function getSort() { /** * Sets sort * - * @param string|null $sort sort + * @param string|null $sort Sort direction. * * @return self */ @@ -366,6 +404,41 @@ public function setSort($sort) { return $this; } + + /** + * Gets aggregation_type + * + * @return string|null + */ + public function getAggregationType() { + return $this->container['aggregation_type']; + } + + /** + * Sets aggregation_type + * + * @param string|null $aggregation_type Optional. Use when sorting by an aggregated value; must match the requested aggregation for this field. + * + * @return self + */ + public function setAggregationType($aggregation_type) { + if (is_null($aggregation_type)) { + throw new \InvalidArgumentException('non-nullable aggregation_type cannot be null'); + } + $allowedValues = $this->getAggregationTypeAllowableValues(); + if (!in_array($aggregation_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'aggregation_type', must be one of '%s'", + $aggregation_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['aggregation_type'] = $aggregation_type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/DatasetDataResponseV2.php b/lib/Model/DatasetDataResponseV2.php new file mode 100644 index 00000000..96e9a458 --- /dev/null +++ b/lib/Model/DatasetDataResponseV2.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * DatasetDataResponseV2 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DatasetDataResponseV2 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DatasetDataResponseV2 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DatasetDataResponseV2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\DatasetDataResponseV2DataInner[]', + 'links' => '\BhrSdk\Model\DatasetDataResponseV2Links', + 'meta' => '\BhrSdk\Model\DatasetDataResponseV2Meta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'links' => null, + 'meta' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'links' => false, + 'meta' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'links' => 'links', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'links' => 'setLinks', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'links' => 'getLinks', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('meta', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\DatasetDataResponseV2DataInner[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\DatasetDataResponseV2DataInner[]|null $data Array of record objects. Each object contains a `fields` object whose keys are the requested field names. Values may be strings, numbers, booleans, arrays/objects, or null depending on the dataset field and value. + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets links + * + * @return \BhrSdk\Model\DatasetDataResponseV2Links|null + */ + public function getLinks() { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \BhrSdk\Model\DatasetDataResponseV2Links|null $links links + * + * @return self + */ + public function setLinks($links) { + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\DatasetDataResponseV2Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\DatasetDataResponseV2Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/FieldList.php b/lib/Model/DatasetDataResponseV2DataInner.php similarity index 93% rename from lib/Model/FieldList.php rename to lib/Model/DatasetDataResponseV2DataInner.php index 8952ae2b..3c2b88b3 100644 --- a/lib/Model/FieldList.php +++ b/lib/Model/DatasetDataResponseV2DataInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * FieldList + * DatasetDataResponseV2DataInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * FieldList Class Doc Comment + * DatasetDataResponseV2DataInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class FieldList implements ModelInterface, ArrayAccess, \JsonSerializable { +class DatasetDataResponseV2DataInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class FieldList implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'FieldList'; + protected static $openApiModelName = 'DatasetDataResponseV2_data_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class FieldList implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'fields' => '\BhrSdk\Model\FieldListFieldsInner[]' + 'fields' => 'array<string,\BhrSdk\Model\DatasetDataResponseV2DataInnerFieldsValue>' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets fields * - * @return \BhrSdk\Model\FieldListFieldsInner[]|null + * @return array<string,\BhrSdk\Model\DatasetDataResponseV2DataInnerFieldsValue>|null */ public function getFields() { return $this->container['fields']; @@ -288,7 +288,7 @@ public function getFields() { /** * Sets fields * - * @param \BhrSdk\Model\FieldListFieldsInner[]|null $fields fields + * @param array<string,\BhrSdk\Model\DatasetDataResponseV2DataInnerFieldsValue>|null $fields fields * * @return self */ diff --git a/lib/Model/DatasetDataResponseV2DataInnerFieldsValue.php b/lib/Model/DatasetDataResponseV2DataInnerFieldsValue.php new file mode 100644 index 00000000..828f117c --- /dev/null +++ b/lib/Model/DatasetDataResponseV2DataInnerFieldsValue.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * DatasetDataResponseV2DataInnerFieldsValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DatasetDataResponseV2DataInnerFieldsValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DatasetDataResponseV2DataInnerFieldsValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DatasetDataResponseV2_data_inner_fields_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DatasetDataResponseV2Links.php b/lib/Model/DatasetDataResponseV2Links.php new file mode 100644 index 00000000..12d2d27b --- /dev/null +++ b/lib/Model/DatasetDataResponseV2Links.php @@ -0,0 +1,433 @@ +<?php +declare(strict_types=1); +/** + * DatasetDataResponseV2Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DatasetDataResponseV2Links Class Doc Comment + * + * @category Class + * @description Pagination navigation links. Contains `next` and/or `prev` URLs when applicable. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DatasetDataResponseV2Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DatasetDataResponseV2_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'next' => 'string', + 'prev' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'next' => null, + 'prev' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'next' => true, + 'prev' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'next' => 'next', + 'prev' => 'prev' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'next' => 'setNext', + 'prev' => 'setPrev' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'next' => 'getNext', + 'prev' => 'getPrev' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('next', $data ?? [], null); + $this->setIfExists('prev', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets next + * + * @return string|null + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param string|null $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + $this->openApiNullablesSetToNull['next'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['next'])) { + unset($nullablesSetToNull['next']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next'] = $next; + + return $this; + } + + /** + * Gets prev + * + * @return string|null + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param string|null $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + $this->openApiNullablesSetToNull['prev'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['prev'])) { + unset($nullablesSetToNull['prev']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['prev'] = $prev; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DatasetDataResponseV2Meta.php b/lib/Model/DatasetDataResponseV2Meta.php new file mode 100644 index 00000000..4cdbc083 --- /dev/null +++ b/lib/Model/DatasetDataResponseV2Meta.php @@ -0,0 +1,509 @@ +<?php +declare(strict_types=1); +/** + * DatasetDataResponseV2Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DatasetDataResponseV2Meta Class Doc Comment + * + * @category Class + * @description Pagination metadata. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DatasetDataResponseV2Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DatasetDataResponseV2_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'page' => 'int', + 'page_size' => 'int', + 'total_pages' => 'int', + 'total_items' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'page' => null, + 'page_size' => null, + 'total_pages' => null, + 'total_items' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'page' => true, + 'page_size' => true, + 'total_pages' => true, + 'total_items' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'page' => 'page', + 'page_size' => 'pageSize', + 'total_pages' => 'totalPages', + 'total_items' => 'totalItems' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'page' => 'setPage', + 'page_size' => 'setPageSize', + 'total_pages' => 'setTotalPages', + 'total_items' => 'setTotalItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'page' => 'getPage', + 'page_size' => 'getPageSize', + 'total_pages' => 'getTotalPages', + 'total_items' => 'getTotalItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_pages', $data ?? [], null); + $this->setIfExists('total_items', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page page + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + $this->openApiNullablesSetToNull['page'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['page'])) { + unset($nullablesSetToNull['page']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size page_size + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + $this->openApiNullablesSetToNull['page_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['page_size'])) { + unset($nullablesSetToNull['page_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_pages + * + * @return int|null + */ + public function getTotalPages() { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int|null $total_pages total_pages + * + * @return self + */ + public function setTotalPages($total_pages) { + if (is_null($total_pages)) { + $this->openApiNullablesSetToNull['total_pages'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['total_pages'])) { + unset($nullablesSetToNull['total_pages']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['total_pages'] = $total_pages; + + return $this; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items total_items + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + $this->openApiNullablesSetToNull['total_items'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['total_items'])) { + unset($nullablesSetToNull['total_items']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['total_items'] = $total_items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DatasetFieldsResponse.php b/lib/Model/DatasetFieldsResponse.php index 75773c22..3a90000f 100644 --- a/lib/Model/DatasetFieldsResponse.php +++ b/lib/Model/DatasetFieldsResponse.php @@ -334,7 +334,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Machine-readable dataset identifier matching the requested datasetName. * * @return self */ @@ -359,7 +359,7 @@ public function getLabel() { /** * Sets label * - * @param string|null $label label + * @param string|null $label Human-readable display name for the dataset. * * @return self */ @@ -384,7 +384,7 @@ public function getFields() { /** * Sets fields * - * @param \BhrSdk\Model\Field[]|null $fields fields + * @param \BhrSdk\Model\Field[]|null $fields Paginated array of field descriptors for this dataset. * * @return self */ diff --git a/lib/Model/DatasetResponse.php b/lib/Model/DatasetResponseV1.php similarity index 95% rename from lib/Model/DatasetResponse.php rename to lib/Model/DatasetResponseV1.php index 1b732f75..35626a4f 100644 --- a/lib/Model/DatasetResponse.php +++ b/lib/Model/DatasetResponseV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * DatasetResponse + * DatasetResponseV1 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * DatasetResponse Class Doc Comment + * DatasetResponseV1 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class DatasetResponse implements ModelInterface, ArrayAccess, \JsonSerializable { +class DatasetResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class DatasetResponse implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openApiModelName = 'DatasetResponse'; + protected static $openApiModelName = 'DatasetResponseV1'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class DatasetResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openApiTypes = [ - 'datasets' => '\BhrSdk\Model\Dataset[]' + 'datasets' => '\BhrSdk\Model\DatasetV1[]' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets datasets * - * @return \BhrSdk\Model\Dataset[]|null + * @return \BhrSdk\Model\DatasetV1[]|null */ public function getDatasets() { return $this->container['datasets']; @@ -288,7 +288,7 @@ public function getDatasets() { /** * Sets datasets * - * @param \BhrSdk\Model\Dataset[]|null $datasets datasets + * @param \BhrSdk\Model\DatasetV1[]|null $datasets Array of available datasets. * * @return self */ diff --git a/lib/Model/Dataset.php b/lib/Model/DatasetV1.php similarity index 95% rename from lib/Model/Dataset.php rename to lib/Model/DatasetV1.php index 956cbea7..e7ab90e7 100644 --- a/lib/Model/Dataset.php +++ b/lib/Model/DatasetV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * Dataset + * DatasetV1 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * Dataset Class Doc Comment + * DatasetV1 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class Dataset implements ModelInterface, ArrayAccess, \JsonSerializable { +class DatasetV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class Dataset implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'Dataset'; + protected static $openApiModelName = 'DatasetV1'; /** * Array of property to type mappings. Used for (de)serialization @@ -295,7 +295,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints. * * @return self */ @@ -320,7 +320,7 @@ public function getLabel() { /** * Sets label * - * @param string|null $label label + * @param string|null $label Human-readable display name for the dataset. * * @return self */ diff --git a/lib/Model/LocationsList.php b/lib/Model/DatasetsResponseV12.php similarity index 89% rename from lib/Model/LocationsList.php rename to lib/Model/DatasetsResponseV12.php index 848ece43..f08d7f1d 100644 --- a/lib/Model/LocationsList.php +++ b/lib/Model/DatasetsResponseV12.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * LocationsList + * DatasetsResponseV12 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * LocationsList Class Doc Comment + * DatasetsResponseV12 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class LocationsList implements ModelInterface, ArrayAccess, \JsonSerializable { +class DatasetsResponseV12 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class LocationsList implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'LocationsList'; + protected static $openApiModelName = 'Datasets_Response__v1_2_'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class LocationsList implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'location' => '\BhrSdk\Model\Location' + 'datasets' => '\BhrSdk\Model\DatasetsResponseV12DatasetsInner[]' ]; /** @@ -68,7 +68,7 @@ class LocationsList implements ModelInterface, ArrayAccess, \JsonSerializable { * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'location' => null + 'datasets' => null ]; /** @@ -78,7 +78,7 @@ class LocationsList implements ModelInterface, ArrayAccess, \JsonSerializable { * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'location' => false + 'datasets' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'location' => 'location' + 'datasets' => 'datasets' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'location' => 'setLocation' + 'datasets' => 'setDatasets' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'location' => 'getLocation' + 'datasets' => 'getDatasets' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('datasets', $data ?? [], null); } /** @@ -277,26 +277,26 @@ public function valid() { } /** - * Gets location + * Gets datasets * - * @return \BhrSdk\Model\Location|null + * @return \BhrSdk\Model\DatasetsResponseV12DatasetsInner[]|null */ - public function getLocation() { - return $this->container['location']; + public function getDatasets() { + return $this->container['datasets']; } /** - * Sets location + * Sets datasets * - * @param \BhrSdk\Model\Location|null $location location + * @param \BhrSdk\Model\DatasetsResponseV12DatasetsInner[]|null $datasets Array of available datasets * * @return self */ - public function setLocation($location) { - if (is_null($location)) { - throw new \InvalidArgumentException('non-nullable location cannot be null'); + public function setDatasets($datasets) { + if (is_null($datasets)) { + throw new \InvalidArgumentException('non-nullable datasets cannot be null'); } - $this->container['location'] = $location; + $this->container['datasets'] = $datasets; return $this; } diff --git a/lib/Model/DatasetsResponseV12DatasetsInner.php b/lib/Model/DatasetsResponseV12DatasetsInner.php new file mode 100644 index 00000000..0f2b658d --- /dev/null +++ b/lib/Model/DatasetsResponseV12DatasetsInner.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * DatasetsResponseV12DatasetsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DatasetsResponseV12DatasetsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DatasetsResponseV12DatasetsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Datasets_Response__v1_2__datasets_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Human-readable display name for the dataset. + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DeleteCompensationBenchmarkSourceRequest.php b/lib/Model/DeleteCompensationBenchmarkSourceRequest.php new file mode 100644 index 00000000..2b3384b4 --- /dev/null +++ b/lib/Model/DeleteCompensationBenchmarkSourceRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * DeleteCompensationBenchmarkSourceRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DeleteCompensationBenchmarkSourceRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DeleteCompensationBenchmarkSourceRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DeleteCompensationBenchmarkSourceRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the benchmark source to delete. Must be non-empty. + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DeleteCompensationBenchmarkSourceResponse.php b/lib/Model/DeleteCompensationBenchmarkSourceResponse.php new file mode 100644 index 00000000..34ae8f59 --- /dev/null +++ b/lib/Model/DeleteCompensationBenchmarkSourceResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * DeleteCompensationBenchmarkSourceResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DeleteCompensationBenchmarkSourceResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DeleteCompensationBenchmarkSourceResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DeleteCompensationBenchmarkSourceResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'result' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'result' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('result', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets result + * + * @return string|null + */ + public function getResult() { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result result + * + * @return self + */ + public function setResult($result) { + if (is_null($result)) { + $this->openApiNullablesSetToNull['result'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['result'])) { + unset($nullablesSetToNull['result']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['result'] = $result; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/DetailsAndCurrencyRequestDataObject.php b/lib/Model/DetailsAndCurrencyRequestDataObject.php new file mode 100644 index 00000000..f4285c1d --- /dev/null +++ b/lib/Model/DetailsAndCurrencyRequestDataObject.php @@ -0,0 +1,779 @@ +<?php +declare(strict_types=1); +/** + * DetailsAndCurrencyRequestDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * DetailsAndCurrencyRequestDataObject Class Doc Comment + * + * @category Class + * @description Request data for updating compensation planning cycle details and currency settings. Pre-condition: User must have permission to update cycle. Post-condition: Cycle configuration is updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class DetailsAndCurrencyRequestDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'DetailsAndCurrencyRequestDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'cycle_name' => 'string', + 'cycle_currency' => 'string', + 'cycle_window_start_ymd' => '\DateTime', + 'cycle_window_end_ymd' => '\DateTime', + 'recommendations_due_ymd' => '\DateTime', + 'approvals_due_ymd' => '\DateTime', + 'cycle_effective_date' => '\DateTime', + 'salary_included' => 'bool', + 'bonus_included' => 'bool', + 'equity_included' => 'bool', + 'cycle_currency_conversion_rates' => '\BhrSdk\Model\ConversionRateDataObject[]', + 'paycheck_date_ymd' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'cycle_name' => null, + 'cycle_currency' => null, + 'cycle_window_start_ymd' => 'date', + 'cycle_window_end_ymd' => 'date', + 'recommendations_due_ymd' => 'date', + 'approvals_due_ymd' => 'date', + 'cycle_effective_date' => 'date', + 'salary_included' => null, + 'bonus_included' => null, + 'equity_included' => null, + 'cycle_currency_conversion_rates' => null, + 'paycheck_date_ymd' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'cycle_name' => false, + 'cycle_currency' => true, + 'cycle_window_start_ymd' => false, + 'cycle_window_end_ymd' => false, + 'recommendations_due_ymd' => false, + 'approvals_due_ymd' => false, + 'cycle_effective_date' => false, + 'salary_included' => false, + 'bonus_included' => false, + 'equity_included' => false, + 'cycle_currency_conversion_rates' => false, + 'paycheck_date_ymd' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'cycle_name' => 'cycleName', + 'cycle_currency' => 'cycleCurrency', + 'cycle_window_start_ymd' => 'cycleWindowStartYmd', + 'cycle_window_end_ymd' => 'cycleWindowEndYmd', + 'recommendations_due_ymd' => 'recommendationsDueYmd', + 'approvals_due_ymd' => 'approvalsDueYmd', + 'cycle_effective_date' => 'cycleEffectiveDate', + 'salary_included' => 'salaryIncluded', + 'bonus_included' => 'bonusIncluded', + 'equity_included' => 'equityIncluded', + 'cycle_currency_conversion_rates' => 'cycleCurrencyConversionRates', + 'paycheck_date_ymd' => 'paycheckDateYmd' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'cycle_name' => 'setCycleName', + 'cycle_currency' => 'setCycleCurrency', + 'cycle_window_start_ymd' => 'setCycleWindowStartYmd', + 'cycle_window_end_ymd' => 'setCycleWindowEndYmd', + 'recommendations_due_ymd' => 'setRecommendationsDueYmd', + 'approvals_due_ymd' => 'setApprovalsDueYmd', + 'cycle_effective_date' => 'setCycleEffectiveDate', + 'salary_included' => 'setSalaryIncluded', + 'bonus_included' => 'setBonusIncluded', + 'equity_included' => 'setEquityIncluded', + 'cycle_currency_conversion_rates' => 'setCycleCurrencyConversionRates', + 'paycheck_date_ymd' => 'setPaycheckDateYmd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'cycle_name' => 'getCycleName', + 'cycle_currency' => 'getCycleCurrency', + 'cycle_window_start_ymd' => 'getCycleWindowStartYmd', + 'cycle_window_end_ymd' => 'getCycleWindowEndYmd', + 'recommendations_due_ymd' => 'getRecommendationsDueYmd', + 'approvals_due_ymd' => 'getApprovalsDueYmd', + 'cycle_effective_date' => 'getCycleEffectiveDate', + 'salary_included' => 'getSalaryIncluded', + 'bonus_included' => 'getBonusIncluded', + 'equity_included' => 'getEquityIncluded', + 'cycle_currency_conversion_rates' => 'getCycleCurrencyConversionRates', + 'paycheck_date_ymd' => 'getPaycheckDateYmd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('cycle_name', $data ?? [], null); + $this->setIfExists('cycle_currency', $data ?? [], null); + $this->setIfExists('cycle_window_start_ymd', $data ?? [], null); + $this->setIfExists('cycle_window_end_ymd', $data ?? [], null); + $this->setIfExists('recommendations_due_ymd', $data ?? [], null); + $this->setIfExists('approvals_due_ymd', $data ?? [], null); + $this->setIfExists('cycle_effective_date', $data ?? [], null); + $this->setIfExists('salary_included', $data ?? [], null); + $this->setIfExists('bonus_included', $data ?? [], null); + $this->setIfExists('equity_included', $data ?? [], null); + $this->setIfExists('cycle_currency_conversion_rates', $data ?? [], null); + $this->setIfExists('paycheck_date_ymd', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id ID of the cycle to update + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets cycle_name + * + * @return string|null + */ + public function getCycleName() { + return $this->container['cycle_name']; + } + + /** + * Sets cycle_name + * + * @param string|null $cycle_name Name of the cycle to update + * + * @return self + */ + public function setCycleName($cycle_name) { + if (is_null($cycle_name)) { + throw new \InvalidArgumentException('non-nullable cycle_name cannot be null'); + } + $this->container['cycle_name'] = $cycle_name; + + return $this; + } + + /** + * Gets cycle_currency + * + * @return string|null + */ + public function getCycleCurrency() { + return $this->container['cycle_currency']; + } + + /** + * Sets cycle_currency + * + * @param string|null $cycle_currency cycle_currency + * + * @return self + */ + public function setCycleCurrency($cycle_currency) { + if (is_null($cycle_currency)) { + $this->openApiNullablesSetToNull['cycle_currency'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['cycle_currency'])) { + unset($nullablesSetToNull['cycle_currency']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cycle_currency'] = $cycle_currency; + + return $this; + } + + /** + * Gets cycle_window_start_ymd + * + * @return \DateTime|null + */ + public function getCycleWindowStartYmd() { + return $this->container['cycle_window_start_ymd']; + } + + /** + * Sets cycle_window_start_ymd + * + * @param \DateTime|null $cycle_window_start_ymd Start date of the cycle window + * + * @return self + */ + public function setCycleWindowStartYmd($cycle_window_start_ymd) { + if (is_null($cycle_window_start_ymd)) { + throw new \InvalidArgumentException('non-nullable cycle_window_start_ymd cannot be null'); + } + $this->container['cycle_window_start_ymd'] = $cycle_window_start_ymd; + + return $this; + } + + /** + * Gets cycle_window_end_ymd + * + * @return \DateTime|null + */ + public function getCycleWindowEndYmd() { + return $this->container['cycle_window_end_ymd']; + } + + /** + * Sets cycle_window_end_ymd + * + * @param \DateTime|null $cycle_window_end_ymd End date of the cycle window + * + * @return self + */ + public function setCycleWindowEndYmd($cycle_window_end_ymd) { + if (is_null($cycle_window_end_ymd)) { + throw new \InvalidArgumentException('non-nullable cycle_window_end_ymd cannot be null'); + } + $this->container['cycle_window_end_ymd'] = $cycle_window_end_ymd; + + return $this; + } + + /** + * Gets recommendations_due_ymd + * + * @return \DateTime|null + */ + public function getRecommendationsDueYmd() { + return $this->container['recommendations_due_ymd']; + } + + /** + * Sets recommendations_due_ymd + * + * @param \DateTime|null $recommendations_due_ymd Date when recommendations are due + * + * @return self + */ + public function setRecommendationsDueYmd($recommendations_due_ymd) { + if (is_null($recommendations_due_ymd)) { + throw new \InvalidArgumentException('non-nullable recommendations_due_ymd cannot be null'); + } + $this->container['recommendations_due_ymd'] = $recommendations_due_ymd; + + return $this; + } + + /** + * Gets approvals_due_ymd + * + * @return \DateTime|null + */ + public function getApprovalsDueYmd() { + return $this->container['approvals_due_ymd']; + } + + /** + * Sets approvals_due_ymd + * + * @param \DateTime|null $approvals_due_ymd Date when approvals are due + * + * @return self + */ + public function setApprovalsDueYmd($approvals_due_ymd) { + if (is_null($approvals_due_ymd)) { + throw new \InvalidArgumentException('non-nullable approvals_due_ymd cannot be null'); + } + $this->container['approvals_due_ymd'] = $approvals_due_ymd; + + return $this; + } + + /** + * Gets cycle_effective_date + * + * @return \DateTime|null + */ + public function getCycleEffectiveDate() { + return $this->container['cycle_effective_date']; + } + + /** + * Sets cycle_effective_date + * + * @param \DateTime|null $cycle_effective_date Effective date of the cycle + * + * @return self + */ + public function setCycleEffectiveDate($cycle_effective_date) { + if (is_null($cycle_effective_date)) { + throw new \InvalidArgumentException('non-nullable cycle_effective_date cannot be null'); + } + $this->container['cycle_effective_date'] = $cycle_effective_date; + + return $this; + } + + /** + * Gets salary_included + * + * @return bool|null + */ + public function getSalaryIncluded() { + return $this->container['salary_included']; + } + + /** + * Sets salary_included + * + * @param bool|null $salary_included Whether salary is included in this cycle + * + * @return self + */ + public function setSalaryIncluded($salary_included) { + if (is_null($salary_included)) { + throw new \InvalidArgumentException('non-nullable salary_included cannot be null'); + } + $this->container['salary_included'] = $salary_included; + + return $this; + } + + /** + * Gets bonus_included + * + * @return bool|null + */ + public function getBonusIncluded() { + return $this->container['bonus_included']; + } + + /** + * Sets bonus_included + * + * @param bool|null $bonus_included Whether bonus is included in this cycle + * + * @return self + */ + public function setBonusIncluded($bonus_included) { + if (is_null($bonus_included)) { + throw new \InvalidArgumentException('non-nullable bonus_included cannot be null'); + } + $this->container['bonus_included'] = $bonus_included; + + return $this; + } + + /** + * Gets equity_included + * + * @return bool|null + */ + public function getEquityIncluded() { + return $this->container['equity_included']; + } + + /** + * Sets equity_included + * + * @param bool|null $equity_included Whether equity is included in this cycle + * + * @return self + */ + public function setEquityIncluded($equity_included) { + if (is_null($equity_included)) { + throw new \InvalidArgumentException('non-nullable equity_included cannot be null'); + } + $this->container['equity_included'] = $equity_included; + + return $this; + } + + /** + * Gets cycle_currency_conversion_rates + * + * @return \BhrSdk\Model\ConversionRateDataObject[]|null + */ + public function getCycleCurrencyConversionRates() { + return $this->container['cycle_currency_conversion_rates']; + } + + /** + * Sets cycle_currency_conversion_rates + * + * @param \BhrSdk\Model\ConversionRateDataObject[]|null $cycle_currency_conversion_rates Currency conversion rates + * + * @return self + */ + public function setCycleCurrencyConversionRates($cycle_currency_conversion_rates) { + if (is_null($cycle_currency_conversion_rates)) { + throw new \InvalidArgumentException('non-nullable cycle_currency_conversion_rates cannot be null'); + } + $this->container['cycle_currency_conversion_rates'] = $cycle_currency_conversion_rates; + + return $this; + } + + /** + * Gets paycheck_date_ymd + * + * @return \DateTime|null + */ + public function getPaycheckDateYmd() { + return $this->container['paycheck_date_ymd']; + } + + /** + * Sets paycheck_date_ymd + * + * @param \DateTime|null $paycheck_date_ymd Date of first paycheck with new compensation updates + * + * @return self + */ + public function setPaycheckDateYmd($paycheck_date_ymd) { + if (is_null($paycheck_date_ymd)) { + throw new \InvalidArgumentException('non-nullable paycheck_date_ymd cannot be null'); + } + $this->container['paycheck_date_ymd'] = $paycheck_date_ymd; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.php b/lib/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.php new file mode 100644 index 00000000..3708be23 --- /dev/null +++ b/lib/Model/Ec1ba8e76f33960b018d0d7518fe97b5Request.php @@ -0,0 +1,743 @@ +<?php +declare(strict_types=1); +/** + * Ec1ba8e76f33960b018d0d7518fe97b5Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Ec1ba8e76f33960b018d0d7518fe97b5Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Ec1ba8e76f33960b018d0d7518fe97b5Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ec1ba8e76f33960b018d0d7518fe97b5_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'contact_employee_id' => 'int', + 'requires_personal_information' => 'bool', + 'requires_photo' => 'bool', + 'requires_personal_questions' => 'bool', + 'arrive_by_time' => 'string', + 'location' => 'string', + 'send_get_to_know_you_email' => 'bool', + 'show_payroll_state' => 'bool', + 'show_payroll_federal' => 'bool', + 'show_payroll_direct_deposit' => 'bool', + 'nhp_template_id' => 'int', + 'employee_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'contact_employee_id' => null, + 'requires_personal_information' => null, + 'requires_photo' => null, + 'requires_personal_questions' => null, + 'arrive_by_time' => null, + 'location' => null, + 'send_get_to_know_you_email' => null, + 'show_payroll_state' => null, + 'show_payroll_federal' => null, + 'show_payroll_direct_deposit' => null, + 'nhp_template_id' => null, + 'employee_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'contact_employee_id' => false, + 'requires_personal_information' => false, + 'requires_photo' => false, + 'requires_personal_questions' => false, + 'arrive_by_time' => false, + 'location' => false, + 'send_get_to_know_you_email' => false, + 'show_payroll_state' => false, + 'show_payroll_federal' => false, + 'show_payroll_direct_deposit' => false, + 'nhp_template_id' => false, + 'employee_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contact_employee_id' => 'contactEmployeeId', + 'requires_personal_information' => 'requiresPersonalInformation', + 'requires_photo' => 'requiresPhoto', + 'requires_personal_questions' => 'requiresPersonalQuestions', + 'arrive_by_time' => 'arriveByTime', + 'location' => 'location', + 'send_get_to_know_you_email' => 'sendGetToKnowYouEmail', + 'show_payroll_state' => 'showPayrollState', + 'show_payroll_federal' => 'showPayrollFederal', + 'show_payroll_direct_deposit' => 'showPayrollDirectDeposit', + 'nhp_template_id' => 'nhpTemplateId', + 'employee_id' => 'employeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contact_employee_id' => 'setContactEmployeeId', + 'requires_personal_information' => 'setRequiresPersonalInformation', + 'requires_photo' => 'setRequiresPhoto', + 'requires_personal_questions' => 'setRequiresPersonalQuestions', + 'arrive_by_time' => 'setArriveByTime', + 'location' => 'setLocation', + 'send_get_to_know_you_email' => 'setSendGetToKnowYouEmail', + 'show_payroll_state' => 'setShowPayrollState', + 'show_payroll_federal' => 'setShowPayrollFederal', + 'show_payroll_direct_deposit' => 'setShowPayrollDirectDeposit', + 'nhp_template_id' => 'setNhpTemplateId', + 'employee_id' => 'setEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contact_employee_id' => 'getContactEmployeeId', + 'requires_personal_information' => 'getRequiresPersonalInformation', + 'requires_photo' => 'getRequiresPhoto', + 'requires_personal_questions' => 'getRequiresPersonalQuestions', + 'arrive_by_time' => 'getArriveByTime', + 'location' => 'getLocation', + 'send_get_to_know_you_email' => 'getSendGetToKnowYouEmail', + 'show_payroll_state' => 'getShowPayrollState', + 'show_payroll_federal' => 'getShowPayrollFederal', + 'show_payroll_direct_deposit' => 'getShowPayrollDirectDeposit', + 'nhp_template_id' => 'getNhpTemplateId', + 'employee_id' => 'getEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('contact_employee_id', $data ?? [], null); + $this->setIfExists('requires_personal_information', $data ?? [], null); + $this->setIfExists('requires_photo', $data ?? [], null); + $this->setIfExists('requires_personal_questions', $data ?? [], null); + $this->setIfExists('arrive_by_time', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('send_get_to_know_you_email', $data ?? [], null); + $this->setIfExists('show_payroll_state', $data ?? [], null); + $this->setIfExists('show_payroll_federal', $data ?? [], null); + $this->setIfExists('show_payroll_direct_deposit', $data ?? [], null); + $this->setIfExists('nhp_template_id', $data ?? [], null); + $this->setIfExists('employee_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_id'] === null) { + $invalidProperties[] = "'employee_id' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets contact_employee_id + * + * @return int|null + */ + public function getContactEmployeeId() { + return $this->container['contact_employee_id']; + } + + /** + * Sets contact_employee_id + * + * @param int|null $contact_employee_id contact_employee_id + * + * @return self + */ + public function setContactEmployeeId($contact_employee_id) { + if (is_null($contact_employee_id)) { + throw new \InvalidArgumentException('non-nullable contact_employee_id cannot be null'); + } + $this->container['contact_employee_id'] = $contact_employee_id; + + return $this; + } + + /** + * Gets requires_personal_information + * + * @return bool|null + */ + public function getRequiresPersonalInformation() { + return $this->container['requires_personal_information']; + } + + /** + * Sets requires_personal_information + * + * @param bool|null $requires_personal_information Whether personal information collection is required. + * + * @return self + */ + public function setRequiresPersonalInformation($requires_personal_information) { + if (is_null($requires_personal_information)) { + throw new \InvalidArgumentException('non-nullable requires_personal_information cannot be null'); + } + $this->container['requires_personal_information'] = $requires_personal_information; + + return $this; + } + + /** + * Gets requires_photo + * + * @return bool|null + */ + public function getRequiresPhoto() { + return $this->container['requires_photo']; + } + + /** + * Sets requires_photo + * + * @param bool|null $requires_photo Whether a photo is required. + * + * @return self + */ + public function setRequiresPhoto($requires_photo) { + if (is_null($requires_photo)) { + throw new \InvalidArgumentException('non-nullable requires_photo cannot be null'); + } + $this->container['requires_photo'] = $requires_photo; + + return $this; + } + + /** + * Gets requires_personal_questions + * + * @return bool|null + */ + public function getRequiresPersonalQuestions() { + return $this->container['requires_personal_questions']; + } + + /** + * Sets requires_personal_questions + * + * @param bool|null $requires_personal_questions Whether personal questions are required. + * + * @return self + */ + public function setRequiresPersonalQuestions($requires_personal_questions) { + if (is_null($requires_personal_questions)) { + throw new \InvalidArgumentException('non-nullable requires_personal_questions cannot be null'); + } + $this->container['requires_personal_questions'] = $requires_personal_questions; + + return $this; + } + + /** + * Gets arrive_by_time + * + * @return string|null + */ + public function getArriveByTime() { + return $this->container['arrive_by_time']; + } + + /** + * Sets arrive_by_time + * + * @param string|null $arrive_by_time arrive_by_time + * + * @return self + */ + public function setArriveByTime($arrive_by_time) { + if (is_null($arrive_by_time)) { + throw new \InvalidArgumentException('non-nullable arrive_by_time cannot be null'); + } + $this->container['arrive_by_time'] = $arrive_by_time; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + throw new \InvalidArgumentException('non-nullable location cannot be null'); + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets send_get_to_know_you_email + * + * @return bool|null + */ + public function getSendGetToKnowYouEmail() { + return $this->container['send_get_to_know_you_email']; + } + + /** + * Sets send_get_to_know_you_email + * + * @param bool|null $send_get_to_know_you_email Whether to send the Get To Know You email. + * + * @return self + */ + public function setSendGetToKnowYouEmail($send_get_to_know_you_email) { + if (is_null($send_get_to_know_you_email)) { + throw new \InvalidArgumentException('non-nullable send_get_to_know_you_email cannot be null'); + } + $this->container['send_get_to_know_you_email'] = $send_get_to_know_you_email; + + return $this; + } + + /** + * Gets show_payroll_state + * + * @return bool|null + */ + public function getShowPayrollState() { + return $this->container['show_payroll_state']; + } + + /** + * Sets show_payroll_state + * + * @param bool|null $show_payroll_state Whether to show state payroll fields. + * + * @return self + */ + public function setShowPayrollState($show_payroll_state) { + if (is_null($show_payroll_state)) { + throw new \InvalidArgumentException('non-nullable show_payroll_state cannot be null'); + } + $this->container['show_payroll_state'] = $show_payroll_state; + + return $this; + } + + /** + * Gets show_payroll_federal + * + * @return bool|null + */ + public function getShowPayrollFederal() { + return $this->container['show_payroll_federal']; + } + + /** + * Sets show_payroll_federal + * + * @param bool|null $show_payroll_federal Whether to show federal payroll fields. + * + * @return self + */ + public function setShowPayrollFederal($show_payroll_federal) { + if (is_null($show_payroll_federal)) { + throw new \InvalidArgumentException('non-nullable show_payroll_federal cannot be null'); + } + $this->container['show_payroll_federal'] = $show_payroll_federal; + + return $this; + } + + /** + * Gets show_payroll_direct_deposit + * + * @return bool|null + */ + public function getShowPayrollDirectDeposit() { + return $this->container['show_payroll_direct_deposit']; + } + + /** + * Sets show_payroll_direct_deposit + * + * @param bool|null $show_payroll_direct_deposit Whether to show direct deposit payroll fields. + * + * @return self + */ + public function setShowPayrollDirectDeposit($show_payroll_direct_deposit) { + if (is_null($show_payroll_direct_deposit)) { + throw new \InvalidArgumentException('non-nullable show_payroll_direct_deposit cannot be null'); + } + $this->container['show_payroll_direct_deposit'] = $show_payroll_direct_deposit; + + return $this; + } + + /** + * Gets nhp_template_id + * + * @return int|null + */ + public function getNhpTemplateId() { + return $this->container['nhp_template_id']; + } + + /** + * Sets nhp_template_id + * + * @param int|null $nhp_template_id nhp_template_id + * + * @return self + */ + public function setNhpTemplateId($nhp_template_id) { + if (is_null($nhp_template_id)) { + throw new \InvalidArgumentException('non-nullable nhp_template_id cannot be null'); + } + $this->container['nhp_template_id'] = $nhp_template_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int $employee_id Employee to attach the new packet to. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Employee.php b/lib/Model/Employee.php index d42ce42e..1bf8196f 100644 --- a/lib/Model/Employee.php +++ b/lib/Model/Employee.php @@ -36,6 +36,7 @@ * Employee Class Doc Comment * * @category Class + * @description A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. **Important for AI agents:** Unknown or misspelled field names are silently ignored — the endpoint returns 200 but the field is not updated. Always use the exact alias from the schema properties below or from the list-fields endpoint; do not invent aliases by adding prefixes such as `home` (e.g., `homeCity` is wrong — the correct alias is `city`). Photo data is not writable through this schema: photo-related keys are silently ignored. Use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to change a profile photo. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -58,7 +59,22 @@ class Employee implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiTypes = [ 'first_name' => 'string', - 'last_name' => 'string' + 'last_name' => 'string', + 'work_email' => 'string', + 'job_title' => 'string', + 'department' => 'string', + 'division' => 'string', + 'location' => 'string', + 'hire_date' => '\DateTime', + 'mobile_phone' => 'string', + 'home_phone' => 'string', + 'work_phone' => 'string', + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zipcode' => 'string', + 'country' => 'string' ]; /** @@ -70,7 +86,22 @@ class Employee implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiFormats = [ 'first_name' => null, - 'last_name' => null + 'last_name' => null, + 'work_email' => null, + 'job_title' => null, + 'department' => null, + 'division' => null, + 'location' => null, + 'hire_date' => 'date', + 'mobile_phone' => null, + 'home_phone' => null, + 'work_phone' => null, + 'address1' => null, + 'address2' => null, + 'city' => null, + 'state' => null, + 'zipcode' => null, + 'country' => null ]; /** @@ -81,7 +112,22 @@ class Employee implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static array $openApiNullables = [ 'first_name' => false, - 'last_name' => false + 'last_name' => false, + 'work_email' => false, + 'job_title' => false, + 'department' => false, + 'division' => false, + 'location' => false, + 'hire_date' => false, + 'mobile_phone' => false, + 'home_phone' => false, + 'work_phone' => false, + 'address1' => false, + 'address2' => false, + 'city' => false, + 'state' => false, + 'zipcode' => false, + 'country' => false ]; /** @@ -167,7 +213,22 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'first_name' => 'firstName', - 'last_name' => 'lastName' + 'last_name' => 'lastName', + 'work_email' => 'workEmail', + 'job_title' => 'jobTitle', + 'department' => 'department', + 'division' => 'division', + 'location' => 'location', + 'hire_date' => 'hireDate', + 'mobile_phone' => 'mobilePhone', + 'home_phone' => 'homePhone', + 'work_phone' => 'workPhone', + 'address1' => 'address1', + 'address2' => 'address2', + 'city' => 'city', + 'state' => 'state', + 'zipcode' => 'zipcode', + 'country' => 'country' ]; /** @@ -177,7 +238,22 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'first_name' => 'setFirstName', - 'last_name' => 'setLastName' + 'last_name' => 'setLastName', + 'work_email' => 'setWorkEmail', + 'job_title' => 'setJobTitle', + 'department' => 'setDepartment', + 'division' => 'setDivision', + 'location' => 'setLocation', + 'hire_date' => 'setHireDate', + 'mobile_phone' => 'setMobilePhone', + 'home_phone' => 'setHomePhone', + 'work_phone' => 'setWorkPhone', + 'address1' => 'setAddress1', + 'address2' => 'setAddress2', + 'city' => 'setCity', + 'state' => 'setState', + 'zipcode' => 'setZipcode', + 'country' => 'setCountry' ]; /** @@ -187,7 +263,22 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'first_name' => 'getFirstName', - 'last_name' => 'getLastName' + 'last_name' => 'getLastName', + 'work_email' => 'getWorkEmail', + 'job_title' => 'getJobTitle', + 'department' => 'getDepartment', + 'division' => 'getDivision', + 'location' => 'getLocation', + 'hire_date' => 'getHireDate', + 'mobile_phone' => 'getMobilePhone', + 'home_phone' => 'getHomePhone', + 'work_phone' => 'getWorkPhone', + 'address1' => 'getAddress1', + 'address2' => 'getAddress2', + 'city' => 'getCity', + 'state' => 'getState', + 'zipcode' => 'getZipcode', + 'country' => 'getCountry' ]; /** @@ -243,6 +334,21 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('first_name', $data ?? [], null); $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('work_email', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('division', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); + $this->setIfExists('mobile_phone', $data ?? [], null); + $this->setIfExists('home_phone', $data ?? [], null); + $this->setIfExists('work_phone', $data ?? [], null); + $this->setIfExists('address1', $data ?? [], null); + $this->setIfExists('address2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); } /** @@ -295,7 +401,7 @@ public function getFirstName() { /** * Sets first_name * - * @param string|null $first_name first_name + * @param string|null $first_name Legal first name. * * @return self */ @@ -320,7 +426,7 @@ public function getLastName() { /** * Sets last_name * - * @param string|null $last_name last_name + * @param string|null $last_name Legal last name. * * @return self */ @@ -332,6 +438,381 @@ public function setLastName($last_name) { return $this; } + + /** + * Gets work_email + * + * @return string|null + */ + public function getWorkEmail() { + return $this->container['work_email']; + } + + /** + * Sets work_email + * + * @param string|null $work_email Work email address. + * + * @return self + */ + public function setWorkEmail($work_email) { + if (is_null($work_email)) { + throw new \InvalidArgumentException('non-nullable work_email cannot be null'); + } + $this->container['work_email'] = $work_email; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title Job title. + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + throw new \InvalidArgumentException('non-nullable job_title cannot be null'); + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment() { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department Department name. + * + * @return self + */ + public function setDepartment($department) { + if (is_null($department)) { + throw new \InvalidArgumentException('non-nullable department cannot be null'); + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets division + * + * @return string|null + */ + public function getDivision() { + return $this->container['division']; + } + + /** + * Sets division + * + * @param string|null $division Division name. + * + * @return self + */ + public function setDivision($division) { + if (is_null($division)) { + throw new \InvalidArgumentException('non-nullable division cannot be null'); + } + $this->container['division'] = $division; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location Location name. + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + throw new \InvalidArgumentException('non-nullable location cannot be null'); + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets hire_date + * + * @return \DateTime|null + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param \DateTime|null $hire_date Hire date in YYYY-MM-DD format. + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + throw new \InvalidArgumentException('non-nullable hire_date cannot be null'); + } + $this->container['hire_date'] = $hire_date; + + return $this; + } + + /** + * Gets mobile_phone + * + * @return string|null + */ + public function getMobilePhone() { + return $this->container['mobile_phone']; + } + + /** + * Sets mobile_phone + * + * @param string|null $mobile_phone Mobile phone number. + * + * @return self + */ + public function setMobilePhone($mobile_phone) { + if (is_null($mobile_phone)) { + throw new \InvalidArgumentException('non-nullable mobile_phone cannot be null'); + } + $this->container['mobile_phone'] = $mobile_phone; + + return $this; + } + + /** + * Gets home_phone + * + * @return string|null + */ + public function getHomePhone() { + return $this->container['home_phone']; + } + + /** + * Sets home_phone + * + * @param string|null $home_phone Home phone number. + * + * @return self + */ + public function setHomePhone($home_phone) { + if (is_null($home_phone)) { + throw new \InvalidArgumentException('non-nullable home_phone cannot be null'); + } + $this->container['home_phone'] = $home_phone; + + return $this; + } + + /** + * Gets work_phone + * + * @return string|null + */ + public function getWorkPhone() { + return $this->container['work_phone']; + } + + /** + * Sets work_phone + * + * @param string|null $work_phone Work phone number. + * + * @return self + */ + public function setWorkPhone($work_phone) { + if (is_null($work_phone)) { + throw new \InvalidArgumentException('non-nullable work_phone cannot be null'); + } + $this->container['work_phone'] = $work_phone; + + return $this; + } + + /** + * Gets address1 + * + * @return string|null + */ + public function getAddress1() { + return $this->container['address1']; + } + + /** + * Sets address1 + * + * @param string|null $address1 Home street address line 1. The correct alias is `address1` — do not use `homeAddress1`, `homeStreet1`, or `street1`. + * + * @return self + */ + public function setAddress1($address1) { + if (is_null($address1)) { + throw new \InvalidArgumentException('non-nullable address1 cannot be null'); + } + $this->container['address1'] = $address1; + + return $this; + } + + /** + * Gets address2 + * + * @return string|null + */ + public function getAddress2() { + return $this->container['address2']; + } + + /** + * Sets address2 + * + * @param string|null $address2 Home street address line 2 (apartment, suite, etc.). The correct alias is `address2` — do not use `homeAddress2` or `homeStreet2`. + * + * @return self + */ + public function setAddress2($address2) { + if (is_null($address2)) { + throw new \InvalidArgumentException('non-nullable address2 cannot be null'); + } + $this->container['address2'] = $address2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city Home city. The correct alias is `city` — do not use `homeCity`. + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state Home state or province. The correct alias is `state` — do not use `homeState`. Values are normalized to standard abbreviations (e.g., \"Pennsylvania\" becomes \"PA\"). + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode Home ZIP or postal code. The correct alias is `zipcode` — do not use `homeZipcode` or `homeZip`. + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + throw new \InvalidArgumentException('non-nullable zipcode cannot be null'); + } + $this->container['zipcode'] = $zipcode; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country Home country name. The correct alias is `country` — do not use `homeCountry`. + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/EmployeeBenefitFilters.php b/lib/Model/EmployeeBenefitFilters.php new file mode 100644 index 00000000..60e0bca0 --- /dev/null +++ b/lib/Model/EmployeeBenefitFilters.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * EmployeeBenefitFilters + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeBenefitFilters Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeBenefitFilters implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeBenefitFilters'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'filters' => '\BhrSdk\Model\EmployeeBenefitFiltersFilters' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'filters' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'filters' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'filters' => 'filters' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'filters' => 'setFilters' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'filters' => 'getFilters' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('filters', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['filters'] === null) { + $invalidProperties[] = "'filters' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets filters + * + * @return \BhrSdk\Model\EmployeeBenefitFiltersFilters + */ + public function getFilters() { + return $this->container['filters']; + } + + /** + * Sets filters + * + * @param \BhrSdk\Model\EmployeeBenefitFiltersFilters $filters filters + * + * @return self + */ + public function setFilters($filters) { + if (is_null($filters)) { + throw new \InvalidArgumentException('non-nullable filters cannot be null'); + } + $this->container['filters'] = $filters; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeBenefitFiltersFilters.php b/lib/Model/EmployeeBenefitFiltersFilters.php new file mode 100644 index 00000000..1bc7a55a --- /dev/null +++ b/lib/Model/EmployeeBenefitFiltersFilters.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * EmployeeBenefitFiltersFilters + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeBenefitFiltersFilters Class Doc Comment + * + * @category Class + * @description Scope filters for the request. At least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided; none of the three is individually required, but omitting all three returns a 400 validation error. Any combination of the three is accepted. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeBenefitFiltersFilters implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeBenefitFilters_filters'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'int', + 'company_benefit_id' => 'int', + 'enrollment_status_effective_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'company_benefit_id' => null, + 'enrollment_status_effective_date' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => false, + 'company_benefit_id' => false, + 'enrollment_status_effective_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'company_benefit_id' => 'companyBenefitId', + 'enrollment_status_effective_date' => 'enrollmentStatusEffectiveDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'company_benefit_id' => 'setCompanyBenefitId', + 'enrollment_status_effective_date' => 'setEnrollmentStatusEffectiveDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'company_benefit_id' => 'getCompanyBenefitId', + 'enrollment_status_effective_date' => 'getEnrollmentStatusEffectiveDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('company_benefit_id', $data ?? [], null); + $this->setIfExists('enrollment_status_effective_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id Return benefit enrollments for a specific employee identified by their numeric ID. Optional unless neither `companyBenefitId` nor `enrollmentStatusEffectiveDate` is supplied. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets company_benefit_id + * + * @return int|null + */ + public function getCompanyBenefitId() { + return $this->container['company_benefit_id']; + } + + /** + * Sets company_benefit_id + * + * @param int|null $company_benefit_id Return benefit enrollments for a specific company benefit plan identified by its numeric ID. Optional unless neither `employeeId` nor `enrollmentStatusEffectiveDate` is supplied. + * + * @return self + */ + public function setCompanyBenefitId($company_benefit_id) { + if (is_null($company_benefit_id)) { + throw new \InvalidArgumentException('non-nullable company_benefit_id cannot be null'); + } + $this->container['company_benefit_id'] = $company_benefit_id; + + return $this; + } + + /** + * Gets enrollment_status_effective_date + * + * @return \DateTime|null + */ + public function getEnrollmentStatusEffectiveDate() { + return $this->container['enrollment_status_effective_date']; + } + + /** + * Sets enrollment_status_effective_date + * + * @param \DateTime|null $enrollment_status_effective_date Return benefit enrollments whose enrollment status became effective on this date. Must be in `YYYY-MM-DD` format. Optional unless neither `employeeId` nor `companyBenefitId` is supplied. + * + * @return self + */ + public function setEnrollmentStatusEffectiveDate($enrollment_status_effective_date) { + if (is_null($enrollment_status_effective_date)) { + throw new \InvalidArgumentException('non-nullable enrollment_status_effective_date cannot be null'); + } + $this->container['enrollment_status_effective_date'] = $enrollment_status_effective_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeBenefitsListResponse.php b/lib/Model/EmployeeBenefitsListResponse.php new file mode 100644 index 00000000..63f8b299 --- /dev/null +++ b/lib/Model/EmployeeBenefitsListResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * EmployeeBenefitsListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeBenefitsListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeBenefitsListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeBenefitsListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_benefits' => '\BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_benefits' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_benefits' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_benefits' => 'employeeBenefits' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_benefits' => 'setEmployeeBenefits' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_benefits' => 'getEmployeeBenefits' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_benefits', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_benefits + * + * @return \BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInner[]|null + */ + public function getEmployeeBenefits() { + return $this->container['employee_benefits']; + } + + /** + * Sets employee_benefits + * + * @param \BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInner[]|null $employee_benefits List of per-employee benefit enrollment records. + * + * @return self + */ + public function setEmployeeBenefits($employee_benefits) { + if (is_null($employee_benefits)) { + throw new \InvalidArgumentException('non-nullable employee_benefits cannot be null'); + } + $this->container['employee_benefits'] = $employee_benefits; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.php b/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.php new file mode 100644 index 00000000..c7747bd4 --- /dev/null +++ b/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInner.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * EmployeeBenefitsListResponseEmployeeBenefitsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeBenefitsListResponseEmployeeBenefitsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeBenefitsListResponseEmployeeBenefitsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeBenefitsListResponse_employeeBenefits_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'int', + 'pay_frequency' => 'string', + 'employee_benefit' => '\BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'pay_frequency' => null, + 'employee_benefit' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => false, + 'pay_frequency' => true, + 'employee_benefit' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'pay_frequency' => 'payFrequency', + 'employee_benefit' => 'employeeBenefit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'pay_frequency' => 'setPayFrequency', + 'employee_benefit' => 'setEmployeeBenefit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'pay_frequency' => 'getPayFrequency', + 'employee_benefit' => 'getEmployeeBenefit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('pay_frequency', $data ?? [], null); + $this->setIfExists('employee_benefit', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The ID of the employee. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets pay_frequency + * + * @return string|null + */ + public function getPayFrequency() { + return $this->container['pay_frequency']; + } + + /** + * Sets pay_frequency + * + * @param string|null $pay_frequency pay_frequency + * + * @return self + */ + public function setPayFrequency($pay_frequency) { + if (is_null($pay_frequency)) { + $this->openApiNullablesSetToNull['pay_frequency'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_frequency'])) { + unset($nullablesSetToNull['pay_frequency']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_frequency'] = $pay_frequency; + + return $this; + } + + /** + * Gets employee_benefit + * + * @return \BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner[]|null + */ + public function getEmployeeBenefit() { + return $this->container['employee_benefit']; + } + + /** + * Sets employee_benefit + * + * @param \BhrSdk\Model\EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner[]|null $employee_benefit The employee's benefit plan enrollments, including both current and future scheduled changes. + * + * @return self + */ + public function setEmployeeBenefit($employee_benefit) { + if (is_null($employee_benefit)) { + throw new \InvalidArgumentException('non-nullable employee_benefit cannot be null'); + } + $this->container['employee_benefit'] = $employee_benefit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.php b/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.php new file mode 100644 index 00000000..1e94078a --- /dev/null +++ b/lib/Model/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.php @@ -0,0 +1,1166 @@ +<?php +declare(strict_types=1); +/** + * EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeBenefitsListResponse_employeeBenefits_inner_employeeBenefit_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_benefit_id' => 'string', + 'company_benefit_name' => 'string', + 'coverage_level' => 'string', + 'deduction_end_date' => '\DateTime', + 'deduction_start_date' => '\DateTime', + 'enrollment_status' => 'string', + 'enrollment_status_effective_date' => '\DateTime', + 'currency_code' => 'string', + 'employee_amount' => 'float', + 'employee_amount_type' => 'string', + 'employee_percent_based_on' => 'string', + 'employee_cap_amount' => 'float', + 'employee_cap_amount_type' => 'string', + 'employee_annual_max' => 'float', + 'company_amount' => 'float', + 'company_amount_type' => 'string', + 'company_percent_based_on' => 'string', + 'company_cap_amount' => 'float', + 'company_cap_amount_type' => 'string', + 'company_annual_max' => 'float', + 'occurrences_per_year' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_benefit_id' => null, + 'company_benefit_name' => null, + 'coverage_level' => null, + 'deduction_end_date' => 'date', + 'deduction_start_date' => 'date', + 'enrollment_status' => null, + 'enrollment_status_effective_date' => 'date', + 'currency_code' => null, + 'employee_amount' => null, + 'employee_amount_type' => null, + 'employee_percent_based_on' => null, + 'employee_cap_amount' => null, + 'employee_cap_amount_type' => null, + 'employee_annual_max' => null, + 'company_amount' => null, + 'company_amount_type' => null, + 'company_percent_based_on' => null, + 'company_cap_amount' => null, + 'company_cap_amount_type' => null, + 'company_annual_max' => null, + 'occurrences_per_year' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_benefit_id' => false, + 'company_benefit_name' => false, + 'coverage_level' => true, + 'deduction_end_date' => true, + 'deduction_start_date' => true, + 'enrollment_status' => false, + 'enrollment_status_effective_date' => false, + 'currency_code' => true, + 'employee_amount' => true, + 'employee_amount_type' => true, + 'employee_percent_based_on' => true, + 'employee_cap_amount' => true, + 'employee_cap_amount_type' => true, + 'employee_annual_max' => true, + 'company_amount' => true, + 'company_amount_type' => true, + 'company_percent_based_on' => true, + 'company_cap_amount' => true, + 'company_cap_amount_type' => true, + 'company_annual_max' => true, + 'occurrences_per_year' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_benefit_id' => 'companyBenefitId', + 'company_benefit_name' => 'companyBenefitName', + 'coverage_level' => 'coverageLevel', + 'deduction_end_date' => 'deductionEndDate', + 'deduction_start_date' => 'deductionStartDate', + 'enrollment_status' => 'enrollmentStatus', + 'enrollment_status_effective_date' => 'enrollmentStatusEffectiveDate', + 'currency_code' => 'currencyCode', + 'employee_amount' => 'employeeAmount', + 'employee_amount_type' => 'employeeAmountType', + 'employee_percent_based_on' => 'employeePercentBasedOn', + 'employee_cap_amount' => 'employeeCapAmount', + 'employee_cap_amount_type' => 'employeeCapAmountType', + 'employee_annual_max' => 'employeeAnnualMax', + 'company_amount' => 'companyAmount', + 'company_amount_type' => 'companyAmountType', + 'company_percent_based_on' => 'companyPercentBasedOn', + 'company_cap_amount' => 'companyCapAmount', + 'company_cap_amount_type' => 'companyCapAmountType', + 'company_annual_max' => 'companyAnnualMax', + 'occurrences_per_year' => 'occurrencesPerYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_benefit_id' => 'setCompanyBenefitId', + 'company_benefit_name' => 'setCompanyBenefitName', + 'coverage_level' => 'setCoverageLevel', + 'deduction_end_date' => 'setDeductionEndDate', + 'deduction_start_date' => 'setDeductionStartDate', + 'enrollment_status' => 'setEnrollmentStatus', + 'enrollment_status_effective_date' => 'setEnrollmentStatusEffectiveDate', + 'currency_code' => 'setCurrencyCode', + 'employee_amount' => 'setEmployeeAmount', + 'employee_amount_type' => 'setEmployeeAmountType', + 'employee_percent_based_on' => 'setEmployeePercentBasedOn', + 'employee_cap_amount' => 'setEmployeeCapAmount', + 'employee_cap_amount_type' => 'setEmployeeCapAmountType', + 'employee_annual_max' => 'setEmployeeAnnualMax', + 'company_amount' => 'setCompanyAmount', + 'company_amount_type' => 'setCompanyAmountType', + 'company_percent_based_on' => 'setCompanyPercentBasedOn', + 'company_cap_amount' => 'setCompanyCapAmount', + 'company_cap_amount_type' => 'setCompanyCapAmountType', + 'company_annual_max' => 'setCompanyAnnualMax', + 'occurrences_per_year' => 'setOccurrencesPerYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_benefit_id' => 'getCompanyBenefitId', + 'company_benefit_name' => 'getCompanyBenefitName', + 'coverage_level' => 'getCoverageLevel', + 'deduction_end_date' => 'getDeductionEndDate', + 'deduction_start_date' => 'getDeductionStartDate', + 'enrollment_status' => 'getEnrollmentStatus', + 'enrollment_status_effective_date' => 'getEnrollmentStatusEffectiveDate', + 'currency_code' => 'getCurrencyCode', + 'employee_amount' => 'getEmployeeAmount', + 'employee_amount_type' => 'getEmployeeAmountType', + 'employee_percent_based_on' => 'getEmployeePercentBasedOn', + 'employee_cap_amount' => 'getEmployeeCapAmount', + 'employee_cap_amount_type' => 'getEmployeeCapAmountType', + 'employee_annual_max' => 'getEmployeeAnnualMax', + 'company_amount' => 'getCompanyAmount', + 'company_amount_type' => 'getCompanyAmountType', + 'company_percent_based_on' => 'getCompanyPercentBasedOn', + 'company_cap_amount' => 'getCompanyCapAmount', + 'company_cap_amount_type' => 'getCompanyCapAmountType', + 'company_annual_max' => 'getCompanyAnnualMax', + 'occurrences_per_year' => 'getOccurrencesPerYear' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const ENROLLMENT_STATUS_ELIGIBLE = 'Eligible'; + public const ENROLLMENT_STATUS_ENROLLED = 'Enrolled'; + public const ENROLLMENT_STATUS_WAIVED = 'Waived'; + public const ENROLLMENT_STATUS_WITHDREW = 'Withdrew'; + public const ENROLLMENT_STATUS_TERMINATED = 'Terminated'; + public const ENROLLMENT_STATUS_INELIGIBLE = 'Ineligible'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEnrollmentStatusAllowableValues() { + return [ + self::ENROLLMENT_STATUS_ELIGIBLE, + self::ENROLLMENT_STATUS_ENROLLED, + self::ENROLLMENT_STATUS_WAIVED, + self::ENROLLMENT_STATUS_WITHDREW, + self::ENROLLMENT_STATUS_TERMINATED, + self::ENROLLMENT_STATUS_INELIGIBLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_benefit_id', $data ?? [], null); + $this->setIfExists('company_benefit_name', $data ?? [], null); + $this->setIfExists('coverage_level', $data ?? [], null); + $this->setIfExists('deduction_end_date', $data ?? [], null); + $this->setIfExists('deduction_start_date', $data ?? [], null); + $this->setIfExists('enrollment_status', $data ?? [], null); + $this->setIfExists('enrollment_status_effective_date', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('employee_amount', $data ?? [], null); + $this->setIfExists('employee_amount_type', $data ?? [], null); + $this->setIfExists('employee_percent_based_on', $data ?? [], null); + $this->setIfExists('employee_cap_amount', $data ?? [], null); + $this->setIfExists('employee_cap_amount_type', $data ?? [], null); + $this->setIfExists('employee_annual_max', $data ?? [], null); + $this->setIfExists('company_amount', $data ?? [], null); + $this->setIfExists('company_amount_type', $data ?? [], null); + $this->setIfExists('company_percent_based_on', $data ?? [], null); + $this->setIfExists('company_cap_amount', $data ?? [], null); + $this->setIfExists('company_cap_amount_type', $data ?? [], null); + $this->setIfExists('company_annual_max', $data ?? [], null); + $this->setIfExists('occurrences_per_year', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getEnrollmentStatusAllowableValues(); + if (!is_null($this->container['enrollment_status']) && !in_array($this->container['enrollment_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'enrollment_status', must be one of '%s'", + $this->container['enrollment_status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_benefit_id + * + * @return string|null + */ + public function getCompanyBenefitId() { + return $this->container['company_benefit_id']; + } + + /** + * Sets company_benefit_id + * + * @param string|null $company_benefit_id The ID of the company benefit plan. + * + * @return self + */ + public function setCompanyBenefitId($company_benefit_id) { + if (is_null($company_benefit_id)) { + throw new \InvalidArgumentException('non-nullable company_benefit_id cannot be null'); + } + $this->container['company_benefit_id'] = $company_benefit_id; + + return $this; + } + + /** + * Gets company_benefit_name + * + * @return string|null + */ + public function getCompanyBenefitName() { + return $this->container['company_benefit_name']; + } + + /** + * Sets company_benefit_name + * + * @param string|null $company_benefit_name The name of the company benefit plan. + * + * @return self + */ + public function setCompanyBenefitName($company_benefit_name) { + if (is_null($company_benefit_name)) { + throw new \InvalidArgumentException('non-nullable company_benefit_name cannot be null'); + } + $this->container['company_benefit_name'] = $company_benefit_name; + + return $this; + } + + /** + * Gets coverage_level + * + * @return string|null + */ + public function getCoverageLevel() { + return $this->container['coverage_level']; + } + + /** + * Sets coverage_level + * + * @param string|null $coverage_level coverage_level + * + * @return self + */ + public function setCoverageLevel($coverage_level) { + if (is_null($coverage_level)) { + $this->openApiNullablesSetToNull['coverage_level'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['coverage_level'])) { + unset($nullablesSetToNull['coverage_level']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['coverage_level'] = $coverage_level; + + return $this; + } + + /** + * Gets deduction_end_date + * + * @return \DateTime|null + */ + public function getDeductionEndDate() { + return $this->container['deduction_end_date']; + } + + /** + * Sets deduction_end_date + * + * @param \DateTime|null $deduction_end_date deduction_end_date + * + * @return self + */ + public function setDeductionEndDate($deduction_end_date) { + if (is_null($deduction_end_date)) { + $this->openApiNullablesSetToNull['deduction_end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deduction_end_date'])) { + unset($nullablesSetToNull['deduction_end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deduction_end_date'] = $deduction_end_date; + + return $this; + } + + /** + * Gets deduction_start_date + * + * @return \DateTime|null + */ + public function getDeductionStartDate() { + return $this->container['deduction_start_date']; + } + + /** + * Sets deduction_start_date + * + * @param \DateTime|null $deduction_start_date deduction_start_date + * + * @return self + */ + public function setDeductionStartDate($deduction_start_date) { + if (is_null($deduction_start_date)) { + $this->openApiNullablesSetToNull['deduction_start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deduction_start_date'])) { + unset($nullablesSetToNull['deduction_start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deduction_start_date'] = $deduction_start_date; + + return $this; + } + + /** + * Gets enrollment_status + * + * @return string|null + */ + public function getEnrollmentStatus() { + return $this->container['enrollment_status']; + } + + /** + * Sets enrollment_status + * + * @param string|null $enrollment_status The current or scheduled enrollment status. + * + * @return self + */ + public function setEnrollmentStatus($enrollment_status) { + if (is_null($enrollment_status)) { + throw new \InvalidArgumentException('non-nullable enrollment_status cannot be null'); + } + $allowedValues = $this->getEnrollmentStatusAllowableValues(); + if (!in_array($enrollment_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'enrollment_status', must be one of '%s'", + $enrollment_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['enrollment_status'] = $enrollment_status; + + return $this; + } + + /** + * Gets enrollment_status_effective_date + * + * @return \DateTime|null + */ + public function getEnrollmentStatusEffectiveDate() { + return $this->container['enrollment_status_effective_date']; + } + + /** + * Sets enrollment_status_effective_date + * + * @param \DateTime|null $enrollment_status_effective_date The date the enrollment status takes effect (YYYY-MM-DD). + * + * @return self + */ + public function setEnrollmentStatusEffectiveDate($enrollment_status_effective_date) { + if (is_null($enrollment_status_effective_date)) { + throw new \InvalidArgumentException('non-nullable enrollment_status_effective_date cannot be null'); + } + $this->container['enrollment_status_effective_date'] = $enrollment_status_effective_date; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets employee_amount + * + * @return float|null + */ + public function getEmployeeAmount() { + return $this->container['employee_amount']; + } + + /** + * Sets employee_amount + * + * @param float|null $employee_amount employee_amount + * + * @return self + */ + public function setEmployeeAmount($employee_amount) { + if (is_null($employee_amount)) { + $this->openApiNullablesSetToNull['employee_amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_amount'])) { + unset($nullablesSetToNull['employee_amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_amount'] = $employee_amount; + + return $this; + } + + /** + * Gets employee_amount_type + * + * @return string|null + */ + public function getEmployeeAmountType() { + return $this->container['employee_amount_type']; + } + + /** + * Sets employee_amount_type + * + * @param string|null $employee_amount_type employee_amount_type + * + * @return self + */ + public function setEmployeeAmountType($employee_amount_type) { + if (is_null($employee_amount_type)) { + $this->openApiNullablesSetToNull['employee_amount_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_amount_type'])) { + unset($nullablesSetToNull['employee_amount_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_amount_type'] = $employee_amount_type; + + return $this; + } + + /** + * Gets employee_percent_based_on + * + * @return string|null + */ + public function getEmployeePercentBasedOn() { + return $this->container['employee_percent_based_on']; + } + + /** + * Sets employee_percent_based_on + * + * @param string|null $employee_percent_based_on employee_percent_based_on + * + * @return self + */ + public function setEmployeePercentBasedOn($employee_percent_based_on) { + if (is_null($employee_percent_based_on)) { + $this->openApiNullablesSetToNull['employee_percent_based_on'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_percent_based_on'])) { + unset($nullablesSetToNull['employee_percent_based_on']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_percent_based_on'] = $employee_percent_based_on; + + return $this; + } + + /** + * Gets employee_cap_amount + * + * @return float|null + */ + public function getEmployeeCapAmount() { + return $this->container['employee_cap_amount']; + } + + /** + * Sets employee_cap_amount + * + * @param float|null $employee_cap_amount employee_cap_amount + * + * @return self + */ + public function setEmployeeCapAmount($employee_cap_amount) { + if (is_null($employee_cap_amount)) { + $this->openApiNullablesSetToNull['employee_cap_amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_cap_amount'])) { + unset($nullablesSetToNull['employee_cap_amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_cap_amount'] = $employee_cap_amount; + + return $this; + } + + /** + * Gets employee_cap_amount_type + * + * @return string|null + */ + public function getEmployeeCapAmountType() { + return $this->container['employee_cap_amount_type']; + } + + /** + * Sets employee_cap_amount_type + * + * @param string|null $employee_cap_amount_type employee_cap_amount_type + * + * @return self + */ + public function setEmployeeCapAmountType($employee_cap_amount_type) { + if (is_null($employee_cap_amount_type)) { + $this->openApiNullablesSetToNull['employee_cap_amount_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_cap_amount_type'])) { + unset($nullablesSetToNull['employee_cap_amount_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_cap_amount_type'] = $employee_cap_amount_type; + + return $this; + } + + /** + * Gets employee_annual_max + * + * @return float|null + */ + public function getEmployeeAnnualMax() { + return $this->container['employee_annual_max']; + } + + /** + * Sets employee_annual_max + * + * @param float|null $employee_annual_max employee_annual_max + * + * @return self + */ + public function setEmployeeAnnualMax($employee_annual_max) { + if (is_null($employee_annual_max)) { + $this->openApiNullablesSetToNull['employee_annual_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_annual_max'])) { + unset($nullablesSetToNull['employee_annual_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_annual_max'] = $employee_annual_max; + + return $this; + } + + /** + * Gets company_amount + * + * @return float|null + */ + public function getCompanyAmount() { + return $this->container['company_amount']; + } + + /** + * Sets company_amount + * + * @param float|null $company_amount company_amount + * + * @return self + */ + public function setCompanyAmount($company_amount) { + if (is_null($company_amount)) { + $this->openApiNullablesSetToNull['company_amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_amount'])) { + unset($nullablesSetToNull['company_amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_amount'] = $company_amount; + + return $this; + } + + /** + * Gets company_amount_type + * + * @return string|null + */ + public function getCompanyAmountType() { + return $this->container['company_amount_type']; + } + + /** + * Sets company_amount_type + * + * @param string|null $company_amount_type company_amount_type + * + * @return self + */ + public function setCompanyAmountType($company_amount_type) { + if (is_null($company_amount_type)) { + $this->openApiNullablesSetToNull['company_amount_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_amount_type'])) { + unset($nullablesSetToNull['company_amount_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_amount_type'] = $company_amount_type; + + return $this; + } + + /** + * Gets company_percent_based_on + * + * @return string|null + */ + public function getCompanyPercentBasedOn() { + return $this->container['company_percent_based_on']; + } + + /** + * Sets company_percent_based_on + * + * @param string|null $company_percent_based_on company_percent_based_on + * + * @return self + */ + public function setCompanyPercentBasedOn($company_percent_based_on) { + if (is_null($company_percent_based_on)) { + $this->openApiNullablesSetToNull['company_percent_based_on'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_percent_based_on'])) { + unset($nullablesSetToNull['company_percent_based_on']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_percent_based_on'] = $company_percent_based_on; + + return $this; + } + + /** + * Gets company_cap_amount + * + * @return float|null + */ + public function getCompanyCapAmount() { + return $this->container['company_cap_amount']; + } + + /** + * Sets company_cap_amount + * + * @param float|null $company_cap_amount company_cap_amount + * + * @return self + */ + public function setCompanyCapAmount($company_cap_amount) { + if (is_null($company_cap_amount)) { + $this->openApiNullablesSetToNull['company_cap_amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_cap_amount'])) { + unset($nullablesSetToNull['company_cap_amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_cap_amount'] = $company_cap_amount; + + return $this; + } + + /** + * Gets company_cap_amount_type + * + * @return string|null + */ + public function getCompanyCapAmountType() { + return $this->container['company_cap_amount_type']; + } + + /** + * Sets company_cap_amount_type + * + * @param string|null $company_cap_amount_type company_cap_amount_type + * + * @return self + */ + public function setCompanyCapAmountType($company_cap_amount_type) { + if (is_null($company_cap_amount_type)) { + $this->openApiNullablesSetToNull['company_cap_amount_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_cap_amount_type'])) { + unset($nullablesSetToNull['company_cap_amount_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_cap_amount_type'] = $company_cap_amount_type; + + return $this; + } + + /** + * Gets company_annual_max + * + * @return float|null + */ + public function getCompanyAnnualMax() { + return $this->container['company_annual_max']; + } + + /** + * Sets company_annual_max + * + * @param float|null $company_annual_max company_annual_max + * + * @return self + */ + public function setCompanyAnnualMax($company_annual_max) { + if (is_null($company_annual_max)) { + $this->openApiNullablesSetToNull['company_annual_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_annual_max'])) { + unset($nullablesSetToNull['company_annual_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_annual_max'] = $company_annual_max; + + return $this; + } + + /** + * Gets occurrences_per_year + * + * @return int|null + */ + public function getOccurrencesPerYear() { + return $this->container['occurrences_per_year']; + } + + /** + * Sets occurrences_per_year + * + * @param int|null $occurrences_per_year The number of deduction occurrences per year based on the employee's pay schedule. + * + * @return self + */ + public function setOccurrencesPerYear($occurrences_per_year) { + if (is_null($occurrences_per_year)) { + throw new \InvalidArgumentException('non-nullable occurrences_per_year cannot be null'); + } + $this->container['occurrences_per_year'] = $occurrences_per_year; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeCreatedWebhookPayload.php b/lib/Model/EmployeeCreatedWebhookPayload.php new file mode 100644 index 00000000..fcac9c5a --- /dev/null +++ b/lib/Model/EmployeeCreatedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * EmployeeCreatedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeCreatedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when a new employee is created. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeCreatedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeCreatedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\EmployeeCreatedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_EMPLOYEE_CREATED = 'employee.created'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_EMPLOYEE_CREATED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\EmployeeCreatedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\EmployeeCreatedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeCreatedWebhookPayloadData.php b/lib/Model/EmployeeCreatedWebhookPayloadData.php new file mode 100644 index 00000000..203148cf --- /dev/null +++ b/lib/Model/EmployeeCreatedWebhookPayloadData.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * EmployeeCreatedWebhookPayloadData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeCreatedWebhookPayloadData Class Doc Comment + * + * @category Class + * @description Event data containing employee information + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeCreatedWebhookPayloadData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeCreatedWebhookPayload_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_id' => 'string', + 'employee_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_id' => null, + 'employee_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_id' => false, + 'employee_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_id' => 'companyId', + 'employee_id' => 'employeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_id' => 'setCompanyId', + 'employee_id' => 'setEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_id' => 'getCompanyId', + 'employee_id' => 'getEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_id', $data ?? [], null); + $this->setIfExists('employee_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_id + * + * @return string|null + */ + public function getCompanyId() { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string|null $company_id The company ID + * + * @return self + */ + public function setCompanyId($company_id) { + if (is_null($company_id)) { + throw new \InvalidArgumentException('non-nullable company_id cannot be null'); + } + $this->container['company_id'] = $company_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id The employee ID that was created + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeCursorPaginationQueryObject.php b/lib/Model/EmployeeCursorPaginationQueryObject.php new file mode 100644 index 00000000..3e77543d --- /dev/null +++ b/lib/Model/EmployeeCursorPaginationQueryObject.php @@ -0,0 +1,468 @@ +<?php +declare(strict_types=1); +/** + * EmployeeCursorPaginationQueryObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeCursorPaginationQueryObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeCursorPaginationQueryObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeCursorPaginationQueryObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'before' => 'string', + 'after' => 'string', + 'limit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'before' => null, + 'after' => null, + 'limit' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'before' => false, + 'after' => false, + 'limit' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'before' => 'before', + 'after' => 'after', + 'limit' => 'limit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'before' => 'setBefore', + 'after' => 'setAfter', + 'limit' => 'setLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'before' => 'getBefore', + 'after' => 'getAfter', + 'limit' => 'getLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('before', $data ?? [], null); + $this->setIfExists('after', $data ?? [], null); + $this->setIfExists('limit', $data ?? [], 250); + } + + /** + * 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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if (!is_null($this->container['limit']) && ($this->container['limit'] > 2500)) { + $invalidProperties[] = "invalid value for 'limit', must be smaller than or equal to 2500."; + } + + if (!is_null($this->container['limit']) && ($this->container['limit'] < 1)) { + $invalidProperties[] = "invalid value for 'limit', 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets before + * + * @return string|null + */ + public function getBefore() { + return $this->container['before']; + } + + /** + * Sets before + * + * @param string|null $before Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward. + * + * @return self + */ + public function setBefore($before) { + if (is_null($before)) { + throw new \InvalidArgumentException('non-nullable before cannot be null'); + } + $this->container['before'] = $before; + + return $this; + } + + /** + * Gets after + * + * @return string|null + */ + public function getAfter() { + return $this->container['after']; + } + + /** + * Sets after + * + * @param string|null $after Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward. + * + * @return self + */ + public function setAfter($after) { + if (is_null($after)) { + throw new \InvalidArgumentException('non-nullable after cannot be null'); + } + $this->container['after'] = $after; + + return $this; + } + + /** + * Gets limit + * + * @return int|null + */ + public function getLimit() { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit Maximum number of items to return. This can be at most 2500. + * + * @return self + */ + public function setLimit($limit) { + if (is_null($limit)) { + throw new \InvalidArgumentException('non-nullable limit cannot be null'); + } + + if (($limit > 2500)) { + throw new \InvalidArgumentException('invalid value for $limit when calling EmployeeCursorPaginationQueryObject., must be smaller than or equal to 2500.'); + } + if (($limit < 1)) { + throw new \InvalidArgumentException('invalid value for $limit when calling EmployeeCursorPaginationQueryObject., must be bigger than or equal to 1.'); + } + + $this->container['limit'] = $limit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeDeletedWebhookPayload.php b/lib/Model/EmployeeDeletedWebhookPayload.php new file mode 100644 index 00000000..6d1a733b --- /dev/null +++ b/lib/Model/EmployeeDeletedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * EmployeeDeletedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeDeletedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when an employee is deleted. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeDeletedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeDeletedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\EmployeeDeletedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_EMPLOYEE_DELETED = 'employee.deleted'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_EMPLOYEE_DELETED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\EmployeeDeletedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\EmployeeDeletedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeDeletedWebhookPayloadData.php b/lib/Model/EmployeeDeletedWebhookPayloadData.php new file mode 100644 index 00000000..2e40d16d --- /dev/null +++ b/lib/Model/EmployeeDeletedWebhookPayloadData.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * EmployeeDeletedWebhookPayloadData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeDeletedWebhookPayloadData Class Doc Comment + * + * @category Class + * @description Event data containing employee information + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeDeletedWebhookPayloadData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeDeletedWebhookPayload_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_id' => 'string', + 'employee_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_id' => null, + 'employee_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_id' => false, + 'employee_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_id' => 'companyId', + 'employee_id' => 'employeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_id' => 'setCompanyId', + 'employee_id' => 'setEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_id' => 'getCompanyId', + 'employee_id' => 'getEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_id', $data ?? [], null); + $this->setIfExists('employee_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_id + * + * @return string|null + */ + public function getCompanyId() { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string|null $company_id The company ID + * + * @return self + */ + public function setCompanyId($company_id) { + if (is_null($company_id)) { + throw new \InvalidArgumentException('non-nullable company_id cannot be null'); + } + $this->container['company_id'] = $company_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id The employee ID that was deleted + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeDependent.php b/lib/Model/EmployeeDependent.php index e05a7dfd..34c15245 100644 --- a/lib/Model/EmployeeDependent.php +++ b/lib/Model/EmployeeDependent.php @@ -64,7 +64,8 @@ class EmployeeDependent implements ModelInterface, ArrayAccess, \JsonSerializabl 'relationship' => 'string', 'gender' => 'string', 'ssn' => 'string', - 'date_of_birth' => 'string', + 'sin' => 'string', + 'date_of_birth' => '\DateTime', 'address_line1' => 'string', 'address_line2' => 'string', 'city' => 'string', @@ -91,7 +92,8 @@ class EmployeeDependent implements ModelInterface, ArrayAccess, \JsonSerializabl 'relationship' => null, 'gender' => null, 'ssn' => null, - 'date_of_birth' => null, + 'sin' => null, + 'date_of_birth' => 'date', 'address_line1' => null, 'address_line2' => null, 'city' => null, @@ -117,6 +119,7 @@ class EmployeeDependent implements ModelInterface, ArrayAccess, \JsonSerializabl 'relationship' => false, 'gender' => false, 'ssn' => false, + 'sin' => false, 'date_of_birth' => false, 'address_line1' => false, 'address_line2' => false, @@ -218,6 +221,7 @@ public function isNullableSetToNull(string $property): bool { 'relationship' => 'relationship', 'gender' => 'gender', 'ssn' => 'ssn', + 'sin' => 'sin', 'date_of_birth' => 'dateOfBirth', 'address_line1' => 'addressLine1', 'address_line2' => 'addressLine2', @@ -243,6 +247,7 @@ public function isNullableSetToNull(string $property): bool { 'relationship' => 'setRelationship', 'gender' => 'setGender', 'ssn' => 'setSsn', + 'sin' => 'setSin', 'date_of_birth' => 'setDateOfBirth', 'address_line1' => 'setAddressLine1', 'address_line2' => 'setAddressLine2', @@ -268,6 +273,7 @@ public function isNullableSetToNull(string $property): bool { 'relationship' => 'getRelationship', 'gender' => 'getGender', 'ssn' => 'getSsn', + 'sin' => 'getSin', 'date_of_birth' => 'getDateOfBirth', 'address_line1' => 'getAddressLine1', 'address_line2' => 'getAddressLine2', @@ -317,6 +323,35 @@ public function getModelName() { return self::$openApiModelName; } + public const IS_US_CITIZEN_YES = 'yes'; + public const IS_US_CITIZEN_NO = 'no'; + public const IS_STUDENT_YES = 'yes'; + public const IS_STUDENT_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsUsCitizenAllowableValues() { + return [ + self::IS_US_CITIZEN_YES, + self::IS_US_CITIZEN_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsStudentAllowableValues() { + return [ + self::IS_STUDENT_YES, + self::IS_STUDENT_NO, + ]; + } + /** * Associative array for storing property values * @@ -338,6 +373,7 @@ public function __construct(?array $data = null) { $this->setIfExists('relationship', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); $this->setIfExists('ssn', $data ?? [], null); + $this->setIfExists('sin', $data ?? [], null); $this->setIfExists('date_of_birth', $data ?? [], null); $this->setIfExists('address_line1', $data ?? [], null); $this->setIfExists('address_line2', $data ?? [], null); @@ -375,6 +411,27 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['employee_id'] === null) { + $invalidProperties[] = "'employee_id' can't be null"; + } + $allowedValues = $this->getIsUsCitizenAllowableValues(); + if (!is_null($this->container['is_us_citizen']) && !in_array($this->container['is_us_citizen'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'is_us_citizen', must be one of '%s'", + $this->container['is_us_citizen'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsStudentAllowableValues(); + if (!is_null($this->container['is_student']) && !in_array($this->container['is_student'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'is_student', must be one of '%s'", + $this->container['is_student'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -391,7 +448,7 @@ public function valid() { /** * Gets employee_id * - * @return string|null + * @return string */ public function getEmployeeId() { return $this->container['employee_id']; @@ -400,7 +457,7 @@ public function getEmployeeId() { /** * Sets employee_id * - * @param string|null $employee_id employee_id + * @param string $employee_id The ID of the employee this dependent belongs to. Required. * * @return self */ @@ -425,7 +482,7 @@ public function getFirstName() { /** * Sets first_name * - * @param string|null $first_name first_name + * @param string|null $first_name The dependent's first name. * * @return self */ @@ -450,7 +507,7 @@ public function getMiddleName() { /** * Sets middle_name * - * @param string|null $middle_name middle_name + * @param string|null $middle_name The dependent's middle name. * * @return self */ @@ -475,7 +532,7 @@ public function getLastName() { /** * Sets last_name * - * @param string|null $last_name last_name + * @param string|null $last_name The dependent's last name. * * @return self */ @@ -500,7 +557,7 @@ public function getRelationship() { /** * Sets relationship * - * @param string|null $relationship relationship + * @param string|null $relationship The dependent's relationship to the employee (e.g. \"spouse\", \"child\", \"domestic_partner\"). * * @return self */ @@ -525,7 +582,7 @@ public function getGender() { /** * Sets gender * - * @param string|null $gender gender + * @param string|null $gender The dependent's gender. * * @return self */ @@ -550,7 +607,7 @@ public function getSsn() { /** * Sets ssn * - * @param string|null $ssn ssn + * @param string|null $ssn The dependent's Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. \"xxx-xx-1234\") on read. * * @return self */ @@ -564,10 +621,35 @@ public function setSsn($ssn) { } /** - * Gets date_of_birth + * Gets sin * * @return string|null */ + public function getSin() { + return $this->container['sin']; + } + + /** + * Sets sin + * + * @param string|null $sin The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read. + * + * @return self + */ + public function setSin($sin) { + if (is_null($sin)) { + throw new \InvalidArgumentException('non-nullable sin cannot be null'); + } + $this->container['sin'] = $sin; + + return $this; + } + + /** + * Gets date_of_birth + * + * @return \DateTime|null + */ public function getDateOfBirth() { return $this->container['date_of_birth']; } @@ -575,7 +657,7 @@ public function getDateOfBirth() { /** * Sets date_of_birth * - * @param string|null $date_of_birth date_of_birth + * @param \DateTime|null $date_of_birth The dependent's date of birth in YYYY-MM-DD format. * * @return self */ @@ -600,7 +682,7 @@ public function getAddressLine1() { /** * Sets address_line1 * - * @param string|null $address_line1 address_line1 + * @param string|null $address_line1 The first line of the dependent's address. * * @return self */ @@ -625,7 +707,7 @@ public function getAddressLine2() { /** * Sets address_line2 * - * @param string|null $address_line2 address_line2 + * @param string|null $address_line2 The second line of the dependent's address. * * @return self */ @@ -650,7 +732,7 @@ public function getCity() { /** * Sets city * - * @param string|null $city city + * @param string|null $city The dependent's city. * * @return self */ @@ -675,7 +757,7 @@ public function getState() { /** * Sets state * - * @param string|null $state state + * @param string|null $state The dependent's state, provided as a state code (e.g. \"UT\"). Returned as a full state name on read. * * @return self */ @@ -700,7 +782,7 @@ public function getZipCode() { /** * Sets zip_code * - * @param string|null $zip_code zip_code + * @param string|null $zip_code The dependent's ZIP or postal code. * * @return self */ @@ -725,7 +807,7 @@ public function getHomePhone() { /** * Sets home_phone * - * @param string|null $home_phone home_phone + * @param string|null $home_phone The dependent's home phone number. * * @return self */ @@ -750,7 +832,7 @@ public function getCountry() { /** * Sets country * - * @param string|null $country country + * @param string|null $country The dependent's country, provided as an ISO 3166-1 alpha-2 country code (e.g. \"US\"). Returned as a full country name on read. * * @return self */ @@ -775,7 +857,7 @@ public function getIsUsCitizen() { /** * Sets is_us_citizen * - * @param string|null $is_us_citizen is_us_citizen + * @param string|null $is_us_citizen Whether the dependent is a US citizen. Accepted values: \"yes\" or \"no\". * * @return self */ @@ -783,6 +865,16 @@ public function setIsUsCitizen($is_us_citizen) { if (is_null($is_us_citizen)) { throw new \InvalidArgumentException('non-nullable is_us_citizen cannot be null'); } + $allowedValues = $this->getIsUsCitizenAllowableValues(); + if (!in_array($is_us_citizen, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'is_us_citizen', must be one of '%s'", + $is_us_citizen, + implode("', '", $allowedValues) + ) + ); + } $this->container['is_us_citizen'] = $is_us_citizen; return $this; @@ -800,7 +892,7 @@ public function getIsStudent() { /** * Sets is_student * - * @param string|null $is_student is_student + * @param string|null $is_student Whether the dependent is currently a student. Accepted values: \"yes\" or \"no\". * * @return self */ @@ -808,6 +900,16 @@ public function setIsStudent($is_student) { if (is_null($is_student)) { throw new \InvalidArgumentException('non-nullable is_student cannot be null'); } + $allowedValues = $this->getIsStudentAllowableValues(); + if (!in_array($is_student, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'is_student', must be one of '%s'", + $is_student, + implode("', '", $allowedValues) + ) + ); + } $this->container['is_student'] = $is_student; return $this; diff --git a/lib/Model/EmployeeDependentsResponse.php b/lib/Model/EmployeeDependentsResponse.php new file mode 100644 index 00000000..a9d430e2 --- /dev/null +++ b/lib/Model/EmployeeDependentsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * EmployeeDependentsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeDependentsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeDependentsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeDependentsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_dependents' => '\BhrSdk\Model\EmployeeDependentsResponseEmployeeDependentsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_dependents' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_dependents' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_dependents' => 'Employee Dependents' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_dependents' => 'setEmployeeDependents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_dependents' => 'getEmployeeDependents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_dependents', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_dependents + * + * @return \BhrSdk\Model\EmployeeDependentsResponseEmployeeDependentsInner[]|null + */ + public function getEmployeeDependents() { + return $this->container['employee_dependents']; + } + + /** + * Sets employee_dependents + * + * @param \BhrSdk\Model\EmployeeDependentsResponseEmployeeDependentsInner[]|null $employee_dependents Array of employee dependent objects. + * + * @return self + */ + public function setEmployeeDependents($employee_dependents) { + if (is_null($employee_dependents)) { + throw new \InvalidArgumentException('non-nullable employee_dependents cannot be null'); + } + $this->container['employee_dependents'] = $employee_dependents; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeDependentsResponseEmployeeDependentsInner.php b/lib/Model/EmployeeDependentsResponseEmployeeDependentsInner.php new file mode 100644 index 00000000..58e7c1d0 --- /dev/null +++ b/lib/Model/EmployeeDependentsResponseEmployeeDependentsInner.php @@ -0,0 +1,1103 @@ +<?php +declare(strict_types=1); +/** + * EmployeeDependentsResponseEmployeeDependentsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeDependentsResponseEmployeeDependentsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeDependentsResponseEmployeeDependentsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeDependentsResponse_Employee_Dependents_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'employee_id' => 'string', + 'first_name' => 'string', + 'middle_name' => 'string', + 'last_name' => 'string', + 'relationship' => 'string', + 'gender' => 'string', + 'masked_ssn' => 'string', + 'masked_sin' => 'string', + 'date_of_birth' => '\DateTime', + 'address_line1' => 'string', + 'address_line2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip_code' => 'string', + 'home_phone' => 'string', + 'country' => 'string', + 'is_us_citizen' => 'string', + 'is_student' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'first_name' => null, + 'middle_name' => null, + 'last_name' => null, + 'relationship' => null, + 'gender' => null, + 'masked_ssn' => null, + 'masked_sin' => null, + 'date_of_birth' => 'date', + 'address_line1' => null, + 'address_line2' => null, + 'city' => null, + 'state' => null, + 'zip_code' => null, + 'home_phone' => null, + 'country' => null, + 'is_us_citizen' => null, + 'is_student' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'first_name' => false, + 'middle_name' => true, + 'last_name' => false, + 'relationship' => false, + 'gender' => false, + 'masked_ssn' => true, + 'masked_sin' => true, + 'date_of_birth' => false, + 'address_line1' => true, + 'address_line2' => true, + 'city' => true, + 'state' => true, + 'zip_code' => true, + 'home_phone' => true, + 'country' => true, + 'is_us_citizen' => true, + 'is_student' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'first_name' => 'firstName', + 'middle_name' => 'middleName', + 'last_name' => 'lastName', + 'relationship' => 'relationship', + 'gender' => 'gender', + 'masked_ssn' => 'maskedSSN', + 'masked_sin' => 'maskedSIN', + 'date_of_birth' => 'dateOfBirth', + 'address_line1' => 'addressLine1', + 'address_line2' => 'addressLine2', + 'city' => 'city', + 'state' => 'state', + 'zip_code' => 'zipCode', + 'home_phone' => 'homePhone', + 'country' => 'country', + 'is_us_citizen' => 'isUsCitizen', + 'is_student' => 'isStudent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'first_name' => 'setFirstName', + 'middle_name' => 'setMiddleName', + 'last_name' => 'setLastName', + 'relationship' => 'setRelationship', + 'gender' => 'setGender', + 'masked_ssn' => 'setMaskedSsn', + 'masked_sin' => 'setMaskedSin', + 'date_of_birth' => 'setDateOfBirth', + 'address_line1' => 'setAddressLine1', + 'address_line2' => 'setAddressLine2', + 'city' => 'setCity', + 'state' => 'setState', + 'zip_code' => 'setZipCode', + 'home_phone' => 'setHomePhone', + 'country' => 'setCountry', + 'is_us_citizen' => 'setIsUsCitizen', + 'is_student' => 'setIsStudent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'first_name' => 'getFirstName', + 'middle_name' => 'getMiddleName', + 'last_name' => 'getLastName', + 'relationship' => 'getRelationship', + 'gender' => 'getGender', + 'masked_ssn' => 'getMaskedSsn', + 'masked_sin' => 'getMaskedSin', + 'date_of_birth' => 'getDateOfBirth', + 'address_line1' => 'getAddressLine1', + 'address_line2' => 'getAddressLine2', + 'city' => 'getCity', + 'state' => 'getState', + 'zip_code' => 'getZipCode', + 'home_phone' => 'getHomePhone', + 'country' => 'getCountry', + 'is_us_citizen' => 'getIsUsCitizen', + 'is_student' => 'getIsStudent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const IS_US_CITIZEN_YES = 'yes'; + public const IS_US_CITIZEN_NO = 'no'; + public const IS_STUDENT_YES = 'yes'; + public const IS_STUDENT_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsUsCitizenAllowableValues() { + return [ + self::IS_US_CITIZEN_YES, + self::IS_US_CITIZEN_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIsStudentAllowableValues() { + return [ + self::IS_STUDENT_YES, + self::IS_STUDENT_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('middle_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('relationship', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('masked_ssn', $data ?? [], null); + $this->setIfExists('masked_sin', $data ?? [], null); + $this->setIfExists('date_of_birth', $data ?? [], null); + $this->setIfExists('address_line1', $data ?? [], null); + $this->setIfExists('address_line2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zip_code', $data ?? [], null); + $this->setIfExists('home_phone', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('is_us_citizen', $data ?? [], null); + $this->setIfExists('is_student', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getIsUsCitizenAllowableValues(); + if (!is_null($this->container['is_us_citizen']) && !in_array($this->container['is_us_citizen'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'is_us_citizen', must be one of '%s'", + $this->container['is_us_citizen'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIsStudentAllowableValues(); + if (!is_null($this->container['is_student']) && !in_array($this->container['is_student'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'is_student', must be one of '%s'", + $this->container['is_student'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique ID of the dependent record. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id The ID of the employee this dependent belongs to. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name The dependent's first name. + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + throw new \InvalidArgumentException('non-nullable first_name cannot be null'); + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets middle_name + * + * @return string|null + */ + public function getMiddleName() { + return $this->container['middle_name']; + } + + /** + * Sets middle_name + * + * @param string|null $middle_name middle_name + * + * @return self + */ + public function setMiddleName($middle_name) { + if (is_null($middle_name)) { + $this->openApiNullablesSetToNull['middle_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['middle_name'])) { + unset($nullablesSetToNull['middle_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['middle_name'] = $middle_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name The dependent's last name. + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets relationship + * + * @return string|null + */ + public function getRelationship() { + return $this->container['relationship']; + } + + /** + * Sets relationship + * + * @param string|null $relationship The dependent's relationship to the employee. + * + * @return self + */ + public function setRelationship($relationship) { + if (is_null($relationship)) { + throw new \InvalidArgumentException('non-nullable relationship cannot be null'); + } + $this->container['relationship'] = $relationship; + + return $this; + } + + /** + * Gets gender + * + * @return string|null + */ + public function getGender() { + return $this->container['gender']; + } + + /** + * Sets gender + * + * @param string|null $gender The dependent's gender. + * + * @return self + */ + public function setGender($gender) { + if (is_null($gender)) { + throw new \InvalidArgumentException('non-nullable gender cannot be null'); + } + $this->container['gender'] = $gender; + + return $this; + } + + /** + * Gets masked_ssn + * + * @return string|null + */ + public function getMaskedSsn() { + return $this->container['masked_ssn']; + } + + /** + * Sets masked_ssn + * + * @param string|null $masked_ssn masked_ssn + * + * @return self + */ + public function setMaskedSsn($masked_ssn) { + if (is_null($masked_ssn)) { + $this->openApiNullablesSetToNull['masked_ssn'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['masked_ssn'])) { + unset($nullablesSetToNull['masked_ssn']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['masked_ssn'] = $masked_ssn; + + return $this; + } + + /** + * Gets masked_sin + * + * @return string|null + */ + public function getMaskedSin() { + return $this->container['masked_sin']; + } + + /** + * Sets masked_sin + * + * @param string|null $masked_sin masked_sin + * + * @return self + */ + public function setMaskedSin($masked_sin) { + if (is_null($masked_sin)) { + $this->openApiNullablesSetToNull['masked_sin'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['masked_sin'])) { + unset($nullablesSetToNull['masked_sin']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['masked_sin'] = $masked_sin; + + return $this; + } + + /** + * Gets date_of_birth + * + * @return \DateTime|null + */ + public function getDateOfBirth() { + return $this->container['date_of_birth']; + } + + /** + * Sets date_of_birth + * + * @param \DateTime|null $date_of_birth The dependent's date of birth in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfBirth($date_of_birth) { + if (is_null($date_of_birth)) { + throw new \InvalidArgumentException('non-nullable date_of_birth cannot be null'); + } + $this->container['date_of_birth'] = $date_of_birth; + + return $this; + } + + /** + * Gets address_line1 + * + * @return string|null + */ + public function getAddressLine1() { + return $this->container['address_line1']; + } + + /** + * Sets address_line1 + * + * @param string|null $address_line1 address_line1 + * + * @return self + */ + public function setAddressLine1($address_line1) { + if (is_null($address_line1)) { + $this->openApiNullablesSetToNull['address_line1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address_line1'])) { + unset($nullablesSetToNull['address_line1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address_line1'] = $address_line1; + + return $this; + } + + /** + * Gets address_line2 + * + * @return string|null + */ + public function getAddressLine2() { + return $this->container['address_line2']; + } + + /** + * Sets address_line2 + * + * @param string|null $address_line2 address_line2 + * + * @return self + */ + public function setAddressLine2($address_line2) { + if (is_null($address_line2)) { + $this->openApiNullablesSetToNull['address_line2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address_line2'])) { + unset($nullablesSetToNull['address_line2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address_line2'] = $address_line2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state state + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + $this->openApiNullablesSetToNull['state'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state'])) { + unset($nullablesSetToNull['state']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zip_code + * + * @return string|null + */ + public function getZipCode() { + return $this->container['zip_code']; + } + + /** + * Sets zip_code + * + * @param string|null $zip_code zip_code + * + * @return self + */ + public function setZipCode($zip_code) { + if (is_null($zip_code)) { + $this->openApiNullablesSetToNull['zip_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zip_code'])) { + unset($nullablesSetToNull['zip_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zip_code'] = $zip_code; + + return $this; + } + + /** + * Gets home_phone + * + * @return string|null + */ + public function getHomePhone() { + return $this->container['home_phone']; + } + + /** + * Sets home_phone + * + * @param string|null $home_phone home_phone + * + * @return self + */ + public function setHomePhone($home_phone) { + if (is_null($home_phone)) { + $this->openApiNullablesSetToNull['home_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['home_phone'])) { + unset($nullablesSetToNull['home_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['home_phone'] = $home_phone; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + $this->openApiNullablesSetToNull['country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country'])) { + unset($nullablesSetToNull['country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets is_us_citizen + * + * @return string|null + */ + public function getIsUsCitizen() { + return $this->container['is_us_citizen']; + } + + /** + * Sets is_us_citizen + * + * @param string|null $is_us_citizen is_us_citizen + * + * @return self + */ + public function setIsUsCitizen($is_us_citizen) { + if (is_null($is_us_citizen)) { + $this->openApiNullablesSetToNull['is_us_citizen'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_us_citizen'])) { + unset($nullablesSetToNull['is_us_citizen']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getIsUsCitizenAllowableValues(); + if (!is_null($is_us_citizen) && !in_array($is_us_citizen, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'is_us_citizen', must be one of '%s'", + $is_us_citizen, + implode("', '", $allowedValues) + ) + ); + } + $this->container['is_us_citizen'] = $is_us_citizen; + + return $this; + } + + /** + * Gets is_student + * + * @return string|null + */ + public function getIsStudent() { + return $this->container['is_student']; + } + + /** + * Sets is_student + * + * @param string|null $is_student is_student + * + * @return self + */ + public function setIsStudent($is_student) { + if (is_null($is_student)) { + $this->openApiNullablesSetToNull['is_student'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_student'])) { + unset($nullablesSetToNull['is_student']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getIsStudentAllowableValues(); + if (!is_null($is_student) && !in_array($is_student, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'is_student', must be one of '%s'", + $is_student, + implode("', '", $allowedValues) + ) + ); + } + $this->container['is_student'] = $is_student; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeFileUpdate.php b/lib/Model/EmployeeFileUpdate.php index 8a88cff2..a74a50c9 100644 --- a/lib/Model/EmployeeFileUpdate.php +++ b/lib/Model/EmployeeFileUpdate.php @@ -58,8 +58,9 @@ class EmployeeFileUpdate implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openApiTypes = [ 'name' => 'string', - 'category_id' => 'string', - 'share_with_employee' => 'string' + 'category_id' => 'int', + 'share_with_employee' => 'string', + 'share_with_employees' => 'string' ]; /** @@ -72,7 +73,8 @@ class EmployeeFileUpdate implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openApiFormats = [ 'name' => null, 'category_id' => null, - 'share_with_employee' => null + 'share_with_employee' => null, + 'share_with_employees' => null ]; /** @@ -84,7 +86,8 @@ class EmployeeFileUpdate implements ModelInterface, ArrayAccess, \JsonSerializab protected static array $openApiNullables = [ 'name' => false, 'category_id' => false, - 'share_with_employee' => false + 'share_with_employee' => false, + 'share_with_employees' => false ]; /** @@ -171,7 +174,8 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'name' => 'name', 'category_id' => 'categoryId', - 'share_with_employee' => 'shareWithEmployee' + 'share_with_employee' => 'shareWithEmployee', + 'share_with_employees' => 'shareWithEmployees' ]; /** @@ -182,7 +186,8 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'name' => 'setName', 'category_id' => 'setCategoryId', - 'share_with_employee' => 'setShareWithEmployee' + 'share_with_employee' => 'setShareWithEmployee', + 'share_with_employees' => 'setShareWithEmployees' ]; /** @@ -193,7 +198,8 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'name' => 'getName', 'category_id' => 'getCategoryId', - 'share_with_employee' => 'getShareWithEmployee' + 'share_with_employee' => 'getShareWithEmployee', + 'share_with_employees' => 'getShareWithEmployees' ]; /** @@ -233,6 +239,35 @@ public function getModelName() { return self::$openApiModelName; } + public const SHARE_WITH_EMPLOYEE_YES = 'yes'; + public const SHARE_WITH_EMPLOYEE_NO = 'no'; + public const SHARE_WITH_EMPLOYEES_YES = 'yes'; + public const SHARE_WITH_EMPLOYEES_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeeAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEE_YES, + self::SHARE_WITH_EMPLOYEE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeesAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEES_YES, + self::SHARE_WITH_EMPLOYEES_NO, + ]; + } + /** * Associative array for storing property values * @@ -250,6 +285,7 @@ public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('category_id', $data ?? [], null); $this->setIfExists('share_with_employee', $data ?? [], null); + $this->setIfExists('share_with_employees', $data ?? [], null); } /** @@ -277,6 +313,24 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!is_null($this->container['share_with_employee']) && !in_array($this->container['share_with_employee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employee', must be one of '%s'", + $this->container['share_with_employee'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getShareWithEmployeesAllowableValues(); + if (!is_null($this->container['share_with_employees']) && !in_array($this->container['share_with_employees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employees', must be one of '%s'", + $this->container['share_with_employees'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -302,7 +356,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name The new display name for the file. * * @return self */ @@ -318,7 +372,7 @@ public function setName($name) { /** * Gets category_id * - * @return string|null + * @return int|null */ public function getCategoryId() { return $this->container['category_id']; @@ -327,7 +381,7 @@ public function getCategoryId() { /** * Sets category_id * - * @param string|null $category_id category_id + * @param int|null $category_id The ID of the file category (section) to move the file into. * * @return self */ @@ -352,7 +406,7 @@ public function getShareWithEmployee() { /** * Sets share_with_employee * - * @param string|null $share_with_employee share_with_employee + * @param string|null $share_with_employee Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'. * * @return self */ @@ -360,10 +414,55 @@ public function setShareWithEmployee($share_with_employee) { if (is_null($share_with_employee)) { throw new \InvalidArgumentException('non-nullable share_with_employee cannot be null'); } + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!in_array($share_with_employee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employee', must be one of '%s'", + $share_with_employee, + implode("', '", $allowedValues) + ) + ); + } $this->container['share_with_employee'] = $share_with_employee; return $this; } + + /** + * Gets share_with_employees + * + * @return string|null + */ + public function getShareWithEmployees() { + return $this->container['share_with_employees']; + } + + /** + * Sets share_with_employees + * + * @param string|null $share_with_employees Alias for shareWithEmployee. Whether the file is shared with the employee. + * + * @return self + */ + public function setShareWithEmployees($share_with_employees) { + if (is_null($share_with_employees)) { + throw new \InvalidArgumentException('non-nullable share_with_employees cannot be null'); + } + $allowedValues = $this->getShareWithEmployeesAllowableValues(); + if (!in_array($share_with_employees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employees', must be one of '%s'", + $share_with_employees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['share_with_employees'] = $share_with_employees; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/EmployeeOptionalField.php b/lib/Model/EmployeeOptionalField.php new file mode 100644 index 00000000..1742bcc9 --- /dev/null +++ b/lib/Model/EmployeeOptionalField.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * EmployeeOptionalField + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeOptionalField Class Doc Comment + * + * @category Class + * @description Valid field names that can be passed via the `fields` query parameter to request additional employee data beyond the default set. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class EmployeeOptionalField +{ + /** + * Possible values of this enum + */ + public const ADDRESS_LINE1 = 'addressLine1'; + + public const ADDRESS_LINE2 = 'addressLine2'; + + public const AGE = 'age'; + + public const ALLERGIES = 'allergies'; + + public const BEST_EMAIL = 'bestEmail'; + + public const BIRTH_DATE = 'birthDate'; + + public const BIRTHPLACE = 'birthplace'; + + public const CITIZENSHIP = 'citizenship'; + + public const CITIZENSHIP_ID = 'citizenshipId'; + + public const CITY = 'city'; + + public const COMPENSATION_CHANGE_REASON = 'compensationChangeReason'; + + public const COMPENSATION_CHANGE_REASON_ID = 'compensationChangeReasonId'; + + public const COMPENSATION_COMMENT = 'compensationComment'; + + public const COMPENSATION_EFFECTIVE_DATE = 'compensationEffectiveDate'; + + public const COMPENSATION_END_DATE = 'compensationEndDate'; + + public const CONTRACT_END_DATE = 'contractEndDate'; + + public const COUNTRY = 'country'; + + public const COUNTRY_ID = 'countryId'; + + public const DEPARTMENT_ID = 'departmentId'; + + public const DEPARTMENT_NAME = 'departmentName'; + + public const DIETARY_RESTRICTIONS = 'dietaryRestrictions'; + + public const DISPLAY_NAME = 'displayName'; + + public const DIVISION_ID = 'divisionId'; + + public const DIVISION_NAME = 'divisionName'; + + public const EEO_JOB_CATEGORY = 'eeoJobCategory'; + + public const EEO_JOB_CATEGORY_ID = 'eeoJobCategoryId'; + + public const EIN = 'ein'; + + public const ELIGIBLE_FOR_REHIRE = 'eligibleForRehire'; + + public const ELIGIBLE_FOR_REHIRE_ID = 'eligibleForRehireId'; + + public const EMPLOYEE_NAME = 'employeeName'; + + public const EMPLOYEE_NUMBER = 'employeeNumber'; + + public const EMPLOYMENT_STATUS_COMMENT = 'employmentStatusComment'; + + public const EMPLOYMENT_STATUS_EFFECTIVE_DATE = 'employmentStatusEffectiveDate'; + + public const EMPLOYMENT_STATUS_ID = 'employmentStatusId'; + + public const EMPLOYMENT_STATUS_NAME = 'employmentStatusName'; + + public const EMPLOYMENT_TYPE = 'employmentType'; + + public const EMPLOYMENT_TYPE_ID = 'employmentTypeId'; + + public const ETHNICITY = 'ethnicity'; + + public const ETHNICITY_ID = 'ethnicityId'; + + public const FACEBOOK_URL = 'facebookUrl'; + + public const FINAL_DOSE_ADMINISTRATION_DATE = 'finalDoseAdministrationDate'; + + public const FINAL_PAY_DATE = 'finalPayDate'; + + public const FIRST_NAME_LAST_NAME = 'firstNameLastName'; + + public const FIRST_NAME_MIDDLE_INITIAL = 'firstNameMiddleInitial'; + + public const FLSA_CODE = 'flsaCode'; + + public const FLSA_CODE_ID = 'flsaCodeId'; + + public const GENDER = 'gender'; + + public const GENDER_IDENTITY = 'genderIdentity'; + + public const GENDER_IDENTITY_ID = 'genderIdentityId'; + + public const HIRE_DATE = 'hireDate'; + + public const HOME_EMAIL = 'homeEmail'; + + public const HOME_PHONE = 'homePhone'; + + public const HOURS_PER_PAY_CYCLE = 'hoursPerPayCycle'; + + public const INSTAGRAM_URL = 'instagramUrl'; + + public const IS_MANAGER = 'isManager'; + + public const JACKET_SIZE = 'jacketSize'; + + public const JACKET_SIZE_ID = 'jacketSizeId'; + + public const JOB_INFORMATION_EFFECTIVE_DATE = 'jobInformationEffectiveDate'; + + public const JOB_TITLE_ID = 'jobTitleId'; + + public const LINKEDIN_URL = 'linkedinUrl'; + + public const LOCATION_ID = 'locationId'; + + public const LOCATION_NAME = 'locationName'; + + public const MARITAL_STATUS = 'maritalStatus'; + + public const MIDDLE_INITIAL = 'middleInitial'; + + public const MIDDLE_NAME = 'middleName'; + + public const MOBILE_PHONE = 'mobilePhone'; + + public const NATIONAL_ID = 'nationalId'; + + public const NATIONAL_INSURANCE_CATEGORY = 'nationalInsuranceCategory'; + + public const NATIONAL_INSURANCE_CATEGORY_ID = 'nationalInsuranceCategoryId'; + + public const NATIONALITY = 'nationality'; + + public const NATIONALITY_ID = 'nationalityId'; + + public const NICK_NAME = 'nickName'; + + public const NIN = 'nin'; + + public const NOTICE_PERIOD = 'noticePeriod'; + + public const NOTICE_PERIOD_ID = 'noticePeriodId'; + + public const ORIGINAL_HIRE_DATE = 'originalHireDate'; + + public const OVERTIME = 'overtime'; + + public const OVERTIME_RATE = 'overtimeRate'; + + public const PAID_PER = 'paidPer'; + + public const PAY_RATE = 'payRate'; + + public const PAY_SCHEDULE = 'paySchedule'; + + public const PAY_SCHEDULE_ID = 'payScheduleId'; + + public const PAY_TYPE = 'payType'; + + public const PINTEREST_URL = 'pinterestUrl'; + + public const PREFERRED_NAME_LAST_NAME = 'preferredNameLastName'; + + public const PROBATION_END_DATE = 'probationEndDate'; + + public const PRONOUNS = 'pronouns'; + + public const PRONOUNS_ID = 'pronounsId'; + + public const PROOF_OF_VACCINATION = 'proofOfVaccination'; + + public const REPORTS_TO_ID = 'reportsToId'; + + public const REPORTS_TO_NAME = 'reportsToName'; + + public const SECONDARY_LANGUAGE = 'secondaryLanguage'; + + public const SHIRT_SIZE = 'shirtSize'; + + public const SHIRT_SIZE_ID = 'shirtSizeId'; + + public const SIN = 'sin'; + + public const SKYPE_USERNAME = 'skypeUsername'; + + public const SSN = 'ssn'; + + public const STATE = 'state'; + + public const STATE_ID = 'stateId'; + + public const TAX_TYPE_ID = 'taxTypeId'; + + public const TEAMS = 'teams'; + + public const TENURE = 'tenure'; + + public const TERMINATION_DATE = 'terminationDate'; + + public const TERMINATION_REASON = 'terminationReason'; + + public const TERMINATION_REASON_ID = 'terminationReasonId'; + + public const TERMINATION_REGRETTABLE = 'terminationRegrettable'; + + public const TERMINATION_REGRETTABLE_ID = 'terminationRegrettableId'; + + public const TERMINATION_TYPE = 'terminationType'; + + public const TERMINATION_TYPE_ID = 'terminationTypeId'; + + public const T_SHIRT_SIZE = 'tShirtSize'; + + public const T_SHIRT_SIZE_ID = 'tShirtSizeId'; + + public const TWITTER_URL = 'twitterUrl'; + + public const USER_ID = 'userId'; + + public const VACCINATION_STATUS = 'vaccinationStatus'; + + public const VACCINATION_STATUS_ID = 'vaccinationStatusId'; + + public const VACCINE_RECEIVED = 'vaccineReceived'; + + public const VACCINE_RECEIVED_ID = 'vaccineReceivedId'; + + public const VETERAN_STATUS = 'veteranStatus'; + + public const VETERAN_STATUS_ID = 'veteranStatusId'; + + public const WORK_EMAIL = 'workEmail'; + + public const WORK_PHONE = 'workPhone'; + + public const WORK_PHONE_EXTENSION = 'workPhoneExtension'; + + public const ZIPCODE = 'zipcode'; + + /** + * Gets allowable values of the enum + * @return string[] + */ + public static function getAllowableEnumValues() + { + return [ + self::ADDRESS_LINE1, + self::ADDRESS_LINE2, + self::AGE, + self::ALLERGIES, + self::BEST_EMAIL, + self::BIRTH_DATE, + self::BIRTHPLACE, + self::CITIZENSHIP, + self::CITIZENSHIP_ID, + self::CITY, + self::COMPENSATION_CHANGE_REASON, + self::COMPENSATION_CHANGE_REASON_ID, + self::COMPENSATION_COMMENT, + self::COMPENSATION_EFFECTIVE_DATE, + self::COMPENSATION_END_DATE, + self::CONTRACT_END_DATE, + self::COUNTRY, + self::COUNTRY_ID, + self::DEPARTMENT_ID, + self::DEPARTMENT_NAME, + self::DIETARY_RESTRICTIONS, + self::DISPLAY_NAME, + self::DIVISION_ID, + self::DIVISION_NAME, + self::EEO_JOB_CATEGORY, + self::EEO_JOB_CATEGORY_ID, + self::EIN, + self::ELIGIBLE_FOR_REHIRE, + self::ELIGIBLE_FOR_REHIRE_ID, + self::EMPLOYEE_NAME, + self::EMPLOYEE_NUMBER, + self::EMPLOYMENT_STATUS_COMMENT, + self::EMPLOYMENT_STATUS_EFFECTIVE_DATE, + self::EMPLOYMENT_STATUS_ID, + self::EMPLOYMENT_STATUS_NAME, + self::EMPLOYMENT_TYPE, + self::EMPLOYMENT_TYPE_ID, + self::ETHNICITY, + self::ETHNICITY_ID, + self::FACEBOOK_URL, + self::FINAL_DOSE_ADMINISTRATION_DATE, + self::FINAL_PAY_DATE, + self::FIRST_NAME_LAST_NAME, + self::FIRST_NAME_MIDDLE_INITIAL, + self::FLSA_CODE, + self::FLSA_CODE_ID, + self::GENDER, + self::GENDER_IDENTITY, + self::GENDER_IDENTITY_ID, + self::HIRE_DATE, + self::HOME_EMAIL, + self::HOME_PHONE, + self::HOURS_PER_PAY_CYCLE, + self::INSTAGRAM_URL, + self::IS_MANAGER, + self::JACKET_SIZE, + self::JACKET_SIZE_ID, + self::JOB_INFORMATION_EFFECTIVE_DATE, + self::JOB_TITLE_ID, + self::LINKEDIN_URL, + self::LOCATION_ID, + self::LOCATION_NAME, + self::MARITAL_STATUS, + self::MIDDLE_INITIAL, + self::MIDDLE_NAME, + self::MOBILE_PHONE, + self::NATIONAL_ID, + self::NATIONAL_INSURANCE_CATEGORY, + self::NATIONAL_INSURANCE_CATEGORY_ID, + self::NATIONALITY, + self::NATIONALITY_ID, + self::NICK_NAME, + self::NIN, + self::NOTICE_PERIOD, + self::NOTICE_PERIOD_ID, + self::ORIGINAL_HIRE_DATE, + self::OVERTIME, + self::OVERTIME_RATE, + self::PAID_PER, + self::PAY_RATE, + self::PAY_SCHEDULE, + self::PAY_SCHEDULE_ID, + self::PAY_TYPE, + self::PINTEREST_URL, + self::PREFERRED_NAME_LAST_NAME, + self::PROBATION_END_DATE, + self::PRONOUNS, + self::PRONOUNS_ID, + self::PROOF_OF_VACCINATION, + self::REPORTS_TO_ID, + self::REPORTS_TO_NAME, + self::SECONDARY_LANGUAGE, + self::SHIRT_SIZE, + self::SHIRT_SIZE_ID, + self::SIN, + self::SKYPE_USERNAME, + self::SSN, + self::STATE, + self::STATE_ID, + self::TAX_TYPE_ID, + self::TEAMS, + self::TENURE, + self::TERMINATION_DATE, + self::TERMINATION_REASON, + self::TERMINATION_REASON_ID, + self::TERMINATION_REGRETTABLE, + self::TERMINATION_REGRETTABLE_ID, + self::TERMINATION_TYPE, + self::TERMINATION_TYPE_ID, + self::T_SHIRT_SIZE, + self::T_SHIRT_SIZE_ID, + self::TWITTER_URL, + self::USER_ID, + self::VACCINATION_STATUS, + self::VACCINATION_STATUS_ID, + self::VACCINE_RECEIVED, + self::VACCINE_RECEIVED_ID, + self::VETERAN_STATUS, + self::VETERAN_STATUS_ID, + self::WORK_EMAIL, + self::WORK_PHONE, + self::WORK_PHONE_EXTENSION, + self::ZIPCODE + ]; + } +} + diff --git a/lib/Model/EmployeePhotoJsonResponse.php b/lib/Model/EmployeePhotoJsonResponse.php new file mode 100644 index 00000000..ec00d5fb --- /dev/null +++ b/lib/Model/EmployeePhotoJsonResponse.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * EmployeePhotoJsonResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeePhotoJsonResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeePhotoJsonResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeePhotoJsonResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'mime_type' => 'string', + 'file_base64' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'mime_type' => null, + 'file_base64' => 'byte' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'mime_type' => false, + 'file_base64' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'mime_type' => 'mimeType', + 'file_base64' => 'fileBase64' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mime_type' => 'setMimeType', + 'file_base64' => 'setFileBase64' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mime_type' => 'getMimeType', + 'file_base64' => 'getFileBase64' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('mime_type', $data ?? [], null); + $this->setIfExists('file_base64', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['mime_type'] === null) { + $invalidProperties[] = "'mime_type' can't be null"; + } + if ($this->container['file_base64'] === null) { + $invalidProperties[] = "'file_base64' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets mime_type + * + * @return string + */ + public function getMimeType() { + return $this->container['mime_type']; + } + + /** + * Sets mime_type + * + * @param string $mime_type The actual MIME type of the underlying image (e.g. `image/jpeg`, `image/png`, `image/bmp`, `image/gif`, `image/tiff`). Use this to identify the format of the decoded bytes. + * + * @return self + */ + public function setMimeType($mime_type) { + if (is_null($mime_type)) { + throw new \InvalidArgumentException('non-nullable mime_type cannot be null'); + } + $this->container['mime_type'] = $mime_type; + + return $this; + } + + /** + * Gets file_base64 + * + * @return string + */ + public function getFileBase64() { + return $this->container['file_base64']; + } + + /** + * Sets file_base64 + * + * @param string $file_base64 Base64-encoded image bytes. Decoding produces the same bytes returned by the binary variant of this endpoint. + * + * @return self + */ + public function setFileBase64($file_base64) { + if (is_null($file_base64)) { + throw new \InvalidArgumentException('non-nullable file_base64 cannot be null'); + } + $this->container['file_base64'] = $file_base64; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeStringCodeErrorResponseV1.php b/lib/Model/EmployeeStringCodeErrorResponseV1.php new file mode 100644 index 00000000..ee622aac --- /dev/null +++ b/lib/Model/EmployeeStringCodeErrorResponseV1.php @@ -0,0 +1,392 @@ +<?php +declare(strict_types=1); +/** + * EmployeeStringCodeErrorResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeStringCodeErrorResponseV1 Class Doc Comment + * + * @category Class + * @description Error response returned by Employee API endpoints where `error.code` is a string identifier. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeStringCodeErrorResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Employee-StringCodeErrorResponse-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => '\BhrSdk\Model\EmployeeStringCodeErrorResponseV1Error' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['error'] === null) { + $invalidProperties[] = "'error' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return \BhrSdk\Model\EmployeeStringCodeErrorResponseV1Error + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \BhrSdk\Model\EmployeeStringCodeErrorResponseV1Error $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/InvalidRequestError.php b/lib/Model/EmployeeStringCodeErrorResponseV1Error.php similarity index 92% rename from lib/Model/InvalidRequestError.php rename to lib/Model/EmployeeStringCodeErrorResponseV1Error.php index d2918136..50738409 100644 --- a/lib/Model/InvalidRequestError.php +++ b/lib/Model/EmployeeStringCodeErrorResponseV1Error.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * InvalidRequestError + * EmployeeStringCodeErrorResponseV1Error * * PHP version 8.1 * @@ -33,16 +33,15 @@ use \BhrSdk\ObjectSerializer; /** - * InvalidRequestError Class Doc Comment + * EmployeeStringCodeErrorResponseV1Error Class Doc Comment * * @category Class - * @description Error details. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class InvalidRequestError implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeeStringCodeErrorResponseV1Error implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +49,7 @@ class InvalidRequestError implements ModelInterface, ArrayAccess, \JsonSerializa * * @var string */ - protected static $openApiModelName = 'InvalidRequest_error'; + protected static $openApiModelName = 'Employee_StringCodeErrorResponse_V1_error'; /** * Array of property to type mappings. Used for (de)serialization @@ -302,7 +301,7 @@ public function getCode() { /** * Sets code * - * @param string $code Error code indicating the type of validation failure. For BadPage errors, common causes include: 1) Invalid page parameter format, 2) Using the wrong paging parameter for before/after cursors, or 3) An employee on the page boundary changed between calls (for example, the employee was deleted or no longer matches the filter criteria). + * @param string $code String error code identifier (for example `BadRequest` or `BadPage`). * * @return self */ @@ -327,7 +326,7 @@ public function getMessage() { /** * Sets message * - * @param string $message Human-readable message describing the validation failure. + * @param string $message Human-readable error message. * * @return self */ diff --git a/lib/Model/EmployeeTableRow.php b/lib/Model/EmployeeTableRow.php new file mode 100644 index 00000000..e10898c1 --- /dev/null +++ b/lib/Model/EmployeeTableRow.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * EmployeeTableRow + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeTableRow Class Doc Comment + * + * @category Class + * @description A single row from the requested table. The returned fields depend on the table and the caller's field-level permissions. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeTableRow implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeTableRow'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'employee_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The table row ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id The employee ID that owns this row. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeTimeOffPolicyAssignment.php b/lib/Model/EmployeeTimeOffPolicyAssignment.php new file mode 100644 index 00000000..707e2ec6 --- /dev/null +++ b/lib/Model/EmployeeTimeOffPolicyAssignment.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * EmployeeTimeOffPolicyAssignment + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeTimeOffPolicyAssignment Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeTimeOffPolicyAssignment implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeTimeOffPolicyAssignment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_policy_id' => 'int', + 'time_off_type_id' => 'int', + 'accrual_start_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_policy_id' => null, + 'time_off_type_id' => null, + 'accrual_start_date' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_policy_id' => false, + 'time_off_type_id' => false, + 'accrual_start_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_policy_id' => 'timeOffPolicyId', + 'time_off_type_id' => 'timeOffTypeId', + 'accrual_start_date' => 'accrualStartDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_policy_id' => 'setTimeOffPolicyId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'accrual_start_date' => 'setAccrualStartDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_policy_id' => 'getTimeOffPolicyId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'accrual_start_date' => 'getAccrualStartDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_policy_id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('accrual_start_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_policy_id + * + * @return int|null + */ + public function getTimeOffPolicyId() { + return $this->container['time_off_policy_id']; + } + + /** + * Sets time_off_policy_id + * + * @param int|null $time_off_policy_id The ID of the assigned time off policy. + * + * @return self + */ + public function setTimeOffPolicyId($time_off_policy_id) { + if (is_null($time_off_policy_id)) { + throw new \InvalidArgumentException('non-nullable time_off_policy_id cannot be null'); + } + $this->container['time_off_policy_id'] = $time_off_policy_id; + + return $this; + } + + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets accrual_start_date + * + * @return \DateTime|null + */ + public function getAccrualStartDate() { + return $this->container['accrual_start_date']; + } + + /** + * Sets accrual_start_date + * + * @param \DateTime|null $accrual_start_date The date accruals started in YYYY-MM-DD format. + * + * @return self + */ + public function setAccrualStartDate($accrual_start_date) { + if (is_null($accrual_start_date)) { + throw new \InvalidArgumentException('non-nullable accrual_start_date cannot be null'); + } + $this->container['accrual_start_date'] = $accrual_start_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeTimeOffPolicyAssignmentV11.php b/lib/Model/EmployeeTimeOffPolicyAssignmentV11.php new file mode 100644 index 00000000..ed64df1d --- /dev/null +++ b/lib/Model/EmployeeTimeOffPolicyAssignmentV11.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * EmployeeTimeOffPolicyAssignmentV11 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeTimeOffPolicyAssignmentV11 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeTimeOffPolicyAssignmentV11 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeTimeOffPolicyAssignmentV1_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_policy_id' => 'int', + 'time_off_type_id' => 'int', + 'accrual_start_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_policy_id' => null, + 'time_off_type_id' => null, + 'accrual_start_date' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_policy_id' => false, + 'time_off_type_id' => false, + 'accrual_start_date' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_policy_id' => 'timeOffPolicyId', + 'time_off_type_id' => 'timeOffTypeId', + 'accrual_start_date' => 'accrualStartDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_policy_id' => 'setTimeOffPolicyId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'accrual_start_date' => 'setAccrualStartDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_policy_id' => 'getTimeOffPolicyId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'accrual_start_date' => 'getAccrualStartDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_policy_id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('accrual_start_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_policy_id + * + * @return int|null + */ + public function getTimeOffPolicyId() { + return $this->container['time_off_policy_id']; + } + + /** + * Sets time_off_policy_id + * + * @param int|null $time_off_policy_id The ID of the assigned time off policy. + * + * @return self + */ + public function setTimeOffPolicyId($time_off_policy_id) { + if (is_null($time_off_policy_id)) { + throw new \InvalidArgumentException('non-nullable time_off_policy_id cannot be null'); + } + $this->container['time_off_policy_id'] = $time_off_policy_id; + + return $this; + } + + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets accrual_start_date + * + * @return \DateTime|null + */ + public function getAccrualStartDate() { + return $this->container['accrual_start_date']; + } + + /** + * Sets accrual_start_date + * + * @param \DateTime|null $accrual_start_date accrual_start_date + * + * @return self + */ + public function setAccrualStartDate($accrual_start_date) { + if (is_null($accrual_start_date)) { + $this->openApiNullablesSetToNull['accrual_start_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['accrual_start_date'])) { + unset($nullablesSetToNull['accrual_start_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accrual_start_date'] = $accrual_start_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeTimeOffRequestApproverResponseInner.php b/lib/Model/EmployeeTimeOffRequestApproverResponseInner.php new file mode 100644 index 00000000..5ad1d3ad --- /dev/null +++ b/lib/Model/EmployeeTimeOffRequestApproverResponseInner.php @@ -0,0 +1,499 @@ +<?php +declare(strict_types=1); +/** + * EmployeeTimeOffRequestApproverResponseInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeTimeOffRequestApproverResponseInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeTimeOffRequestApproverResponseInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeTimeOffRequestApproverResponse_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'user_id' => 'int', + 'display_name' => 'string', + 'employee_id' => 'int', + 'photo_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'user_id' => null, + 'display_name' => null, + 'employee_id' => null, + 'photo_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'user_id' => false, + 'display_name' => false, + 'employee_id' => false, + 'photo_url' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'user_id' => 'userId', + 'display_name' => 'displayName', + 'employee_id' => 'employeeId', + 'photo_url' => 'photoUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'user_id' => 'setUserId', + 'display_name' => 'setDisplayName', + 'employee_id' => 'setEmployeeId', + 'photo_url' => 'setPhotoUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'user_id' => 'getUserId', + 'display_name' => 'getDisplayName', + 'employee_id' => 'getEmployeeId', + 'photo_url' => 'getPhotoUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('photo_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['user_id'] === null) { + $invalidProperties[] = "'user_id' can't be null"; + } + if ($this->container['display_name'] === null) { + $invalidProperties[] = "'display_name' can't be null"; + } + if ($this->container['employee_id'] === null) { + $invalidProperties[] = "'employee_id' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets user_id + * + * @return int + */ + public function getUserId() { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param int $user_id User ID of the approver + * + * @return self + */ + public function setUserId($user_id) { + if (is_null($user_id)) { + throw new \InvalidArgumentException('non-nullable user_id cannot be null'); + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets display_name + * + * @return string + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string $display_name Display name of the approver + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets employee_id + * + * @return int + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int $employee_id Employee ID of the approver + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeTimesheetEntryTransformer.php b/lib/Model/EmployeeTimesheetEntryTransformer.php index b877c6c9..bcd7f8e2 100644 --- a/lib/Model/EmployeeTimesheetEntryTransformer.php +++ b/lib/Model/EmployeeTimesheetEntryTransformer.php @@ -68,7 +68,9 @@ class EmployeeTimesheetEntryTransformer implements ModelInterface, ArrayAccess, 'note' => 'string', 'project_info' => '\BhrSdk\Model\ProjectInfoApiTransformer', 'approved_at' => '\DateTime', - 'approved' => 'bool' + 'approved' => 'bool', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' ]; /** @@ -90,7 +92,9 @@ class EmployeeTimesheetEntryTransformer implements ModelInterface, ArrayAccess, 'note' => null, 'project_info' => null, 'approved_at' => 'date-time', - 'approved' => null + 'approved' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' ]; /** @@ -111,7 +115,9 @@ class EmployeeTimesheetEntryTransformer implements ModelInterface, ArrayAccess, 'note' => true, 'project_info' => true, 'approved_at' => true, - 'approved' => false + 'approved' => false, + 'created_at' => false, + 'updated_at' => true ]; /** @@ -207,7 +213,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'note', 'project_info' => 'projectInfo', 'approved_at' => 'approvedAt', - 'approved' => 'approved' + 'approved' => 'approved', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' ]; /** @@ -227,7 +235,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'setNote', 'project_info' => 'setProjectInfo', 'approved_at' => 'setApprovedAt', - 'approved' => 'setApproved' + 'approved' => 'setApproved', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -247,7 +257,9 @@ public function isNullableSetToNull(string $property): bool { 'note' => 'getNote', 'project_info' => 'getProjectInfo', 'approved_at' => 'getApprovedAt', - 'approved' => 'getApproved' + 'approved' => 'getApproved', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -313,6 +325,8 @@ public function __construct(?array $data = null) { $this->setIfExists('project_info', $data ?? [], null); $this->setIfExists('approved_at', $data ?? [], null); $this->setIfExists('approved', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); } /** @@ -465,7 +479,7 @@ public function getStart() { /** * Sets start * - * @param \DateTime|null $start Start time + * @param \DateTime|null $start start * * @return self */ @@ -496,7 +510,7 @@ public function getEnd() { /** * Sets end * - * @param \DateTime|null $end End time + * @param \DateTime|null $end end * * @return self */ @@ -527,7 +541,7 @@ public function getTimezone() { /** * Sets timezone * - * @param string|null $timezone Timezone + * @param string|null $timezone timezone * * @return self */ @@ -558,7 +572,7 @@ public function getHours() { /** * Sets hours * - * @param float|null $hours Hours worked + * @param float|null $hours hours * * @return self */ @@ -589,7 +603,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note Note + * @param string|null $note note * * @return self */ @@ -651,7 +665,7 @@ public function getApprovedAt() { /** * Sets approved_at * - * @param \DateTime|null $approved_at Approved time + * @param \DateTime|null $approved_at approved_at * * @return self */ @@ -694,6 +708,62 @@ public function setApproved($approved) { return $this; } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Created time + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/EmployeeUpdatedWebhookPayload.php b/lib/Model/EmployeeUpdatedWebhookPayload.php new file mode 100644 index 00000000..a761d07b --- /dev/null +++ b/lib/Model/EmployeeUpdatedWebhookPayload.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * EmployeeUpdatedWebhookPayload + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeUpdatedWebhookPayload Class Doc Comment + * + * @category Class + * @description Webhook payload sent when an employee is updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeUpdatedWebhookPayload implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeUpdatedWebhookPayload'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'timestamp' => '\DateTime', + 'data' => '\BhrSdk\Model\EmployeeUpdatedWebhookPayloadData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'timestamp' => 'date-time', + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'timestamp' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'timestamp' => 'timestamp', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'timestamp' => 'setTimestamp', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'timestamp' => 'getTimestamp', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_EMPLOYEE_UPDATED = 'employee.updated'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_EMPLOYEE_UPDATED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The event type identifier + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp ISO 8601 timestamp (UTC) when the event was fired + * + * @return self + */ + public function setTimestamp($timestamp) { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\EmployeeUpdatedWebhookPayloadData|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\EmployeeUpdatedWebhookPayloadData|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeUpdatedWebhookPayloadData.php b/lib/Model/EmployeeUpdatedWebhookPayloadData.php new file mode 100644 index 00000000..26526828 --- /dev/null +++ b/lib/Model/EmployeeUpdatedWebhookPayloadData.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * EmployeeUpdatedWebhookPayloadData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeUpdatedWebhookPayloadData Class Doc Comment + * + * @category Class + * @description Event data containing employee and change information + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeUpdatedWebhookPayloadData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeUpdatedWebhookPayload_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_id' => 'string', + 'employee_id' => 'string', + 'changed_fields' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_id' => null, + 'employee_id' => null, + 'changed_fields' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_id' => false, + 'employee_id' => false, + 'changed_fields' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_id' => 'companyId', + 'employee_id' => 'employeeId', + 'changed_fields' => 'changedFields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_id' => 'setCompanyId', + 'employee_id' => 'setEmployeeId', + 'changed_fields' => 'setChangedFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_id' => 'getCompanyId', + 'employee_id' => 'getEmployeeId', + 'changed_fields' => 'getChangedFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('changed_fields', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_id + * + * @return string|null + */ + public function getCompanyId() { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string|null $company_id The company ID + * + * @return self + */ + public function setCompanyId($company_id) { + if (is_null($company_id)) { + throw new \InvalidArgumentException('non-nullable company_id cannot be null'); + } + $this->container['company_id'] = $company_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id The employee ID that was updated + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets changed_fields + * + * @return string[]|null + */ + public function getChangedFields() { + return $this->container['changed_fields']; + } + + /** + * Sets changed_fields + * + * @param string[]|null $changed_fields Array of API aliases for fields that changed and are monitored by this webhook + * + * @return self + */ + public function setChangedFields($changed_fields) { + if (is_null($changed_fields)) { + throw new \InvalidArgumentException('non-nullable changed_fields cannot be null'); + } + $this->container['changed_fields'] = $changed_fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeValue.php b/lib/Model/EmployeeValue.php new file mode 100644 index 00000000..cc0e1e3d --- /dev/null +++ b/lib/Model/EmployeeValue.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * EmployeeValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Employee_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeValueAnyOfInner.php b/lib/Model/EmployeeValueAnyOfInner.php new file mode 100644 index 00000000..226634fe --- /dev/null +++ b/lib/Model/EmployeeValueAnyOfInner.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * EmployeeValueAnyOfInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeValueAnyOfInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeValueAnyOfInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Employee_value_anyOf_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeVerificationIntegration.php b/lib/Model/EmployeeVerificationIntegration.php new file mode 100644 index 00000000..1ca5221d --- /dev/null +++ b/lib/Model/EmployeeVerificationIntegration.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationIntegration + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeVerificationIntegration Class Doc Comment + * + * @category Class + * @description Install state and partner metadata for the company's employee verification integration. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeVerificationIntegration implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeVerificationIntegration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'enabled' => 'bool', + 'integration_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'enabled' => null, + 'integration_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'enabled' => false, + 'integration_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'integration_type' => 'integrationType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'integration_type' => 'setIntegrationType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'integration_type' => 'getIntegrationType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('integration_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + if ($this->container['integration_type'] === null) { + $invalidProperties[] = "'integration_type' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled True when the integration is installed for the company and partner endpoints are usable. + * + * @return self + */ + public function setEnabled($enabled) { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets integration_type + * + * @return string + */ + public function getIntegrationType() { + return $this->container['integration_type']; + } + + /** + * Sets integration_type + * + * @param string $integration_type Identifier of the configured employee verification partner (opaque string; matches `integrationType` from the integration GET response). + * + * @return self + */ + public function setIntegrationType($integration_type) { + if (is_null($integration_type)) { + throw new \InvalidArgumentException('non-nullable integration_type cannot be null'); + } + $this->container['integration_type'] = $integration_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingRecordList.php b/lib/Model/EmployeeVerificationIntegrationResponse.php similarity index 87% rename from lib/Model/TrainingRecordList.php rename to lib/Model/EmployeeVerificationIntegrationResponse.php index cdcd84fb..c1edbc61 100644 --- a/lib/Model/TrainingRecordList.php +++ b/lib/Model/EmployeeVerificationIntegrationResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TrainingRecordList + * EmployeeVerificationIntegrationResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TrainingRecordList Class Doc Comment + * EmployeeVerificationIntegrationResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TrainingRecordList implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeeVerificationIntegrationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TrainingRecordList implements ModelInterface, ArrayAccess, \JsonSerializab * * @var string */ - protected static $openApiModelName = 'TrainingRecordList'; + protected static $openApiModelName = 'EmployeeVerificationIntegrationResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class TrainingRecordList implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openApiTypes = [ - 'training_id' => '\BhrSdk\Model\TrainingRecord' + 'integration' => '\BhrSdk\Model\EmployeeVerificationIntegration' ]; /** @@ -68,7 +68,7 @@ class TrainingRecordList implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'training_id' => null + 'integration' => null ]; /** @@ -78,7 +78,7 @@ class TrainingRecordList implements ModelInterface, ArrayAccess, \JsonSerializab * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'training_id' => false + 'integration' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'training_id' => 'trainingId' + 'integration' => 'integration' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'training_id' => 'setTrainingId' + 'integration' => 'setIntegration' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'training_id' => 'getTrainingId' + 'integration' => 'getIntegration' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('training_id', $data ?? [], null); + $this->setIfExists('integration', $data ?? [], null); } /** @@ -263,6 +263,9 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['integration'] === null) { + $invalidProperties[] = "'integration' can't be null"; + } return $invalidProperties; } @@ -277,26 +280,26 @@ public function valid() { } /** - * Gets training_id + * Gets integration * - * @return \BhrSdk\Model\TrainingRecord|null + * @return \BhrSdk\Model\EmployeeVerificationIntegration */ - public function getTrainingId() { - return $this->container['training_id']; + public function getIntegration() { + return $this->container['integration']; } /** - * Sets training_id + * Sets integration * - * @param \BhrSdk\Model\TrainingRecord|null $training_id training_id + * @param \BhrSdk\Model\EmployeeVerificationIntegration $integration integration * * @return self */ - public function setTrainingId($training_id) { - if (is_null($training_id)) { - throw new \InvalidArgumentException('non-nullable training_id cannot be null'); + public function setIntegration($integration) { + if (is_null($integration)) { + throw new \InvalidArgumentException('non-nullable integration cannot be null'); } - $this->container['training_id'] = $training_id; + $this->container['integration'] = $integration; return $this; } diff --git a/lib/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.php b/lib/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.php new file mode 100644 index 00000000..2737c207 --- /dev/null +++ b/lib/Model/EmployeeVerificationLifecycleEmailAcceptedResponse.php @@ -0,0 +1,423 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationLifecycleEmailAcceptedResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeVerificationLifecycleEmailAcceptedResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeVerificationLifecycleEmailAcceptedResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeVerificationLifecycleEmailAcceptedResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeVerificationPublicApiRecord.php b/lib/Model/EmployeeVerificationPublicApiRecord.php new file mode 100644 index 00000000..314150eb --- /dev/null +++ b/lib/Model/EmployeeVerificationPublicApiRecord.php @@ -0,0 +1,835 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationPublicApiRecord + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeVerificationPublicApiRecord Class Doc Comment + * + * @category Class + * @description A single employee verification row as returned by the public list API. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeVerificationPublicApiRecord implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeVerificationPublicApiRecord'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'integration_type' => 'string', + 'verification_type' => 'string', + 'verification_status' => 'string', + 'verification_status_notes' => 'string', + 'remote_access_url' => 'string', + 'e_verify_status' => 'string', + 'archived' => 'bool', + 'billing_processed' => 'bool', + 'created_by_user_id' => 'int', + 'created_ymdt' => 'string', + 'last_modified_ymdt' => 'string', + 'start_date_ymdt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'int64', + 'employee_id' => 'int64', + 'integration_type' => null, + 'verification_type' => null, + 'verification_status' => null, + 'verification_status_notes' => null, + 'remote_access_url' => null, + 'e_verify_status' => null, + 'archived' => null, + 'billing_processed' => null, + 'created_by_user_id' => 'int64', + 'created_ymdt' => null, + 'last_modified_ymdt' => null, + 'start_date_ymdt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => true, + 'integration_type' => false, + 'verification_type' => false, + 'verification_status' => true, + 'verification_status_notes' => true, + 'remote_access_url' => true, + 'e_verify_status' => true, + 'archived' => false, + 'billing_processed' => false, + 'created_by_user_id' => false, + 'created_ymdt' => false, + 'last_modified_ymdt' => false, + 'start_date_ymdt' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'integration_type' => 'integrationType', + 'verification_type' => 'verificationType', + 'verification_status' => 'verificationStatus', + 'verification_status_notes' => 'verificationStatusNotes', + 'remote_access_url' => 'remoteAccessUrl', + 'e_verify_status' => 'eVerifyStatus', + 'archived' => 'archived', + 'billing_processed' => 'billingProcessed', + 'created_by_user_id' => 'createdByUserId', + 'created_ymdt' => 'createdYmdt', + 'last_modified_ymdt' => 'lastModifiedYmdt', + 'start_date_ymdt' => 'startDateYmdt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'integration_type' => 'setIntegrationType', + 'verification_type' => 'setVerificationType', + 'verification_status' => 'setVerificationStatus', + 'verification_status_notes' => 'setVerificationStatusNotes', + 'remote_access_url' => 'setRemoteAccessUrl', + 'e_verify_status' => 'setEVerifyStatus', + 'archived' => 'setArchived', + 'billing_processed' => 'setBillingProcessed', + 'created_by_user_id' => 'setCreatedByUserId', + 'created_ymdt' => 'setCreatedYmdt', + 'last_modified_ymdt' => 'setLastModifiedYmdt', + 'start_date_ymdt' => 'setStartDateYmdt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'integration_type' => 'getIntegrationType', + 'verification_type' => 'getVerificationType', + 'verification_status' => 'getVerificationStatus', + 'verification_status_notes' => 'getVerificationStatusNotes', + 'remote_access_url' => 'getRemoteAccessUrl', + 'e_verify_status' => 'getEVerifyStatus', + 'archived' => 'getArchived', + 'billing_processed' => 'getBillingProcessed', + 'created_by_user_id' => 'getCreatedByUserId', + 'created_ymdt' => 'getCreatedYmdt', + 'last_modified_ymdt' => 'getLastModifiedYmdt', + 'start_date_ymdt' => 'getStartDateYmdt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('integration_type', $data ?? [], null); + $this->setIfExists('verification_type', $data ?? [], null); + $this->setIfExists('verification_status', $data ?? [], null); + $this->setIfExists('verification_status_notes', $data ?? [], null); + $this->setIfExists('remote_access_url', $data ?? [], null); + $this->setIfExists('e_verify_status', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('billing_processed', $data ?? [], null); + $this->setIfExists('created_by_user_id', $data ?? [], null); + $this->setIfExists('created_ymdt', $data ?? [], null); + $this->setIfExists('last_modified_ymdt', $data ?? [], null); + $this->setIfExists('start_date_ymdt', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets integration_type + * + * @return string|null + */ + public function getIntegrationType() { + return $this->container['integration_type']; + } + + /** + * Sets integration_type + * + * @param string|null $integration_type integration_type + * + * @return self + */ + public function setIntegrationType($integration_type) { + if (is_null($integration_type)) { + throw new \InvalidArgumentException('non-nullable integration_type cannot be null'); + } + $this->container['integration_type'] = $integration_type; + + return $this; + } + + /** + * Gets verification_type + * + * @return string|null + */ + public function getVerificationType() { + return $this->container['verification_type']; + } + + /** + * Sets verification_type + * + * @param string|null $verification_type verification_type + * + * @return self + */ + public function setVerificationType($verification_type) { + if (is_null($verification_type)) { + throw new \InvalidArgumentException('non-nullable verification_type cannot be null'); + } + $this->container['verification_type'] = $verification_type; + + return $this; + } + + /** + * Gets verification_status + * + * @return string|null + */ + public function getVerificationStatus() { + return $this->container['verification_status']; + } + + /** + * Sets verification_status + * + * @param string|null $verification_status verification_status + * + * @return self + */ + public function setVerificationStatus($verification_status) { + if (is_null($verification_status)) { + $this->openApiNullablesSetToNull['verification_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['verification_status'])) { + unset($nullablesSetToNull['verification_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['verification_status'] = $verification_status; + + return $this; + } + + /** + * Gets verification_status_notes + * + * @return string|null + */ + public function getVerificationStatusNotes() { + return $this->container['verification_status_notes']; + } + + /** + * Sets verification_status_notes + * + * @param string|null $verification_status_notes verification_status_notes + * + * @return self + */ + public function setVerificationStatusNotes($verification_status_notes) { + if (is_null($verification_status_notes)) { + $this->openApiNullablesSetToNull['verification_status_notes'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['verification_status_notes'])) { + unset($nullablesSetToNull['verification_status_notes']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['verification_status_notes'] = $verification_status_notes; + + return $this; + } + + /** + * Gets remote_access_url + * + * @return string|null + */ + public function getRemoteAccessUrl() { + return $this->container['remote_access_url']; + } + + /** + * Sets remote_access_url + * + * @param string|null $remote_access_url remote_access_url + * + * @return self + */ + public function setRemoteAccessUrl($remote_access_url) { + if (is_null($remote_access_url)) { + $this->openApiNullablesSetToNull['remote_access_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['remote_access_url'])) { + unset($nullablesSetToNull['remote_access_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['remote_access_url'] = $remote_access_url; + + return $this; + } + + /** + * Gets e_verify_status + * + * @return string|null + */ + public function getEVerifyStatus() { + return $this->container['e_verify_status']; + } + + /** + * Sets e_verify_status + * + * @param string|null $e_verify_status e_verify_status + * + * @return self + */ + public function setEVerifyStatus($e_verify_status) { + if (is_null($e_verify_status)) { + $this->openApiNullablesSetToNull['e_verify_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['e_verify_status'])) { + unset($nullablesSetToNull['e_verify_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['e_verify_status'] = $e_verify_status; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived archived + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets billing_processed + * + * @return bool|null + */ + public function getBillingProcessed() { + return $this->container['billing_processed']; + } + + /** + * Sets billing_processed + * + * @param bool|null $billing_processed billing_processed + * + * @return self + */ + public function setBillingProcessed($billing_processed) { + if (is_null($billing_processed)) { + throw new \InvalidArgumentException('non-nullable billing_processed cannot be null'); + } + $this->container['billing_processed'] = $billing_processed; + + return $this; + } + + /** + * Gets created_by_user_id + * + * @return int|null + */ + public function getCreatedByUserId() { + return $this->container['created_by_user_id']; + } + + /** + * Sets created_by_user_id + * + * @param int|null $created_by_user_id created_by_user_id + * + * @return self + */ + public function setCreatedByUserId($created_by_user_id) { + if (is_null($created_by_user_id)) { + throw new \InvalidArgumentException('non-nullable created_by_user_id cannot be null'); + } + $this->container['created_by_user_id'] = $created_by_user_id; + + return $this; + } + + /** + * Gets created_ymdt + * + * @return string|null + */ + public function getCreatedYmdt() { + return $this->container['created_ymdt']; + } + + /** + * Sets created_ymdt + * + * @param string|null $created_ymdt Creation timestamp (company DB format). + * + * @return self + */ + public function setCreatedYmdt($created_ymdt) { + if (is_null($created_ymdt)) { + throw new \InvalidArgumentException('non-nullable created_ymdt cannot be null'); + } + $this->container['created_ymdt'] = $created_ymdt; + + return $this; + } + + /** + * Gets last_modified_ymdt + * + * @return string|null + */ + public function getLastModifiedYmdt() { + return $this->container['last_modified_ymdt']; + } + + /** + * Sets last_modified_ymdt + * + * @param string|null $last_modified_ymdt Last modified timestamp (company DB format). + * + * @return self + */ + public function setLastModifiedYmdt($last_modified_ymdt) { + if (is_null($last_modified_ymdt)) { + throw new \InvalidArgumentException('non-nullable last_modified_ymdt cannot be null'); + } + $this->container['last_modified_ymdt'] = $last_modified_ymdt; + + return $this; + } + + /** + * Gets start_date_ymdt + * + * @return string|null + */ + public function getStartDateYmdt() { + return $this->container['start_date_ymdt']; + } + + /** + * Sets start_date_ymdt + * + * @param string|null $start_date_ymdt start_date_ymdt + * + * @return self + */ + public function setStartDateYmdt($start_date_ymdt) { + if (is_null($start_date_ymdt)) { + throw new \InvalidArgumentException('non-nullable start_date_ymdt cannot be null'); + } + $this->container['start_date_ymdt'] = $start_date_ymdt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeVerificationUpdateResponse.php b/lib/Model/EmployeeVerificationUpdateResponse.php new file mode 100644 index 00000000..532406db --- /dev/null +++ b/lib/Model/EmployeeVerificationUpdateResponse.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationUpdateResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeVerificationUpdateResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeVerificationUpdateResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeVerificationUpdateResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_verification' => '\BhrSdk\Model\EmployeeVerificationPublicApiRecord' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_verification' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_verification' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_verification' => 'employeeVerification' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_verification' => 'setEmployeeVerification' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_verification' => 'getEmployeeVerification' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_verification', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_verification'] === null) { + $invalidProperties[] = "'employee_verification' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_verification + * + * @return \BhrSdk\Model\EmployeeVerificationPublicApiRecord + */ + public function getEmployeeVerification() { + return $this->container['employee_verification']; + } + + /** + * Sets employee_verification + * + * @param \BhrSdk\Model\EmployeeVerificationPublicApiRecord $employee_verification employee_verification + * + * @return self + */ + public function setEmployeeVerification($employee_verification) { + if (is_null($employee_verification)) { + throw new \InvalidArgumentException('non-nullable employee_verification cannot be null'); + } + $this->container['employee_verification'] = $employee_verification; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/EmployeeVerificationsListResponse.php b/lib/Model/EmployeeVerificationsListResponse.php new file mode 100644 index 00000000..f3c5aa4a --- /dev/null +++ b/lib/Model/EmployeeVerificationsListResponse.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationsListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeeVerificationsListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeeVerificationsListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeeVerificationsListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_verifications' => '\BhrSdk\Model\EmployeeVerificationPublicApiRecord[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_verifications' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_verifications' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_verifications' => 'employeeVerifications' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_verifications' => 'setEmployeeVerifications' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_verifications' => 'getEmployeeVerifications' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_verifications', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_verifications'] === null) { + $invalidProperties[] = "'employee_verifications' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_verifications + * + * @return \BhrSdk\Model\EmployeeVerificationPublicApiRecord[] + */ + public function getEmployeeVerifications() { + return $this->container['employee_verifications']; + } + + /** + * Sets employee_verifications + * + * @param \BhrSdk\Model\EmployeeVerificationPublicApiRecord[] $employee_verifications Verification records for the employee, newest first. + * + * @return self + */ + public function setEmployeeVerifications($employee_verifications) { + if (is_null($employee_verifications)) { + throw new \InvalidArgumentException('non-nullable employee_verifications cannot be null'); + } + $this->container['employee_verifications'] = $employee_verifications; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonDirectoryEmployee.php b/lib/Model/EmployeesDirectoryJsonResponse.php similarity index 87% rename from lib/Model/JsonDirectoryEmployee.php rename to lib/Model/EmployeesDirectoryJsonResponse.php index 1225e852..b22e9ebc 100644 --- a/lib/Model/JsonDirectoryEmployee.php +++ b/lib/Model/EmployeesDirectoryJsonResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * JsonDirectoryEmployee + * EmployeesDirectoryJsonResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * JsonDirectoryEmployee Class Doc Comment + * EmployeesDirectoryJsonResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class JsonDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryJsonResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class JsonDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSeriali * * @var string */ - protected static $openApiModelName = 'JsonDirectoryEmployee'; + protected static $openApiModelName = 'EmployeesDirectoryJsonResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,8 +57,8 @@ class JsonDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openApiTypes = [ - 'fields' => '\BhrSdk\Model\JsonDirectoryEmployeeFieldsInner[]', - 'employees' => 'object[]' + 'fields' => '\BhrSdk\Model\EmployeesDirectoryJsonResponseFieldsInner[]', + 'employees' => 'array<string,mixed>[]' ]; /** @@ -286,7 +286,7 @@ public function valid() { /** * Gets fields * - * @return \BhrSdk\Model\JsonDirectoryEmployeeFieldsInner[]|null + * @return \BhrSdk\Model\EmployeesDirectoryJsonResponseFieldsInner[]|null */ public function getFields() { return $this->container['fields']; @@ -295,7 +295,7 @@ public function getFields() { /** * Sets fields * - * @param \BhrSdk\Model\JsonDirectoryEmployeeFieldsInner[]|null $fields Array of field definitions + * @param \BhrSdk\Model\EmployeesDirectoryJsonResponseFieldsInner[]|null $fields Field definitions included in this response. Each entry describes one key that appears on every employee object. The set of fields is fixed by company directory configuration; the `canUploadPhoto` entry is always appended. * * @return self */ @@ -311,7 +311,7 @@ public function setFields($fields) { /** * Gets employees * - * @return object[]|null + * @return array<string,mixed>[]|null */ public function getEmployees() { return $this->container['employees']; @@ -320,7 +320,7 @@ public function getEmployees() { /** * Sets employees * - * @param object[]|null $employees Array of employee records. Each employee object contains properties matching the 'id' values from the 'fields' array. Property names are dynamically determined by company configuration. Property values can be strings, numbers, booleans, or null. Common fields include: id, displayName, firstName, lastName, preferredName, jobTitle, workPhone, mobilePhone, workEmail, department, location, division, twitterFeed, pronouns, workPhoneExtension, photoUploaded, photoUrl, canUploadPhoto. + * @param array<string,mixed>[]|null $employees One object per directory employee. Every object includes `id` (employee ID as a string) and `canUploadPhoto` (1 if the authenticated caller may upload a photo for this employee, 0 otherwise), plus one key per entry in `fields`. The exact key set varies with company directory configuration. Field values are returned in the JSON type indicated by the matching `fields[].type` (for example, `bool` fields are JSON booleans). * * @return self */ diff --git a/lib/Model/EmployeesDirectoryJsonResponseFieldsInner.php b/lib/Model/EmployeesDirectoryJsonResponseFieldsInner.php new file mode 100644 index 00000000..1f95e005 --- /dev/null +++ b/lib/Model/EmployeesDirectoryJsonResponseFieldsInner.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * EmployeesDirectoryJsonResponseFieldsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * EmployeesDirectoryJsonResponseFieldsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class EmployeesDirectoryJsonResponseFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'EmployeesDirectoryJsonResponse_fields_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'type' => 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'type' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'type' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Field identifier; appears as a key on each employee object. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Field data type. Observed values include `text`, `list`, `email`, `bool`, `url`, and `employee`. + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Human-readable field label. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/XmlDirectoryEmployee.php b/lib/Model/EmployeesDirectoryXmlResponse.php similarity index 92% rename from lib/Model/XmlDirectoryEmployee.php rename to lib/Model/EmployeesDirectoryXmlResponse.php index aed6c240..0784a391 100644 --- a/lib/Model/XmlDirectoryEmployee.php +++ b/lib/Model/EmployeesDirectoryXmlResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployee + * EmployeesDirectoryXmlResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployee Class Doc Comment + * EmployeesDirectoryXmlResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class XmlDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSerializ * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,8 +57,8 @@ class XmlDirectoryEmployee implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openApiTypes = [ - 'fieldset' => '\BhrSdk\Model\XmlDirectoryEmployeeFieldset', - 'employees' => '\BhrSdk\Model\XmlDirectoryEmployeeEmployees' + 'fieldset' => '\BhrSdk\Model\EmployeesDirectoryXmlResponseFieldset', + 'employees' => '\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployees' ]; /** @@ -286,7 +286,7 @@ public function valid() { /** * Gets fieldset * - * @return \BhrSdk\Model\XmlDirectoryEmployeeFieldset|null + * @return \BhrSdk\Model\EmployeesDirectoryXmlResponseFieldset|null */ public function getFieldset() { return $this->container['fieldset']; @@ -295,7 +295,7 @@ public function getFieldset() { /** * Sets fieldset * - * @param \BhrSdk\Model\XmlDirectoryEmployeeFieldset|null $fieldset fieldset + * @param \BhrSdk\Model\EmployeesDirectoryXmlResponseFieldset|null $fieldset fieldset * * @return self */ @@ -311,7 +311,7 @@ public function setFieldset($fieldset) { /** * Gets employees * - * @return \BhrSdk\Model\XmlDirectoryEmployeeEmployees|null + * @return \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployees|null */ public function getEmployees() { return $this->container['employees']; @@ -320,7 +320,7 @@ public function getEmployees() { /** * Sets employees * - * @param \BhrSdk\Model\XmlDirectoryEmployeeEmployees|null $employees employees + * @param \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployees|null $employees employees * * @return self */ diff --git a/lib/Model/XmlDirectoryEmployeeEmployees.php b/lib/Model/EmployeesDirectoryXmlResponseEmployees.php similarity index 93% rename from lib/Model/XmlDirectoryEmployeeEmployees.php rename to lib/Model/EmployeesDirectoryXmlResponseEmployees.php index 0881e8b3..29f6ff35 100644 --- a/lib/Model/XmlDirectoryEmployeeEmployees.php +++ b/lib/Model/EmployeesDirectoryXmlResponseEmployees.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployeeEmployees + * EmployeesDirectoryXmlResponseEmployees * * PHP version 8.1 * @@ -33,16 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployeeEmployees Class Doc Comment + * EmployeesDirectoryXmlResponseEmployees Class Doc Comment * * @category Class - * @description Employee records + * @description Directory employee records. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployeeEmployees implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponseEmployees implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class XmlDirectoryEmployeeEmployees implements ModelInterface, ArrayAccess, \Jso * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee_employees'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse_employees'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class XmlDirectoryEmployeeEmployees implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openApiTypes = [ - 'employee' => '\BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInner[]' + 'employee' => '\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInner[]' ]; /** @@ -280,7 +280,7 @@ public function valid() { /** * Gets employee * - * @return \BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInner[]|null + * @return \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInner[]|null */ public function getEmployee() { return $this->container['employee']; @@ -289,7 +289,7 @@ public function getEmployee() { /** * Sets employee * - * @param \BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInner[]|null $employee employee + * @param \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInner[]|null $employee employee * * @return self */ diff --git a/lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.php b/lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.php similarity index 89% rename from lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.php rename to lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.php index 09120055..80c2fa83 100644 --- a/lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInner.php +++ b/lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployeeEmployeesEmployeeInner + * EmployeesDirectoryXmlResponseEmployeesEmployeeInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployeeEmployeesEmployeeInner Class Doc Comment + * EmployeesDirectoryXmlResponseEmployeesEmployeeInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployeeEmployeesEmployeeInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponseEmployeesEmployeeInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class XmlDirectoryEmployeeEmployeesEmployeeInner implements ModelInterface, Arra * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee_employees_employee_inner'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse_employees_employee_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class XmlDirectoryEmployeeEmployeesEmployeeInner implements ModelInterface, Arra */ protected static $openApiTypes = [ 'id' => 'string', - 'field' => '\BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner[]' + 'field' => '\BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner[]' ]; /** @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param string|null $id Employee ID (XML attribute) + * @param string|null $id Employee ID, serialized as an attribute on the `<employee>` element. * * @return self */ @@ -311,7 +311,7 @@ public function setId($id) { /** * Gets field * - * @return \BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner[]|null + * @return \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner[]|null */ public function getField() { return $this->container['field']; @@ -320,7 +320,7 @@ public function getField() { /** * Sets field * - * @param \BhrSdk\Model\XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner[]|null $field Employee field values + * @param \BhrSdk\Model\EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner[]|null $field Field values for the employee. Each `<field>` element has an `id` attribute matching one of the `<fieldset>` ids and the value as element text. Currency fields additionally carry a `currency` attribute (ISO currency code). Boolean fields are serialized as the strings `true`/`false`; the appended `canUploadPhoto` field is serialized as `yes`/`no`. * * @return self */ diff --git a/lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.php b/lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.php similarity index 90% rename from lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.php rename to lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.php index ae688b79..5e7a8e00 100644 --- a/lib/Model/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.php +++ b/lib/Model/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner + * EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner Class Doc Comment + * EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner implements ModelInter * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee_employees_employee_inner_field_inner'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse_employees_employee_inner_field_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param string|null $id Field identifier (XML attribute). Array of employee records. Each employee object contains dynamic field values based on the fields defined in the 'fields' array. Common fields include: id, displayName, firstName, lastName, preferredName, jobTitle, workPhone, mobilePhone, workEmail, department, location, division, twitterFeed, pronouns, workPhoneExtension, photoUploaded, photoUrl, canUploadPhoto. Actual fields may vary by company configuration. + * @param string|null $id Field identifier matching one of the ids in `<fieldset>`. * * @return self */ @@ -320,7 +320,7 @@ public function getValue() { /** * Sets value * - * @param string|null $value Field value (element text content) + * @param string|null $value Field value serialized as element text content. * * @return self */ diff --git a/lib/Model/XmlDirectoryEmployeeFieldset.php b/lib/Model/EmployeesDirectoryXmlResponseFieldset.php similarity index 93% rename from lib/Model/XmlDirectoryEmployeeFieldset.php rename to lib/Model/EmployeesDirectoryXmlResponseFieldset.php index 4b36d69b..7b783be8 100644 --- a/lib/Model/XmlDirectoryEmployeeFieldset.php +++ b/lib/Model/EmployeesDirectoryXmlResponseFieldset.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployeeFieldset + * EmployeesDirectoryXmlResponseFieldset * * PHP version 8.1 * @@ -33,16 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployeeFieldset Class Doc Comment + * EmployeesDirectoryXmlResponseFieldset Class Doc Comment * * @category Class - * @description Field definitions + * @description Field definitions included in this response. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployeeFieldset implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponseFieldset implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class XmlDirectoryEmployeeFieldset implements ModelInterface, ArrayAccess, \Json * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee_fieldset'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse_fieldset'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class XmlDirectoryEmployeeFieldset implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openApiTypes = [ - 'field' => '\BhrSdk\Model\XmlDirectoryEmployeeFieldsetFieldInner[]' + 'field' => '\BhrSdk\Model\EmployeesDirectoryXmlResponseFieldsetFieldInner[]' ]; /** @@ -280,7 +280,7 @@ public function valid() { /** * Gets field * - * @return \BhrSdk\Model\XmlDirectoryEmployeeFieldsetFieldInner[]|null + * @return \BhrSdk\Model\EmployeesDirectoryXmlResponseFieldsetFieldInner[]|null */ public function getField() { return $this->container['field']; @@ -289,7 +289,7 @@ public function getField() { /** * Sets field * - * @param \BhrSdk\Model\XmlDirectoryEmployeeFieldsetFieldInner[]|null $field field + * @param \BhrSdk\Model\EmployeesDirectoryXmlResponseFieldsetFieldInner[]|null $field field * * @return self */ diff --git a/lib/Model/XmlDirectoryEmployeeFieldsetFieldInner.php b/lib/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.php similarity index 94% rename from lib/Model/XmlDirectoryEmployeeFieldsetFieldInner.php rename to lib/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.php index eec409e9..9c3e121a 100644 --- a/lib/Model/XmlDirectoryEmployeeFieldsetFieldInner.php +++ b/lib/Model/EmployeesDirectoryXmlResponseFieldsetFieldInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * XmlDirectoryEmployeeFieldsetFieldInner + * EmployeesDirectoryXmlResponseFieldsetFieldInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * XmlDirectoryEmployeeFieldsetFieldInner Class Doc Comment + * EmployeesDirectoryXmlResponseFieldsetFieldInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class XmlDirectoryEmployeeFieldsetFieldInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class EmployeesDirectoryXmlResponseFieldsetFieldInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class XmlDirectoryEmployeeFieldsetFieldInner implements ModelInterface, ArrayAcc * * @var string */ - protected static $openApiModelName = 'XmlDirectoryEmployee_fieldset_field_inner'; + protected static $openApiModelName = 'EmployeesDirectoryXmlResponse_fieldset_field_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param string|null $id Field identifier (XML attribute) + * @param string|null $id Field identifier; matches the `id` attribute on each `<field>` element inside `<employee>`. * * @return self */ @@ -320,7 +320,7 @@ public function getValue() { /** * Sets value * - * @param string|null $value Field display name (element text content) + * @param string|null $value Human-readable field label, serialized as the element's text content. * * @return self */ diff --git a/lib/Model/InvalidRequest.php b/lib/Model/ErrorResponse.php similarity index 95% rename from lib/Model/InvalidRequest.php rename to lib/Model/ErrorResponse.php index df1bbf9b..7150398d 100644 --- a/lib/Model/InvalidRequest.php +++ b/lib/Model/ErrorResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * InvalidRequest + * ErrorResponse * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * InvalidRequest Class Doc Comment + * ErrorResponse Class Doc Comment * * @category Class + * @description Standard error response from BaseController * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class InvalidRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class ErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class InvalidRequest implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'InvalidRequest'; + protected static $openApiModelName = 'ErrorResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +58,7 @@ class InvalidRequest implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'error' => '\BhrSdk\Model\InvalidRequestError' + 'error' => '\BhrSdk\Model\ErrorResponseError' ]; /** @@ -279,7 +280,7 @@ public function valid() { /** * Gets error * - * @return \BhrSdk\Model\InvalidRequestError|null + * @return \BhrSdk\Model\ErrorResponseError|null */ public function getError() { return $this->container['error']; @@ -288,7 +289,7 @@ public function getError() { /** * Sets error * - * @param \BhrSdk\Model\InvalidRequestError|null $error error + * @param \BhrSdk\Model\ErrorResponseError|null $error error * * @return self */ diff --git a/lib/Model/ErrorResponseError.php b/lib/Model/ErrorResponseError.php new file mode 100644 index 00000000..c1a0740f --- /dev/null +++ b/lib/Model/ErrorResponseError.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * ErrorResponseError + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ErrorResponseError Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ErrorResponseError implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ErrorResponse_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'int', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return int|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.php b/lib/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.php new file mode 100644 index 00000000..859e589c --- /dev/null +++ b/lib/Model/F3883a522dadbe9e11b34f8b656e3adbRequest.php @@ -0,0 +1,651 @@ +<?php +declare(strict_types=1); +/** + * F3883a522dadbe9e11b34f8b656e3adbRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * F3883a522dadbe9e11b34f8b656e3adbRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class F3883a522dadbe9e11b34f8b656e3adbRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'f3883a522dadbe9e11b34f8b656e3adb_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'assignee_employee_id' => 'string', + 'approval_flow_id' => 'int', + 'approval_stage' => 'int', + 'rec_salary_increase' => 'object', + 'rec_bonus_increase' => 'object', + 'rec_equity_increase' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'assignee_employee_id' => null, + 'approval_flow_id' => null, + 'approval_stage' => null, + 'rec_salary_increase' => null, + 'rec_bonus_increase' => null, + 'rec_equity_increase' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => false, + 'assignee_employee_id' => false, + 'approval_flow_id' => false, + 'approval_stage' => false, + 'rec_salary_increase' => true, + 'rec_bonus_increase' => true, + 'rec_equity_increase' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'assignee_employee_id' => 'assigneeEmployeeId', + 'approval_flow_id' => 'approvalFlowId', + 'approval_stage' => 'approvalStage', + 'rec_salary_increase' => 'recSalaryIncrease', + 'rec_bonus_increase' => 'recBonusIncrease', + 'rec_equity_increase' => 'recEquityIncrease' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'assignee_employee_id' => 'setAssigneeEmployeeId', + 'approval_flow_id' => 'setApprovalFlowId', + 'approval_stage' => 'setApprovalStage', + 'rec_salary_increase' => 'setRecSalaryIncrease', + 'rec_bonus_increase' => 'setRecBonusIncrease', + 'rec_equity_increase' => 'setRecEquityIncrease' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'assignee_employee_id' => 'getAssigneeEmployeeId', + 'approval_flow_id' => 'getApprovalFlowId', + 'approval_stage' => 'getApprovalStage', + 'rec_salary_increase' => 'getRecSalaryIncrease', + 'rec_bonus_increase' => 'getRecBonusIncrease', + 'rec_equity_increase' => 'getRecEquityIncrease' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const APPROVAL_STAGE_NUMBER_0 = 0; + public const APPROVAL_STAGE_NUMBER_1 = 1; + public const APPROVAL_STAGE_NUMBER_2 = 2; + public const APPROVAL_STAGE_NUMBER_3 = 3; + public const APPROVAL_STAGE_NUMBER_4 = 4; + public const APPROVAL_STAGE_NUMBER_5 = 5; + public const APPROVAL_STAGE_NUMBER_999 = 999; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getApprovalStageAllowableValues() { + return [ + self::APPROVAL_STAGE_NUMBER_0, + self::APPROVAL_STAGE_NUMBER_1, + self::APPROVAL_STAGE_NUMBER_2, + self::APPROVAL_STAGE_NUMBER_3, + self::APPROVAL_STAGE_NUMBER_4, + self::APPROVAL_STAGE_NUMBER_5, + self::APPROVAL_STAGE_NUMBER_999, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('assignee_employee_id', $data ?? [], null); + $this->setIfExists('approval_flow_id', $data ?? [], null); + $this->setIfExists('approval_stage', $data ?? [], null); + $this->setIfExists('rec_salary_increase', $data ?? [], null); + $this->setIfExists('rec_bonus_increase', $data ?? [], null); + $this->setIfExists('rec_equity_increase', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_id'] === null) { + $invalidProperties[] = "'employee_id' can't be null"; + } + if ($this->container['assignee_employee_id'] === null) { + $invalidProperties[] = "'assignee_employee_id' can't be null"; + } + if ($this->container['approval_stage'] === null) { + $invalidProperties[] = "'approval_stage' can't be null"; + } + $allowedValues = $this->getApprovalStageAllowableValues(); + if (!is_null($this->container['approval_stage']) && !in_array($this->container['approval_stage'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'approval_stage', must be one of '%s'", + $this->container['approval_stage'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string $employee_id The ID of the employee receiving the recommendation + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets assignee_employee_id + * + * @return string + */ + public function getAssigneeEmployeeId() { + return $this->container['assignee_employee_id']; + } + + /** + * Sets assignee_employee_id + * + * @param string $assignee_employee_id The ID of the employee making the recommendation + * + * @return self + */ + public function setAssigneeEmployeeId($assignee_employee_id) { + if (is_null($assignee_employee_id)) { + throw new \InvalidArgumentException('non-nullable assignee_employee_id cannot be null'); + } + $this->container['assignee_employee_id'] = $assignee_employee_id; + + return $this; + } + + /** + * Gets approval_flow_id + * + * @return int|null + */ + public function getApprovalFlowId() { + return $this->container['approval_flow_id']; + } + + /** + * Sets approval_flow_id + * + * @param int|null $approval_flow_id The ID of the approval flow + * + * @return self + */ + public function setApprovalFlowId($approval_flow_id) { + if (is_null($approval_flow_id)) { + throw new \InvalidArgumentException('non-nullable approval_flow_id cannot be null'); + } + $this->container['approval_flow_id'] = $approval_flow_id; + + return $this; + } + + /** + * Gets approval_stage + * + * @return int + */ + public function getApprovalStage() { + return $this->container['approval_stage']; + } + + /** + * Sets approval_stage + * + * @param int $approval_stage The approval stage + * + * @return self + */ + public function setApprovalStage($approval_stage) { + if (is_null($approval_stage)) { + throw new \InvalidArgumentException('non-nullable approval_stage cannot be null'); + } + $allowedValues = $this->getApprovalStageAllowableValues(); + if (!in_array($approval_stage, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'approval_stage', must be one of '%s'", + $approval_stage, + implode("', '", $allowedValues) + ) + ); + } + $this->container['approval_stage'] = $approval_stage; + + return $this; + } + + /** + * Gets rec_salary_increase + * + * @return object|null + */ + public function getRecSalaryIncrease() { + return $this->container['rec_salary_increase']; + } + + /** + * Sets rec_salary_increase + * + * @param object|null $rec_salary_increase rec_salary_increase + * + * @return self + */ + public function setRecSalaryIncrease($rec_salary_increase) { + if (is_null($rec_salary_increase)) { + $this->openApiNullablesSetToNull['rec_salary_increase'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['rec_salary_increase'])) { + unset($nullablesSetToNull['rec_salary_increase']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['rec_salary_increase'] = $rec_salary_increase; + + return $this; + } + + /** + * Gets rec_bonus_increase + * + * @return object|null + */ + public function getRecBonusIncrease() { + return $this->container['rec_bonus_increase']; + } + + /** + * Sets rec_bonus_increase + * + * @param object|null $rec_bonus_increase rec_bonus_increase + * + * @return self + */ + public function setRecBonusIncrease($rec_bonus_increase) { + if (is_null($rec_bonus_increase)) { + $this->openApiNullablesSetToNull['rec_bonus_increase'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['rec_bonus_increase'])) { + unset($nullablesSetToNull['rec_bonus_increase']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['rec_bonus_increase'] = $rec_bonus_increase; + + return $this; + } + + /** + * Gets rec_equity_increase + * + * @return object|null + */ + public function getRecEquityIncrease() { + return $this->container['rec_equity_increase']; + } + + /** + * Sets rec_equity_increase + * + * @param object|null $rec_equity_increase rec_equity_increase + * + * @return self + */ + public function setRecEquityIncrease($rec_equity_increase) { + if (is_null($rec_equity_increase)) { + $this->openApiNullablesSetToNull['rec_equity_increase'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['rec_equity_increase'])) { + unset($nullablesSetToNull['rec_equity_increase']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['rec_equity_increase'] = $rec_equity_increase; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Field.php b/lib/Model/Field.php index 79149274..8e2e4b1a 100644 --- a/lib/Model/Field.php +++ b/lib/Model/Field.php @@ -316,7 +316,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Machine-readable field identifier. Use this value in the `fields` array when querying data. * * @return self */ @@ -341,7 +341,7 @@ public function getLabel() { /** * Sets label * - * @param string|null $label label + * @param string|null $label Human-readable display name for the field. * * @return self */ @@ -366,7 +366,7 @@ public function getParentType() { /** * Sets parent_type * - * @param string|null $parent_type parent_type + * @param string|null $parent_type The type of the parent section (e.g. `page`, `table`). * * @return self */ @@ -391,7 +391,7 @@ public function getParentName() { /** * Sets parent_name * - * @param string|null $parent_name parent_name + * @param string|null $parent_name The name of the parent section this field belongs to. * * @return self */ @@ -416,7 +416,7 @@ public function getEntityName() { /** * Sets entity_name * - * @param string|null $entity_name entity_name + * @param string|null $entity_name The entity name for the field, used in `showHistory` when querying historical table fields. * * @return self */ diff --git a/lib/Model/Field1.php b/lib/Model/Field1.php new file mode 100644 index 00000000..3996c811 --- /dev/null +++ b/lib/Model/Field1.php @@ -0,0 +1,525 @@ +<?php +declare(strict_types=1); +/** + * Field1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Field1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Field1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Field_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => '\BhrSdk\Model\Field1Id', + 'name' => 'string', + 'type' => 'string', + 'alias' => 'string', + 'deprecated' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'type' => null, + 'alias' => null, + 'deprecated' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'type' => false, + 'alias' => false, + 'deprecated' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'type' => 'type', + 'alias' => 'alias', + 'deprecated' => 'deprecated' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'type' => 'setType', + 'alias' => 'setAlias', + 'deprecated' => 'setDeprecated' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'type' => 'getType', + 'alias' => 'getAlias', + 'deprecated' => 'getDeprecated' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('deprecated', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return \BhrSdk\Model\Field1Id + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param \BhrSdk\Model\Field1Id $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The display name of the field. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The data type of the field (e.g., text, date, list, checkbox). + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets alias + * + * @return string|null + */ + public function getAlias() { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string|null $alias The API alias for the field. Only present when the field has an alias. + * + * @return self + */ + public function setAlias($alias) { + if (is_null($alias)) { + throw new \InvalidArgumentException('non-nullable alias cannot be null'); + } + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets deprecated + * + * @return bool|null + */ + public function getDeprecated() { + return $this->container['deprecated']; + } + + /** + * Sets deprecated + * + * @param bool|null $deprecated Whether the field is deprecated and should no longer be used. Only present for deprecated fields. + * + * @return self + */ + public function setDeprecated($deprecated) { + if (is_null($deprecated)) { + throw new \InvalidArgumentException('non-nullable deprecated cannot be null'); + } + $this->container['deprecated'] = $deprecated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Field1Id.php b/lib/Model/Field1Id.php new file mode 100644 index 00000000..c5cad573 --- /dev/null +++ b/lib/Model/Field1Id.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * Field1Id + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * Field1Id Class Doc Comment + * + * @category Class + * @description The field identifier. For subfields this is a dotted string (e.g., \"4340.4\"); for top-level fields it may be an integer. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class Field1Id implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Field_1_id'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/FieldOptionsRequestSchema.php b/lib/Model/FieldOptionsRequestSchema.php index 336363c9..d25e5e49 100644 --- a/lib/Model/FieldOptionsRequestSchema.php +++ b/lib/Model/FieldOptionsRequestSchema.php @@ -59,7 +59,8 @@ class FieldOptionsRequestSchema implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openApiTypes = [ 'fields' => 'string[]', - 'dependent_fields' => 'array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>' + 'dependent_fields' => 'array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>', + 'filters' => 'object' ]; /** @@ -71,7 +72,8 @@ class FieldOptionsRequestSchema implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openApiFormats = [ 'fields' => null, - 'dependent_fields' => null + 'dependent_fields' => null, + 'filters' => null ]; /** @@ -82,7 +84,8 @@ class FieldOptionsRequestSchema implements ModelInterface, ArrayAccess, \JsonSer */ protected static array $openApiNullables = [ 'fields' => false, - 'dependent_fields' => false + 'dependent_fields' => true, + 'filters' => true ]; /** @@ -168,7 +171,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'fields' => 'fields', - 'dependent_fields' => 'dependentFields' + 'dependent_fields' => 'dependentFields', + 'filters' => 'filters' ]; /** @@ -178,7 +182,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'fields' => 'setFields', - 'dependent_fields' => 'setDependentFields' + 'dependent_fields' => 'setDependentFields', + 'filters' => 'setFilters' ]; /** @@ -188,7 +193,8 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'fields' => 'getFields', - 'dependent_fields' => 'getDependentFields' + 'dependent_fields' => 'getDependentFields', + 'filters' => 'getFilters' ]; /** @@ -244,6 +250,7 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('fields', $data ?? [], null); $this->setIfExists('dependent_fields', $data ?? [], null); + $this->setIfExists('filters', $data ?? [], null); } /** @@ -324,18 +331,55 @@ public function getDependentFields() { /** * Sets dependent_fields * - * @param array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>|null $dependent_fields Dependent fields and their values that affect the options of the requested fields + * @param array<string,\BhrSdk\Model\FieldOptionsRequestSchemaDependentFieldsValueInner[]>|null $dependent_fields dependent_fields * * @return self */ public function setDependentFields($dependent_fields) { if (is_null($dependent_fields)) { - throw new \InvalidArgumentException('non-nullable dependent_fields cannot be null'); + $this->openApiNullablesSetToNull['dependent_fields'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['dependent_fields'])) { + unset($nullablesSetToNull['dependent_fields']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['dependent_fields'] = $dependent_fields; return $this; } + + /** + * Gets filters + * + * @return object|null + */ + public function getFilters() { + return $this->container['filters']; + } + + /** + * Sets filters + * + * @param object|null $filters filters + * + * @return self + */ + public function setFilters($filters) { + if (is_null($filters)) { + $this->openApiNullablesSetToNull['filters'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['filters'])) { + unset($nullablesSetToNull['filters']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['filters'] = $filters; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/FieldOptionsTransformer.php b/lib/Model/FieldOptionsTransformer.php index 0c72438a..7e1d20b1 100644 --- a/lib/Model/FieldOptionsTransformer.php +++ b/lib/Model/FieldOptionsTransformer.php @@ -57,7 +57,7 @@ class FieldOptionsTransformer implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openApiTypes = [ - 'id' => 'string', + 'id' => '\BhrSdk\Model\FieldOptionsTransformerId', 'value' => 'string' ]; @@ -286,7 +286,7 @@ public function valid() { /** * Gets id * - * @return string|null + * @return \BhrSdk\Model\FieldOptionsTransformerId|null */ public function getId() { return $this->container['id']; @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param string|null $id The ID of the field option + * @param \BhrSdk\Model\FieldOptionsTransformerId|null $id id * * @return self */ @@ -320,7 +320,7 @@ public function getValue() { /** * Sets value * - * @param string|null $value The value of the field option + * @param string|null $value The human-readable label of the field option * * @return self */ diff --git a/lib/Model/FieldOptionsTransformerId.php b/lib/Model/FieldOptionsTransformerId.php new file mode 100644 index 00000000..78dd7e89 --- /dev/null +++ b/lib/Model/FieldOptionsTransformerId.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * FieldOptionsTransformerId + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * FieldOptionsTransformerId Class Doc Comment + * + * @category Class + * @description The ID of the field option. May be a string or an integer depending on the field type. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class FieldOptionsTransformerId implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'FieldOptionsTransformer_id'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Forbidden.php b/lib/Model/ForbiddenV1.php similarity index 96% rename from lib/Model/Forbidden.php rename to lib/Model/ForbiddenV1.php index 147c7ac5..e9ad6383 100644 --- a/lib/Model/Forbidden.php +++ b/lib/Model/ForbiddenV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * Forbidden + * ForbiddenV1 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * Forbidden Class Doc Comment + * ForbiddenV1 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class Forbidden implements ModelInterface, ArrayAccess, \JsonSerializable { +class ForbiddenV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class Forbidden implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'Forbidden'; + protected static $openApiModelName = 'ForbiddenV1'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class Forbidden implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'error' => 'string' + 'error' => '\BhrSdk\Model\ForbiddenV1Error' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets error * - * @return string|null + * @return \BhrSdk\Model\ForbiddenV1Error|null */ public function getError() { return $this->container['error']; @@ -288,7 +288,7 @@ public function getError() { /** * Sets error * - * @param string|null $error error + * @param \BhrSdk\Model\ForbiddenV1Error|null $error error * * @return self */ diff --git a/lib/Model/ForbiddenV1Error.php b/lib/Model/ForbiddenV1Error.php new file mode 100644 index 00000000..e40b74ff --- /dev/null +++ b/lib/Model/ForbiddenV1Error.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * ForbiddenV1Error + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ForbiddenV1Error Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ForbiddenV1Error implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ForbiddenV1_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'int', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return int|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetBreakPolicySuggestionsRequest.php b/lib/Model/GetBreakPolicySuggestionsRequest.php new file mode 100644 index 00000000..082a4410 --- /dev/null +++ b/lib/Model/GetBreakPolicySuggestionsRequest.php @@ -0,0 +1,400 @@ +<?php +declare(strict_types=1); +/** + * GetBreakPolicySuggestionsRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetBreakPolicySuggestionsRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetBreakPolicySuggestionsRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'get_break_policy_suggestions_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prompt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prompt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prompt' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prompt' => 'prompt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prompt' => 'setPrompt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prompt' => 'getPrompt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prompt', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['prompt'] === null) { + $invalidProperties[] = "'prompt' can't be null"; + } + if ((mb_strlen($this->container['prompt']) < 1)) { + $invalidProperties[] = "invalid value for 'prompt', 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prompt + * + * @return string + */ + public function getPrompt() { + return $this->container['prompt']; + } + + /** + * Sets prompt + * + * @param string $prompt The user's request or question for break policy suggestions (e.g. \"What policies do we need for our California employees?\") + * + * @return self + */ + public function setPrompt($prompt) { + if (is_null($prompt)) { + throw new \InvalidArgumentException('non-nullable prompt cannot be null'); + } + + if ((mb_strlen($prompt) < 1)) { + throw new \InvalidArgumentException('invalid length for $prompt when calling GetBreakPolicySuggestionsRequest., must be bigger than or equal to 1.'); + } + + $this->container['prompt'] = $prompt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetCompanyReportResponse.php b/lib/Model/GetCompanyReportResponse.php new file mode 100644 index 00000000..b861f9ac --- /dev/null +++ b/lib/Model/GetCompanyReportResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * GetCompanyReportResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetCompanyReportResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetCompanyReportResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetCompanyReportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'fields' => '\BhrSdk\Model\RequestCustomReportResponseFieldsInner[]', + 'employees' => '\BhrSdk\Model\GetCompanyReportResponseEmployeesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'fields' => null, + 'employees' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'fields' => false, + 'employees' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'fields' => 'fields', + 'employees' => 'employees' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'fields' => 'setFields', + 'employees' => 'setEmployees' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'fields' => 'getFields', + 'employees' => 'getEmployees' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('fields', $data ?? [], null); + $this->setIfExists('employees', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title The report title. + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets fields + * + * @return \BhrSdk\Model\RequestCustomReportResponseFieldsInner[]|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param \BhrSdk\Model\RequestCustomReportResponseFieldsInner[]|null $fields Metadata for each field included in the report. + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + + /** + * Gets employees + * + * @return \BhrSdk\Model\GetCompanyReportResponseEmployeesInner[]|null + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param \BhrSdk\Model\GetCompanyReportResponseEmployeesInner[]|null $employees One object per employee. Each object contains an `id` property plus one key per report field. + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetCompanyReportResponseEmployeesInner.php b/lib/Model/GetCompanyReportResponseEmployeesInner.php new file mode 100644 index 00000000..a91f9ba2 --- /dev/null +++ b/lib/Model/GetCompanyReportResponseEmployeesInner.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * GetCompanyReportResponseEmployeesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetCompanyReportResponseEmployeesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetCompanyReportResponseEmployeesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetCompanyReportResponse_employees_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The employee ID. + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetDataFromDatasetV2Request.php b/lib/Model/GetDataFromDatasetV2Request.php new file mode 100644 index 00000000..e574d70d --- /dev/null +++ b/lib/Model/GetDataFromDatasetV2Request.php @@ -0,0 +1,556 @@ +<?php +declare(strict_types=1); +/** + * GetDataFromDatasetV2Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetDataFromDatasetV2Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetDataFromDatasetV2Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'get_data_from_dataset_v2_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'fields' => 'string[]', + 'filter' => 'string', + 'order_by' => 'string', + 'page' => 'int', + 'page_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'fields' => null, + 'filter' => null, + 'order_by' => null, + 'page' => null, + 'page_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'fields' => false, + 'filter' => true, + 'order_by' => true, + 'page' => false, + 'page_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fields' => 'fields', + 'filter' => 'filter', + 'order_by' => 'orderBy', + 'page' => 'page', + 'page_size' => 'pageSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fields' => 'setFields', + 'filter' => 'setFilter', + 'order_by' => 'setOrderBy', + 'page' => 'setPage', + 'page_size' => 'setPageSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fields' => 'getFields', + 'filter' => 'getFilter', + 'order_by' => 'getOrderBy', + 'page' => 'getPage', + 'page_size' => 'getPageSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('fields', $data ?? [], null); + $this->setIfExists('filter', $data ?? [], null); + $this->setIfExists('order_by', $data ?? [], null); + $this->setIfExists('page', $data ?? [], 1); + $this->setIfExists('page_size', $data ?? [], 100); + } + + /** + * 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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['fields'] === null) { + $invalidProperties[] = "'fields' can't be null"; + } + if (!is_null($this->container['page']) && ($this->container['page'] < 1)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['page_size']) && ($this->container['page_size'] > 1000)) { + $invalidProperties[] = "invalid value for 'page_size', must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['page_size']) && ($this->container['page_size'] < 1)) { + $invalidProperties[] = "invalid value for 'page_size', 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets fields + * + * @return string[] + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param string[] $fields Field names to return for each row. Names are dataset-specific; discover valid names via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`). The field-name vocabulary differs from the dedicated employee endpoints (e.g., the `employee` dataset uses `jobInformationReportsTo` / `jobInformationDepartment` / `employmentStatus` rather than List Employees' `reportsTo` / `department` / `status`). + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + + /** + * Gets filter + * + * @return string|null + */ + public function getFilter() { + return $this->container['filter']; + } + + /** + * Sets filter + * + * @param string|null $filter filter + * + * @return self + */ + public function setFilter($filter) { + if (is_null($filter)) { + $this->openApiNullablesSetToNull['filter'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['filter'])) { + unset($nullablesSetToNull['filter']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['filter'] = $filter; + + return $this; + } + + /** + * Gets order_by + * + * @return string|null + */ + public function getOrderBy() { + return $this->container['order_by']; + } + + /** + * Sets order_by + * + * @param string|null $order_by order_by + * + * @return self + */ + public function setOrderBy($order_by) { + if (is_null($order_by)) { + $this->openApiNullablesSetToNull['order_by'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['order_by'])) { + unset($nullablesSetToNull['order_by']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['order_by'] = $order_by; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page Page number to retrieve (1-indexed). Defaults to 1. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + + if (($page < 1)) { + throw new \InvalidArgumentException('invalid value for $page when calling GetDataFromDatasetV2Request., must be bigger than or equal to 1.'); + } + + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size Number of records per page. Defaults to 100. Maximum is 1000. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + + if (($page_size > 1000)) { + throw new \InvalidArgumentException('invalid value for $page_size when calling GetDataFromDatasetV2Request., must be smaller than or equal to 1000.'); + } + if (($page_size < 1)) { + throw new \InvalidArgumentException('invalid value for $page_size when calling GetDataFromDatasetV2Request., must be bigger than or equal to 1.'); + } + + $this->container['page_size'] = $page_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeeResponse.php b/lib/Model/GetEmployeeResponse.php new file mode 100644 index 00000000..fca77c55 --- /dev/null +++ b/lib/Model/GetEmployeeResponse.php @@ -0,0 +1,2174 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeeResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeeResponse Class Doc Comment + * + * @category Class + * @description Employee data returned by the Get Employee endpoint. The `id` field is always present; all other named properties are included only when explicitly requested via the `fields` query parameter. Additional custom or company-configured fields may also appear. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeeResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeeResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'preferred_name' => 'string', + 'middle_name' => 'string', + 'photo_url' => 'string', + 'job_title_name' => 'string', + 'job_title_id' => 'string', + 'status' => 'string', + 'work_email' => 'string', + 'home_email' => 'string', + 'best_email' => 'string', + 'work_phone' => 'string', + 'work_phone_extension' => 'string', + 'mobile_phone' => 'string', + 'home_phone' => 'string', + 'skype_username' => 'string', + 'linkedin_url' => 'string', + 'facebook_url' => 'string', + 'instagram_url' => 'string', + 'twitter_url' => 'string', + 'pinterest_url' => 'string', + 'birth_date' => 'string', + 'hire_date' => 'string', + 'original_hire_date' => 'string', + 'termination_date' => 'string', + 'address1' => 'string', + 'city' => 'string', + 'state' => 'string', + 'country' => 'string', + 'gender' => 'string', + 'marital' => 'string', + 'pay_rate' => 'string', + 'pay_type' => 'string', + 'pay_period' => 'string', + 'exempt' => 'string', + 'can_upload_photo' => 'bool', + 'division' => 'string', + 'division_id' => 'string', + 'department' => 'string', + 'department_id' => 'string', + 'location' => 'string', + 'location_id' => 'string', + 'employment_status' => 'string', + 'employment_status_id' => 'string', + 'reports_to_name' => 'string', + 'reports_to_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'first_name' => null, + 'last_name' => null, + 'preferred_name' => null, + 'middle_name' => null, + 'photo_url' => null, + 'job_title_name' => null, + 'job_title_id' => null, + 'status' => null, + 'work_email' => null, + 'home_email' => null, + 'best_email' => null, + 'work_phone' => null, + 'work_phone_extension' => null, + 'mobile_phone' => null, + 'home_phone' => null, + 'skype_username' => null, + 'linkedin_url' => null, + 'facebook_url' => null, + 'instagram_url' => null, + 'twitter_url' => null, + 'pinterest_url' => null, + 'birth_date' => null, + 'hire_date' => null, + 'original_hire_date' => null, + 'termination_date' => null, + 'address1' => null, + 'city' => null, + 'state' => null, + 'country' => null, + 'gender' => null, + 'marital' => null, + 'pay_rate' => null, + 'pay_type' => null, + 'pay_period' => null, + 'exempt' => null, + 'can_upload_photo' => null, + 'division' => null, + 'division_id' => null, + 'department' => null, + 'department_id' => null, + 'location' => null, + 'location_id' => null, + 'employment_status' => null, + 'employment_status_id' => null, + 'reports_to_name' => null, + 'reports_to_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'first_name' => true, + 'last_name' => true, + 'preferred_name' => true, + 'middle_name' => true, + 'photo_url' => true, + 'job_title_name' => true, + 'job_title_id' => true, + 'status' => true, + 'work_email' => true, + 'home_email' => true, + 'best_email' => true, + 'work_phone' => true, + 'work_phone_extension' => true, + 'mobile_phone' => true, + 'home_phone' => true, + 'skype_username' => true, + 'linkedin_url' => true, + 'facebook_url' => true, + 'instagram_url' => true, + 'twitter_url' => true, + 'pinterest_url' => true, + 'birth_date' => true, + 'hire_date' => true, + 'original_hire_date' => true, + 'termination_date' => true, + 'address1' => true, + 'city' => true, + 'state' => true, + 'country' => true, + 'gender' => true, + 'marital' => true, + 'pay_rate' => true, + 'pay_type' => true, + 'pay_period' => true, + 'exempt' => true, + 'can_upload_photo' => true, + 'division' => true, + 'division_id' => true, + 'department' => true, + 'department_id' => true, + 'location' => true, + 'location_id' => true, + 'employment_status' => true, + 'employment_status_id' => true, + 'reports_to_name' => true, + 'reports_to_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'preferred_name' => 'preferredName', + 'middle_name' => 'middleName', + 'photo_url' => 'photoUrl', + 'job_title_name' => 'jobTitleName', + 'job_title_id' => 'jobTitleId', + 'status' => 'status', + 'work_email' => 'workEmail', + 'home_email' => 'homeEmail', + 'best_email' => 'bestEmail', + 'work_phone' => 'workPhone', + 'work_phone_extension' => 'workPhoneExtension', + 'mobile_phone' => 'mobilePhone', + 'home_phone' => 'homePhone', + 'skype_username' => 'skypeUsername', + 'linkedin_url' => 'linkedinUrl', + 'facebook_url' => 'facebookUrl', + 'instagram_url' => 'instagramUrl', + 'twitter_url' => 'twitterUrl', + 'pinterest_url' => 'pinterestUrl', + 'birth_date' => 'birthDate', + 'hire_date' => 'hireDate', + 'original_hire_date' => 'originalHireDate', + 'termination_date' => 'terminationDate', + 'address1' => 'address1', + 'city' => 'city', + 'state' => 'state', + 'country' => 'country', + 'gender' => 'gender', + 'marital' => 'marital', + 'pay_rate' => 'payRate', + 'pay_type' => 'payType', + 'pay_period' => 'payPeriod', + 'exempt' => 'exempt', + 'can_upload_photo' => 'canUploadPhoto', + 'division' => 'division', + 'division_id' => 'divisionId', + 'department' => 'department', + 'department_id' => 'departmentId', + 'location' => 'location', + 'location_id' => 'locationId', + 'employment_status' => 'employmentStatus', + 'employment_status_id' => 'employmentStatusId', + 'reports_to_name' => 'reportsToName', + 'reports_to_id' => 'reportsToId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'preferred_name' => 'setPreferredName', + 'middle_name' => 'setMiddleName', + 'photo_url' => 'setPhotoUrl', + 'job_title_name' => 'setJobTitleName', + 'job_title_id' => 'setJobTitleId', + 'status' => 'setStatus', + 'work_email' => 'setWorkEmail', + 'home_email' => 'setHomeEmail', + 'best_email' => 'setBestEmail', + 'work_phone' => 'setWorkPhone', + 'work_phone_extension' => 'setWorkPhoneExtension', + 'mobile_phone' => 'setMobilePhone', + 'home_phone' => 'setHomePhone', + 'skype_username' => 'setSkypeUsername', + 'linkedin_url' => 'setLinkedinUrl', + 'facebook_url' => 'setFacebookUrl', + 'instagram_url' => 'setInstagramUrl', + 'twitter_url' => 'setTwitterUrl', + 'pinterest_url' => 'setPinterestUrl', + 'birth_date' => 'setBirthDate', + 'hire_date' => 'setHireDate', + 'original_hire_date' => 'setOriginalHireDate', + 'termination_date' => 'setTerminationDate', + 'address1' => 'setAddress1', + 'city' => 'setCity', + 'state' => 'setState', + 'country' => 'setCountry', + 'gender' => 'setGender', + 'marital' => 'setMarital', + 'pay_rate' => 'setPayRate', + 'pay_type' => 'setPayType', + 'pay_period' => 'setPayPeriod', + 'exempt' => 'setExempt', + 'can_upload_photo' => 'setCanUploadPhoto', + 'division' => 'setDivision', + 'division_id' => 'setDivisionId', + 'department' => 'setDepartment', + 'department_id' => 'setDepartmentId', + 'location' => 'setLocation', + 'location_id' => 'setLocationId', + 'employment_status' => 'setEmploymentStatus', + 'employment_status_id' => 'setEmploymentStatusId', + 'reports_to_name' => 'setReportsToName', + 'reports_to_id' => 'setReportsToId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'preferred_name' => 'getPreferredName', + 'middle_name' => 'getMiddleName', + 'photo_url' => 'getPhotoUrl', + 'job_title_name' => 'getJobTitleName', + 'job_title_id' => 'getJobTitleId', + 'status' => 'getStatus', + 'work_email' => 'getWorkEmail', + 'home_email' => 'getHomeEmail', + 'best_email' => 'getBestEmail', + 'work_phone' => 'getWorkPhone', + 'work_phone_extension' => 'getWorkPhoneExtension', + 'mobile_phone' => 'getMobilePhone', + 'home_phone' => 'getHomePhone', + 'skype_username' => 'getSkypeUsername', + 'linkedin_url' => 'getLinkedinUrl', + 'facebook_url' => 'getFacebookUrl', + 'instagram_url' => 'getInstagramUrl', + 'twitter_url' => 'getTwitterUrl', + 'pinterest_url' => 'getPinterestUrl', + 'birth_date' => 'getBirthDate', + 'hire_date' => 'getHireDate', + 'original_hire_date' => 'getOriginalHireDate', + 'termination_date' => 'getTerminationDate', + 'address1' => 'getAddress1', + 'city' => 'getCity', + 'state' => 'getState', + 'country' => 'getCountry', + 'gender' => 'getGender', + 'marital' => 'getMarital', + 'pay_rate' => 'getPayRate', + 'pay_type' => 'getPayType', + 'pay_period' => 'getPayPeriod', + 'exempt' => 'getExempt', + 'can_upload_photo' => 'getCanUploadPhoto', + 'division' => 'getDivision', + 'division_id' => 'getDivisionId', + 'department' => 'getDepartment', + 'department_id' => 'getDepartmentId', + 'location' => 'getLocation', + 'location_id' => 'getLocationId', + 'employment_status' => 'getEmploymentStatus', + 'employment_status_id' => 'getEmploymentStatusId', + 'reports_to_name' => 'getReportsToName', + 'reports_to_id' => 'getReportsToId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_ACTIVE = 'Active'; + public const STATUS_INACTIVE = 'Inactive'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_ACTIVE, + self::STATUS_INACTIVE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('preferred_name', $data ?? [], null); + $this->setIfExists('middle_name', $data ?? [], null); + $this->setIfExists('photo_url', $data ?? [], null); + $this->setIfExists('job_title_name', $data ?? [], null); + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('work_email', $data ?? [], null); + $this->setIfExists('home_email', $data ?? [], null); + $this->setIfExists('best_email', $data ?? [], null); + $this->setIfExists('work_phone', $data ?? [], null); + $this->setIfExists('work_phone_extension', $data ?? [], null); + $this->setIfExists('mobile_phone', $data ?? [], null); + $this->setIfExists('home_phone', $data ?? [], null); + $this->setIfExists('skype_username', $data ?? [], null); + $this->setIfExists('linkedin_url', $data ?? [], null); + $this->setIfExists('facebook_url', $data ?? [], null); + $this->setIfExists('instagram_url', $data ?? [], null); + $this->setIfExists('twitter_url', $data ?? [], null); + $this->setIfExists('pinterest_url', $data ?? [], null); + $this->setIfExists('birth_date', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); + $this->setIfExists('original_hire_date', $data ?? [], null); + $this->setIfExists('termination_date', $data ?? [], null); + $this->setIfExists('address1', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('marital', $data ?? [], null); + $this->setIfExists('pay_rate', $data ?? [], null); + $this->setIfExists('pay_type', $data ?? [], null); + $this->setIfExists('pay_period', $data ?? [], null); + $this->setIfExists('exempt', $data ?? [], null); + $this->setIfExists('can_upload_photo', $data ?? [], null); + $this->setIfExists('division', $data ?? [], null); + $this->setIfExists('division_id', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('department_id', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('employment_status', $data ?? [], null); + $this->setIfExists('employment_status_id', $data ?? [], null); + $this->setIfExists('reports_to_name', $data ?? [], null); + $this->setIfExists('reports_to_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique identifier for the employee + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name first_name + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + $this->openApiNullablesSetToNull['first_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['first_name'])) { + unset($nullablesSetToNull['first_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name last_name + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + $this->openApiNullablesSetToNull['last_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_name'])) { + unset($nullablesSetToNull['last_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets preferred_name + * + * @return string|null + */ + public function getPreferredName() { + return $this->container['preferred_name']; + } + + /** + * Sets preferred_name + * + * @param string|null $preferred_name preferred_name + * + * @return self + */ + public function setPreferredName($preferred_name) { + if (is_null($preferred_name)) { + $this->openApiNullablesSetToNull['preferred_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['preferred_name'])) { + unset($nullablesSetToNull['preferred_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['preferred_name'] = $preferred_name; + + return $this; + } + + /** + * Gets middle_name + * + * @return string|null + */ + public function getMiddleName() { + return $this->container['middle_name']; + } + + /** + * Sets middle_name + * + * @param string|null $middle_name middle_name + * + * @return self + */ + public function setMiddleName($middle_name) { + if (is_null($middle_name)) { + $this->openApiNullablesSetToNull['middle_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['middle_name'])) { + unset($nullablesSetToNull['middle_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['middle_name'] = $middle_name; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + + /** + * Gets job_title_name + * + * @return string|null + */ + public function getJobTitleName() { + return $this->container['job_title_name']; + } + + /** + * Sets job_title_name + * + * @param string|null $job_title_name job_title_name + * + * @return self + */ + public function setJobTitleName($job_title_name) { + if (is_null($job_title_name)) { + $this->openApiNullablesSetToNull['job_title_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title_name'])) { + unset($nullablesSetToNull['job_title_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title_name'] = $job_title_name; + + return $this; + } + + /** + * Gets job_title_id + * + * @return string|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param string|null $job_title_id job_title_id + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + $this->openApiNullablesSetToNull['job_title_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title_id'])) { + unset($nullablesSetToNull['job_title_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + $this->openApiNullablesSetToNull['status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['status'])) { + unset($nullablesSetToNull['status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets work_email + * + * @return string|null + */ + public function getWorkEmail() { + return $this->container['work_email']; + } + + /** + * Sets work_email + * + * @param string|null $work_email work_email + * + * @return self + */ + public function setWorkEmail($work_email) { + if (is_null($work_email)) { + $this->openApiNullablesSetToNull['work_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_email'])) { + unset($nullablesSetToNull['work_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_email'] = $work_email; + + return $this; + } + + /** + * Gets home_email + * + * @return string|null + */ + public function getHomeEmail() { + return $this->container['home_email']; + } + + /** + * Sets home_email + * + * @param string|null $home_email home_email + * + * @return self + */ + public function setHomeEmail($home_email) { + if (is_null($home_email)) { + $this->openApiNullablesSetToNull['home_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['home_email'])) { + unset($nullablesSetToNull['home_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['home_email'] = $home_email; + + return $this; + } + + /** + * Gets best_email + * + * @return string|null + */ + public function getBestEmail() { + return $this->container['best_email']; + } + + /** + * Sets best_email + * + * @param string|null $best_email best_email + * + * @return self + */ + public function setBestEmail($best_email) { + if (is_null($best_email)) { + $this->openApiNullablesSetToNull['best_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['best_email'])) { + unset($nullablesSetToNull['best_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['best_email'] = $best_email; + + return $this; + } + + /** + * Gets work_phone + * + * @return string|null + */ + public function getWorkPhone() { + return $this->container['work_phone']; + } + + /** + * Sets work_phone + * + * @param string|null $work_phone work_phone + * + * @return self + */ + public function setWorkPhone($work_phone) { + if (is_null($work_phone)) { + $this->openApiNullablesSetToNull['work_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_phone'])) { + unset($nullablesSetToNull['work_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_phone'] = $work_phone; + + return $this; + } + + /** + * Gets work_phone_extension + * + * @return string|null + */ + public function getWorkPhoneExtension() { + return $this->container['work_phone_extension']; + } + + /** + * Sets work_phone_extension + * + * @param string|null $work_phone_extension work_phone_extension + * + * @return self + */ + public function setWorkPhoneExtension($work_phone_extension) { + if (is_null($work_phone_extension)) { + $this->openApiNullablesSetToNull['work_phone_extension'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_phone_extension'])) { + unset($nullablesSetToNull['work_phone_extension']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_phone_extension'] = $work_phone_extension; + + return $this; + } + + /** + * Gets mobile_phone + * + * @return string|null + */ + public function getMobilePhone() { + return $this->container['mobile_phone']; + } + + /** + * Sets mobile_phone + * + * @param string|null $mobile_phone mobile_phone + * + * @return self + */ + public function setMobilePhone($mobile_phone) { + if (is_null($mobile_phone)) { + $this->openApiNullablesSetToNull['mobile_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['mobile_phone'])) { + unset($nullablesSetToNull['mobile_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mobile_phone'] = $mobile_phone; + + return $this; + } + + /** + * Gets home_phone + * + * @return string|null + */ + public function getHomePhone() { + return $this->container['home_phone']; + } + + /** + * Sets home_phone + * + * @param string|null $home_phone home_phone + * + * @return self + */ + public function setHomePhone($home_phone) { + if (is_null($home_phone)) { + $this->openApiNullablesSetToNull['home_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['home_phone'])) { + unset($nullablesSetToNull['home_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['home_phone'] = $home_phone; + + return $this; + } + + /** + * Gets skype_username + * + * @return string|null + */ + public function getSkypeUsername() { + return $this->container['skype_username']; + } + + /** + * Sets skype_username + * + * @param string|null $skype_username skype_username + * + * @return self + */ + public function setSkypeUsername($skype_username) { + if (is_null($skype_username)) { + $this->openApiNullablesSetToNull['skype_username'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['skype_username'])) { + unset($nullablesSetToNull['skype_username']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['skype_username'] = $skype_username; + + return $this; + } + + /** + * Gets linkedin_url + * + * @return string|null + */ + public function getLinkedinUrl() { + return $this->container['linkedin_url']; + } + + /** + * Sets linkedin_url + * + * @param string|null $linkedin_url linkedin_url + * + * @return self + */ + public function setLinkedinUrl($linkedin_url) { + if (is_null($linkedin_url)) { + $this->openApiNullablesSetToNull['linkedin_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['linkedin_url'])) { + unset($nullablesSetToNull['linkedin_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['linkedin_url'] = $linkedin_url; + + return $this; + } + + /** + * Gets facebook_url + * + * @return string|null + */ + public function getFacebookUrl() { + return $this->container['facebook_url']; + } + + /** + * Sets facebook_url + * + * @param string|null $facebook_url facebook_url + * + * @return self + */ + public function setFacebookUrl($facebook_url) { + if (is_null($facebook_url)) { + $this->openApiNullablesSetToNull['facebook_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['facebook_url'])) { + unset($nullablesSetToNull['facebook_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['facebook_url'] = $facebook_url; + + return $this; + } + + /** + * Gets instagram_url + * + * @return string|null + */ + public function getInstagramUrl() { + return $this->container['instagram_url']; + } + + /** + * Sets instagram_url + * + * @param string|null $instagram_url instagram_url + * + * @return self + */ + public function setInstagramUrl($instagram_url) { + if (is_null($instagram_url)) { + $this->openApiNullablesSetToNull['instagram_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['instagram_url'])) { + unset($nullablesSetToNull['instagram_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['instagram_url'] = $instagram_url; + + return $this; + } + + /** + * Gets twitter_url + * + * @return string|null + */ + public function getTwitterUrl() { + return $this->container['twitter_url']; + } + + /** + * Sets twitter_url + * + * @param string|null $twitter_url twitter_url + * + * @return self + */ + public function setTwitterUrl($twitter_url) { + if (is_null($twitter_url)) { + $this->openApiNullablesSetToNull['twitter_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['twitter_url'])) { + unset($nullablesSetToNull['twitter_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['twitter_url'] = $twitter_url; + + return $this; + } + + /** + * Gets pinterest_url + * + * @return string|null + */ + public function getPinterestUrl() { + return $this->container['pinterest_url']; + } + + /** + * Sets pinterest_url + * + * @param string|null $pinterest_url pinterest_url + * + * @return self + */ + public function setPinterestUrl($pinterest_url) { + if (is_null($pinterest_url)) { + $this->openApiNullablesSetToNull['pinterest_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pinterest_url'])) { + unset($nullablesSetToNull['pinterest_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pinterest_url'] = $pinterest_url; + + return $this; + } + + /** + * Gets birth_date + * + * @return string|null + */ + public function getBirthDate() { + return $this->container['birth_date']; + } + + /** + * Sets birth_date + * + * @param string|null $birth_date birth_date + * + * @return self + */ + public function setBirthDate($birth_date) { + if (is_null($birth_date)) { + $this->openApiNullablesSetToNull['birth_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['birth_date'])) { + unset($nullablesSetToNull['birth_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['birth_date'] = $birth_date; + + return $this; + } + + /** + * Gets hire_date + * + * @return string|null + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param string|null $hire_date hire_date + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + $this->openApiNullablesSetToNull['hire_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hire_date'])) { + unset($nullablesSetToNull['hire_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hire_date'] = $hire_date; + + return $this; + } + + /** + * Gets original_hire_date + * + * @return string|null + */ + public function getOriginalHireDate() { + return $this->container['original_hire_date']; + } + + /** + * Sets original_hire_date + * + * @param string|null $original_hire_date original_hire_date + * + * @return self + */ + public function setOriginalHireDate($original_hire_date) { + if (is_null($original_hire_date)) { + $this->openApiNullablesSetToNull['original_hire_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_hire_date'])) { + unset($nullablesSetToNull['original_hire_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_hire_date'] = $original_hire_date; + + return $this; + } + + /** + * Gets termination_date + * + * @return string|null + */ + public function getTerminationDate() { + return $this->container['termination_date']; + } + + /** + * Sets termination_date + * + * @param string|null $termination_date termination_date + * + * @return self + */ + public function setTerminationDate($termination_date) { + if (is_null($termination_date)) { + $this->openApiNullablesSetToNull['termination_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_date'])) { + unset($nullablesSetToNull['termination_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_date'] = $termination_date; + + return $this; + } + + /** + * Gets address1 + * + * @return string|null + */ + public function getAddress1() { + return $this->container['address1']; + } + + /** + * Sets address1 + * + * @param string|null $address1 address1 + * + * @return self + */ + public function setAddress1($address1) { + if (is_null($address1)) { + $this->openApiNullablesSetToNull['address1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address1'])) { + unset($nullablesSetToNull['address1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address1'] = $address1; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state state + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + $this->openApiNullablesSetToNull['state'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state'])) { + unset($nullablesSetToNull['state']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + $this->openApiNullablesSetToNull['country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country'])) { + unset($nullablesSetToNull['country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets gender + * + * @return string|null + */ + public function getGender() { + return $this->container['gender']; + } + + /** + * Sets gender + * + * @param string|null $gender gender + * + * @return self + */ + public function setGender($gender) { + if (is_null($gender)) { + $this->openApiNullablesSetToNull['gender'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['gender'])) { + unset($nullablesSetToNull['gender']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['gender'] = $gender; + + return $this; + } + + /** + * Gets marital + * + * @return string|null + */ + public function getMarital() { + return $this->container['marital']; + } + + /** + * Sets marital + * + * @param string|null $marital marital + * + * @return self + */ + public function setMarital($marital) { + if (is_null($marital)) { + $this->openApiNullablesSetToNull['marital'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['marital'])) { + unset($nullablesSetToNull['marital']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['marital'] = $marital; + + return $this; + } + + /** + * Gets pay_rate + * + * @return string|null + */ + public function getPayRate() { + return $this->container['pay_rate']; + } + + /** + * Sets pay_rate + * + * @param string|null $pay_rate pay_rate + * + * @return self + */ + public function setPayRate($pay_rate) { + if (is_null($pay_rate)) { + $this->openApiNullablesSetToNull['pay_rate'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_rate'])) { + unset($nullablesSetToNull['pay_rate']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_rate'] = $pay_rate; + + return $this; + } + + /** + * Gets pay_type + * + * @return string|null + */ + public function getPayType() { + return $this->container['pay_type']; + } + + /** + * Sets pay_type + * + * @param string|null $pay_type pay_type + * + * @return self + */ + public function setPayType($pay_type) { + if (is_null($pay_type)) { + $this->openApiNullablesSetToNull['pay_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_type'])) { + unset($nullablesSetToNull['pay_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_type'] = $pay_type; + + return $this; + } + + /** + * Gets pay_period + * + * @return string|null + */ + public function getPayPeriod() { + return $this->container['pay_period']; + } + + /** + * Sets pay_period + * + * @param string|null $pay_period pay_period + * + * @return self + */ + public function setPayPeriod($pay_period) { + if (is_null($pay_period)) { + $this->openApiNullablesSetToNull['pay_period'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_period'])) { + unset($nullablesSetToNull['pay_period']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_period'] = $pay_period; + + return $this; + } + + /** + * Gets exempt + * + * @return string|null + */ + public function getExempt() { + return $this->container['exempt']; + } + + /** + * Sets exempt + * + * @param string|null $exempt exempt + * + * @return self + */ + public function setExempt($exempt) { + if (is_null($exempt)) { + $this->openApiNullablesSetToNull['exempt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['exempt'])) { + unset($nullablesSetToNull['exempt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['exempt'] = $exempt; + + return $this; + } + + /** + * Gets can_upload_photo + * + * @return bool|null + */ + public function getCanUploadPhoto() { + return $this->container['can_upload_photo']; + } + + /** + * Sets can_upload_photo + * + * @param bool|null $can_upload_photo can_upload_photo + * + * @return self + */ + public function setCanUploadPhoto($can_upload_photo) { + if (is_null($can_upload_photo)) { + $this->openApiNullablesSetToNull['can_upload_photo'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['can_upload_photo'])) { + unset($nullablesSetToNull['can_upload_photo']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['can_upload_photo'] = $can_upload_photo; + + return $this; + } + + /** + * Gets division + * + * @return string|null + */ + public function getDivision() { + return $this->container['division']; + } + + /** + * Sets division + * + * @param string|null $division division + * + * @return self + */ + public function setDivision($division) { + if (is_null($division)) { + $this->openApiNullablesSetToNull['division'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['division'])) { + unset($nullablesSetToNull['division']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['division'] = $division; + + return $this; + } + + /** + * Gets division_id + * + * @return string|null + */ + public function getDivisionId() { + return $this->container['division_id']; + } + + /** + * Sets division_id + * + * @param string|null $division_id division_id + * + * @return self + */ + public function setDivisionId($division_id) { + if (is_null($division_id)) { + $this->openApiNullablesSetToNull['division_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['division_id'])) { + unset($nullablesSetToNull['division_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['division_id'] = $division_id; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment() { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department department + * + * @return self + */ + public function setDepartment($department) { + if (is_null($department)) { + $this->openApiNullablesSetToNull['department'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department'])) { + unset($nullablesSetToNull['department']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets department_id + * + * @return string|null + */ + public function getDepartmentId() { + return $this->container['department_id']; + } + + /** + * Sets department_id + * + * @param string|null $department_id department_id + * + * @return self + */ + public function setDepartmentId($department_id) { + if (is_null($department_id)) { + $this->openApiNullablesSetToNull['department_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department_id'])) { + unset($nullablesSetToNull['department_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department_id'] = $department_id; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets location_id + * + * @return string|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param string|null $location_id location_id + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + $this->openApiNullablesSetToNull['location_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location_id'])) { + unset($nullablesSetToNull['location_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets employment_status + * + * @return string|null + */ + public function getEmploymentStatus() { + return $this->container['employment_status']; + } + + /** + * Sets employment_status + * + * @param string|null $employment_status employment_status + * + * @return self + */ + public function setEmploymentStatus($employment_status) { + if (is_null($employment_status)) { + $this->openApiNullablesSetToNull['employment_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status'])) { + unset($nullablesSetToNull['employment_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status'] = $employment_status; + + return $this; + } + + /** + * Gets employment_status_id + * + * @return string|null + */ + public function getEmploymentStatusId() { + return $this->container['employment_status_id']; + } + + /** + * Sets employment_status_id + * + * @param string|null $employment_status_id employment_status_id + * + * @return self + */ + public function setEmploymentStatusId($employment_status_id) { + if (is_null($employment_status_id)) { + $this->openApiNullablesSetToNull['employment_status_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status_id'])) { + unset($nullablesSetToNull['employment_status_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status_id'] = $employment_status_id; + + return $this; + } + + /** + * Gets reports_to_name + * + * @return string|null + */ + public function getReportsToName() { + return $this->container['reports_to_name']; + } + + /** + * Sets reports_to_name + * + * @param string|null $reports_to_name reports_to_name + * + * @return self + */ + public function setReportsToName($reports_to_name) { + if (is_null($reports_to_name)) { + $this->openApiNullablesSetToNull['reports_to_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['reports_to_name'])) { + unset($nullablesSetToNull['reports_to_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reports_to_name'] = $reports_to_name; + + return $this; + } + + /** + * Gets reports_to_id + * + * @return string|null + */ + public function getReportsToId() { + return $this->container['reports_to_id']; + } + + /** + * Sets reports_to_id + * + * @param string|null $reports_to_id reports_to_id + * + * @return self + */ + public function setReportsToId($reports_to_id) { + if (is_null($reports_to_id)) { + $this->openApiNullablesSetToNull['reports_to_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['reports_to_id'])) { + unset($nullablesSetToNull['reports_to_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reports_to_id'] = $reports_to_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesEmployeeBaseResponse.php b/lib/Model/GetEmployeesEmployeeBaseResponse.php new file mode 100644 index 00000000..7aef6d8d --- /dev/null +++ b/lib/Model/GetEmployeesEmployeeBaseResponse.php @@ -0,0 +1,673 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesEmployeeBaseResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesEmployeeBaseResponse Class Doc Comment + * + * @category Class + * @description Base employee fields that are always included in the response. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesEmployeeBaseResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesEmployeeBaseResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'preferred_name' => 'string', + 'photo_url' => 'string', + 'job_title_name' => 'string', + 'status' => 'string', + '_restricted_fields' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'first_name' => null, + 'last_name' => null, + 'preferred_name' => null, + 'photo_url' => null, + 'job_title_name' => null, + 'status' => null, + '_restricted_fields' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => false, + 'first_name' => true, + 'last_name' => true, + 'preferred_name' => true, + 'photo_url' => true, + 'job_title_name' => true, + 'status' => true, + '_restricted_fields' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'preferred_name' => 'preferredName', + 'photo_url' => 'photoUrl', + 'job_title_name' => 'jobTitleName', + 'status' => 'status', + '_restricted_fields' => '_restrictedFields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'preferred_name' => 'setPreferredName', + 'photo_url' => 'setPhotoUrl', + 'job_title_name' => 'setJobTitleName', + 'status' => 'setStatus', + '_restricted_fields' => 'setRestrictedFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'preferred_name' => 'getPreferredName', + 'photo_url' => 'getPhotoUrl', + 'job_title_name' => 'getJobTitleName', + 'status' => 'getStatus', + '_restricted_fields' => 'getRestrictedFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('preferred_name', $data ?? [], null); + $this->setIfExists('photo_url', $data ?? [], null); + $this->setIfExists('job_title_name', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('_restricted_fields', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_id'] === null) { + $invalidProperties[] = "'employee_id' can't be null"; + } + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; + } + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; + } + if ($this->container['preferred_name'] === null) { + $invalidProperties[] = "'preferred_name' can't be null"; + } + if ($this->container['photo_url'] === null) { + $invalidProperties[] = "'photo_url' can't be null"; + } + if ($this->container['job_title_name'] === null) { + $invalidProperties[] = "'job_title_name' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['_restricted_fields'] === null) { + $invalidProperties[] = "'_restricted_fields' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string $employee_id Unique identifier for the employee + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets first_name + * + * @return string + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string $first_name first_name + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + $this->openApiNullablesSetToNull['first_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['first_name'])) { + unset($nullablesSetToNull['first_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string $last_name last_name + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + $this->openApiNullablesSetToNull['last_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_name'])) { + unset($nullablesSetToNull['last_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets preferred_name + * + * @return string + */ + public function getPreferredName() { + return $this->container['preferred_name']; + } + + /** + * Sets preferred_name + * + * @param string $preferred_name preferred_name + * + * @return self + */ + public function setPreferredName($preferred_name) { + if (is_null($preferred_name)) { + $this->openApiNullablesSetToNull['preferred_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['preferred_name'])) { + unset($nullablesSetToNull['preferred_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['preferred_name'] = $preferred_name; + + return $this; + } + + /** + * Gets photo_url + * + * @return string + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + + /** + * Gets job_title_name + * + * @return string + */ + public function getJobTitleName() { + return $this->container['job_title_name']; + } + + /** + * Sets job_title_name + * + * @param string $job_title_name job_title_name + * + * @return self + */ + public function setJobTitleName($job_title_name) { + if (is_null($job_title_name)) { + $this->openApiNullablesSetToNull['job_title_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title_name'])) { + unset($nullablesSetToNull['job_title_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title_name'] = $job_title_name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + $this->openApiNullablesSetToNull['status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['status'])) { + unset($nullablesSetToNull['status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets _restricted_fields + * + * @return string[] + */ + public function getRestrictedFields() { + return $this->container['_restricted_fields']; + } + + /** + * Sets _restricted_fields + * + * @param string[] $_restricted_fields Array of field names that are restricted due to permission checks + * + * @return self + */ + public function setRestrictedFields($_restricted_fields) { + if (is_null($_restricted_fields)) { + throw new \InvalidArgumentException('non-nullable _restricted_fields cannot be null'); + } + $this->container['_restricted_fields'] = $_restricted_fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesEmployeeResponse.php b/lib/Model/GetEmployeesEmployeeResponse.php index 3fe7e932..8a025f5f 100644 --- a/lib/Model/GetEmployeesEmployeeResponse.php +++ b/lib/Model/GetEmployeesEmployeeResponse.php @@ -36,7 +36,7 @@ * GetEmployeesEmployeeResponse Class Doc Comment * * @category Class - * @description Employee data response object containing basic employee information and permission-restricted fields + * @description Employee data response object containing basic employee information and optionally requested fields. When the `fields` parameter is provided, additional requested fields will be included. Field values are subject to permission checks — restricted fields are returned as `null` and their names are listed in `_restrictedFields`. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -65,7 +65,130 @@ class GetEmployeesEmployeeResponse implements ModelInterface, ArrayAccess, \Json 'photo_url' => 'string', 'job_title_name' => 'string', 'status' => 'string', - '_restricted_fields' => 'string[]' + '_restricted_fields' => 'string[]', + 'address_line1' => 'string', + 'address_line2' => 'string', + 'age' => 'string', + 'allergies' => 'string', + 'best_email' => 'string', + 'birth_date' => 'string', + 'birthplace' => 'string', + 'citizenship' => 'string', + 'citizenship_id' => 'string', + 'city' => 'string', + 'compensation_change_reason' => 'string', + 'compensation_change_reason_id' => 'string', + 'compensation_comment' => 'string', + 'compensation_effective_date' => 'string', + 'compensation_end_date' => 'string', + 'contract_end_date' => 'string', + 'country' => 'string', + 'country_id' => 'string', + 'department_id' => 'string', + 'department_name' => 'string', + 'dietary_restrictions' => 'string', + 'display_name' => 'string', + 'division_id' => 'string', + 'division_name' => 'string', + 'eeo_job_category' => 'string', + 'eeo_job_category_id' => 'string', + 'ein' => 'string', + 'eligible_for_rehire' => 'string', + 'eligible_for_rehire_id' => 'string', + 'employee_name' => 'string', + 'employee_number' => 'string', + 'employment_status_comment' => 'string', + 'employment_status_effective_date' => 'string', + 'employment_status_id' => 'string', + 'employment_status_name' => 'string', + 'employment_type' => 'string', + 'employment_type_id' => 'string', + 'ethnicity' => 'string', + 'ethnicity_id' => 'string', + 'facebook_url' => 'string', + 'final_dose_administration_date' => 'string', + 'final_pay_date' => 'string', + 'first_name_last_name' => 'string', + 'first_name_middle_initial' => 'string', + 'flsa_code' => 'string', + 'flsa_code_id' => 'string', + 'gender' => 'string', + 'gender_identity' => 'string', + 'gender_identity_id' => 'int[]', + 'hire_date' => 'string', + 'home_email' => 'string', + 'home_phone' => 'string', + 'hours_per_pay_cycle' => 'string', + 'instagram_url' => 'string', + 'is_manager' => 'bool', + 'jacket_size' => 'string', + 'jacket_size_id' => 'string', + 'job_information_effective_date' => 'string', + 'job_title_id' => 'string', + 'linkedin_url' => 'string', + 'location_id' => 'string', + 'location_name' => 'string', + 'marital_status' => 'string', + 'middle_initial' => 'string', + 'middle_name' => 'string', + 'mobile_phone' => 'string', + 'national_id' => 'string', + 'national_insurance_category' => 'string', + 'national_insurance_category_id' => 'string', + 'nationality' => 'string', + 'nationality_id' => 'string', + 'nick_name' => 'string', + 'nin' => 'string', + 'notice_period' => 'string', + 'notice_period_id' => 'string', + 'original_hire_date' => 'string', + 'overtime' => 'string', + 'overtime_rate' => '\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfOvertimeRate', + 'paid_per' => 'string', + 'pay_rate' => '\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfPayRate', + 'pay_schedule' => 'string', + 'pay_schedule_id' => 'string', + 'pay_type' => 'string', + 'pinterest_url' => 'string', + 'preferred_name_last_name' => 'string', + 'probation_end_date' => 'string', + 'pronouns' => 'string', + 'pronouns_id' => 'string', + 'proof_of_vaccination' => 'bool', + 'reports_to_id' => 'string', + 'reports_to_name' => 'string', + 'secondary_language' => 'string', + 'shirt_size' => 'string', + 'shirt_size_id' => 'string', + 'sin' => 'string', + 'skype_username' => 'string', + 'ssn' => 'string', + 'state' => 'string', + 'state_id' => 'string', + 'tax_type_id' => 'string', + 'teams' => '\BhrSdk\Model\GetEmployeesEmployeeResponseAllOfTeams[]', + 'tenure' => 'string', + 'termination_date' => 'string', + 'termination_reason' => 'string', + 'termination_reason_id' => 'string', + 'termination_regrettable' => 'string', + 'termination_regrettable_id' => 'string', + 'termination_type' => 'string', + 'termination_type_id' => 'string', + 't_shirt_size' => 'string', + 't_shirt_size_id' => 'string', + 'twitter_url' => 'string', + 'user_id' => 'string', + 'vaccination_status' => 'string', + 'vaccination_status_id' => 'string', + 'vaccine_received' => 'string', + 'vaccine_received_id' => 'string', + 'veteran_status' => 'string', + 'veteran_status_id' => 'int[]', + 'work_email' => 'string', + 'work_phone' => 'string', + 'work_phone_extension' => 'string', + 'zipcode' => 'string' ]; /** @@ -83,7 +206,130 @@ class GetEmployeesEmployeeResponse implements ModelInterface, ArrayAccess, \Json 'photo_url' => null, 'job_title_name' => null, 'status' => null, - '_restricted_fields' => null + '_restricted_fields' => null, + 'address_line1' => null, + 'address_line2' => null, + 'age' => null, + 'allergies' => null, + 'best_email' => null, + 'birth_date' => null, + 'birthplace' => null, + 'citizenship' => null, + 'citizenship_id' => null, + 'city' => null, + 'compensation_change_reason' => null, + 'compensation_change_reason_id' => null, + 'compensation_comment' => null, + 'compensation_effective_date' => null, + 'compensation_end_date' => null, + 'contract_end_date' => null, + 'country' => null, + 'country_id' => null, + 'department_id' => null, + 'department_name' => null, + 'dietary_restrictions' => null, + 'display_name' => null, + 'division_id' => null, + 'division_name' => null, + 'eeo_job_category' => null, + 'eeo_job_category_id' => null, + 'ein' => null, + 'eligible_for_rehire' => null, + 'eligible_for_rehire_id' => null, + 'employee_name' => null, + 'employee_number' => null, + 'employment_status_comment' => null, + 'employment_status_effective_date' => null, + 'employment_status_id' => null, + 'employment_status_name' => null, + 'employment_type' => null, + 'employment_type_id' => null, + 'ethnicity' => null, + 'ethnicity_id' => null, + 'facebook_url' => null, + 'final_dose_administration_date' => null, + 'final_pay_date' => null, + 'first_name_last_name' => null, + 'first_name_middle_initial' => null, + 'flsa_code' => null, + 'flsa_code_id' => null, + 'gender' => null, + 'gender_identity' => null, + 'gender_identity_id' => null, + 'hire_date' => null, + 'home_email' => null, + 'home_phone' => null, + 'hours_per_pay_cycle' => null, + 'instagram_url' => null, + 'is_manager' => null, + 'jacket_size' => null, + 'jacket_size_id' => null, + 'job_information_effective_date' => null, + 'job_title_id' => null, + 'linkedin_url' => null, + 'location_id' => null, + 'location_name' => null, + 'marital_status' => null, + 'middle_initial' => null, + 'middle_name' => null, + 'mobile_phone' => null, + 'national_id' => null, + 'national_insurance_category' => null, + 'national_insurance_category_id' => null, + 'nationality' => null, + 'nationality_id' => null, + 'nick_name' => null, + 'nin' => null, + 'notice_period' => null, + 'notice_period_id' => null, + 'original_hire_date' => null, + 'overtime' => null, + 'overtime_rate' => null, + 'paid_per' => null, + 'pay_rate' => null, + 'pay_schedule' => null, + 'pay_schedule_id' => null, + 'pay_type' => null, + 'pinterest_url' => null, + 'preferred_name_last_name' => null, + 'probation_end_date' => null, + 'pronouns' => null, + 'pronouns_id' => null, + 'proof_of_vaccination' => null, + 'reports_to_id' => null, + 'reports_to_name' => null, + 'secondary_language' => null, + 'shirt_size' => null, + 'shirt_size_id' => null, + 'sin' => null, + 'skype_username' => null, + 'ssn' => null, + 'state' => null, + 'state_id' => null, + 'tax_type_id' => null, + 'teams' => null, + 'tenure' => null, + 'termination_date' => null, + 'termination_reason' => null, + 'termination_reason_id' => null, + 'termination_regrettable' => null, + 'termination_regrettable_id' => null, + 'termination_type' => null, + 'termination_type_id' => null, + 't_shirt_size' => null, + 't_shirt_size_id' => null, + 'twitter_url' => null, + 'user_id' => null, + 'vaccination_status' => null, + 'vaccination_status_id' => null, + 'vaccine_received' => null, + 'vaccine_received_id' => null, + 'veteran_status' => null, + 'veteran_status_id' => null, + 'work_email' => null, + 'work_phone' => null, + 'work_phone_extension' => null, + 'zipcode' => null ]; /** @@ -94,13 +340,136 @@ class GetEmployeesEmployeeResponse implements ModelInterface, ArrayAccess, \Json */ protected static array $openApiNullables = [ 'employee_id' => false, - 'first_name' => true, - 'last_name' => true, - 'preferred_name' => true, - 'photo_url' => true, - 'job_title_name' => true, - 'status' => true, - '_restricted_fields' => false + 'first_name' => false, + 'last_name' => false, + 'preferred_name' => false, + 'photo_url' => false, + 'job_title_name' => false, + 'status' => false, + '_restricted_fields' => false, + 'address_line1' => true, + 'address_line2' => true, + 'age' => true, + 'allergies' => true, + 'best_email' => true, + 'birth_date' => true, + 'birthplace' => true, + 'citizenship' => true, + 'citizenship_id' => true, + 'city' => true, + 'compensation_change_reason' => true, + 'compensation_change_reason_id' => true, + 'compensation_comment' => true, + 'compensation_effective_date' => true, + 'compensation_end_date' => true, + 'contract_end_date' => true, + 'country' => true, + 'country_id' => true, + 'department_id' => true, + 'department_name' => true, + 'dietary_restrictions' => true, + 'display_name' => true, + 'division_id' => true, + 'division_name' => true, + 'eeo_job_category' => true, + 'eeo_job_category_id' => true, + 'ein' => true, + 'eligible_for_rehire' => true, + 'eligible_for_rehire_id' => true, + 'employee_name' => true, + 'employee_number' => true, + 'employment_status_comment' => true, + 'employment_status_effective_date' => true, + 'employment_status_id' => true, + 'employment_status_name' => true, + 'employment_type' => true, + 'employment_type_id' => true, + 'ethnicity' => true, + 'ethnicity_id' => true, + 'facebook_url' => true, + 'final_dose_administration_date' => true, + 'final_pay_date' => true, + 'first_name_last_name' => true, + 'first_name_middle_initial' => true, + 'flsa_code' => true, + 'flsa_code_id' => true, + 'gender' => true, + 'gender_identity' => true, + 'gender_identity_id' => false, + 'hire_date' => true, + 'home_email' => true, + 'home_phone' => true, + 'hours_per_pay_cycle' => true, + 'instagram_url' => true, + 'is_manager' => true, + 'jacket_size' => true, + 'jacket_size_id' => true, + 'job_information_effective_date' => true, + 'job_title_id' => true, + 'linkedin_url' => true, + 'location_id' => true, + 'location_name' => true, + 'marital_status' => true, + 'middle_initial' => true, + 'middle_name' => true, + 'mobile_phone' => true, + 'national_id' => true, + 'national_insurance_category' => true, + 'national_insurance_category_id' => true, + 'nationality' => true, + 'nationality_id' => true, + 'nick_name' => true, + 'nin' => true, + 'notice_period' => true, + 'notice_period_id' => true, + 'original_hire_date' => true, + 'overtime' => true, + 'overtime_rate' => false, + 'paid_per' => true, + 'pay_rate' => false, + 'pay_schedule' => true, + 'pay_schedule_id' => true, + 'pay_type' => true, + 'pinterest_url' => true, + 'preferred_name_last_name' => true, + 'probation_end_date' => true, + 'pronouns' => true, + 'pronouns_id' => true, + 'proof_of_vaccination' => true, + 'reports_to_id' => true, + 'reports_to_name' => true, + 'secondary_language' => true, + 'shirt_size' => true, + 'shirt_size_id' => true, + 'sin' => true, + 'skype_username' => true, + 'ssn' => true, + 'state' => true, + 'state_id' => true, + 'tax_type_id' => true, + 'teams' => false, + 'tenure' => true, + 'termination_date' => true, + 'termination_reason' => true, + 'termination_reason_id' => true, + 'termination_regrettable' => true, + 'termination_regrettable_id' => true, + 'termination_type' => true, + 'termination_type_id' => true, + 't_shirt_size' => true, + 't_shirt_size_id' => true, + 'twitter_url' => true, + 'user_id' => true, + 'vaccination_status' => true, + 'vaccination_status_id' => true, + 'vaccine_received' => true, + 'vaccine_received_id' => true, + 'veteran_status' => true, + 'veteran_status_id' => false, + 'work_email' => true, + 'work_phone' => true, + 'work_phone_extension' => true, + 'zipcode' => true ]; /** @@ -192,7 +561,130 @@ public function isNullableSetToNull(string $property): bool { 'photo_url' => 'photoUrl', 'job_title_name' => 'jobTitleName', 'status' => 'status', - '_restricted_fields' => '_restrictedFields' + '_restricted_fields' => '_restrictedFields', + 'address_line1' => 'addressLine1', + 'address_line2' => 'addressLine2', + 'age' => 'age', + 'allergies' => 'allergies', + 'best_email' => 'bestEmail', + 'birth_date' => 'birthDate', + 'birthplace' => 'birthplace', + 'citizenship' => 'citizenship', + 'citizenship_id' => 'citizenshipId', + 'city' => 'city', + 'compensation_change_reason' => 'compensationChangeReason', + 'compensation_change_reason_id' => 'compensationChangeReasonId', + 'compensation_comment' => 'compensationComment', + 'compensation_effective_date' => 'compensationEffectiveDate', + 'compensation_end_date' => 'compensationEndDate', + 'contract_end_date' => 'contractEndDate', + 'country' => 'country', + 'country_id' => 'countryId', + 'department_id' => 'departmentId', + 'department_name' => 'departmentName', + 'dietary_restrictions' => 'dietaryRestrictions', + 'display_name' => 'displayName', + 'division_id' => 'divisionId', + 'division_name' => 'divisionName', + 'eeo_job_category' => 'eeoJobCategory', + 'eeo_job_category_id' => 'eeoJobCategoryId', + 'ein' => 'ein', + 'eligible_for_rehire' => 'eligibleForRehire', + 'eligible_for_rehire_id' => 'eligibleForRehireId', + 'employee_name' => 'employeeName', + 'employee_number' => 'employeeNumber', + 'employment_status_comment' => 'employmentStatusComment', + 'employment_status_effective_date' => 'employmentStatusEffectiveDate', + 'employment_status_id' => 'employmentStatusId', + 'employment_status_name' => 'employmentStatusName', + 'employment_type' => 'employmentType', + 'employment_type_id' => 'employmentTypeId', + 'ethnicity' => 'ethnicity', + 'ethnicity_id' => 'ethnicityId', + 'facebook_url' => 'facebookUrl', + 'final_dose_administration_date' => 'finalDoseAdministrationDate', + 'final_pay_date' => 'finalPayDate', + 'first_name_last_name' => 'firstNameLastName', + 'first_name_middle_initial' => 'firstNameMiddleInitial', + 'flsa_code' => 'flsaCode', + 'flsa_code_id' => 'flsaCodeId', + 'gender' => 'gender', + 'gender_identity' => 'genderIdentity', + 'gender_identity_id' => 'genderIdentityId', + 'hire_date' => 'hireDate', + 'home_email' => 'homeEmail', + 'home_phone' => 'homePhone', + 'hours_per_pay_cycle' => 'hoursPerPayCycle', + 'instagram_url' => 'instagramUrl', + 'is_manager' => 'isManager', + 'jacket_size' => 'jacketSize', + 'jacket_size_id' => 'jacketSizeId', + 'job_information_effective_date' => 'jobInformationEffectiveDate', + 'job_title_id' => 'jobTitleId', + 'linkedin_url' => 'linkedinUrl', + 'location_id' => 'locationId', + 'location_name' => 'locationName', + 'marital_status' => 'maritalStatus', + 'middle_initial' => 'middleInitial', + 'middle_name' => 'middleName', + 'mobile_phone' => 'mobilePhone', + 'national_id' => 'nationalId', + 'national_insurance_category' => 'nationalInsuranceCategory', + 'national_insurance_category_id' => 'nationalInsuranceCategoryId', + 'nationality' => 'nationality', + 'nationality_id' => 'nationalityId', + 'nick_name' => 'nickName', + 'nin' => 'nin', + 'notice_period' => 'noticePeriod', + 'notice_period_id' => 'noticePeriodId', + 'original_hire_date' => 'originalHireDate', + 'overtime' => 'overtime', + 'overtime_rate' => 'overtimeRate', + 'paid_per' => 'paidPer', + 'pay_rate' => 'payRate', + 'pay_schedule' => 'paySchedule', + 'pay_schedule_id' => 'payScheduleId', + 'pay_type' => 'payType', + 'pinterest_url' => 'pinterestUrl', + 'preferred_name_last_name' => 'preferredNameLastName', + 'probation_end_date' => 'probationEndDate', + 'pronouns' => 'pronouns', + 'pronouns_id' => 'pronounsId', + 'proof_of_vaccination' => 'proofOfVaccination', + 'reports_to_id' => 'reportsToId', + 'reports_to_name' => 'reportsToName', + 'secondary_language' => 'secondaryLanguage', + 'shirt_size' => 'shirtSize', + 'shirt_size_id' => 'shirtSizeId', + 'sin' => 'sin', + 'skype_username' => 'skypeUsername', + 'ssn' => 'ssn', + 'state' => 'state', + 'state_id' => 'stateId', + 'tax_type_id' => 'taxTypeId', + 'teams' => 'teams', + 'tenure' => 'tenure', + 'termination_date' => 'terminationDate', + 'termination_reason' => 'terminationReason', + 'termination_reason_id' => 'terminationReasonId', + 'termination_regrettable' => 'terminationRegrettable', + 'termination_regrettable_id' => 'terminationRegrettableId', + 'termination_type' => 'terminationType', + 'termination_type_id' => 'terminationTypeId', + 't_shirt_size' => 'tShirtSize', + 't_shirt_size_id' => 'tShirtSizeId', + 'twitter_url' => 'twitterUrl', + 'user_id' => 'userId', + 'vaccination_status' => 'vaccinationStatus', + 'vaccination_status_id' => 'vaccinationStatusId', + 'vaccine_received' => 'vaccineReceived', + 'vaccine_received_id' => 'vaccineReceivedId', + 'veteran_status' => 'veteranStatus', + 'veteran_status_id' => 'veteranStatusId', + 'work_email' => 'workEmail', + 'work_phone' => 'workPhone', + 'work_phone_extension' => 'workPhoneExtension', + 'zipcode' => 'zipcode' ]; /** @@ -208,7 +700,130 @@ public function isNullableSetToNull(string $property): bool { 'photo_url' => 'setPhotoUrl', 'job_title_name' => 'setJobTitleName', 'status' => 'setStatus', - '_restricted_fields' => 'setRestrictedFields' + '_restricted_fields' => 'setRestrictedFields', + 'address_line1' => 'setAddressLine1', + 'address_line2' => 'setAddressLine2', + 'age' => 'setAge', + 'allergies' => 'setAllergies', + 'best_email' => 'setBestEmail', + 'birth_date' => 'setBirthDate', + 'birthplace' => 'setBirthplace', + 'citizenship' => 'setCitizenship', + 'citizenship_id' => 'setCitizenshipId', + 'city' => 'setCity', + 'compensation_change_reason' => 'setCompensationChangeReason', + 'compensation_change_reason_id' => 'setCompensationChangeReasonId', + 'compensation_comment' => 'setCompensationComment', + 'compensation_effective_date' => 'setCompensationEffectiveDate', + 'compensation_end_date' => 'setCompensationEndDate', + 'contract_end_date' => 'setContractEndDate', + 'country' => 'setCountry', + 'country_id' => 'setCountryId', + 'department_id' => 'setDepartmentId', + 'department_name' => 'setDepartmentName', + 'dietary_restrictions' => 'setDietaryRestrictions', + 'display_name' => 'setDisplayName', + 'division_id' => 'setDivisionId', + 'division_name' => 'setDivisionName', + 'eeo_job_category' => 'setEeoJobCategory', + 'eeo_job_category_id' => 'setEeoJobCategoryId', + 'ein' => 'setEin', + 'eligible_for_rehire' => 'setEligibleForRehire', + 'eligible_for_rehire_id' => 'setEligibleForRehireId', + 'employee_name' => 'setEmployeeName', + 'employee_number' => 'setEmployeeNumber', + 'employment_status_comment' => 'setEmploymentStatusComment', + 'employment_status_effective_date' => 'setEmploymentStatusEffectiveDate', + 'employment_status_id' => 'setEmploymentStatusId', + 'employment_status_name' => 'setEmploymentStatusName', + 'employment_type' => 'setEmploymentType', + 'employment_type_id' => 'setEmploymentTypeId', + 'ethnicity' => 'setEthnicity', + 'ethnicity_id' => 'setEthnicityId', + 'facebook_url' => 'setFacebookUrl', + 'final_dose_administration_date' => 'setFinalDoseAdministrationDate', + 'final_pay_date' => 'setFinalPayDate', + 'first_name_last_name' => 'setFirstNameLastName', + 'first_name_middle_initial' => 'setFirstNameMiddleInitial', + 'flsa_code' => 'setFlsaCode', + 'flsa_code_id' => 'setFlsaCodeId', + 'gender' => 'setGender', + 'gender_identity' => 'setGenderIdentity', + 'gender_identity_id' => 'setGenderIdentityId', + 'hire_date' => 'setHireDate', + 'home_email' => 'setHomeEmail', + 'home_phone' => 'setHomePhone', + 'hours_per_pay_cycle' => 'setHoursPerPayCycle', + 'instagram_url' => 'setInstagramUrl', + 'is_manager' => 'setIsManager', + 'jacket_size' => 'setJacketSize', + 'jacket_size_id' => 'setJacketSizeId', + 'job_information_effective_date' => 'setJobInformationEffectiveDate', + 'job_title_id' => 'setJobTitleId', + 'linkedin_url' => 'setLinkedinUrl', + 'location_id' => 'setLocationId', + 'location_name' => 'setLocationName', + 'marital_status' => 'setMaritalStatus', + 'middle_initial' => 'setMiddleInitial', + 'middle_name' => 'setMiddleName', + 'mobile_phone' => 'setMobilePhone', + 'national_id' => 'setNationalId', + 'national_insurance_category' => 'setNationalInsuranceCategory', + 'national_insurance_category_id' => 'setNationalInsuranceCategoryId', + 'nationality' => 'setNationality', + 'nationality_id' => 'setNationalityId', + 'nick_name' => 'setNickName', + 'nin' => 'setNin', + 'notice_period' => 'setNoticePeriod', + 'notice_period_id' => 'setNoticePeriodId', + 'original_hire_date' => 'setOriginalHireDate', + 'overtime' => 'setOvertime', + 'overtime_rate' => 'setOvertimeRate', + 'paid_per' => 'setPaidPer', + 'pay_rate' => 'setPayRate', + 'pay_schedule' => 'setPaySchedule', + 'pay_schedule_id' => 'setPayScheduleId', + 'pay_type' => 'setPayType', + 'pinterest_url' => 'setPinterestUrl', + 'preferred_name_last_name' => 'setPreferredNameLastName', + 'probation_end_date' => 'setProbationEndDate', + 'pronouns' => 'setPronouns', + 'pronouns_id' => 'setPronounsId', + 'proof_of_vaccination' => 'setProofOfVaccination', + 'reports_to_id' => 'setReportsToId', + 'reports_to_name' => 'setReportsToName', + 'secondary_language' => 'setSecondaryLanguage', + 'shirt_size' => 'setShirtSize', + 'shirt_size_id' => 'setShirtSizeId', + 'sin' => 'setSin', + 'skype_username' => 'setSkypeUsername', + 'ssn' => 'setSsn', + 'state' => 'setState', + 'state_id' => 'setStateId', + 'tax_type_id' => 'setTaxTypeId', + 'teams' => 'setTeams', + 'tenure' => 'setTenure', + 'termination_date' => 'setTerminationDate', + 'termination_reason' => 'setTerminationReason', + 'termination_reason_id' => 'setTerminationReasonId', + 'termination_regrettable' => 'setTerminationRegrettable', + 'termination_regrettable_id' => 'setTerminationRegrettableId', + 'termination_type' => 'setTerminationType', + 'termination_type_id' => 'setTerminationTypeId', + 't_shirt_size' => 'setTShirtSize', + 't_shirt_size_id' => 'setTShirtSizeId', + 'twitter_url' => 'setTwitterUrl', + 'user_id' => 'setUserId', + 'vaccination_status' => 'setVaccinationStatus', + 'vaccination_status_id' => 'setVaccinationStatusId', + 'vaccine_received' => 'setVaccineReceived', + 'vaccine_received_id' => 'setVaccineReceivedId', + 'veteran_status' => 'setVeteranStatus', + 'veteran_status_id' => 'setVeteranStatusId', + 'work_email' => 'setWorkEmail', + 'work_phone' => 'setWorkPhone', + 'work_phone_extension' => 'setWorkPhoneExtension', + 'zipcode' => 'setZipcode' ]; /** @@ -224,7 +839,130 @@ public function isNullableSetToNull(string $property): bool { 'photo_url' => 'getPhotoUrl', 'job_title_name' => 'getJobTitleName', 'status' => 'getStatus', - '_restricted_fields' => 'getRestrictedFields' + '_restricted_fields' => 'getRestrictedFields', + 'address_line1' => 'getAddressLine1', + 'address_line2' => 'getAddressLine2', + 'age' => 'getAge', + 'allergies' => 'getAllergies', + 'best_email' => 'getBestEmail', + 'birth_date' => 'getBirthDate', + 'birthplace' => 'getBirthplace', + 'citizenship' => 'getCitizenship', + 'citizenship_id' => 'getCitizenshipId', + 'city' => 'getCity', + 'compensation_change_reason' => 'getCompensationChangeReason', + 'compensation_change_reason_id' => 'getCompensationChangeReasonId', + 'compensation_comment' => 'getCompensationComment', + 'compensation_effective_date' => 'getCompensationEffectiveDate', + 'compensation_end_date' => 'getCompensationEndDate', + 'contract_end_date' => 'getContractEndDate', + 'country' => 'getCountry', + 'country_id' => 'getCountryId', + 'department_id' => 'getDepartmentId', + 'department_name' => 'getDepartmentName', + 'dietary_restrictions' => 'getDietaryRestrictions', + 'display_name' => 'getDisplayName', + 'division_id' => 'getDivisionId', + 'division_name' => 'getDivisionName', + 'eeo_job_category' => 'getEeoJobCategory', + 'eeo_job_category_id' => 'getEeoJobCategoryId', + 'ein' => 'getEin', + 'eligible_for_rehire' => 'getEligibleForRehire', + 'eligible_for_rehire_id' => 'getEligibleForRehireId', + 'employee_name' => 'getEmployeeName', + 'employee_number' => 'getEmployeeNumber', + 'employment_status_comment' => 'getEmploymentStatusComment', + 'employment_status_effective_date' => 'getEmploymentStatusEffectiveDate', + 'employment_status_id' => 'getEmploymentStatusId', + 'employment_status_name' => 'getEmploymentStatusName', + 'employment_type' => 'getEmploymentType', + 'employment_type_id' => 'getEmploymentTypeId', + 'ethnicity' => 'getEthnicity', + 'ethnicity_id' => 'getEthnicityId', + 'facebook_url' => 'getFacebookUrl', + 'final_dose_administration_date' => 'getFinalDoseAdministrationDate', + 'final_pay_date' => 'getFinalPayDate', + 'first_name_last_name' => 'getFirstNameLastName', + 'first_name_middle_initial' => 'getFirstNameMiddleInitial', + 'flsa_code' => 'getFlsaCode', + 'flsa_code_id' => 'getFlsaCodeId', + 'gender' => 'getGender', + 'gender_identity' => 'getGenderIdentity', + 'gender_identity_id' => 'getGenderIdentityId', + 'hire_date' => 'getHireDate', + 'home_email' => 'getHomeEmail', + 'home_phone' => 'getHomePhone', + 'hours_per_pay_cycle' => 'getHoursPerPayCycle', + 'instagram_url' => 'getInstagramUrl', + 'is_manager' => 'getIsManager', + 'jacket_size' => 'getJacketSize', + 'jacket_size_id' => 'getJacketSizeId', + 'job_information_effective_date' => 'getJobInformationEffectiveDate', + 'job_title_id' => 'getJobTitleId', + 'linkedin_url' => 'getLinkedinUrl', + 'location_id' => 'getLocationId', + 'location_name' => 'getLocationName', + 'marital_status' => 'getMaritalStatus', + 'middle_initial' => 'getMiddleInitial', + 'middle_name' => 'getMiddleName', + 'mobile_phone' => 'getMobilePhone', + 'national_id' => 'getNationalId', + 'national_insurance_category' => 'getNationalInsuranceCategory', + 'national_insurance_category_id' => 'getNationalInsuranceCategoryId', + 'nationality' => 'getNationality', + 'nationality_id' => 'getNationalityId', + 'nick_name' => 'getNickName', + 'nin' => 'getNin', + 'notice_period' => 'getNoticePeriod', + 'notice_period_id' => 'getNoticePeriodId', + 'original_hire_date' => 'getOriginalHireDate', + 'overtime' => 'getOvertime', + 'overtime_rate' => 'getOvertimeRate', + 'paid_per' => 'getPaidPer', + 'pay_rate' => 'getPayRate', + 'pay_schedule' => 'getPaySchedule', + 'pay_schedule_id' => 'getPayScheduleId', + 'pay_type' => 'getPayType', + 'pinterest_url' => 'getPinterestUrl', + 'preferred_name_last_name' => 'getPreferredNameLastName', + 'probation_end_date' => 'getProbationEndDate', + 'pronouns' => 'getPronouns', + 'pronouns_id' => 'getPronounsId', + 'proof_of_vaccination' => 'getProofOfVaccination', + 'reports_to_id' => 'getReportsToId', + 'reports_to_name' => 'getReportsToName', + 'secondary_language' => 'getSecondaryLanguage', + 'shirt_size' => 'getShirtSize', + 'shirt_size_id' => 'getShirtSizeId', + 'sin' => 'getSin', + 'skype_username' => 'getSkypeUsername', + 'ssn' => 'getSsn', + 'state' => 'getState', + 'state_id' => 'getStateId', + 'tax_type_id' => 'getTaxTypeId', + 'teams' => 'getTeams', + 'tenure' => 'getTenure', + 'termination_date' => 'getTerminationDate', + 'termination_reason' => 'getTerminationReason', + 'termination_reason_id' => 'getTerminationReasonId', + 'termination_regrettable' => 'getTerminationRegrettable', + 'termination_regrettable_id' => 'getTerminationRegrettableId', + 'termination_type' => 'getTerminationType', + 'termination_type_id' => 'getTerminationTypeId', + 't_shirt_size' => 'getTShirtSize', + 't_shirt_size_id' => 'getTShirtSizeId', + 'twitter_url' => 'getTwitterUrl', + 'user_id' => 'getUserId', + 'vaccination_status' => 'getVaccinationStatus', + 'vaccination_status_id' => 'getVaccinationStatusId', + 'vaccine_received' => 'getVaccineReceived', + 'vaccine_received_id' => 'getVaccineReceivedId', + 'veteran_status' => 'getVeteranStatus', + 'veteran_status_id' => 'getVeteranStatusId', + 'work_email' => 'getWorkEmail', + 'work_phone' => 'getWorkPhone', + 'work_phone_extension' => 'getWorkPhoneExtension', + 'zipcode' => 'getZipcode' ]; /** @@ -286,6 +1024,129 @@ public function __construct(?array $data = null) { $this->setIfExists('job_title_name', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('_restricted_fields', $data ?? [], null); + $this->setIfExists('address_line1', $data ?? [], null); + $this->setIfExists('address_line2', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); + $this->setIfExists('allergies', $data ?? [], null); + $this->setIfExists('best_email', $data ?? [], null); + $this->setIfExists('birth_date', $data ?? [], null); + $this->setIfExists('birthplace', $data ?? [], null); + $this->setIfExists('citizenship', $data ?? [], null); + $this->setIfExists('citizenship_id', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('compensation_change_reason', $data ?? [], null); + $this->setIfExists('compensation_change_reason_id', $data ?? [], null); + $this->setIfExists('compensation_comment', $data ?? [], null); + $this->setIfExists('compensation_effective_date', $data ?? [], null); + $this->setIfExists('compensation_end_date', $data ?? [], null); + $this->setIfExists('contract_end_date', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('department_id', $data ?? [], null); + $this->setIfExists('department_name', $data ?? [], null); + $this->setIfExists('dietary_restrictions', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('division_id', $data ?? [], null); + $this->setIfExists('division_name', $data ?? [], null); + $this->setIfExists('eeo_job_category', $data ?? [], null); + $this->setIfExists('eeo_job_category_id', $data ?? [], null); + $this->setIfExists('ein', $data ?? [], null); + $this->setIfExists('eligible_for_rehire', $data ?? [], null); + $this->setIfExists('eligible_for_rehire_id', $data ?? [], null); + $this->setIfExists('employee_name', $data ?? [], null); + $this->setIfExists('employee_number', $data ?? [], null); + $this->setIfExists('employment_status_comment', $data ?? [], null); + $this->setIfExists('employment_status_effective_date', $data ?? [], null); + $this->setIfExists('employment_status_id', $data ?? [], null); + $this->setIfExists('employment_status_name', $data ?? [], null); + $this->setIfExists('employment_type', $data ?? [], null); + $this->setIfExists('employment_type_id', $data ?? [], null); + $this->setIfExists('ethnicity', $data ?? [], null); + $this->setIfExists('ethnicity_id', $data ?? [], null); + $this->setIfExists('facebook_url', $data ?? [], null); + $this->setIfExists('final_dose_administration_date', $data ?? [], null); + $this->setIfExists('final_pay_date', $data ?? [], null); + $this->setIfExists('first_name_last_name', $data ?? [], null); + $this->setIfExists('first_name_middle_initial', $data ?? [], null); + $this->setIfExists('flsa_code', $data ?? [], null); + $this->setIfExists('flsa_code_id', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('gender_identity', $data ?? [], null); + $this->setIfExists('gender_identity_id', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); + $this->setIfExists('home_email', $data ?? [], null); + $this->setIfExists('home_phone', $data ?? [], null); + $this->setIfExists('hours_per_pay_cycle', $data ?? [], null); + $this->setIfExists('instagram_url', $data ?? [], null); + $this->setIfExists('is_manager', $data ?? [], null); + $this->setIfExists('jacket_size', $data ?? [], null); + $this->setIfExists('jacket_size_id', $data ?? [], null); + $this->setIfExists('job_information_effective_date', $data ?? [], null); + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('linkedin_url', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('location_name', $data ?? [], null); + $this->setIfExists('marital_status', $data ?? [], null); + $this->setIfExists('middle_initial', $data ?? [], null); + $this->setIfExists('middle_name', $data ?? [], null); + $this->setIfExists('mobile_phone', $data ?? [], null); + $this->setIfExists('national_id', $data ?? [], null); + $this->setIfExists('national_insurance_category', $data ?? [], null); + $this->setIfExists('national_insurance_category_id', $data ?? [], null); + $this->setIfExists('nationality', $data ?? [], null); + $this->setIfExists('nationality_id', $data ?? [], null); + $this->setIfExists('nick_name', $data ?? [], null); + $this->setIfExists('nin', $data ?? [], null); + $this->setIfExists('notice_period', $data ?? [], null); + $this->setIfExists('notice_period_id', $data ?? [], null); + $this->setIfExists('original_hire_date', $data ?? [], null); + $this->setIfExists('overtime', $data ?? [], null); + $this->setIfExists('overtime_rate', $data ?? [], null); + $this->setIfExists('paid_per', $data ?? [], null); + $this->setIfExists('pay_rate', $data ?? [], null); + $this->setIfExists('pay_schedule', $data ?? [], null); + $this->setIfExists('pay_schedule_id', $data ?? [], null); + $this->setIfExists('pay_type', $data ?? [], null); + $this->setIfExists('pinterest_url', $data ?? [], null); + $this->setIfExists('preferred_name_last_name', $data ?? [], null); + $this->setIfExists('probation_end_date', $data ?? [], null); + $this->setIfExists('pronouns', $data ?? [], null); + $this->setIfExists('pronouns_id', $data ?? [], null); + $this->setIfExists('proof_of_vaccination', $data ?? [], null); + $this->setIfExists('reports_to_id', $data ?? [], null); + $this->setIfExists('reports_to_name', $data ?? [], null); + $this->setIfExists('secondary_language', $data ?? [], null); + $this->setIfExists('shirt_size', $data ?? [], null); + $this->setIfExists('shirt_size_id', $data ?? [], null); + $this->setIfExists('sin', $data ?? [], null); + $this->setIfExists('skype_username', $data ?? [], null); + $this->setIfExists('ssn', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('state_id', $data ?? [], null); + $this->setIfExists('tax_type_id', $data ?? [], null); + $this->setIfExists('teams', $data ?? [], null); + $this->setIfExists('tenure', $data ?? [], null); + $this->setIfExists('termination_date', $data ?? [], null); + $this->setIfExists('termination_reason', $data ?? [], null); + $this->setIfExists('termination_reason_id', $data ?? [], null); + $this->setIfExists('termination_regrettable', $data ?? [], null); + $this->setIfExists('termination_regrettable_id', $data ?? [], null); + $this->setIfExists('termination_type', $data ?? [], null); + $this->setIfExists('termination_type_id', $data ?? [], null); + $this->setIfExists('t_shirt_size', $data ?? [], null); + $this->setIfExists('t_shirt_size_id', $data ?? [], null); + $this->setIfExists('twitter_url', $data ?? [], null); + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('vaccination_status', $data ?? [], null); + $this->setIfExists('vaccination_status_id', $data ?? [], null); + $this->setIfExists('vaccine_received', $data ?? [], null); + $this->setIfExists('vaccine_received_id', $data ?? [], null); + $this->setIfExists('veteran_status', $data ?? [], null); + $this->setIfExists('veteran_status_id', $data ?? [], null); + $this->setIfExists('work_email', $data ?? [], null); + $this->setIfExists('work_phone', $data ?? [], null); + $this->setIfExists('work_phone_extension', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); } /** @@ -387,19 +1248,13 @@ public function getFirstName() { /** * Sets first_name * - * @param string $first_name Employee's first name + * @param string $first_name first_name * * @return self */ public function setFirstName($first_name) { if (is_null($first_name)) { - $this->openApiNullablesSetToNull['first_name'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['first_name'])) { - unset($nullablesSetToNull['first_name']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable first_name cannot be null'); } $this->container['first_name'] = $first_name; @@ -418,19 +1273,13 @@ public function getLastName() { /** * Sets last_name * - * @param string $last_name Employee's last name + * @param string $last_name last_name * * @return self */ public function setLastName($last_name) { if (is_null($last_name)) { - $this->openApiNullablesSetToNull['last_name'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['last_name'])) { - unset($nullablesSetToNull['last_name']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); } $this->container['last_name'] = $last_name; @@ -449,19 +1298,13 @@ public function getPreferredName() { /** * Sets preferred_name * - * @param string $preferred_name Employee's preferred name + * @param string $preferred_name preferred_name * * @return self */ public function setPreferredName($preferred_name) { if (is_null($preferred_name)) { - $this->openApiNullablesSetToNull['preferred_name'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['preferred_name'])) { - unset($nullablesSetToNull['preferred_name']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable preferred_name cannot be null'); } $this->container['preferred_name'] = $preferred_name; @@ -480,19 +1323,13 @@ public function getPhotoUrl() { /** * Sets photo_url * - * @param string $photo_url URL to employee's profile photo + * @param string $photo_url photo_url * * @return self */ public function setPhotoUrl($photo_url) { if (is_null($photo_url)) { - $this->openApiNullablesSetToNull['photo_url'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['photo_url'])) { - unset($nullablesSetToNull['photo_url']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable photo_url cannot be null'); } $this->container['photo_url'] = $photo_url; @@ -511,19 +1348,13 @@ public function getJobTitleName() { /** * Sets job_title_name * - * @param string $job_title_name Employee's current job title + * @param string $job_title_name job_title_name * * @return self */ public function setJobTitleName($job_title_name) { if (is_null($job_title_name)) { - $this->openApiNullablesSetToNull['job_title_name'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['job_title_name'])) { - unset($nullablesSetToNull['job_title_name']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable job_title_name cannot be null'); } $this->container['job_title_name'] = $job_title_name; @@ -542,19 +1373,13 @@ public function getStatus() { /** * Sets status * - * @param string $status Employee's current status (active/inactive) + * @param string $status status * * @return self */ public function setStatus($status) { if (is_null($status)) { - $this->openApiNullablesSetToNull['status'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['status'])) { - unset($nullablesSetToNull['status']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable status cannot be null'); } $this->container['status'] = $status; @@ -585,6 +1410,3789 @@ public function setRestrictedFields($_restricted_fields) { return $this; } + + /** + * Gets address_line1 + * + * @return string|null + */ + public function getAddressLine1() { + return $this->container['address_line1']; + } + + /** + * Sets address_line1 + * + * @param string|null $address_line1 address_line1 + * + * @return self + */ + public function setAddressLine1($address_line1) { + if (is_null($address_line1)) { + $this->openApiNullablesSetToNull['address_line1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address_line1'])) { + unset($nullablesSetToNull['address_line1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address_line1'] = $address_line1; + + return $this; + } + + /** + * Gets address_line2 + * + * @return string|null + */ + public function getAddressLine2() { + return $this->container['address_line2']; + } + + /** + * Sets address_line2 + * + * @param string|null $address_line2 address_line2 + * + * @return self + */ + public function setAddressLine2($address_line2) { + if (is_null($address_line2)) { + $this->openApiNullablesSetToNull['address_line2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address_line2'])) { + unset($nullablesSetToNull['address_line2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address_line2'] = $address_line2; + + return $this; + } + + /** + * Gets age + * + * @return string|null + */ + public function getAge() { + return $this->container['age']; + } + + /** + * Sets age + * + * @param string|null $age age + * + * @return self + */ + public function setAge($age) { + if (is_null($age)) { + $this->openApiNullablesSetToNull['age'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['age'])) { + unset($nullablesSetToNull['age']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['age'] = $age; + + return $this; + } + + /** + * Gets allergies + * + * @return string|null + */ + public function getAllergies() { + return $this->container['allergies']; + } + + /** + * Sets allergies + * + * @param string|null $allergies allergies + * + * @return self + */ + public function setAllergies($allergies) { + if (is_null($allergies)) { + $this->openApiNullablesSetToNull['allergies'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['allergies'])) { + unset($nullablesSetToNull['allergies']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['allergies'] = $allergies; + + return $this; + } + + /** + * Gets best_email + * + * @return string|null + */ + public function getBestEmail() { + return $this->container['best_email']; + } + + /** + * Sets best_email + * + * @param string|null $best_email best_email + * + * @return self + */ + public function setBestEmail($best_email) { + if (is_null($best_email)) { + $this->openApiNullablesSetToNull['best_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['best_email'])) { + unset($nullablesSetToNull['best_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['best_email'] = $best_email; + + return $this; + } + + /** + * Gets birth_date + * + * @return string|null + */ + public function getBirthDate() { + return $this->container['birth_date']; + } + + /** + * Sets birth_date + * + * @param string|null $birth_date birth_date + * + * @return self + */ + public function setBirthDate($birth_date) { + if (is_null($birth_date)) { + $this->openApiNullablesSetToNull['birth_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['birth_date'])) { + unset($nullablesSetToNull['birth_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['birth_date'] = $birth_date; + + return $this; + } + + /** + * Gets birthplace + * + * @return string|null + */ + public function getBirthplace() { + return $this->container['birthplace']; + } + + /** + * Sets birthplace + * + * @param string|null $birthplace birthplace + * + * @return self + */ + public function setBirthplace($birthplace) { + if (is_null($birthplace)) { + $this->openApiNullablesSetToNull['birthplace'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['birthplace'])) { + unset($nullablesSetToNull['birthplace']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['birthplace'] = $birthplace; + + return $this; + } + + /** + * Gets citizenship + * + * @return string|null + */ + public function getCitizenship() { + return $this->container['citizenship']; + } + + /** + * Sets citizenship + * + * @param string|null $citizenship citizenship + * + * @return self + */ + public function setCitizenship($citizenship) { + if (is_null($citizenship)) { + $this->openApiNullablesSetToNull['citizenship'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['citizenship'])) { + unset($nullablesSetToNull['citizenship']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['citizenship'] = $citizenship; + + return $this; + } + + /** + * Gets citizenship_id + * + * @return string|null + */ + public function getCitizenshipId() { + return $this->container['citizenship_id']; + } + + /** + * Sets citizenship_id + * + * @param string|null $citizenship_id citizenship_id + * + * @return self + */ + public function setCitizenshipId($citizenship_id) { + if (is_null($citizenship_id)) { + $this->openApiNullablesSetToNull['citizenship_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['citizenship_id'])) { + unset($nullablesSetToNull['citizenship_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['citizenship_id'] = $citizenship_id; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets compensation_change_reason + * + * @return string|null + */ + public function getCompensationChangeReason() { + return $this->container['compensation_change_reason']; + } + + /** + * Sets compensation_change_reason + * + * @param string|null $compensation_change_reason compensation_change_reason + * + * @return self + */ + public function setCompensationChangeReason($compensation_change_reason) { + if (is_null($compensation_change_reason)) { + $this->openApiNullablesSetToNull['compensation_change_reason'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compensation_change_reason'])) { + unset($nullablesSetToNull['compensation_change_reason']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compensation_change_reason'] = $compensation_change_reason; + + return $this; + } + + /** + * Gets compensation_change_reason_id + * + * @return string|null + */ + public function getCompensationChangeReasonId() { + return $this->container['compensation_change_reason_id']; + } + + /** + * Sets compensation_change_reason_id + * + * @param string|null $compensation_change_reason_id compensation_change_reason_id + * + * @return self + */ + public function setCompensationChangeReasonId($compensation_change_reason_id) { + if (is_null($compensation_change_reason_id)) { + $this->openApiNullablesSetToNull['compensation_change_reason_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compensation_change_reason_id'])) { + unset($nullablesSetToNull['compensation_change_reason_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compensation_change_reason_id'] = $compensation_change_reason_id; + + return $this; + } + + /** + * Gets compensation_comment + * + * @return string|null + */ + public function getCompensationComment() { + return $this->container['compensation_comment']; + } + + /** + * Sets compensation_comment + * + * @param string|null $compensation_comment compensation_comment + * + * @return self + */ + public function setCompensationComment($compensation_comment) { + if (is_null($compensation_comment)) { + $this->openApiNullablesSetToNull['compensation_comment'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compensation_comment'])) { + unset($nullablesSetToNull['compensation_comment']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compensation_comment'] = $compensation_comment; + + return $this; + } + + /** + * Gets compensation_effective_date + * + * @return string|null + */ + public function getCompensationEffectiveDate() { + return $this->container['compensation_effective_date']; + } + + /** + * Sets compensation_effective_date + * + * @param string|null $compensation_effective_date compensation_effective_date + * + * @return self + */ + public function setCompensationEffectiveDate($compensation_effective_date) { + if (is_null($compensation_effective_date)) { + $this->openApiNullablesSetToNull['compensation_effective_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compensation_effective_date'])) { + unset($nullablesSetToNull['compensation_effective_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compensation_effective_date'] = $compensation_effective_date; + + return $this; + } + + /** + * Gets compensation_end_date + * + * @return string|null + */ + public function getCompensationEndDate() { + return $this->container['compensation_end_date']; + } + + /** + * Sets compensation_end_date + * + * @param string|null $compensation_end_date compensation_end_date + * + * @return self + */ + public function setCompensationEndDate($compensation_end_date) { + if (is_null($compensation_end_date)) { + $this->openApiNullablesSetToNull['compensation_end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['compensation_end_date'])) { + unset($nullablesSetToNull['compensation_end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['compensation_end_date'] = $compensation_end_date; + + return $this; + } + + /** + * Gets contract_end_date + * + * @return string|null + */ + public function getContractEndDate() { + return $this->container['contract_end_date']; + } + + /** + * Sets contract_end_date + * + * @param string|null $contract_end_date contract_end_date + * + * @return self + */ + public function setContractEndDate($contract_end_date) { + if (is_null($contract_end_date)) { + $this->openApiNullablesSetToNull['contract_end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['contract_end_date'])) { + unset($nullablesSetToNull['contract_end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contract_end_date'] = $contract_end_date; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + $this->openApiNullablesSetToNull['country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country'])) { + unset($nullablesSetToNull['country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets country_id + * + * @return string|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param string|null $country_id country_id + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + $this->openApiNullablesSetToNull['country_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country_id'])) { + unset($nullablesSetToNull['country_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets department_id + * + * @return string|null + */ + public function getDepartmentId() { + return $this->container['department_id']; + } + + /** + * Sets department_id + * + * @param string|null $department_id department_id + * + * @return self + */ + public function setDepartmentId($department_id) { + if (is_null($department_id)) { + $this->openApiNullablesSetToNull['department_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department_id'])) { + unset($nullablesSetToNull['department_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department_id'] = $department_id; + + return $this; + } + + /** + * Gets department_name + * + * @return string|null + */ + public function getDepartmentName() { + return $this->container['department_name']; + } + + /** + * Sets department_name + * + * @param string|null $department_name department_name + * + * @return self + */ + public function setDepartmentName($department_name) { + if (is_null($department_name)) { + $this->openApiNullablesSetToNull['department_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department_name'])) { + unset($nullablesSetToNull['department_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department_name'] = $department_name; + + return $this; + } + + /** + * Gets dietary_restrictions + * + * @return string|null + */ + public function getDietaryRestrictions() { + return $this->container['dietary_restrictions']; + } + + /** + * Sets dietary_restrictions + * + * @param string|null $dietary_restrictions dietary_restrictions + * + * @return self + */ + public function setDietaryRestrictions($dietary_restrictions) { + if (is_null($dietary_restrictions)) { + $this->openApiNullablesSetToNull['dietary_restrictions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['dietary_restrictions'])) { + unset($nullablesSetToNull['dietary_restrictions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['dietary_restrictions'] = $dietary_restrictions; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name display_name + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + $this->openApiNullablesSetToNull['display_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['display_name'])) { + unset($nullablesSetToNull['display_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets division_id + * + * @return string|null + */ + public function getDivisionId() { + return $this->container['division_id']; + } + + /** + * Sets division_id + * + * @param string|null $division_id division_id + * + * @return self + */ + public function setDivisionId($division_id) { + if (is_null($division_id)) { + $this->openApiNullablesSetToNull['division_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['division_id'])) { + unset($nullablesSetToNull['division_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['division_id'] = $division_id; + + return $this; + } + + /** + * Gets division_name + * + * @return string|null + */ + public function getDivisionName() { + return $this->container['division_name']; + } + + /** + * Sets division_name + * + * @param string|null $division_name division_name + * + * @return self + */ + public function setDivisionName($division_name) { + if (is_null($division_name)) { + $this->openApiNullablesSetToNull['division_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['division_name'])) { + unset($nullablesSetToNull['division_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['division_name'] = $division_name; + + return $this; + } + + /** + * Gets eeo_job_category + * + * @return string|null + */ + public function getEeoJobCategory() { + return $this->container['eeo_job_category']; + } + + /** + * Sets eeo_job_category + * + * @param string|null $eeo_job_category eeo_job_category + * + * @return self + */ + public function setEeoJobCategory($eeo_job_category) { + if (is_null($eeo_job_category)) { + $this->openApiNullablesSetToNull['eeo_job_category'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['eeo_job_category'])) { + unset($nullablesSetToNull['eeo_job_category']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['eeo_job_category'] = $eeo_job_category; + + return $this; + } + + /** + * Gets eeo_job_category_id + * + * @return string|null + */ + public function getEeoJobCategoryId() { + return $this->container['eeo_job_category_id']; + } + + /** + * Sets eeo_job_category_id + * + * @param string|null $eeo_job_category_id eeo_job_category_id + * + * @return self + */ + public function setEeoJobCategoryId($eeo_job_category_id) { + if (is_null($eeo_job_category_id)) { + $this->openApiNullablesSetToNull['eeo_job_category_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['eeo_job_category_id'])) { + unset($nullablesSetToNull['eeo_job_category_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['eeo_job_category_id'] = $eeo_job_category_id; + + return $this; + } + + /** + * Gets ein + * + * @return string|null + */ + public function getEin() { + return $this->container['ein']; + } + + /** + * Sets ein + * + * @param string|null $ein ein + * + * @return self + */ + public function setEin($ein) { + if (is_null($ein)) { + $this->openApiNullablesSetToNull['ein'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['ein'])) { + unset($nullablesSetToNull['ein']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ein'] = $ein; + + return $this; + } + + /** + * Gets eligible_for_rehire + * + * @return string|null + */ + public function getEligibleForRehire() { + return $this->container['eligible_for_rehire']; + } + + /** + * Sets eligible_for_rehire + * + * @param string|null $eligible_for_rehire eligible_for_rehire + * + * @return self + */ + public function setEligibleForRehire($eligible_for_rehire) { + if (is_null($eligible_for_rehire)) { + $this->openApiNullablesSetToNull['eligible_for_rehire'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['eligible_for_rehire'])) { + unset($nullablesSetToNull['eligible_for_rehire']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['eligible_for_rehire'] = $eligible_for_rehire; + + return $this; + } + + /** + * Gets eligible_for_rehire_id + * + * @return string|null + */ + public function getEligibleForRehireId() { + return $this->container['eligible_for_rehire_id']; + } + + /** + * Sets eligible_for_rehire_id + * + * @param string|null $eligible_for_rehire_id eligible_for_rehire_id + * + * @return self + */ + public function setEligibleForRehireId($eligible_for_rehire_id) { + if (is_null($eligible_for_rehire_id)) { + $this->openApiNullablesSetToNull['eligible_for_rehire_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['eligible_for_rehire_id'])) { + unset($nullablesSetToNull['eligible_for_rehire_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['eligible_for_rehire_id'] = $eligible_for_rehire_id; + + return $this; + } + + /** + * Gets employee_name + * + * @return string|null + */ + public function getEmployeeName() { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string|null $employee_name employee_name + * + * @return self + */ + public function setEmployeeName($employee_name) { + if (is_null($employee_name)) { + $this->openApiNullablesSetToNull['employee_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_name'])) { + unset($nullablesSetToNull['employee_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets employee_number + * + * @return string|null + */ + public function getEmployeeNumber() { + return $this->container['employee_number']; + } + + /** + * Sets employee_number + * + * @param string|null $employee_number employee_number + * + * @return self + */ + public function setEmployeeNumber($employee_number) { + if (is_null($employee_number)) { + $this->openApiNullablesSetToNull['employee_number'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_number'])) { + unset($nullablesSetToNull['employee_number']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_number'] = $employee_number; + + return $this; + } + + /** + * Gets employment_status_comment + * + * @return string|null + */ + public function getEmploymentStatusComment() { + return $this->container['employment_status_comment']; + } + + /** + * Sets employment_status_comment + * + * @param string|null $employment_status_comment employment_status_comment + * + * @return self + */ + public function setEmploymentStatusComment($employment_status_comment) { + if (is_null($employment_status_comment)) { + $this->openApiNullablesSetToNull['employment_status_comment'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status_comment'])) { + unset($nullablesSetToNull['employment_status_comment']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status_comment'] = $employment_status_comment; + + return $this; + } + + /** + * Gets employment_status_effective_date + * + * @return string|null + */ + public function getEmploymentStatusEffectiveDate() { + return $this->container['employment_status_effective_date']; + } + + /** + * Sets employment_status_effective_date + * + * @param string|null $employment_status_effective_date employment_status_effective_date + * + * @return self + */ + public function setEmploymentStatusEffectiveDate($employment_status_effective_date) { + if (is_null($employment_status_effective_date)) { + $this->openApiNullablesSetToNull['employment_status_effective_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status_effective_date'])) { + unset($nullablesSetToNull['employment_status_effective_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status_effective_date'] = $employment_status_effective_date; + + return $this; + } + + /** + * Gets employment_status_id + * + * @return string|null + */ + public function getEmploymentStatusId() { + return $this->container['employment_status_id']; + } + + /** + * Sets employment_status_id + * + * @param string|null $employment_status_id employment_status_id + * + * @return self + */ + public function setEmploymentStatusId($employment_status_id) { + if (is_null($employment_status_id)) { + $this->openApiNullablesSetToNull['employment_status_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status_id'])) { + unset($nullablesSetToNull['employment_status_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status_id'] = $employment_status_id; + + return $this; + } + + /** + * Gets employment_status_name + * + * @return string|null + */ + public function getEmploymentStatusName() { + return $this->container['employment_status_name']; + } + + /** + * Sets employment_status_name + * + * @param string|null $employment_status_name employment_status_name + * + * @return self + */ + public function setEmploymentStatusName($employment_status_name) { + if (is_null($employment_status_name)) { + $this->openApiNullablesSetToNull['employment_status_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_status_name'])) { + unset($nullablesSetToNull['employment_status_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_status_name'] = $employment_status_name; + + return $this; + } + + /** + * Gets employment_type + * + * @return string|null + */ + public function getEmploymentType() { + return $this->container['employment_type']; + } + + /** + * Sets employment_type + * + * @param string|null $employment_type employment_type + * + * @return self + */ + public function setEmploymentType($employment_type) { + if (is_null($employment_type)) { + $this->openApiNullablesSetToNull['employment_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_type'])) { + unset($nullablesSetToNull['employment_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_type'] = $employment_type; + + return $this; + } + + /** + * Gets employment_type_id + * + * @return string|null + */ + public function getEmploymentTypeId() { + return $this->container['employment_type_id']; + } + + /** + * Sets employment_type_id + * + * @param string|null $employment_type_id employment_type_id + * + * @return self + */ + public function setEmploymentTypeId($employment_type_id) { + if (is_null($employment_type_id)) { + $this->openApiNullablesSetToNull['employment_type_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employment_type_id'])) { + unset($nullablesSetToNull['employment_type_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employment_type_id'] = $employment_type_id; + + return $this; + } + + /** + * Gets ethnicity + * + * @return string|null + */ + public function getEthnicity() { + return $this->container['ethnicity']; + } + + /** + * Sets ethnicity + * + * @param string|null $ethnicity ethnicity + * + * @return self + */ + public function setEthnicity($ethnicity) { + if (is_null($ethnicity)) { + $this->openApiNullablesSetToNull['ethnicity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['ethnicity'])) { + unset($nullablesSetToNull['ethnicity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ethnicity'] = $ethnicity; + + return $this; + } + + /** + * Gets ethnicity_id + * + * @return string|null + */ + public function getEthnicityId() { + return $this->container['ethnicity_id']; + } + + /** + * Sets ethnicity_id + * + * @param string|null $ethnicity_id ethnicity_id + * + * @return self + */ + public function setEthnicityId($ethnicity_id) { + if (is_null($ethnicity_id)) { + $this->openApiNullablesSetToNull['ethnicity_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['ethnicity_id'])) { + unset($nullablesSetToNull['ethnicity_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ethnicity_id'] = $ethnicity_id; + + return $this; + } + + /** + * Gets facebook_url + * + * @return string|null + */ + public function getFacebookUrl() { + return $this->container['facebook_url']; + } + + /** + * Sets facebook_url + * + * @param string|null $facebook_url facebook_url + * + * @return self + */ + public function setFacebookUrl($facebook_url) { + if (is_null($facebook_url)) { + $this->openApiNullablesSetToNull['facebook_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['facebook_url'])) { + unset($nullablesSetToNull['facebook_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['facebook_url'] = $facebook_url; + + return $this; + } + + /** + * Gets final_dose_administration_date + * + * @return string|null + */ + public function getFinalDoseAdministrationDate() { + return $this->container['final_dose_administration_date']; + } + + /** + * Sets final_dose_administration_date + * + * @param string|null $final_dose_administration_date final_dose_administration_date + * + * @return self + */ + public function setFinalDoseAdministrationDate($final_dose_administration_date) { + if (is_null($final_dose_administration_date)) { + $this->openApiNullablesSetToNull['final_dose_administration_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['final_dose_administration_date'])) { + unset($nullablesSetToNull['final_dose_administration_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['final_dose_administration_date'] = $final_dose_administration_date; + + return $this; + } + + /** + * Gets final_pay_date + * + * @return string|null + */ + public function getFinalPayDate() { + return $this->container['final_pay_date']; + } + + /** + * Sets final_pay_date + * + * @param string|null $final_pay_date final_pay_date + * + * @return self + */ + public function setFinalPayDate($final_pay_date) { + if (is_null($final_pay_date)) { + $this->openApiNullablesSetToNull['final_pay_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['final_pay_date'])) { + unset($nullablesSetToNull['final_pay_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['final_pay_date'] = $final_pay_date; + + return $this; + } + + /** + * Gets first_name_last_name + * + * @return string|null + */ + public function getFirstNameLastName() { + return $this->container['first_name_last_name']; + } + + /** + * Sets first_name_last_name + * + * @param string|null $first_name_last_name first_name_last_name + * + * @return self + */ + public function setFirstNameLastName($first_name_last_name) { + if (is_null($first_name_last_name)) { + $this->openApiNullablesSetToNull['first_name_last_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['first_name_last_name'])) { + unset($nullablesSetToNull['first_name_last_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['first_name_last_name'] = $first_name_last_name; + + return $this; + } + + /** + * Gets first_name_middle_initial + * + * @return string|null + */ + public function getFirstNameMiddleInitial() { + return $this->container['first_name_middle_initial']; + } + + /** + * Sets first_name_middle_initial + * + * @param string|null $first_name_middle_initial first_name_middle_initial + * + * @return self + */ + public function setFirstNameMiddleInitial($first_name_middle_initial) { + if (is_null($first_name_middle_initial)) { + $this->openApiNullablesSetToNull['first_name_middle_initial'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['first_name_middle_initial'])) { + unset($nullablesSetToNull['first_name_middle_initial']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['first_name_middle_initial'] = $first_name_middle_initial; + + return $this; + } + + /** + * Gets flsa_code + * + * @return string|null + */ + public function getFlsaCode() { + return $this->container['flsa_code']; + } + + /** + * Sets flsa_code + * + * @param string|null $flsa_code flsa_code + * + * @return self + */ + public function setFlsaCode($flsa_code) { + if (is_null($flsa_code)) { + $this->openApiNullablesSetToNull['flsa_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['flsa_code'])) { + unset($nullablesSetToNull['flsa_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['flsa_code'] = $flsa_code; + + return $this; + } + + /** + * Gets flsa_code_id + * + * @return string|null + */ + public function getFlsaCodeId() { + return $this->container['flsa_code_id']; + } + + /** + * Sets flsa_code_id + * + * @param string|null $flsa_code_id flsa_code_id + * + * @return self + */ + public function setFlsaCodeId($flsa_code_id) { + if (is_null($flsa_code_id)) { + $this->openApiNullablesSetToNull['flsa_code_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['flsa_code_id'])) { + unset($nullablesSetToNull['flsa_code_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['flsa_code_id'] = $flsa_code_id; + + return $this; + } + + /** + * Gets gender + * + * @return string|null + */ + public function getGender() { + return $this->container['gender']; + } + + /** + * Sets gender + * + * @param string|null $gender gender + * + * @return self + */ + public function setGender($gender) { + if (is_null($gender)) { + $this->openApiNullablesSetToNull['gender'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['gender'])) { + unset($nullablesSetToNull['gender']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['gender'] = $gender; + + return $this; + } + + /** + * Gets gender_identity + * + * @return string|null + */ + public function getGenderIdentity() { + return $this->container['gender_identity']; + } + + /** + * Sets gender_identity + * + * @param string|null $gender_identity gender_identity + * + * @return self + */ + public function setGenderIdentity($gender_identity) { + if (is_null($gender_identity)) { + $this->openApiNullablesSetToNull['gender_identity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['gender_identity'])) { + unset($nullablesSetToNull['gender_identity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['gender_identity'] = $gender_identity; + + return $this; + } + + /** + * Gets gender_identity_id + * + * @return int[]|null + */ + public function getGenderIdentityId() { + return $this->container['gender_identity_id']; + } + + /** + * Sets gender_identity_id + * + * @param int[]|null $gender_identity_id Employee's gender identity ID. Only included when requested via the `fields` parameter. + * + * @return self + */ + public function setGenderIdentityId($gender_identity_id) { + if (is_null($gender_identity_id)) { + throw new \InvalidArgumentException('non-nullable gender_identity_id cannot be null'); + } + $this->container['gender_identity_id'] = $gender_identity_id; + + return $this; + } + + /** + * Gets hire_date + * + * @return string|null + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param string|null $hire_date hire_date + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + $this->openApiNullablesSetToNull['hire_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hire_date'])) { + unset($nullablesSetToNull['hire_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hire_date'] = $hire_date; + + return $this; + } + + /** + * Gets home_email + * + * @return string|null + */ + public function getHomeEmail() { + return $this->container['home_email']; + } + + /** + * Sets home_email + * + * @param string|null $home_email home_email + * + * @return self + */ + public function setHomeEmail($home_email) { + if (is_null($home_email)) { + $this->openApiNullablesSetToNull['home_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['home_email'])) { + unset($nullablesSetToNull['home_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['home_email'] = $home_email; + + return $this; + } + + /** + * Gets home_phone + * + * @return string|null + */ + public function getHomePhone() { + return $this->container['home_phone']; + } + + /** + * Sets home_phone + * + * @param string|null $home_phone home_phone + * + * @return self + */ + public function setHomePhone($home_phone) { + if (is_null($home_phone)) { + $this->openApiNullablesSetToNull['home_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['home_phone'])) { + unset($nullablesSetToNull['home_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['home_phone'] = $home_phone; + + return $this; + } + + /** + * Gets hours_per_pay_cycle + * + * @return string|null + */ + public function getHoursPerPayCycle() { + return $this->container['hours_per_pay_cycle']; + } + + /** + * Sets hours_per_pay_cycle + * + * @param string|null $hours_per_pay_cycle hours_per_pay_cycle + * + * @return self + */ + public function setHoursPerPayCycle($hours_per_pay_cycle) { + if (is_null($hours_per_pay_cycle)) { + $this->openApiNullablesSetToNull['hours_per_pay_cycle'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hours_per_pay_cycle'])) { + unset($nullablesSetToNull['hours_per_pay_cycle']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hours_per_pay_cycle'] = $hours_per_pay_cycle; + + return $this; + } + + /** + * Gets instagram_url + * + * @return string|null + */ + public function getInstagramUrl() { + return $this->container['instagram_url']; + } + + /** + * Sets instagram_url + * + * @param string|null $instagram_url instagram_url + * + * @return self + */ + public function setInstagramUrl($instagram_url) { + if (is_null($instagram_url)) { + $this->openApiNullablesSetToNull['instagram_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['instagram_url'])) { + unset($nullablesSetToNull['instagram_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['instagram_url'] = $instagram_url; + + return $this; + } + + /** + * Gets is_manager + * + * @return bool|null + */ + public function getIsManager() { + return $this->container['is_manager']; + } + + /** + * Sets is_manager + * + * @param bool|null $is_manager is_manager + * + * @return self + */ + public function setIsManager($is_manager) { + if (is_null($is_manager)) { + $this->openApiNullablesSetToNull['is_manager'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['is_manager'])) { + unset($nullablesSetToNull['is_manager']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['is_manager'] = $is_manager; + + return $this; + } + + /** + * Gets jacket_size + * + * @return string|null + */ + public function getJacketSize() { + return $this->container['jacket_size']; + } + + /** + * Sets jacket_size + * + * @param string|null $jacket_size jacket_size + * + * @return self + */ + public function setJacketSize($jacket_size) { + if (is_null($jacket_size)) { + $this->openApiNullablesSetToNull['jacket_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['jacket_size'])) { + unset($nullablesSetToNull['jacket_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['jacket_size'] = $jacket_size; + + return $this; + } + + /** + * Gets jacket_size_id + * + * @return string|null + */ + public function getJacketSizeId() { + return $this->container['jacket_size_id']; + } + + /** + * Sets jacket_size_id + * + * @param string|null $jacket_size_id jacket_size_id + * + * @return self + */ + public function setJacketSizeId($jacket_size_id) { + if (is_null($jacket_size_id)) { + $this->openApiNullablesSetToNull['jacket_size_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['jacket_size_id'])) { + unset($nullablesSetToNull['jacket_size_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['jacket_size_id'] = $jacket_size_id; + + return $this; + } + + /** + * Gets job_information_effective_date + * + * @return string|null + */ + public function getJobInformationEffectiveDate() { + return $this->container['job_information_effective_date']; + } + + /** + * Sets job_information_effective_date + * + * @param string|null $job_information_effective_date job_information_effective_date + * + * @return self + */ + public function setJobInformationEffectiveDate($job_information_effective_date) { + if (is_null($job_information_effective_date)) { + $this->openApiNullablesSetToNull['job_information_effective_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_information_effective_date'])) { + unset($nullablesSetToNull['job_information_effective_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_information_effective_date'] = $job_information_effective_date; + + return $this; + } + + /** + * Gets job_title_id + * + * @return string|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param string|null $job_title_id job_title_id + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + $this->openApiNullablesSetToNull['job_title_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title_id'])) { + unset($nullablesSetToNull['job_title_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets linkedin_url + * + * @return string|null + */ + public function getLinkedinUrl() { + return $this->container['linkedin_url']; + } + + /** + * Sets linkedin_url + * + * @param string|null $linkedin_url linkedin_url + * + * @return self + */ + public function setLinkedinUrl($linkedin_url) { + if (is_null($linkedin_url)) { + $this->openApiNullablesSetToNull['linkedin_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['linkedin_url'])) { + unset($nullablesSetToNull['linkedin_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['linkedin_url'] = $linkedin_url; + + return $this; + } + + /** + * Gets location_id + * + * @return string|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param string|null $location_id location_id + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + $this->openApiNullablesSetToNull['location_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location_id'])) { + unset($nullablesSetToNull['location_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets location_name + * + * @return string|null + */ + public function getLocationName() { + return $this->container['location_name']; + } + + /** + * Sets location_name + * + * @param string|null $location_name location_name + * + * @return self + */ + public function setLocationName($location_name) { + if (is_null($location_name)) { + $this->openApiNullablesSetToNull['location_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location_name'])) { + unset($nullablesSetToNull['location_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location_name'] = $location_name; + + return $this; + } + + /** + * Gets marital_status + * + * @return string|null + */ + public function getMaritalStatus() { + return $this->container['marital_status']; + } + + /** + * Sets marital_status + * + * @param string|null $marital_status marital_status + * + * @return self + */ + public function setMaritalStatus($marital_status) { + if (is_null($marital_status)) { + $this->openApiNullablesSetToNull['marital_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['marital_status'])) { + unset($nullablesSetToNull['marital_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['marital_status'] = $marital_status; + + return $this; + } + + /** + * Gets middle_initial + * + * @return string|null + */ + public function getMiddleInitial() { + return $this->container['middle_initial']; + } + + /** + * Sets middle_initial + * + * @param string|null $middle_initial middle_initial + * + * @return self + */ + public function setMiddleInitial($middle_initial) { + if (is_null($middle_initial)) { + $this->openApiNullablesSetToNull['middle_initial'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['middle_initial'])) { + unset($nullablesSetToNull['middle_initial']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['middle_initial'] = $middle_initial; + + return $this; + } + + /** + * Gets middle_name + * + * @return string|null + */ + public function getMiddleName() { + return $this->container['middle_name']; + } + + /** + * Sets middle_name + * + * @param string|null $middle_name middle_name + * + * @return self + */ + public function setMiddleName($middle_name) { + if (is_null($middle_name)) { + $this->openApiNullablesSetToNull['middle_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['middle_name'])) { + unset($nullablesSetToNull['middle_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['middle_name'] = $middle_name; + + return $this; + } + + /** + * Gets mobile_phone + * + * @return string|null + */ + public function getMobilePhone() { + return $this->container['mobile_phone']; + } + + /** + * Sets mobile_phone + * + * @param string|null $mobile_phone mobile_phone + * + * @return self + */ + public function setMobilePhone($mobile_phone) { + if (is_null($mobile_phone)) { + $this->openApiNullablesSetToNull['mobile_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['mobile_phone'])) { + unset($nullablesSetToNull['mobile_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mobile_phone'] = $mobile_phone; + + return $this; + } + + /** + * Gets national_id + * + * @return string|null + */ + public function getNationalId() { + return $this->container['national_id']; + } + + /** + * Sets national_id + * + * @param string|null $national_id national_id + * + * @return self + */ + public function setNationalId($national_id) { + if (is_null($national_id)) { + $this->openApiNullablesSetToNull['national_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['national_id'])) { + unset($nullablesSetToNull['national_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['national_id'] = $national_id; + + return $this; + } + + /** + * Gets national_insurance_category + * + * @return string|null + */ + public function getNationalInsuranceCategory() { + return $this->container['national_insurance_category']; + } + + /** + * Sets national_insurance_category + * + * @param string|null $national_insurance_category national_insurance_category + * + * @return self + */ + public function setNationalInsuranceCategory($national_insurance_category) { + if (is_null($national_insurance_category)) { + $this->openApiNullablesSetToNull['national_insurance_category'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['national_insurance_category'])) { + unset($nullablesSetToNull['national_insurance_category']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['national_insurance_category'] = $national_insurance_category; + + return $this; + } + + /** + * Gets national_insurance_category_id + * + * @return string|null + */ + public function getNationalInsuranceCategoryId() { + return $this->container['national_insurance_category_id']; + } + + /** + * Sets national_insurance_category_id + * + * @param string|null $national_insurance_category_id national_insurance_category_id + * + * @return self + */ + public function setNationalInsuranceCategoryId($national_insurance_category_id) { + if (is_null($national_insurance_category_id)) { + $this->openApiNullablesSetToNull['national_insurance_category_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['national_insurance_category_id'])) { + unset($nullablesSetToNull['national_insurance_category_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['national_insurance_category_id'] = $national_insurance_category_id; + + return $this; + } + + /** + * Gets nationality + * + * @return string|null + */ + public function getNationality() { + return $this->container['nationality']; + } + + /** + * Sets nationality + * + * @param string|null $nationality nationality + * + * @return self + */ + public function setNationality($nationality) { + if (is_null($nationality)) { + $this->openApiNullablesSetToNull['nationality'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nationality'])) { + unset($nullablesSetToNull['nationality']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nationality'] = $nationality; + + return $this; + } + + /** + * Gets nationality_id + * + * @return string|null + */ + public function getNationalityId() { + return $this->container['nationality_id']; + } + + /** + * Sets nationality_id + * + * @param string|null $nationality_id nationality_id + * + * @return self + */ + public function setNationalityId($nationality_id) { + if (is_null($nationality_id)) { + $this->openApiNullablesSetToNull['nationality_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nationality_id'])) { + unset($nullablesSetToNull['nationality_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nationality_id'] = $nationality_id; + + return $this; + } + + /** + * Gets nick_name + * + * @return string|null + */ + public function getNickName() { + return $this->container['nick_name']; + } + + /** + * Sets nick_name + * + * @param string|null $nick_name nick_name + * + * @return self + */ + public function setNickName($nick_name) { + if (is_null($nick_name)) { + $this->openApiNullablesSetToNull['nick_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nick_name'])) { + unset($nullablesSetToNull['nick_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nick_name'] = $nick_name; + + return $this; + } + + /** + * Gets nin + * + * @return string|null + */ + public function getNin() { + return $this->container['nin']; + } + + /** + * Sets nin + * + * @param string|null $nin nin + * + * @return self + */ + public function setNin($nin) { + if (is_null($nin)) { + $this->openApiNullablesSetToNull['nin'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nin'])) { + unset($nullablesSetToNull['nin']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nin'] = $nin; + + return $this; + } + + /** + * Gets notice_period + * + * @return string|null + */ + public function getNoticePeriod() { + return $this->container['notice_period']; + } + + /** + * Sets notice_period + * + * @param string|null $notice_period notice_period + * + * @return self + */ + public function setNoticePeriod($notice_period) { + if (is_null($notice_period)) { + $this->openApiNullablesSetToNull['notice_period'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['notice_period'])) { + unset($nullablesSetToNull['notice_period']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['notice_period'] = $notice_period; + + return $this; + } + + /** + * Gets notice_period_id + * + * @return string|null + */ + public function getNoticePeriodId() { + return $this->container['notice_period_id']; + } + + /** + * Sets notice_period_id + * + * @param string|null $notice_period_id notice_period_id + * + * @return self + */ + public function setNoticePeriodId($notice_period_id) { + if (is_null($notice_period_id)) { + $this->openApiNullablesSetToNull['notice_period_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['notice_period_id'])) { + unset($nullablesSetToNull['notice_period_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['notice_period_id'] = $notice_period_id; + + return $this; + } + + /** + * Gets original_hire_date + * + * @return string|null + */ + public function getOriginalHireDate() { + return $this->container['original_hire_date']; + } + + /** + * Sets original_hire_date + * + * @param string|null $original_hire_date original_hire_date + * + * @return self + */ + public function setOriginalHireDate($original_hire_date) { + if (is_null($original_hire_date)) { + $this->openApiNullablesSetToNull['original_hire_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_hire_date'])) { + unset($nullablesSetToNull['original_hire_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_hire_date'] = $original_hire_date; + + return $this; + } + + /** + * Gets overtime + * + * @return string|null + */ + public function getOvertime() { + return $this->container['overtime']; + } + + /** + * Sets overtime + * + * @param string|null $overtime overtime + * + * @return self + */ + public function setOvertime($overtime) { + if (is_null($overtime)) { + $this->openApiNullablesSetToNull['overtime'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['overtime'])) { + unset($nullablesSetToNull['overtime']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['overtime'] = $overtime; + + return $this; + } + + /** + * Gets overtime_rate + * + * @return \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfOvertimeRate|null + */ + public function getOvertimeRate() { + return $this->container['overtime_rate']; + } + + /** + * Sets overtime_rate + * + * @param \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfOvertimeRate|null $overtime_rate overtime_rate + * + * @return self + */ + public function setOvertimeRate($overtime_rate) { + if (is_null($overtime_rate)) { + throw new \InvalidArgumentException('non-nullable overtime_rate cannot be null'); + } + $this->container['overtime_rate'] = $overtime_rate; + + return $this; + } + + /** + * Gets paid_per + * + * @return string|null + */ + public function getPaidPer() { + return $this->container['paid_per']; + } + + /** + * Sets paid_per + * + * @param string|null $paid_per paid_per + * + * @return self + */ + public function setPaidPer($paid_per) { + if (is_null($paid_per)) { + $this->openApiNullablesSetToNull['paid_per'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['paid_per'])) { + unset($nullablesSetToNull['paid_per']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paid_per'] = $paid_per; + + return $this; + } + + /** + * Gets pay_rate + * + * @return \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfPayRate|null + */ + public function getPayRate() { + return $this->container['pay_rate']; + } + + /** + * Sets pay_rate + * + * @param \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfPayRate|null $pay_rate pay_rate + * + * @return self + */ + public function setPayRate($pay_rate) { + if (is_null($pay_rate)) { + throw new \InvalidArgumentException('non-nullable pay_rate cannot be null'); + } + $this->container['pay_rate'] = $pay_rate; + + return $this; + } + + /** + * Gets pay_schedule + * + * @return string|null + */ + public function getPaySchedule() { + return $this->container['pay_schedule']; + } + + /** + * Sets pay_schedule + * + * @param string|null $pay_schedule pay_schedule + * + * @return self + */ + public function setPaySchedule($pay_schedule) { + if (is_null($pay_schedule)) { + $this->openApiNullablesSetToNull['pay_schedule'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_schedule'])) { + unset($nullablesSetToNull['pay_schedule']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_schedule'] = $pay_schedule; + + return $this; + } + + /** + * Gets pay_schedule_id + * + * @return string|null + */ + public function getPayScheduleId() { + return $this->container['pay_schedule_id']; + } + + /** + * Sets pay_schedule_id + * + * @param string|null $pay_schedule_id pay_schedule_id + * + * @return self + */ + public function setPayScheduleId($pay_schedule_id) { + if (is_null($pay_schedule_id)) { + $this->openApiNullablesSetToNull['pay_schedule_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_schedule_id'])) { + unset($nullablesSetToNull['pay_schedule_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_schedule_id'] = $pay_schedule_id; + + return $this; + } + + /** + * Gets pay_type + * + * @return string|null + */ + public function getPayType() { + return $this->container['pay_type']; + } + + /** + * Sets pay_type + * + * @param string|null $pay_type pay_type + * + * @return self + */ + public function setPayType($pay_type) { + if (is_null($pay_type)) { + $this->openApiNullablesSetToNull['pay_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pay_type'])) { + unset($nullablesSetToNull['pay_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pay_type'] = $pay_type; + + return $this; + } + + /** + * Gets pinterest_url + * + * @return string|null + */ + public function getPinterestUrl() { + return $this->container['pinterest_url']; + } + + /** + * Sets pinterest_url + * + * @param string|null $pinterest_url pinterest_url + * + * @return self + */ + public function setPinterestUrl($pinterest_url) { + if (is_null($pinterest_url)) { + $this->openApiNullablesSetToNull['pinterest_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pinterest_url'])) { + unset($nullablesSetToNull['pinterest_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pinterest_url'] = $pinterest_url; + + return $this; + } + + /** + * Gets preferred_name_last_name + * + * @return string|null + */ + public function getPreferredNameLastName() { + return $this->container['preferred_name_last_name']; + } + + /** + * Sets preferred_name_last_name + * + * @param string|null $preferred_name_last_name preferred_name_last_name + * + * @return self + */ + public function setPreferredNameLastName($preferred_name_last_name) { + if (is_null($preferred_name_last_name)) { + $this->openApiNullablesSetToNull['preferred_name_last_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['preferred_name_last_name'])) { + unset($nullablesSetToNull['preferred_name_last_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['preferred_name_last_name'] = $preferred_name_last_name; + + return $this; + } + + /** + * Gets probation_end_date + * + * @return string|null + */ + public function getProbationEndDate() { + return $this->container['probation_end_date']; + } + + /** + * Sets probation_end_date + * + * @param string|null $probation_end_date probation_end_date + * + * @return self + */ + public function setProbationEndDate($probation_end_date) { + if (is_null($probation_end_date)) { + $this->openApiNullablesSetToNull['probation_end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['probation_end_date'])) { + unset($nullablesSetToNull['probation_end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['probation_end_date'] = $probation_end_date; + + return $this; + } + + /** + * Gets pronouns + * + * @return string|null + */ + public function getPronouns() { + return $this->container['pronouns']; + } + + /** + * Sets pronouns + * + * @param string|null $pronouns pronouns + * + * @return self + */ + public function setPronouns($pronouns) { + if (is_null($pronouns)) { + $this->openApiNullablesSetToNull['pronouns'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pronouns'])) { + unset($nullablesSetToNull['pronouns']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pronouns'] = $pronouns; + + return $this; + } + + /** + * Gets pronouns_id + * + * @return string|null + */ + public function getPronounsId() { + return $this->container['pronouns_id']; + } + + /** + * Sets pronouns_id + * + * @param string|null $pronouns_id pronouns_id + * + * @return self + */ + public function setPronounsId($pronouns_id) { + if (is_null($pronouns_id)) { + $this->openApiNullablesSetToNull['pronouns_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['pronouns_id'])) { + unset($nullablesSetToNull['pronouns_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pronouns_id'] = $pronouns_id; + + return $this; + } + + /** + * Gets proof_of_vaccination + * + * @return bool|null + */ + public function getProofOfVaccination() { + return $this->container['proof_of_vaccination']; + } + + /** + * Sets proof_of_vaccination + * + * @param bool|null $proof_of_vaccination proof_of_vaccination + * + * @return self + */ + public function setProofOfVaccination($proof_of_vaccination) { + if (is_null($proof_of_vaccination)) { + $this->openApiNullablesSetToNull['proof_of_vaccination'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['proof_of_vaccination'])) { + unset($nullablesSetToNull['proof_of_vaccination']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['proof_of_vaccination'] = $proof_of_vaccination; + + return $this; + } + + /** + * Gets reports_to_id + * + * @return string|null + */ + public function getReportsToId() { + return $this->container['reports_to_id']; + } + + /** + * Sets reports_to_id + * + * @param string|null $reports_to_id reports_to_id + * + * @return self + */ + public function setReportsToId($reports_to_id) { + if (is_null($reports_to_id)) { + $this->openApiNullablesSetToNull['reports_to_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['reports_to_id'])) { + unset($nullablesSetToNull['reports_to_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reports_to_id'] = $reports_to_id; + + return $this; + } + + /** + * Gets reports_to_name + * + * @return string|null + */ + public function getReportsToName() { + return $this->container['reports_to_name']; + } + + /** + * Sets reports_to_name + * + * @param string|null $reports_to_name reports_to_name + * + * @return self + */ + public function setReportsToName($reports_to_name) { + if (is_null($reports_to_name)) { + $this->openApiNullablesSetToNull['reports_to_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['reports_to_name'])) { + unset($nullablesSetToNull['reports_to_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reports_to_name'] = $reports_to_name; + + return $this; + } + + /** + * Gets secondary_language + * + * @return string|null + */ + public function getSecondaryLanguage() { + return $this->container['secondary_language']; + } + + /** + * Sets secondary_language + * + * @param string|null $secondary_language secondary_language + * + * @return self + */ + public function setSecondaryLanguage($secondary_language) { + if (is_null($secondary_language)) { + $this->openApiNullablesSetToNull['secondary_language'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['secondary_language'])) { + unset($nullablesSetToNull['secondary_language']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['secondary_language'] = $secondary_language; + + return $this; + } + + /** + * Gets shirt_size + * + * @return string|null + */ + public function getShirtSize() { + return $this->container['shirt_size']; + } + + /** + * Sets shirt_size + * + * @param string|null $shirt_size shirt_size + * + * @return self + */ + public function setShirtSize($shirt_size) { + if (is_null($shirt_size)) { + $this->openApiNullablesSetToNull['shirt_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['shirt_size'])) { + unset($nullablesSetToNull['shirt_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['shirt_size'] = $shirt_size; + + return $this; + } + + /** + * Gets shirt_size_id + * + * @return string|null + */ + public function getShirtSizeId() { + return $this->container['shirt_size_id']; + } + + /** + * Sets shirt_size_id + * + * @param string|null $shirt_size_id shirt_size_id + * + * @return self + */ + public function setShirtSizeId($shirt_size_id) { + if (is_null($shirt_size_id)) { + $this->openApiNullablesSetToNull['shirt_size_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['shirt_size_id'])) { + unset($nullablesSetToNull['shirt_size_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['shirt_size_id'] = $shirt_size_id; + + return $this; + } + + /** + * Gets sin + * + * @return string|null + */ + public function getSin() { + return $this->container['sin']; + } + + /** + * Sets sin + * + * @param string|null $sin sin + * + * @return self + */ + public function setSin($sin) { + if (is_null($sin)) { + $this->openApiNullablesSetToNull['sin'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['sin'])) { + unset($nullablesSetToNull['sin']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['sin'] = $sin; + + return $this; + } + + /** + * Gets skype_username + * + * @return string|null + */ + public function getSkypeUsername() { + return $this->container['skype_username']; + } + + /** + * Sets skype_username + * + * @param string|null $skype_username skype_username + * + * @return self + */ + public function setSkypeUsername($skype_username) { + if (is_null($skype_username)) { + $this->openApiNullablesSetToNull['skype_username'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['skype_username'])) { + unset($nullablesSetToNull['skype_username']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['skype_username'] = $skype_username; + + return $this; + } + + /** + * Gets ssn + * + * @return string|null + */ + public function getSsn() { + return $this->container['ssn']; + } + + /** + * Sets ssn + * + * @param string|null $ssn ssn + * + * @return self + */ + public function setSsn($ssn) { + if (is_null($ssn)) { + $this->openApiNullablesSetToNull['ssn'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['ssn'])) { + unset($nullablesSetToNull['ssn']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ssn'] = $ssn; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state state + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + $this->openApiNullablesSetToNull['state'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state'])) { + unset($nullablesSetToNull['state']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets state_id + * + * @return string|null + */ + public function getStateId() { + return $this->container['state_id']; + } + + /** + * Sets state_id + * + * @param string|null $state_id state_id + * + * @return self + */ + public function setStateId($state_id) { + if (is_null($state_id)) { + $this->openApiNullablesSetToNull['state_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state_id'])) { + unset($nullablesSetToNull['state_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state_id'] = $state_id; + + return $this; + } + + /** + * Gets tax_type_id + * + * @return string|null + */ + public function getTaxTypeId() { + return $this->container['tax_type_id']; + } + + /** + * Sets tax_type_id + * + * @param string|null $tax_type_id tax_type_id + * + * @return self + */ + public function setTaxTypeId($tax_type_id) { + if (is_null($tax_type_id)) { + $this->openApiNullablesSetToNull['tax_type_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['tax_type_id'])) { + unset($nullablesSetToNull['tax_type_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tax_type_id'] = $tax_type_id; + + return $this; + } + + /** + * Gets teams + * + * @return \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfTeams[]|null + */ + public function getTeams() { + return $this->container['teams']; + } + + /** + * Sets teams + * + * @param \BhrSdk\Model\GetEmployeesEmployeeResponseAllOfTeams[]|null $teams Employee's teams. Only included when requested via the `fields` parameter. + * + * @return self + */ + public function setTeams($teams) { + if (is_null($teams)) { + throw new \InvalidArgumentException('non-nullable teams cannot be null'); + } + $this->container['teams'] = $teams; + + return $this; + } + + /** + * Gets tenure + * + * @return string|null + */ + public function getTenure() { + return $this->container['tenure']; + } + + /** + * Sets tenure + * + * @param string|null $tenure tenure + * + * @return self + */ + public function setTenure($tenure) { + if (is_null($tenure)) { + $this->openApiNullablesSetToNull['tenure'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['tenure'])) { + unset($nullablesSetToNull['tenure']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tenure'] = $tenure; + + return $this; + } + + /** + * Gets termination_date + * + * @return string|null + */ + public function getTerminationDate() { + return $this->container['termination_date']; + } + + /** + * Sets termination_date + * + * @param string|null $termination_date termination_date + * + * @return self + */ + public function setTerminationDate($termination_date) { + if (is_null($termination_date)) { + $this->openApiNullablesSetToNull['termination_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_date'])) { + unset($nullablesSetToNull['termination_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_date'] = $termination_date; + + return $this; + } + + /** + * Gets termination_reason + * + * @return string|null + */ + public function getTerminationReason() { + return $this->container['termination_reason']; + } + + /** + * Sets termination_reason + * + * @param string|null $termination_reason termination_reason + * + * @return self + */ + public function setTerminationReason($termination_reason) { + if (is_null($termination_reason)) { + $this->openApiNullablesSetToNull['termination_reason'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_reason'])) { + unset($nullablesSetToNull['termination_reason']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_reason'] = $termination_reason; + + return $this; + } + + /** + * Gets termination_reason_id + * + * @return string|null + */ + public function getTerminationReasonId() { + return $this->container['termination_reason_id']; + } + + /** + * Sets termination_reason_id + * + * @param string|null $termination_reason_id termination_reason_id + * + * @return self + */ + public function setTerminationReasonId($termination_reason_id) { + if (is_null($termination_reason_id)) { + $this->openApiNullablesSetToNull['termination_reason_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_reason_id'])) { + unset($nullablesSetToNull['termination_reason_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_reason_id'] = $termination_reason_id; + + return $this; + } + + /** + * Gets termination_regrettable + * + * @return string|null + */ + public function getTerminationRegrettable() { + return $this->container['termination_regrettable']; + } + + /** + * Sets termination_regrettable + * + * @param string|null $termination_regrettable termination_regrettable + * + * @return self + */ + public function setTerminationRegrettable($termination_regrettable) { + if (is_null($termination_regrettable)) { + $this->openApiNullablesSetToNull['termination_regrettable'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_regrettable'])) { + unset($nullablesSetToNull['termination_regrettable']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_regrettable'] = $termination_regrettable; + + return $this; + } + + /** + * Gets termination_regrettable_id + * + * @return string|null + */ + public function getTerminationRegrettableId() { + return $this->container['termination_regrettable_id']; + } + + /** + * Sets termination_regrettable_id + * + * @param string|null $termination_regrettable_id termination_regrettable_id + * + * @return self + */ + public function setTerminationRegrettableId($termination_regrettable_id) { + if (is_null($termination_regrettable_id)) { + $this->openApiNullablesSetToNull['termination_regrettable_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_regrettable_id'])) { + unset($nullablesSetToNull['termination_regrettable_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_regrettable_id'] = $termination_regrettable_id; + + return $this; + } + + /** + * Gets termination_type + * + * @return string|null + */ + public function getTerminationType() { + return $this->container['termination_type']; + } + + /** + * Sets termination_type + * + * @param string|null $termination_type termination_type + * + * @return self + */ + public function setTerminationType($termination_type) { + if (is_null($termination_type)) { + $this->openApiNullablesSetToNull['termination_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_type'])) { + unset($nullablesSetToNull['termination_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_type'] = $termination_type; + + return $this; + } + + /** + * Gets termination_type_id + * + * @return string|null + */ + public function getTerminationTypeId() { + return $this->container['termination_type_id']; + } + + /** + * Sets termination_type_id + * + * @param string|null $termination_type_id termination_type_id + * + * @return self + */ + public function setTerminationTypeId($termination_type_id) { + if (is_null($termination_type_id)) { + $this->openApiNullablesSetToNull['termination_type_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['termination_type_id'])) { + unset($nullablesSetToNull['termination_type_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['termination_type_id'] = $termination_type_id; + + return $this; + } + + /** + * Gets t_shirt_size + * + * @return string|null + */ + public function getTShirtSize() { + return $this->container['t_shirt_size']; + } + + /** + * Sets t_shirt_size + * + * @param string|null $t_shirt_size t_shirt_size + * + * @return self + */ + public function setTShirtSize($t_shirt_size) { + if (is_null($t_shirt_size)) { + $this->openApiNullablesSetToNull['t_shirt_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['t_shirt_size'])) { + unset($nullablesSetToNull['t_shirt_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['t_shirt_size'] = $t_shirt_size; + + return $this; + } + + /** + * Gets t_shirt_size_id + * + * @return string|null + */ + public function getTShirtSizeId() { + return $this->container['t_shirt_size_id']; + } + + /** + * Sets t_shirt_size_id + * + * @param string|null $t_shirt_size_id t_shirt_size_id + * + * @return self + */ + public function setTShirtSizeId($t_shirt_size_id) { + if (is_null($t_shirt_size_id)) { + $this->openApiNullablesSetToNull['t_shirt_size_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['t_shirt_size_id'])) { + unset($nullablesSetToNull['t_shirt_size_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['t_shirt_size_id'] = $t_shirt_size_id; + + return $this; + } + + /** + * Gets twitter_url + * + * @return string|null + */ + public function getTwitterUrl() { + return $this->container['twitter_url']; + } + + /** + * Sets twitter_url + * + * @param string|null $twitter_url twitter_url + * + * @return self + */ + public function setTwitterUrl($twitter_url) { + if (is_null($twitter_url)) { + $this->openApiNullablesSetToNull['twitter_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['twitter_url'])) { + unset($nullablesSetToNull['twitter_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['twitter_url'] = $twitter_url; + + return $this; + } + + /** + * Gets user_id + * + * @return string|null + */ + public function getUserId() { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param string|null $user_id user_id + * + * @return self + */ + public function setUserId($user_id) { + if (is_null($user_id)) { + $this->openApiNullablesSetToNull['user_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['user_id'])) { + unset($nullablesSetToNull['user_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets vaccination_status + * + * @return string|null + */ + public function getVaccinationStatus() { + return $this->container['vaccination_status']; + } + + /** + * Sets vaccination_status + * + * @param string|null $vaccination_status vaccination_status + * + * @return self + */ + public function setVaccinationStatus($vaccination_status) { + if (is_null($vaccination_status)) { + $this->openApiNullablesSetToNull['vaccination_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vaccination_status'])) { + unset($nullablesSetToNull['vaccination_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vaccination_status'] = $vaccination_status; + + return $this; + } + + /** + * Gets vaccination_status_id + * + * @return string|null + */ + public function getVaccinationStatusId() { + return $this->container['vaccination_status_id']; + } + + /** + * Sets vaccination_status_id + * + * @param string|null $vaccination_status_id vaccination_status_id + * + * @return self + */ + public function setVaccinationStatusId($vaccination_status_id) { + if (is_null($vaccination_status_id)) { + $this->openApiNullablesSetToNull['vaccination_status_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vaccination_status_id'])) { + unset($nullablesSetToNull['vaccination_status_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vaccination_status_id'] = $vaccination_status_id; + + return $this; + } + + /** + * Gets vaccine_received + * + * @return string|null + */ + public function getVaccineReceived() { + return $this->container['vaccine_received']; + } + + /** + * Sets vaccine_received + * + * @param string|null $vaccine_received vaccine_received + * + * @return self + */ + public function setVaccineReceived($vaccine_received) { + if (is_null($vaccine_received)) { + $this->openApiNullablesSetToNull['vaccine_received'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vaccine_received'])) { + unset($nullablesSetToNull['vaccine_received']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vaccine_received'] = $vaccine_received; + + return $this; + } + + /** + * Gets vaccine_received_id + * + * @return string|null + */ + public function getVaccineReceivedId() { + return $this->container['vaccine_received_id']; + } + + /** + * Sets vaccine_received_id + * + * @param string|null $vaccine_received_id vaccine_received_id + * + * @return self + */ + public function setVaccineReceivedId($vaccine_received_id) { + if (is_null($vaccine_received_id)) { + $this->openApiNullablesSetToNull['vaccine_received_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vaccine_received_id'])) { + unset($nullablesSetToNull['vaccine_received_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vaccine_received_id'] = $vaccine_received_id; + + return $this; + } + + /** + * Gets veteran_status + * + * @return string|null + */ + public function getVeteranStatus() { + return $this->container['veteran_status']; + } + + /** + * Sets veteran_status + * + * @param string|null $veteran_status veteran_status + * + * @return self + */ + public function setVeteranStatus($veteran_status) { + if (is_null($veteran_status)) { + $this->openApiNullablesSetToNull['veteran_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['veteran_status'])) { + unset($nullablesSetToNull['veteran_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['veteran_status'] = $veteran_status; + + return $this; + } + + /** + * Gets veteran_status_id + * + * @return int[]|null + */ + public function getVeteranStatusId() { + return $this->container['veteran_status_id']; + } + + /** + * Sets veteran_status_id + * + * @param int[]|null $veteran_status_id Employee's veteran status ID. Only included when requested via the `fields` parameter. + * + * @return self + */ + public function setVeteranStatusId($veteran_status_id) { + if (is_null($veteran_status_id)) { + throw new \InvalidArgumentException('non-nullable veteran_status_id cannot be null'); + } + $this->container['veteran_status_id'] = $veteran_status_id; + + return $this; + } + + /** + * Gets work_email + * + * @return string|null + */ + public function getWorkEmail() { + return $this->container['work_email']; + } + + /** + * Sets work_email + * + * @param string|null $work_email work_email + * + * @return self + */ + public function setWorkEmail($work_email) { + if (is_null($work_email)) { + $this->openApiNullablesSetToNull['work_email'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_email'])) { + unset($nullablesSetToNull['work_email']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_email'] = $work_email; + + return $this; + } + + /** + * Gets work_phone + * + * @return string|null + */ + public function getWorkPhone() { + return $this->container['work_phone']; + } + + /** + * Sets work_phone + * + * @param string|null $work_phone work_phone + * + * @return self + */ + public function setWorkPhone($work_phone) { + if (is_null($work_phone)) { + $this->openApiNullablesSetToNull['work_phone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_phone'])) { + unset($nullablesSetToNull['work_phone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_phone'] = $work_phone; + + return $this; + } + + /** + * Gets work_phone_extension + * + * @return string|null + */ + public function getWorkPhoneExtension() { + return $this->container['work_phone_extension']; + } + + /** + * Sets work_phone_extension + * + * @param string|null $work_phone_extension work_phone_extension + * + * @return self + */ + public function setWorkPhoneExtension($work_phone_extension) { + if (is_null($work_phone_extension)) { + $this->openApiNullablesSetToNull['work_phone_extension'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['work_phone_extension'])) { + unset($nullablesSetToNull['work_phone_extension']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['work_phone_extension'] = $work_phone_extension; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode zipcode + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + $this->openApiNullablesSetToNull['zipcode'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zipcode'])) { + unset($nullablesSetToNull['zipcode']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zipcode'] = $zipcode; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.php b/lib/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.php new file mode 100644 index 00000000..4fdd9c2e --- /dev/null +++ b/lib/Model/GetEmployeesEmployeeResponseAllOfOvertimeRate.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesEmployeeResponseAllOfOvertimeRate + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesEmployeeResponseAllOfOvertimeRate Class Doc Comment + * + * @category Class + * @description Employee's overtime rate. Only included when requested via the `fields` parameter. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesEmployeeResponseAllOfOvertimeRate implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesEmployeeResponse_allOf_overtimeRate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'amount' => 'string', + 'currency' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'amount' => null, + 'currency' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'amount' => false, + 'currency' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'currency' => 'currency' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'currency' => 'setCurrency' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'currency' => 'getCurrency' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('currency', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets amount + * + * @return string|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency currency + * + * @return self + */ + public function setCurrency($currency) { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesEmployeeResponseAllOfPayRate.php b/lib/Model/GetEmployeesEmployeeResponseAllOfPayRate.php new file mode 100644 index 00000000..eb809750 --- /dev/null +++ b/lib/Model/GetEmployeesEmployeeResponseAllOfPayRate.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesEmployeeResponseAllOfPayRate + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesEmployeeResponseAllOfPayRate Class Doc Comment + * + * @category Class + * @description Employee's pay rate. Only included when requested via the `fields` parameter. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesEmployeeResponseAllOfPayRate implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesEmployeeResponse_allOf_payRate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'amount' => 'string', + 'currency' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'amount' => null, + 'currency' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'amount' => false, + 'currency' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'currency' => 'currency' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'currency' => 'setCurrency' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'currency' => 'getCurrency' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('currency', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets amount + * + * @return string|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency currency + * + * @return self + */ + public function setCurrency($currency) { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesEmployeeResponseAllOfTeams.php b/lib/Model/GetEmployeesEmployeeResponseAllOfTeams.php new file mode 100644 index 00000000..34b315df --- /dev/null +++ b/lib/Model/GetEmployeesEmployeeResponseAllOfTeams.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesEmployeeResponseAllOfTeams + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesEmployeeResponseAllOfTeams Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesEmployeeResponseAllOfTeams implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesEmployeeResponse_allOf_teams'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label label + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesFilterRequestObject.php b/lib/Model/GetEmployeesFilterRequestObject.php index 6ced5177..9e18a3cb 100644 --- a/lib/Model/GetEmployeesFilterRequestObject.php +++ b/lib/Model/GetEmployeesFilterRequestObject.php @@ -36,7 +36,7 @@ * GetEmployeesFilterRequestObject Class Doc Comment * * @category Class - * @description + * @description Filter criteria for the employee list endpoint, supplied as `filter[fieldName]=value` query parameters. All filter fields are optional, and multiple fields are combined with AND logic. Three matching strategies are used depending on the field: - **Substring** (case-insensitive `LIKE`) — applied to free-text fields such as names, addresses, social URLs, and free-form labels. - **Equality** — applied to IDs (integer), enumerated string values, booleans (`true`/`false`), numeric values, and ISO 8601 dates (`YYYY-MM-DD`). - **Special** — `ids` accepts a list of employee IDs (`filter[ids][]=123&filter[ids][]=124` or `filter[ids]=123,124`). Filtering is **not supported** for the following fields and will return a 422: `bestEmail`, `ein`, `genderIdentity`, `genderIdentityId`, `nationalId`, `nin`, `overtime`, `overtimeRate`, `payRate`, `sin`, `ssn`, `teams`, `userId`, `veteranStatus`, `veteranStatusId`. Any unrecognized filter key will also return a 422. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -58,6 +58,114 @@ class GetEmployeesFilterRequestObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openApiTypes = [ + 'address_line1' => 'string', + 'address_line2' => 'string', + 'allergies' => 'string', + 'birthplace' => 'string', + 'citizenship' => 'string', + 'city' => 'string', + 'compensation_change_reason' => 'string', + 'compensation_comment' => 'string', + 'country' => 'string', + 'department_name' => 'string', + 'dietary_restrictions' => 'string', + 'display_name' => 'string', + 'division_name' => 'string', + 'eeo_job_category' => 'string', + 'eligible_for_rehire' => 'string', + 'employee_name' => 'string', + 'employee_number' => 'string', + 'employment_status_name' => 'string', + 'employment_status_comment' => 'string', + 'employment_type' => 'string', + 'ethnicity' => 'string', + 'facebook_url' => 'string', + 'first_name_last_name' => 'string', + 'first_name_middle_initial' => 'string', + 'flsa_code' => 'string', + 'home_email' => 'string', + 'home_phone' => 'string', + 'instagram_url' => 'string', + 'jacket_size' => 'string', + 'linkedin_url' => 'string', + 'location_name' => 'string', + 'marital_status' => 'string', + 'middle_initial' => 'string', + 'middle_name' => 'string', + 'mobile_phone' => 'string', + 'national_insurance_category' => 'string', + 'nationality' => 'string', + 'nick_name' => 'string', + 'notice_period' => 'string', + 'pay_schedule' => 'string', + 'pinterest_url' => 'string', + 'preferred_name_last_name' => 'string', + 'pronouns' => 'string', + 'reports_to_name' => 'string', + 'secondary_language' => 'string', + 'shirt_size' => 'string', + 'skype_username' => 'string', + 'state' => 'string', + 'termination_reason' => 'string', + 'termination_regrettable' => 'string', + 'termination_type' => 'string', + 't_shirt_size' => 'string', + 'twitter_url' => 'string', + 'vaccination_status' => 'string', + 'vaccine_received' => 'string', + 'work_email' => 'string', + 'work_phone' => 'string', + 'work_phone_extension' => 'string', + 'zipcode' => 'string', + 'gender' => 'string', + 'paid_per' => 'string', + 'pay_type' => 'string', + 'citizenship_id' => 'int', + 'compensation_change_reason_id' => 'int', + 'country_id' => 'int', + 'department_id' => 'int', + 'division_id' => 'int', + 'eeo_job_category_id' => 'int', + 'eligible_for_rehire_id' => 'int', + 'employment_status_id' => 'int', + 'employment_type_id' => 'int', + 'ethnicity_id' => 'int', + 'flsa_code_id' => 'int', + 'jacket_size_id' => 'int', + 'job_title_id' => 'int', + 'location_id' => 'int', + 'national_insurance_category_id' => 'int', + 'nationality_id' => 'int', + 'notice_period_id' => 'int', + 'pay_schedule_id' => 'int', + 'pronouns_id' => 'int', + 'reports_to_id' => 'int', + 'shirt_size_id' => 'int', + 'state_id' => 'int', + 'tax_type_id' => 'int', + 'termination_reason_id' => 'int', + 'termination_regrettable_id' => 'int', + 'termination_type_id' => 'int', + 't_shirt_size_id' => 'int', + 'vaccination_status_id' => 'int', + 'vaccine_received_id' => 'int', + 'is_manager' => 'bool', + 'proof_of_vaccination' => 'bool', + 'age' => 'float', + 'tenure' => 'float', + 'hours_per_pay_cycle' => 'float', + 'birth_date' => '\DateTime', + 'compensation_effective_date' => '\DateTime', + 'compensation_end_date' => '\DateTime', + 'contract_end_date' => '\DateTime', + 'employment_status_effective_date' => '\DateTime', + 'final_dose_administration_date' => '\DateTime', + 'final_pay_date' => '\DateTime', + 'hire_date' => '\DateTime', + 'job_information_effective_date' => '\DateTime', + 'original_hire_date' => '\DateTime', + 'probation_end_date' => '\DateTime', + 'termination_date' => '\DateTime', 'first_name' => 'string', 'last_name' => 'string', 'job_title_name' => 'string', @@ -73,6 +181,114 @@ class GetEmployeesFilterRequestObject implements ModelInterface, ArrayAccess, \J * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ + 'address_line1' => null, + 'address_line2' => null, + 'allergies' => null, + 'birthplace' => null, + 'citizenship' => null, + 'city' => null, + 'compensation_change_reason' => null, + 'compensation_comment' => null, + 'country' => null, + 'department_name' => null, + 'dietary_restrictions' => null, + 'display_name' => null, + 'division_name' => null, + 'eeo_job_category' => null, + 'eligible_for_rehire' => null, + 'employee_name' => null, + 'employee_number' => null, + 'employment_status_name' => null, + 'employment_status_comment' => null, + 'employment_type' => null, + 'ethnicity' => null, + 'facebook_url' => null, + 'first_name_last_name' => null, + 'first_name_middle_initial' => null, + 'flsa_code' => null, + 'home_email' => null, + 'home_phone' => null, + 'instagram_url' => null, + 'jacket_size' => null, + 'linkedin_url' => null, + 'location_name' => null, + 'marital_status' => null, + 'middle_initial' => null, + 'middle_name' => null, + 'mobile_phone' => null, + 'national_insurance_category' => null, + 'nationality' => null, + 'nick_name' => null, + 'notice_period' => null, + 'pay_schedule' => null, + 'pinterest_url' => null, + 'preferred_name_last_name' => null, + 'pronouns' => null, + 'reports_to_name' => null, + 'secondary_language' => null, + 'shirt_size' => null, + 'skype_username' => null, + 'state' => null, + 'termination_reason' => null, + 'termination_regrettable' => null, + 'termination_type' => null, + 't_shirt_size' => null, + 'twitter_url' => null, + 'vaccination_status' => null, + 'vaccine_received' => null, + 'work_email' => null, + 'work_phone' => null, + 'work_phone_extension' => null, + 'zipcode' => null, + 'gender' => null, + 'paid_per' => null, + 'pay_type' => null, + 'citizenship_id' => null, + 'compensation_change_reason_id' => null, + 'country_id' => null, + 'department_id' => null, + 'division_id' => null, + 'eeo_job_category_id' => null, + 'eligible_for_rehire_id' => null, + 'employment_status_id' => null, + 'employment_type_id' => null, + 'ethnicity_id' => null, + 'flsa_code_id' => null, + 'jacket_size_id' => null, + 'job_title_id' => null, + 'location_id' => null, + 'national_insurance_category_id' => null, + 'nationality_id' => null, + 'notice_period_id' => null, + 'pay_schedule_id' => null, + 'pronouns_id' => null, + 'reports_to_id' => null, + 'shirt_size_id' => null, + 'state_id' => null, + 'tax_type_id' => null, + 'termination_reason_id' => null, + 'termination_regrettable_id' => null, + 'termination_type_id' => null, + 't_shirt_size_id' => null, + 'vaccination_status_id' => null, + 'vaccine_received_id' => null, + 'is_manager' => null, + 'proof_of_vaccination' => null, + 'age' => null, + 'tenure' => null, + 'hours_per_pay_cycle' => null, + 'birth_date' => 'date', + 'compensation_effective_date' => 'date', + 'compensation_end_date' => 'date', + 'contract_end_date' => 'date', + 'employment_status_effective_date' => 'date', + 'final_dose_administration_date' => 'date', + 'final_pay_date' => 'date', + 'hire_date' => 'date', + 'job_information_effective_date' => 'date', + 'original_hire_date' => 'date', + 'probation_end_date' => 'date', + 'termination_date' => 'date', 'first_name' => null, 'last_name' => null, 'job_title_name' => null, @@ -87,6 +303,114 @@ class GetEmployeesFilterRequestObject implements ModelInterface, ArrayAccess, \J * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ + 'address_line1' => false, + 'address_line2' => false, + 'allergies' => false, + 'birthplace' => false, + 'citizenship' => false, + 'city' => false, + 'compensation_change_reason' => false, + 'compensation_comment' => false, + 'country' => false, + 'department_name' => false, + 'dietary_restrictions' => false, + 'display_name' => false, + 'division_name' => false, + 'eeo_job_category' => false, + 'eligible_for_rehire' => false, + 'employee_name' => false, + 'employee_number' => false, + 'employment_status_name' => false, + 'employment_status_comment' => false, + 'employment_type' => false, + 'ethnicity' => false, + 'facebook_url' => false, + 'first_name_last_name' => false, + 'first_name_middle_initial' => false, + 'flsa_code' => false, + 'home_email' => false, + 'home_phone' => false, + 'instagram_url' => false, + 'jacket_size' => false, + 'linkedin_url' => false, + 'location_name' => false, + 'marital_status' => false, + 'middle_initial' => false, + 'middle_name' => false, + 'mobile_phone' => false, + 'national_insurance_category' => false, + 'nationality' => false, + 'nick_name' => false, + 'notice_period' => false, + 'pay_schedule' => false, + 'pinterest_url' => false, + 'preferred_name_last_name' => false, + 'pronouns' => false, + 'reports_to_name' => false, + 'secondary_language' => false, + 'shirt_size' => false, + 'skype_username' => false, + 'state' => false, + 'termination_reason' => false, + 'termination_regrettable' => false, + 'termination_type' => false, + 't_shirt_size' => false, + 'twitter_url' => false, + 'vaccination_status' => false, + 'vaccine_received' => false, + 'work_email' => false, + 'work_phone' => false, + 'work_phone_extension' => false, + 'zipcode' => false, + 'gender' => false, + 'paid_per' => false, + 'pay_type' => false, + 'citizenship_id' => false, + 'compensation_change_reason_id' => false, + 'country_id' => false, + 'department_id' => false, + 'division_id' => false, + 'eeo_job_category_id' => false, + 'eligible_for_rehire_id' => false, + 'employment_status_id' => false, + 'employment_type_id' => false, + 'ethnicity_id' => false, + 'flsa_code_id' => false, + 'jacket_size_id' => false, + 'job_title_id' => false, + 'location_id' => false, + 'national_insurance_category_id' => false, + 'nationality_id' => false, + 'notice_period_id' => false, + 'pay_schedule_id' => false, + 'pronouns_id' => false, + 'reports_to_id' => false, + 'shirt_size_id' => false, + 'state_id' => false, + 'tax_type_id' => false, + 'termination_reason_id' => false, + 'termination_regrettable_id' => false, + 'termination_type_id' => false, + 't_shirt_size_id' => false, + 'vaccination_status_id' => false, + 'vaccine_received_id' => false, + 'is_manager' => false, + 'proof_of_vaccination' => false, + 'age' => false, + 'tenure' => false, + 'hours_per_pay_cycle' => false, + 'birth_date' => false, + 'compensation_effective_date' => false, + 'compensation_end_date' => false, + 'contract_end_date' => false, + 'employment_status_effective_date' => false, + 'final_dose_administration_date' => false, + 'final_pay_date' => false, + 'hire_date' => false, + 'job_information_effective_date' => false, + 'original_hire_date' => false, + 'probation_end_date' => false, + 'termination_date' => false, 'first_name' => false, 'last_name' => false, 'job_title_name' => false, @@ -176,6 +500,114 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ + 'address_line1' => 'addressLine1', + 'address_line2' => 'addressLine2', + 'allergies' => 'allergies', + 'birthplace' => 'birthplace', + 'citizenship' => 'citizenship', + 'city' => 'city', + 'compensation_change_reason' => 'compensationChangeReason', + 'compensation_comment' => 'compensationComment', + 'country' => 'country', + 'department_name' => 'departmentName', + 'dietary_restrictions' => 'dietaryRestrictions', + 'display_name' => 'displayName', + 'division_name' => 'divisionName', + 'eeo_job_category' => 'eeoJobCategory', + 'eligible_for_rehire' => 'eligibleForRehire', + 'employee_name' => 'employeeName', + 'employee_number' => 'employeeNumber', + 'employment_status_name' => 'employmentStatusName', + 'employment_status_comment' => 'employmentStatusComment', + 'employment_type' => 'employmentType', + 'ethnicity' => 'ethnicity', + 'facebook_url' => 'facebookUrl', + 'first_name_last_name' => 'firstNameLastName', + 'first_name_middle_initial' => 'firstNameMiddleInitial', + 'flsa_code' => 'flsaCode', + 'home_email' => 'homeEmail', + 'home_phone' => 'homePhone', + 'instagram_url' => 'instagramUrl', + 'jacket_size' => 'jacketSize', + 'linkedin_url' => 'linkedinUrl', + 'location_name' => 'locationName', + 'marital_status' => 'maritalStatus', + 'middle_initial' => 'middleInitial', + 'middle_name' => 'middleName', + 'mobile_phone' => 'mobilePhone', + 'national_insurance_category' => 'nationalInsuranceCategory', + 'nationality' => 'nationality', + 'nick_name' => 'nickName', + 'notice_period' => 'noticePeriod', + 'pay_schedule' => 'paySchedule', + 'pinterest_url' => 'pinterestUrl', + 'preferred_name_last_name' => 'preferredNameLastName', + 'pronouns' => 'pronouns', + 'reports_to_name' => 'reportsToName', + 'secondary_language' => 'secondaryLanguage', + 'shirt_size' => 'shirtSize', + 'skype_username' => 'skypeUsername', + 'state' => 'state', + 'termination_reason' => 'terminationReason', + 'termination_regrettable' => 'terminationRegrettable', + 'termination_type' => 'terminationType', + 't_shirt_size' => 'tShirtSize', + 'twitter_url' => 'twitterUrl', + 'vaccination_status' => 'vaccinationStatus', + 'vaccine_received' => 'vaccineReceived', + 'work_email' => 'workEmail', + 'work_phone' => 'workPhone', + 'work_phone_extension' => 'workPhoneExtension', + 'zipcode' => 'zipcode', + 'gender' => 'gender', + 'paid_per' => 'paidPer', + 'pay_type' => 'payType', + 'citizenship_id' => 'citizenshipId', + 'compensation_change_reason_id' => 'compensationChangeReasonId', + 'country_id' => 'countryId', + 'department_id' => 'departmentId', + 'division_id' => 'divisionId', + 'eeo_job_category_id' => 'eeoJobCategoryId', + 'eligible_for_rehire_id' => 'eligibleForRehireId', + 'employment_status_id' => 'employmentStatusId', + 'employment_type_id' => 'employmentTypeId', + 'ethnicity_id' => 'ethnicityId', + 'flsa_code_id' => 'flsaCodeId', + 'jacket_size_id' => 'jacketSizeId', + 'job_title_id' => 'jobTitleId', + 'location_id' => 'locationId', + 'national_insurance_category_id' => 'nationalInsuranceCategoryId', + 'nationality_id' => 'nationalityId', + 'notice_period_id' => 'noticePeriodId', + 'pay_schedule_id' => 'payScheduleId', + 'pronouns_id' => 'pronounsId', + 'reports_to_id' => 'reportsToId', + 'shirt_size_id' => 'shirtSizeId', + 'state_id' => 'stateId', + 'tax_type_id' => 'taxTypeId', + 'termination_reason_id' => 'terminationReasonId', + 'termination_regrettable_id' => 'terminationRegrettableId', + 'termination_type_id' => 'terminationTypeId', + 't_shirt_size_id' => 'tShirtSizeId', + 'vaccination_status_id' => 'vaccinationStatusId', + 'vaccine_received_id' => 'vaccineReceivedId', + 'is_manager' => 'isManager', + 'proof_of_vaccination' => 'proofOfVaccination', + 'age' => 'age', + 'tenure' => 'tenure', + 'hours_per_pay_cycle' => 'hoursPerPayCycle', + 'birth_date' => 'birthDate', + 'compensation_effective_date' => 'compensationEffectiveDate', + 'compensation_end_date' => 'compensationEndDate', + 'contract_end_date' => 'contractEndDate', + 'employment_status_effective_date' => 'employmentStatusEffectiveDate', + 'final_dose_administration_date' => 'finalDoseAdministrationDate', + 'final_pay_date' => 'finalPayDate', + 'hire_date' => 'hireDate', + 'job_information_effective_date' => 'jobInformationEffectiveDate', + 'original_hire_date' => 'originalHireDate', + 'probation_end_date' => 'probationEndDate', + 'termination_date' => 'terminationDate', 'first_name' => 'firstName', 'last_name' => 'lastName', 'job_title_name' => 'jobTitleName', @@ -189,6 +621,114 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ + 'address_line1' => 'setAddressLine1', + 'address_line2' => 'setAddressLine2', + 'allergies' => 'setAllergies', + 'birthplace' => 'setBirthplace', + 'citizenship' => 'setCitizenship', + 'city' => 'setCity', + 'compensation_change_reason' => 'setCompensationChangeReason', + 'compensation_comment' => 'setCompensationComment', + 'country' => 'setCountry', + 'department_name' => 'setDepartmentName', + 'dietary_restrictions' => 'setDietaryRestrictions', + 'display_name' => 'setDisplayName', + 'division_name' => 'setDivisionName', + 'eeo_job_category' => 'setEeoJobCategory', + 'eligible_for_rehire' => 'setEligibleForRehire', + 'employee_name' => 'setEmployeeName', + 'employee_number' => 'setEmployeeNumber', + 'employment_status_name' => 'setEmploymentStatusName', + 'employment_status_comment' => 'setEmploymentStatusComment', + 'employment_type' => 'setEmploymentType', + 'ethnicity' => 'setEthnicity', + 'facebook_url' => 'setFacebookUrl', + 'first_name_last_name' => 'setFirstNameLastName', + 'first_name_middle_initial' => 'setFirstNameMiddleInitial', + 'flsa_code' => 'setFlsaCode', + 'home_email' => 'setHomeEmail', + 'home_phone' => 'setHomePhone', + 'instagram_url' => 'setInstagramUrl', + 'jacket_size' => 'setJacketSize', + 'linkedin_url' => 'setLinkedinUrl', + 'location_name' => 'setLocationName', + 'marital_status' => 'setMaritalStatus', + 'middle_initial' => 'setMiddleInitial', + 'middle_name' => 'setMiddleName', + 'mobile_phone' => 'setMobilePhone', + 'national_insurance_category' => 'setNationalInsuranceCategory', + 'nationality' => 'setNationality', + 'nick_name' => 'setNickName', + 'notice_period' => 'setNoticePeriod', + 'pay_schedule' => 'setPaySchedule', + 'pinterest_url' => 'setPinterestUrl', + 'preferred_name_last_name' => 'setPreferredNameLastName', + 'pronouns' => 'setPronouns', + 'reports_to_name' => 'setReportsToName', + 'secondary_language' => 'setSecondaryLanguage', + 'shirt_size' => 'setShirtSize', + 'skype_username' => 'setSkypeUsername', + 'state' => 'setState', + 'termination_reason' => 'setTerminationReason', + 'termination_regrettable' => 'setTerminationRegrettable', + 'termination_type' => 'setTerminationType', + 't_shirt_size' => 'setTShirtSize', + 'twitter_url' => 'setTwitterUrl', + 'vaccination_status' => 'setVaccinationStatus', + 'vaccine_received' => 'setVaccineReceived', + 'work_email' => 'setWorkEmail', + 'work_phone' => 'setWorkPhone', + 'work_phone_extension' => 'setWorkPhoneExtension', + 'zipcode' => 'setZipcode', + 'gender' => 'setGender', + 'paid_per' => 'setPaidPer', + 'pay_type' => 'setPayType', + 'citizenship_id' => 'setCitizenshipId', + 'compensation_change_reason_id' => 'setCompensationChangeReasonId', + 'country_id' => 'setCountryId', + 'department_id' => 'setDepartmentId', + 'division_id' => 'setDivisionId', + 'eeo_job_category_id' => 'setEeoJobCategoryId', + 'eligible_for_rehire_id' => 'setEligibleForRehireId', + 'employment_status_id' => 'setEmploymentStatusId', + 'employment_type_id' => 'setEmploymentTypeId', + 'ethnicity_id' => 'setEthnicityId', + 'flsa_code_id' => 'setFlsaCodeId', + 'jacket_size_id' => 'setJacketSizeId', + 'job_title_id' => 'setJobTitleId', + 'location_id' => 'setLocationId', + 'national_insurance_category_id' => 'setNationalInsuranceCategoryId', + 'nationality_id' => 'setNationalityId', + 'notice_period_id' => 'setNoticePeriodId', + 'pay_schedule_id' => 'setPayScheduleId', + 'pronouns_id' => 'setPronounsId', + 'reports_to_id' => 'setReportsToId', + 'shirt_size_id' => 'setShirtSizeId', + 'state_id' => 'setStateId', + 'tax_type_id' => 'setTaxTypeId', + 'termination_reason_id' => 'setTerminationReasonId', + 'termination_regrettable_id' => 'setTerminationRegrettableId', + 'termination_type_id' => 'setTerminationTypeId', + 't_shirt_size_id' => 'setTShirtSizeId', + 'vaccination_status_id' => 'setVaccinationStatusId', + 'vaccine_received_id' => 'setVaccineReceivedId', + 'is_manager' => 'setIsManager', + 'proof_of_vaccination' => 'setProofOfVaccination', + 'age' => 'setAge', + 'tenure' => 'setTenure', + 'hours_per_pay_cycle' => 'setHoursPerPayCycle', + 'birth_date' => 'setBirthDate', + 'compensation_effective_date' => 'setCompensationEffectiveDate', + 'compensation_end_date' => 'setCompensationEndDate', + 'contract_end_date' => 'setContractEndDate', + 'employment_status_effective_date' => 'setEmploymentStatusEffectiveDate', + 'final_dose_administration_date' => 'setFinalDoseAdministrationDate', + 'final_pay_date' => 'setFinalPayDate', + 'hire_date' => 'setHireDate', + 'job_information_effective_date' => 'setJobInformationEffectiveDate', + 'original_hire_date' => 'setOriginalHireDate', + 'probation_end_date' => 'setProbationEndDate', + 'termination_date' => 'setTerminationDate', 'first_name' => 'setFirstName', 'last_name' => 'setLastName', 'job_title_name' => 'setJobTitleName', @@ -202,6 +742,114 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ + 'address_line1' => 'getAddressLine1', + 'address_line2' => 'getAddressLine2', + 'allergies' => 'getAllergies', + 'birthplace' => 'getBirthplace', + 'citizenship' => 'getCitizenship', + 'city' => 'getCity', + 'compensation_change_reason' => 'getCompensationChangeReason', + 'compensation_comment' => 'getCompensationComment', + 'country' => 'getCountry', + 'department_name' => 'getDepartmentName', + 'dietary_restrictions' => 'getDietaryRestrictions', + 'display_name' => 'getDisplayName', + 'division_name' => 'getDivisionName', + 'eeo_job_category' => 'getEeoJobCategory', + 'eligible_for_rehire' => 'getEligibleForRehire', + 'employee_name' => 'getEmployeeName', + 'employee_number' => 'getEmployeeNumber', + 'employment_status_name' => 'getEmploymentStatusName', + 'employment_status_comment' => 'getEmploymentStatusComment', + 'employment_type' => 'getEmploymentType', + 'ethnicity' => 'getEthnicity', + 'facebook_url' => 'getFacebookUrl', + 'first_name_last_name' => 'getFirstNameLastName', + 'first_name_middle_initial' => 'getFirstNameMiddleInitial', + 'flsa_code' => 'getFlsaCode', + 'home_email' => 'getHomeEmail', + 'home_phone' => 'getHomePhone', + 'instagram_url' => 'getInstagramUrl', + 'jacket_size' => 'getJacketSize', + 'linkedin_url' => 'getLinkedinUrl', + 'location_name' => 'getLocationName', + 'marital_status' => 'getMaritalStatus', + 'middle_initial' => 'getMiddleInitial', + 'middle_name' => 'getMiddleName', + 'mobile_phone' => 'getMobilePhone', + 'national_insurance_category' => 'getNationalInsuranceCategory', + 'nationality' => 'getNationality', + 'nick_name' => 'getNickName', + 'notice_period' => 'getNoticePeriod', + 'pay_schedule' => 'getPaySchedule', + 'pinterest_url' => 'getPinterestUrl', + 'preferred_name_last_name' => 'getPreferredNameLastName', + 'pronouns' => 'getPronouns', + 'reports_to_name' => 'getReportsToName', + 'secondary_language' => 'getSecondaryLanguage', + 'shirt_size' => 'getShirtSize', + 'skype_username' => 'getSkypeUsername', + 'state' => 'getState', + 'termination_reason' => 'getTerminationReason', + 'termination_regrettable' => 'getTerminationRegrettable', + 'termination_type' => 'getTerminationType', + 't_shirt_size' => 'getTShirtSize', + 'twitter_url' => 'getTwitterUrl', + 'vaccination_status' => 'getVaccinationStatus', + 'vaccine_received' => 'getVaccineReceived', + 'work_email' => 'getWorkEmail', + 'work_phone' => 'getWorkPhone', + 'work_phone_extension' => 'getWorkPhoneExtension', + 'zipcode' => 'getZipcode', + 'gender' => 'getGender', + 'paid_per' => 'getPaidPer', + 'pay_type' => 'getPayType', + 'citizenship_id' => 'getCitizenshipId', + 'compensation_change_reason_id' => 'getCompensationChangeReasonId', + 'country_id' => 'getCountryId', + 'department_id' => 'getDepartmentId', + 'division_id' => 'getDivisionId', + 'eeo_job_category_id' => 'getEeoJobCategoryId', + 'eligible_for_rehire_id' => 'getEligibleForRehireId', + 'employment_status_id' => 'getEmploymentStatusId', + 'employment_type_id' => 'getEmploymentTypeId', + 'ethnicity_id' => 'getEthnicityId', + 'flsa_code_id' => 'getFlsaCodeId', + 'jacket_size_id' => 'getJacketSizeId', + 'job_title_id' => 'getJobTitleId', + 'location_id' => 'getLocationId', + 'national_insurance_category_id' => 'getNationalInsuranceCategoryId', + 'nationality_id' => 'getNationalityId', + 'notice_period_id' => 'getNoticePeriodId', + 'pay_schedule_id' => 'getPayScheduleId', + 'pronouns_id' => 'getPronounsId', + 'reports_to_id' => 'getReportsToId', + 'shirt_size_id' => 'getShirtSizeId', + 'state_id' => 'getStateId', + 'tax_type_id' => 'getTaxTypeId', + 'termination_reason_id' => 'getTerminationReasonId', + 'termination_regrettable_id' => 'getTerminationRegrettableId', + 'termination_type_id' => 'getTerminationTypeId', + 't_shirt_size_id' => 'getTShirtSizeId', + 'vaccination_status_id' => 'getVaccinationStatusId', + 'vaccine_received_id' => 'getVaccineReceivedId', + 'is_manager' => 'getIsManager', + 'proof_of_vaccination' => 'getProofOfVaccination', + 'age' => 'getAge', + 'tenure' => 'getTenure', + 'hours_per_pay_cycle' => 'getHoursPerPayCycle', + 'birth_date' => 'getBirthDate', + 'compensation_effective_date' => 'getCompensationEffectiveDate', + 'compensation_end_date' => 'getCompensationEndDate', + 'contract_end_date' => 'getContractEndDate', + 'employment_status_effective_date' => 'getEmploymentStatusEffectiveDate', + 'final_dose_administration_date' => 'getFinalDoseAdministrationDate', + 'final_pay_date' => 'getFinalPayDate', + 'hire_date' => 'getHireDate', + 'job_information_effective_date' => 'getJobInformationEffectiveDate', + 'original_hire_date' => 'getOriginalHireDate', + 'probation_end_date' => 'getProbationEndDate', + 'termination_date' => 'getTerminationDate', 'first_name' => 'getFirstName', 'last_name' => 'getLastName', 'job_title_name' => 'getJobTitleName', @@ -246,9 +894,65 @@ public function getModelName() { return self::$openApiModelName; } + public const GENDER_MALE = 'Male'; + public const GENDER_FEMALE = 'Female'; + public const GENDER_NON_BINARY = 'Non-Binary'; + public const PAID_PER_DAY = 'Day'; + public const PAID_PER_WEEK = 'Week'; + public const PAID_PER_MONTH = 'Month'; + public const PAID_PER_QUARTER = 'Quarter'; + public const PAID_PER_YEAR = 'Year'; + public const PAID_PER_PAY_PERIOD = 'PayPeriod'; + public const PAID_PER_PIECE = 'Piece'; + public const PAY_TYPE_HOURLY = 'Hourly'; + public const PAY_TYPE_SALARY = 'Salary'; + public const PAY_TYPE_COMMISSION = 'Commission'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGenderAllowableValues() { + return [ + self::GENDER_MALE, + self::GENDER_FEMALE, + self::GENDER_NON_BINARY, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaidPerAllowableValues() { + return [ + self::PAID_PER_DAY, + self::PAID_PER_WEEK, + self::PAID_PER_MONTH, + self::PAID_PER_QUARTER, + self::PAID_PER_YEAR, + self::PAID_PER_PAY_PERIOD, + self::PAID_PER_PIECE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPayTypeAllowableValues() { + return [ + self::PAY_TYPE_HOURLY, + self::PAY_TYPE_SALARY, + self::PAY_TYPE_COMMISSION, + ]; + } + /** * Gets allowable values of the enum * @@ -275,6 +979,114 @@ public function getStatusAllowableValues() { * initializing the model */ public function __construct(?array $data = null) { + $this->setIfExists('address_line1', $data ?? [], null); + $this->setIfExists('address_line2', $data ?? [], null); + $this->setIfExists('allergies', $data ?? [], null); + $this->setIfExists('birthplace', $data ?? [], null); + $this->setIfExists('citizenship', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('compensation_change_reason', $data ?? [], null); + $this->setIfExists('compensation_comment', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('department_name', $data ?? [], null); + $this->setIfExists('dietary_restrictions', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('division_name', $data ?? [], null); + $this->setIfExists('eeo_job_category', $data ?? [], null); + $this->setIfExists('eligible_for_rehire', $data ?? [], null); + $this->setIfExists('employee_name', $data ?? [], null); + $this->setIfExists('employee_number', $data ?? [], null); + $this->setIfExists('employment_status_name', $data ?? [], null); + $this->setIfExists('employment_status_comment', $data ?? [], null); + $this->setIfExists('employment_type', $data ?? [], null); + $this->setIfExists('ethnicity', $data ?? [], null); + $this->setIfExists('facebook_url', $data ?? [], null); + $this->setIfExists('first_name_last_name', $data ?? [], null); + $this->setIfExists('first_name_middle_initial', $data ?? [], null); + $this->setIfExists('flsa_code', $data ?? [], null); + $this->setIfExists('home_email', $data ?? [], null); + $this->setIfExists('home_phone', $data ?? [], null); + $this->setIfExists('instagram_url', $data ?? [], null); + $this->setIfExists('jacket_size', $data ?? [], null); + $this->setIfExists('linkedin_url', $data ?? [], null); + $this->setIfExists('location_name', $data ?? [], null); + $this->setIfExists('marital_status', $data ?? [], null); + $this->setIfExists('middle_initial', $data ?? [], null); + $this->setIfExists('middle_name', $data ?? [], null); + $this->setIfExists('mobile_phone', $data ?? [], null); + $this->setIfExists('national_insurance_category', $data ?? [], null); + $this->setIfExists('nationality', $data ?? [], null); + $this->setIfExists('nick_name', $data ?? [], null); + $this->setIfExists('notice_period', $data ?? [], null); + $this->setIfExists('pay_schedule', $data ?? [], null); + $this->setIfExists('pinterest_url', $data ?? [], null); + $this->setIfExists('preferred_name_last_name', $data ?? [], null); + $this->setIfExists('pronouns', $data ?? [], null); + $this->setIfExists('reports_to_name', $data ?? [], null); + $this->setIfExists('secondary_language', $data ?? [], null); + $this->setIfExists('shirt_size', $data ?? [], null); + $this->setIfExists('skype_username', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('termination_reason', $data ?? [], null); + $this->setIfExists('termination_regrettable', $data ?? [], null); + $this->setIfExists('termination_type', $data ?? [], null); + $this->setIfExists('t_shirt_size', $data ?? [], null); + $this->setIfExists('twitter_url', $data ?? [], null); + $this->setIfExists('vaccination_status', $data ?? [], null); + $this->setIfExists('vaccine_received', $data ?? [], null); + $this->setIfExists('work_email', $data ?? [], null); + $this->setIfExists('work_phone', $data ?? [], null); + $this->setIfExists('work_phone_extension', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('paid_per', $data ?? [], null); + $this->setIfExists('pay_type', $data ?? [], null); + $this->setIfExists('citizenship_id', $data ?? [], null); + $this->setIfExists('compensation_change_reason_id', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('department_id', $data ?? [], null); + $this->setIfExists('division_id', $data ?? [], null); + $this->setIfExists('eeo_job_category_id', $data ?? [], null); + $this->setIfExists('eligible_for_rehire_id', $data ?? [], null); + $this->setIfExists('employment_status_id', $data ?? [], null); + $this->setIfExists('employment_type_id', $data ?? [], null); + $this->setIfExists('ethnicity_id', $data ?? [], null); + $this->setIfExists('flsa_code_id', $data ?? [], null); + $this->setIfExists('jacket_size_id', $data ?? [], null); + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('national_insurance_category_id', $data ?? [], null); + $this->setIfExists('nationality_id', $data ?? [], null); + $this->setIfExists('notice_period_id', $data ?? [], null); + $this->setIfExists('pay_schedule_id', $data ?? [], null); + $this->setIfExists('pronouns_id', $data ?? [], null); + $this->setIfExists('reports_to_id', $data ?? [], null); + $this->setIfExists('shirt_size_id', $data ?? [], null); + $this->setIfExists('state_id', $data ?? [], null); + $this->setIfExists('tax_type_id', $data ?? [], null); + $this->setIfExists('termination_reason_id', $data ?? [], null); + $this->setIfExists('termination_regrettable_id', $data ?? [], null); + $this->setIfExists('termination_type_id', $data ?? [], null); + $this->setIfExists('t_shirt_size_id', $data ?? [], null); + $this->setIfExists('vaccination_status_id', $data ?? [], null); + $this->setIfExists('vaccine_received_id', $data ?? [], null); + $this->setIfExists('is_manager', $data ?? [], null); + $this->setIfExists('proof_of_vaccination', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); + $this->setIfExists('tenure', $data ?? [], null); + $this->setIfExists('hours_per_pay_cycle', $data ?? [], null); + $this->setIfExists('birth_date', $data ?? [], null); + $this->setIfExists('compensation_effective_date', $data ?? [], null); + $this->setIfExists('compensation_end_date', $data ?? [], null); + $this->setIfExists('contract_end_date', $data ?? [], null); + $this->setIfExists('employment_status_effective_date', $data ?? [], null); + $this->setIfExists('final_dose_administration_date', $data ?? [], null); + $this->setIfExists('final_pay_date', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); + $this->setIfExists('job_information_effective_date', $data ?? [], null); + $this->setIfExists('original_hire_date', $data ?? [], null); + $this->setIfExists('probation_end_date', $data ?? [], null); + $this->setIfExists('termination_date', $data ?? [], null); $this->setIfExists('first_name', $data ?? [], null); $this->setIfExists('last_name', $data ?? [], null); $this->setIfExists('job_title_name', $data ?? [], null); @@ -307,6 +1119,33 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getGenderAllowableValues(); + if (!is_null($this->container['gender']) && !in_array($this->container['gender'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'gender', must be one of '%s'", + $this->container['gender'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPaidPerAllowableValues(); + if (!is_null($this->container['paid_per']) && !in_array($this->container['paid_per'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paid_per', must be one of '%s'", + $this->container['paid_per'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPayTypeAllowableValues(); + if (!is_null($this->container['pay_type']) && !in_array($this->container['pay_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'pay_type', must be one of '%s'", + $this->container['pay_type'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getStatusAllowableValues(); if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -329,6 +1168,2736 @@ public function valid() { return count($this->listInvalidProperties()) === 0; } + /** + * Gets address_line1 + * + * @return string|null + */ + public function getAddressLine1() { + return $this->container['address_line1']; + } + + /** + * Sets address_line1 + * + * @param string|null $address_line1 Substring match (case-insensitive). + * + * @return self + */ + public function setAddressLine1($address_line1) { + if (is_null($address_line1)) { + throw new \InvalidArgumentException('non-nullable address_line1 cannot be null'); + } + $this->container['address_line1'] = $address_line1; + + return $this; + } + + /** + * Gets address_line2 + * + * @return string|null + */ + public function getAddressLine2() { + return $this->container['address_line2']; + } + + /** + * Sets address_line2 + * + * @param string|null $address_line2 Substring match (case-insensitive). + * + * @return self + */ + public function setAddressLine2($address_line2) { + if (is_null($address_line2)) { + throw new \InvalidArgumentException('non-nullable address_line2 cannot be null'); + } + $this->container['address_line2'] = $address_line2; + + return $this; + } + + /** + * Gets allergies + * + * @return string|null + */ + public function getAllergies() { + return $this->container['allergies']; + } + + /** + * Sets allergies + * + * @param string|null $allergies Substring match (case-insensitive). + * + * @return self + */ + public function setAllergies($allergies) { + if (is_null($allergies)) { + throw new \InvalidArgumentException('non-nullable allergies cannot be null'); + } + $this->container['allergies'] = $allergies; + + return $this; + } + + /** + * Gets birthplace + * + * @return string|null + */ + public function getBirthplace() { + return $this->container['birthplace']; + } + + /** + * Sets birthplace + * + * @param string|null $birthplace Substring match (case-insensitive). + * + * @return self + */ + public function setBirthplace($birthplace) { + if (is_null($birthplace)) { + throw new \InvalidArgumentException('non-nullable birthplace cannot be null'); + } + $this->container['birthplace'] = $birthplace; + + return $this; + } + + /** + * Gets citizenship + * + * @return string|null + */ + public function getCitizenship() { + return $this->container['citizenship']; + } + + /** + * Sets citizenship + * + * @param string|null $citizenship Substring match (case-insensitive). + * + * @return self + */ + public function setCitizenship($citizenship) { + if (is_null($citizenship)) { + throw new \InvalidArgumentException('non-nullable citizenship cannot be null'); + } + $this->container['citizenship'] = $citizenship; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city Substring match (case-insensitive). + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets compensation_change_reason + * + * @return string|null + */ + public function getCompensationChangeReason() { + return $this->container['compensation_change_reason']; + } + + /** + * Sets compensation_change_reason + * + * @param string|null $compensation_change_reason Substring match (case-insensitive). + * + * @return self + */ + public function setCompensationChangeReason($compensation_change_reason) { + if (is_null($compensation_change_reason)) { + throw new \InvalidArgumentException('non-nullable compensation_change_reason cannot be null'); + } + $this->container['compensation_change_reason'] = $compensation_change_reason; + + return $this; + } + + /** + * Gets compensation_comment + * + * @return string|null + */ + public function getCompensationComment() { + return $this->container['compensation_comment']; + } + + /** + * Sets compensation_comment + * + * @param string|null $compensation_comment Substring match (case-insensitive). + * + * @return self + */ + public function setCompensationComment($compensation_comment) { + if (is_null($compensation_comment)) { + throw new \InvalidArgumentException('non-nullable compensation_comment cannot be null'); + } + $this->container['compensation_comment'] = $compensation_comment; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country Substring match (case-insensitive). + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets department_name + * + * @return string|null + */ + public function getDepartmentName() { + return $this->container['department_name']; + } + + /** + * Sets department_name + * + * @param string|null $department_name Substring match (case-insensitive). + * + * @return self + */ + public function setDepartmentName($department_name) { + if (is_null($department_name)) { + throw new \InvalidArgumentException('non-nullable department_name cannot be null'); + } + $this->container['department_name'] = $department_name; + + return $this; + } + + /** + * Gets dietary_restrictions + * + * @return string|null + */ + public function getDietaryRestrictions() { + return $this->container['dietary_restrictions']; + } + + /** + * Sets dietary_restrictions + * + * @param string|null $dietary_restrictions Substring match (case-insensitive). + * + * @return self + */ + public function setDietaryRestrictions($dietary_restrictions) { + if (is_null($dietary_restrictions)) { + throw new \InvalidArgumentException('non-nullable dietary_restrictions cannot be null'); + } + $this->container['dietary_restrictions'] = $dietary_restrictions; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name Substring match (case-insensitive). + * + * @return self + */ + public function setDisplayName($display_name) { + if (is_null($display_name)) { + throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets division_name + * + * @return string|null + */ + public function getDivisionName() { + return $this->container['division_name']; + } + + /** + * Sets division_name + * + * @param string|null $division_name Substring match (case-insensitive). + * + * @return self + */ + public function setDivisionName($division_name) { + if (is_null($division_name)) { + throw new \InvalidArgumentException('non-nullable division_name cannot be null'); + } + $this->container['division_name'] = $division_name; + + return $this; + } + + /** + * Gets eeo_job_category + * + * @return string|null + */ + public function getEeoJobCategory() { + return $this->container['eeo_job_category']; + } + + /** + * Sets eeo_job_category + * + * @param string|null $eeo_job_category Substring match (case-insensitive). + * + * @return self + */ + public function setEeoJobCategory($eeo_job_category) { + if (is_null($eeo_job_category)) { + throw new \InvalidArgumentException('non-nullable eeo_job_category cannot be null'); + } + $this->container['eeo_job_category'] = $eeo_job_category; + + return $this; + } + + /** + * Gets eligible_for_rehire + * + * @return string|null + */ + public function getEligibleForRehire() { + return $this->container['eligible_for_rehire']; + } + + /** + * Sets eligible_for_rehire + * + * @param string|null $eligible_for_rehire Substring match (case-insensitive). + * + * @return self + */ + public function setEligibleForRehire($eligible_for_rehire) { + if (is_null($eligible_for_rehire)) { + throw new \InvalidArgumentException('non-nullable eligible_for_rehire cannot be null'); + } + $this->container['eligible_for_rehire'] = $eligible_for_rehire; + + return $this; + } + + /** + * Gets employee_name + * + * @return string|null + */ + public function getEmployeeName() { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string|null $employee_name Substring match (case-insensitive). + * + * @return self + */ + public function setEmployeeName($employee_name) { + if (is_null($employee_name)) { + throw new \InvalidArgumentException('non-nullable employee_name cannot be null'); + } + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets employee_number + * + * @return string|null + */ + public function getEmployeeNumber() { + return $this->container['employee_number']; + } + + /** + * Sets employee_number + * + * @param string|null $employee_number Substring match (case-insensitive). + * + * @return self + */ + public function setEmployeeNumber($employee_number) { + if (is_null($employee_number)) { + throw new \InvalidArgumentException('non-nullable employee_number cannot be null'); + } + $this->container['employee_number'] = $employee_number; + + return $this; + } + + /** + * Gets employment_status_name + * + * @return string|null + */ + public function getEmploymentStatusName() { + return $this->container['employment_status_name']; + } + + /** + * Sets employment_status_name + * + * @param string|null $employment_status_name Substring match (case-insensitive). + * + * @return self + */ + public function setEmploymentStatusName($employment_status_name) { + if (is_null($employment_status_name)) { + throw new \InvalidArgumentException('non-nullable employment_status_name cannot be null'); + } + $this->container['employment_status_name'] = $employment_status_name; + + return $this; + } + + /** + * Gets employment_status_comment + * + * @return string|null + */ + public function getEmploymentStatusComment() { + return $this->container['employment_status_comment']; + } + + /** + * Sets employment_status_comment + * + * @param string|null $employment_status_comment Substring match (case-insensitive). + * + * @return self + */ + public function setEmploymentStatusComment($employment_status_comment) { + if (is_null($employment_status_comment)) { + throw new \InvalidArgumentException('non-nullable employment_status_comment cannot be null'); + } + $this->container['employment_status_comment'] = $employment_status_comment; + + return $this; + } + + /** + * Gets employment_type + * + * @return string|null + */ + public function getEmploymentType() { + return $this->container['employment_type']; + } + + /** + * Sets employment_type + * + * @param string|null $employment_type Substring match (case-insensitive). + * + * @return self + */ + public function setEmploymentType($employment_type) { + if (is_null($employment_type)) { + throw new \InvalidArgumentException('non-nullable employment_type cannot be null'); + } + $this->container['employment_type'] = $employment_type; + + return $this; + } + + /** + * Gets ethnicity + * + * @return string|null + */ + public function getEthnicity() { + return $this->container['ethnicity']; + } + + /** + * Sets ethnicity + * + * @param string|null $ethnicity Substring match (case-insensitive). + * + * @return self + */ + public function setEthnicity($ethnicity) { + if (is_null($ethnicity)) { + throw new \InvalidArgumentException('non-nullable ethnicity cannot be null'); + } + $this->container['ethnicity'] = $ethnicity; + + return $this; + } + + /** + * Gets facebook_url + * + * @return string|null + */ + public function getFacebookUrl() { + return $this->container['facebook_url']; + } + + /** + * Sets facebook_url + * + * @param string|null $facebook_url Substring match (case-insensitive). + * + * @return self + */ + public function setFacebookUrl($facebook_url) { + if (is_null($facebook_url)) { + throw new \InvalidArgumentException('non-nullable facebook_url cannot be null'); + } + $this->container['facebook_url'] = $facebook_url; + + return $this; + } + + /** + * Gets first_name_last_name + * + * @return string|null + */ + public function getFirstNameLastName() { + return $this->container['first_name_last_name']; + } + + /** + * Sets first_name_last_name + * + * @param string|null $first_name_last_name Substring match (case-insensitive). + * + * @return self + */ + public function setFirstNameLastName($first_name_last_name) { + if (is_null($first_name_last_name)) { + throw new \InvalidArgumentException('non-nullable first_name_last_name cannot be null'); + } + $this->container['first_name_last_name'] = $first_name_last_name; + + return $this; + } + + /** + * Gets first_name_middle_initial + * + * @return string|null + */ + public function getFirstNameMiddleInitial() { + return $this->container['first_name_middle_initial']; + } + + /** + * Sets first_name_middle_initial + * + * @param string|null $first_name_middle_initial Substring match (case-insensitive). + * + * @return self + */ + public function setFirstNameMiddleInitial($first_name_middle_initial) { + if (is_null($first_name_middle_initial)) { + throw new \InvalidArgumentException('non-nullable first_name_middle_initial cannot be null'); + } + $this->container['first_name_middle_initial'] = $first_name_middle_initial; + + return $this; + } + + /** + * Gets flsa_code + * + * @return string|null + */ + public function getFlsaCode() { + return $this->container['flsa_code']; + } + + /** + * Sets flsa_code + * + * @param string|null $flsa_code Substring match (case-insensitive). + * + * @return self + */ + public function setFlsaCode($flsa_code) { + if (is_null($flsa_code)) { + throw new \InvalidArgumentException('non-nullable flsa_code cannot be null'); + } + $this->container['flsa_code'] = $flsa_code; + + return $this; + } + + /** + * Gets home_email + * + * @return string|null + */ + public function getHomeEmail() { + return $this->container['home_email']; + } + + /** + * Sets home_email + * + * @param string|null $home_email Substring match (case-insensitive). + * + * @return self + */ + public function setHomeEmail($home_email) { + if (is_null($home_email)) { + throw new \InvalidArgumentException('non-nullable home_email cannot be null'); + } + $this->container['home_email'] = $home_email; + + return $this; + } + + /** + * Gets home_phone + * + * @return string|null + */ + public function getHomePhone() { + return $this->container['home_phone']; + } + + /** + * Sets home_phone + * + * @param string|null $home_phone Substring match (case-insensitive). + * + * @return self + */ + public function setHomePhone($home_phone) { + if (is_null($home_phone)) { + throw new \InvalidArgumentException('non-nullable home_phone cannot be null'); + } + $this->container['home_phone'] = $home_phone; + + return $this; + } + + /** + * Gets instagram_url + * + * @return string|null + */ + public function getInstagramUrl() { + return $this->container['instagram_url']; + } + + /** + * Sets instagram_url + * + * @param string|null $instagram_url Substring match (case-insensitive). + * + * @return self + */ + public function setInstagramUrl($instagram_url) { + if (is_null($instagram_url)) { + throw new \InvalidArgumentException('non-nullable instagram_url cannot be null'); + } + $this->container['instagram_url'] = $instagram_url; + + return $this; + } + + /** + * Gets jacket_size + * + * @return string|null + */ + public function getJacketSize() { + return $this->container['jacket_size']; + } + + /** + * Sets jacket_size + * + * @param string|null $jacket_size Substring match (case-insensitive). + * + * @return self + */ + public function setJacketSize($jacket_size) { + if (is_null($jacket_size)) { + throw new \InvalidArgumentException('non-nullable jacket_size cannot be null'); + } + $this->container['jacket_size'] = $jacket_size; + + return $this; + } + + /** + * Gets linkedin_url + * + * @return string|null + */ + public function getLinkedinUrl() { + return $this->container['linkedin_url']; + } + + /** + * Sets linkedin_url + * + * @param string|null $linkedin_url Substring match (case-insensitive). + * + * @return self + */ + public function setLinkedinUrl($linkedin_url) { + if (is_null($linkedin_url)) { + throw new \InvalidArgumentException('non-nullable linkedin_url cannot be null'); + } + $this->container['linkedin_url'] = $linkedin_url; + + return $this; + } + + /** + * Gets location_name + * + * @return string|null + */ + public function getLocationName() { + return $this->container['location_name']; + } + + /** + * Sets location_name + * + * @param string|null $location_name Substring match (case-insensitive). + * + * @return self + */ + public function setLocationName($location_name) { + if (is_null($location_name)) { + throw new \InvalidArgumentException('non-nullable location_name cannot be null'); + } + $this->container['location_name'] = $location_name; + + return $this; + } + + /** + * Gets marital_status + * + * @return string|null + */ + public function getMaritalStatus() { + return $this->container['marital_status']; + } + + /** + * Sets marital_status + * + * @param string|null $marital_status Substring match (case-insensitive). + * + * @return self + */ + public function setMaritalStatus($marital_status) { + if (is_null($marital_status)) { + throw new \InvalidArgumentException('non-nullable marital_status cannot be null'); + } + $this->container['marital_status'] = $marital_status; + + return $this; + } + + /** + * Gets middle_initial + * + * @return string|null + */ + public function getMiddleInitial() { + return $this->container['middle_initial']; + } + + /** + * Sets middle_initial + * + * @param string|null $middle_initial Substring match (case-insensitive). + * + * @return self + */ + public function setMiddleInitial($middle_initial) { + if (is_null($middle_initial)) { + throw new \InvalidArgumentException('non-nullable middle_initial cannot be null'); + } + $this->container['middle_initial'] = $middle_initial; + + return $this; + } + + /** + * Gets middle_name + * + * @return string|null + */ + public function getMiddleName() { + return $this->container['middle_name']; + } + + /** + * Sets middle_name + * + * @param string|null $middle_name Substring match (case-insensitive). + * + * @return self + */ + public function setMiddleName($middle_name) { + if (is_null($middle_name)) { + throw new \InvalidArgumentException('non-nullable middle_name cannot be null'); + } + $this->container['middle_name'] = $middle_name; + + return $this; + } + + /** + * Gets mobile_phone + * + * @return string|null + */ + public function getMobilePhone() { + return $this->container['mobile_phone']; + } + + /** + * Sets mobile_phone + * + * @param string|null $mobile_phone Substring match (case-insensitive). + * + * @return self + */ + public function setMobilePhone($mobile_phone) { + if (is_null($mobile_phone)) { + throw new \InvalidArgumentException('non-nullable mobile_phone cannot be null'); + } + $this->container['mobile_phone'] = $mobile_phone; + + return $this; + } + + /** + * Gets national_insurance_category + * + * @return string|null + */ + public function getNationalInsuranceCategory() { + return $this->container['national_insurance_category']; + } + + /** + * Sets national_insurance_category + * + * @param string|null $national_insurance_category Substring match (case-insensitive). + * + * @return self + */ + public function setNationalInsuranceCategory($national_insurance_category) { + if (is_null($national_insurance_category)) { + throw new \InvalidArgumentException('non-nullable national_insurance_category cannot be null'); + } + $this->container['national_insurance_category'] = $national_insurance_category; + + return $this; + } + + /** + * Gets nationality + * + * @return string|null + */ + public function getNationality() { + return $this->container['nationality']; + } + + /** + * Sets nationality + * + * @param string|null $nationality Substring match (case-insensitive). + * + * @return self + */ + public function setNationality($nationality) { + if (is_null($nationality)) { + throw new \InvalidArgumentException('non-nullable nationality cannot be null'); + } + $this->container['nationality'] = $nationality; + + return $this; + } + + /** + * Gets nick_name + * + * @return string|null + */ + public function getNickName() { + return $this->container['nick_name']; + } + + /** + * Sets nick_name + * + * @param string|null $nick_name Substring match (case-insensitive). + * + * @return self + */ + public function setNickName($nick_name) { + if (is_null($nick_name)) { + throw new \InvalidArgumentException('non-nullable nick_name cannot be null'); + } + $this->container['nick_name'] = $nick_name; + + return $this; + } + + /** + * Gets notice_period + * + * @return string|null + */ + public function getNoticePeriod() { + return $this->container['notice_period']; + } + + /** + * Sets notice_period + * + * @param string|null $notice_period Substring match (case-insensitive). + * + * @return self + */ + public function setNoticePeriod($notice_period) { + if (is_null($notice_period)) { + throw new \InvalidArgumentException('non-nullable notice_period cannot be null'); + } + $this->container['notice_period'] = $notice_period; + + return $this; + } + + /** + * Gets pay_schedule + * + * @return string|null + */ + public function getPaySchedule() { + return $this->container['pay_schedule']; + } + + /** + * Sets pay_schedule + * + * @param string|null $pay_schedule Substring match (case-insensitive). + * + * @return self + */ + public function setPaySchedule($pay_schedule) { + if (is_null($pay_schedule)) { + throw new \InvalidArgumentException('non-nullable pay_schedule cannot be null'); + } + $this->container['pay_schedule'] = $pay_schedule; + + return $this; + } + + /** + * Gets pinterest_url + * + * @return string|null + */ + public function getPinterestUrl() { + return $this->container['pinterest_url']; + } + + /** + * Sets pinterest_url + * + * @param string|null $pinterest_url Substring match (case-insensitive). + * + * @return self + */ + public function setPinterestUrl($pinterest_url) { + if (is_null($pinterest_url)) { + throw new \InvalidArgumentException('non-nullable pinterest_url cannot be null'); + } + $this->container['pinterest_url'] = $pinterest_url; + + return $this; + } + + /** + * Gets preferred_name_last_name + * + * @return string|null + */ + public function getPreferredNameLastName() { + return $this->container['preferred_name_last_name']; + } + + /** + * Sets preferred_name_last_name + * + * @param string|null $preferred_name_last_name Substring match (case-insensitive). + * + * @return self + */ + public function setPreferredNameLastName($preferred_name_last_name) { + if (is_null($preferred_name_last_name)) { + throw new \InvalidArgumentException('non-nullable preferred_name_last_name cannot be null'); + } + $this->container['preferred_name_last_name'] = $preferred_name_last_name; + + return $this; + } + + /** + * Gets pronouns + * + * @return string|null + */ + public function getPronouns() { + return $this->container['pronouns']; + } + + /** + * Sets pronouns + * + * @param string|null $pronouns Substring match (case-insensitive). + * + * @return self + */ + public function setPronouns($pronouns) { + if (is_null($pronouns)) { + throw new \InvalidArgumentException('non-nullable pronouns cannot be null'); + } + $this->container['pronouns'] = $pronouns; + + return $this; + } + + /** + * Gets reports_to_name + * + * @return string|null + */ + public function getReportsToName() { + return $this->container['reports_to_name']; + } + + /** + * Sets reports_to_name + * + * @param string|null $reports_to_name Substring match (case-insensitive). + * + * @return self + */ + public function setReportsToName($reports_to_name) { + if (is_null($reports_to_name)) { + throw new \InvalidArgumentException('non-nullable reports_to_name cannot be null'); + } + $this->container['reports_to_name'] = $reports_to_name; + + return $this; + } + + /** + * Gets secondary_language + * + * @return string|null + */ + public function getSecondaryLanguage() { + return $this->container['secondary_language']; + } + + /** + * Sets secondary_language + * + * @param string|null $secondary_language Substring match (case-insensitive). + * + * @return self + */ + public function setSecondaryLanguage($secondary_language) { + if (is_null($secondary_language)) { + throw new \InvalidArgumentException('non-nullable secondary_language cannot be null'); + } + $this->container['secondary_language'] = $secondary_language; + + return $this; + } + + /** + * Gets shirt_size + * + * @return string|null + */ + public function getShirtSize() { + return $this->container['shirt_size']; + } + + /** + * Sets shirt_size + * + * @param string|null $shirt_size Substring match (case-insensitive). + * + * @return self + */ + public function setShirtSize($shirt_size) { + if (is_null($shirt_size)) { + throw new \InvalidArgumentException('non-nullable shirt_size cannot be null'); + } + $this->container['shirt_size'] = $shirt_size; + + return $this; + } + + /** + * Gets skype_username + * + * @return string|null + */ + public function getSkypeUsername() { + return $this->container['skype_username']; + } + + /** + * Sets skype_username + * + * @param string|null $skype_username Substring match (case-insensitive). + * + * @return self + */ + public function setSkypeUsername($skype_username) { + if (is_null($skype_username)) { + throw new \InvalidArgumentException('non-nullable skype_username cannot be null'); + } + $this->container['skype_username'] = $skype_username; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state Substring match (case-insensitive). + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets termination_reason + * + * @return string|null + */ + public function getTerminationReason() { + return $this->container['termination_reason']; + } + + /** + * Sets termination_reason + * + * @param string|null $termination_reason Substring match (case-insensitive). + * + * @return self + */ + public function setTerminationReason($termination_reason) { + if (is_null($termination_reason)) { + throw new \InvalidArgumentException('non-nullable termination_reason cannot be null'); + } + $this->container['termination_reason'] = $termination_reason; + + return $this; + } + + /** + * Gets termination_regrettable + * + * @return string|null + */ + public function getTerminationRegrettable() { + return $this->container['termination_regrettable']; + } + + /** + * Sets termination_regrettable + * + * @param string|null $termination_regrettable Substring match (case-insensitive). + * + * @return self + */ + public function setTerminationRegrettable($termination_regrettable) { + if (is_null($termination_regrettable)) { + throw new \InvalidArgumentException('non-nullable termination_regrettable cannot be null'); + } + $this->container['termination_regrettable'] = $termination_regrettable; + + return $this; + } + + /** + * Gets termination_type + * + * @return string|null + */ + public function getTerminationType() { + return $this->container['termination_type']; + } + + /** + * Sets termination_type + * + * @param string|null $termination_type Substring match (case-insensitive). + * + * @return self + */ + public function setTerminationType($termination_type) { + if (is_null($termination_type)) { + throw new \InvalidArgumentException('non-nullable termination_type cannot be null'); + } + $this->container['termination_type'] = $termination_type; + + return $this; + } + + /** + * Gets t_shirt_size + * + * @return string|null + */ + public function getTShirtSize() { + return $this->container['t_shirt_size']; + } + + /** + * Sets t_shirt_size + * + * @param string|null $t_shirt_size Substring match (case-insensitive). + * + * @return self + */ + public function setTShirtSize($t_shirt_size) { + if (is_null($t_shirt_size)) { + throw new \InvalidArgumentException('non-nullable t_shirt_size cannot be null'); + } + $this->container['t_shirt_size'] = $t_shirt_size; + + return $this; + } + + /** + * Gets twitter_url + * + * @return string|null + */ + public function getTwitterUrl() { + return $this->container['twitter_url']; + } + + /** + * Sets twitter_url + * + * @param string|null $twitter_url Substring match (case-insensitive). + * + * @return self + */ + public function setTwitterUrl($twitter_url) { + if (is_null($twitter_url)) { + throw new \InvalidArgumentException('non-nullable twitter_url cannot be null'); + } + $this->container['twitter_url'] = $twitter_url; + + return $this; + } + + /** + * Gets vaccination_status + * + * @return string|null + */ + public function getVaccinationStatus() { + return $this->container['vaccination_status']; + } + + /** + * Sets vaccination_status + * + * @param string|null $vaccination_status Substring match (case-insensitive). + * + * @return self + */ + public function setVaccinationStatus($vaccination_status) { + if (is_null($vaccination_status)) { + throw new \InvalidArgumentException('non-nullable vaccination_status cannot be null'); + } + $this->container['vaccination_status'] = $vaccination_status; + + return $this; + } + + /** + * Gets vaccine_received + * + * @return string|null + */ + public function getVaccineReceived() { + return $this->container['vaccine_received']; + } + + /** + * Sets vaccine_received + * + * @param string|null $vaccine_received Substring match (case-insensitive). + * + * @return self + */ + public function setVaccineReceived($vaccine_received) { + if (is_null($vaccine_received)) { + throw new \InvalidArgumentException('non-nullable vaccine_received cannot be null'); + } + $this->container['vaccine_received'] = $vaccine_received; + + return $this; + } + + /** + * Gets work_email + * + * @return string|null + */ + public function getWorkEmail() { + return $this->container['work_email']; + } + + /** + * Sets work_email + * + * @param string|null $work_email Substring match (case-insensitive). + * + * @return self + */ + public function setWorkEmail($work_email) { + if (is_null($work_email)) { + throw new \InvalidArgumentException('non-nullable work_email cannot be null'); + } + $this->container['work_email'] = $work_email; + + return $this; + } + + /** + * Gets work_phone + * + * @return string|null + */ + public function getWorkPhone() { + return $this->container['work_phone']; + } + + /** + * Sets work_phone + * + * @param string|null $work_phone Substring match (case-insensitive). + * + * @return self + */ + public function setWorkPhone($work_phone) { + if (is_null($work_phone)) { + throw new \InvalidArgumentException('non-nullable work_phone cannot be null'); + } + $this->container['work_phone'] = $work_phone; + + return $this; + } + + /** + * Gets work_phone_extension + * + * @return string|null + */ + public function getWorkPhoneExtension() { + return $this->container['work_phone_extension']; + } + + /** + * Sets work_phone_extension + * + * @param string|null $work_phone_extension Substring match (case-insensitive). + * + * @return self + */ + public function setWorkPhoneExtension($work_phone_extension) { + if (is_null($work_phone_extension)) { + throw new \InvalidArgumentException('non-nullable work_phone_extension cannot be null'); + } + $this->container['work_phone_extension'] = $work_phone_extension; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode Substring match (case-insensitive). + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + throw new \InvalidArgumentException('non-nullable zipcode cannot be null'); + } + $this->container['zipcode'] = $zipcode; + + return $this; + } + + /** + * Gets gender + * + * @return string|null + */ + public function getGender() { + return $this->container['gender']; + } + + /** + * Sets gender + * + * @param string|null $gender Exact match. + * + * @return self + */ + public function setGender($gender) { + if (is_null($gender)) { + throw new \InvalidArgumentException('non-nullable gender cannot be null'); + } + $allowedValues = $this->getGenderAllowableValues(); + if (!in_array($gender, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'gender', must be one of '%s'", + $gender, + implode("', '", $allowedValues) + ) + ); + } + $this->container['gender'] = $gender; + + return $this; + } + + /** + * Gets paid_per + * + * @return string|null + */ + public function getPaidPer() { + return $this->container['paid_per']; + } + + /** + * Sets paid_per + * + * @param string|null $paid_per Exact match. + * + * @return self + */ + public function setPaidPer($paid_per) { + if (is_null($paid_per)) { + throw new \InvalidArgumentException('non-nullable paid_per cannot be null'); + } + $allowedValues = $this->getPaidPerAllowableValues(); + if (!in_array($paid_per, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paid_per', must be one of '%s'", + $paid_per, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paid_per'] = $paid_per; + + return $this; + } + + /** + * Gets pay_type + * + * @return string|null + */ + public function getPayType() { + return $this->container['pay_type']; + } + + /** + * Sets pay_type + * + * @param string|null $pay_type Exact match. + * + * @return self + */ + public function setPayType($pay_type) { + if (is_null($pay_type)) { + throw new \InvalidArgumentException('non-nullable pay_type cannot be null'); + } + $allowedValues = $this->getPayTypeAllowableValues(); + if (!in_array($pay_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'pay_type', must be one of '%s'", + $pay_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['pay_type'] = $pay_type; + + return $this; + } + + /** + * Gets citizenship_id + * + * @return int|null + */ + public function getCitizenshipId() { + return $this->container['citizenship_id']; + } + + /** + * Sets citizenship_id + * + * @param int|null $citizenship_id Exact match against an integer ID. + * + * @return self + */ + public function setCitizenshipId($citizenship_id) { + if (is_null($citizenship_id)) { + throw new \InvalidArgumentException('non-nullable citizenship_id cannot be null'); + } + $this->container['citizenship_id'] = $citizenship_id; + + return $this; + } + + /** + * Gets compensation_change_reason_id + * + * @return int|null + */ + public function getCompensationChangeReasonId() { + return $this->container['compensation_change_reason_id']; + } + + /** + * Sets compensation_change_reason_id + * + * @param int|null $compensation_change_reason_id Exact match against an integer ID. + * + * @return self + */ + public function setCompensationChangeReasonId($compensation_change_reason_id) { + if (is_null($compensation_change_reason_id)) { + throw new \InvalidArgumentException('non-nullable compensation_change_reason_id cannot be null'); + } + $this->container['compensation_change_reason_id'] = $compensation_change_reason_id; + + return $this; + } + + /** + * Gets country_id + * + * @return int|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param int|null $country_id Exact match against an integer ID. + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + throw new \InvalidArgumentException('non-nullable country_id cannot be null'); + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets department_id + * + * @return int|null + */ + public function getDepartmentId() { + return $this->container['department_id']; + } + + /** + * Sets department_id + * + * @param int|null $department_id Exact match against an integer ID. + * + * @return self + */ + public function setDepartmentId($department_id) { + if (is_null($department_id)) { + throw new \InvalidArgumentException('non-nullable department_id cannot be null'); + } + $this->container['department_id'] = $department_id; + + return $this; + } + + /** + * Gets division_id + * + * @return int|null + */ + public function getDivisionId() { + return $this->container['division_id']; + } + + /** + * Sets division_id + * + * @param int|null $division_id Exact match against an integer ID. + * + * @return self + */ + public function setDivisionId($division_id) { + if (is_null($division_id)) { + throw new \InvalidArgumentException('non-nullable division_id cannot be null'); + } + $this->container['division_id'] = $division_id; + + return $this; + } + + /** + * Gets eeo_job_category_id + * + * @return int|null + */ + public function getEeoJobCategoryId() { + return $this->container['eeo_job_category_id']; + } + + /** + * Sets eeo_job_category_id + * + * @param int|null $eeo_job_category_id Exact match against an integer ID. + * + * @return self + */ + public function setEeoJobCategoryId($eeo_job_category_id) { + if (is_null($eeo_job_category_id)) { + throw new \InvalidArgumentException('non-nullable eeo_job_category_id cannot be null'); + } + $this->container['eeo_job_category_id'] = $eeo_job_category_id; + + return $this; + } + + /** + * Gets eligible_for_rehire_id + * + * @return int|null + */ + public function getEligibleForRehireId() { + return $this->container['eligible_for_rehire_id']; + } + + /** + * Sets eligible_for_rehire_id + * + * @param int|null $eligible_for_rehire_id Exact match against an integer ID. + * + * @return self + */ + public function setEligibleForRehireId($eligible_for_rehire_id) { + if (is_null($eligible_for_rehire_id)) { + throw new \InvalidArgumentException('non-nullable eligible_for_rehire_id cannot be null'); + } + $this->container['eligible_for_rehire_id'] = $eligible_for_rehire_id; + + return $this; + } + + /** + * Gets employment_status_id + * + * @return int|null + */ + public function getEmploymentStatusId() { + return $this->container['employment_status_id']; + } + + /** + * Sets employment_status_id + * + * @param int|null $employment_status_id Exact match against an integer ID. + * + * @return self + */ + public function setEmploymentStatusId($employment_status_id) { + if (is_null($employment_status_id)) { + throw new \InvalidArgumentException('non-nullable employment_status_id cannot be null'); + } + $this->container['employment_status_id'] = $employment_status_id; + + return $this; + } + + /** + * Gets employment_type_id + * + * @return int|null + */ + public function getEmploymentTypeId() { + return $this->container['employment_type_id']; + } + + /** + * Sets employment_type_id + * + * @param int|null $employment_type_id Exact match against an integer ID. + * + * @return self + */ + public function setEmploymentTypeId($employment_type_id) { + if (is_null($employment_type_id)) { + throw new \InvalidArgumentException('non-nullable employment_type_id cannot be null'); + } + $this->container['employment_type_id'] = $employment_type_id; + + return $this; + } + + /** + * Gets ethnicity_id + * + * @return int|null + */ + public function getEthnicityId() { + return $this->container['ethnicity_id']; + } + + /** + * Sets ethnicity_id + * + * @param int|null $ethnicity_id Exact match against an integer ID. + * + * @return self + */ + public function setEthnicityId($ethnicity_id) { + if (is_null($ethnicity_id)) { + throw new \InvalidArgumentException('non-nullable ethnicity_id cannot be null'); + } + $this->container['ethnicity_id'] = $ethnicity_id; + + return $this; + } + + /** + * Gets flsa_code_id + * + * @return int|null + */ + public function getFlsaCodeId() { + return $this->container['flsa_code_id']; + } + + /** + * Sets flsa_code_id + * + * @param int|null $flsa_code_id Exact match against an integer ID. + * + * @return self + */ + public function setFlsaCodeId($flsa_code_id) { + if (is_null($flsa_code_id)) { + throw new \InvalidArgumentException('non-nullable flsa_code_id cannot be null'); + } + $this->container['flsa_code_id'] = $flsa_code_id; + + return $this; + } + + /** + * Gets jacket_size_id + * + * @return int|null + */ + public function getJacketSizeId() { + return $this->container['jacket_size_id']; + } + + /** + * Sets jacket_size_id + * + * @param int|null $jacket_size_id Exact match against an integer ID. + * + * @return self + */ + public function setJacketSizeId($jacket_size_id) { + if (is_null($jacket_size_id)) { + throw new \InvalidArgumentException('non-nullable jacket_size_id cannot be null'); + } + $this->container['jacket_size_id'] = $jacket_size_id; + + return $this; + } + + /** + * Gets job_title_id + * + * @return int|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param int|null $job_title_id Exact match against an integer ID. + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + throw new \InvalidArgumentException('non-nullable job_title_id cannot be null'); + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets location_id + * + * @return int|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int|null $location_id Exact match against an integer ID. + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + throw new \InvalidArgumentException('non-nullable location_id cannot be null'); + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets national_insurance_category_id + * + * @return int|null + */ + public function getNationalInsuranceCategoryId() { + return $this->container['national_insurance_category_id']; + } + + /** + * Sets national_insurance_category_id + * + * @param int|null $national_insurance_category_id Exact match against an integer ID. + * + * @return self + */ + public function setNationalInsuranceCategoryId($national_insurance_category_id) { + if (is_null($national_insurance_category_id)) { + throw new \InvalidArgumentException('non-nullable national_insurance_category_id cannot be null'); + } + $this->container['national_insurance_category_id'] = $national_insurance_category_id; + + return $this; + } + + /** + * Gets nationality_id + * + * @return int|null + */ + public function getNationalityId() { + return $this->container['nationality_id']; + } + + /** + * Sets nationality_id + * + * @param int|null $nationality_id Exact match against an integer ID. + * + * @return self + */ + public function setNationalityId($nationality_id) { + if (is_null($nationality_id)) { + throw new \InvalidArgumentException('non-nullable nationality_id cannot be null'); + } + $this->container['nationality_id'] = $nationality_id; + + return $this; + } + + /** + * Gets notice_period_id + * + * @return int|null + */ + public function getNoticePeriodId() { + return $this->container['notice_period_id']; + } + + /** + * Sets notice_period_id + * + * @param int|null $notice_period_id Exact match against an integer ID. + * + * @return self + */ + public function setNoticePeriodId($notice_period_id) { + if (is_null($notice_period_id)) { + throw new \InvalidArgumentException('non-nullable notice_period_id cannot be null'); + } + $this->container['notice_period_id'] = $notice_period_id; + + return $this; + } + + /** + * Gets pay_schedule_id + * + * @return int|null + */ + public function getPayScheduleId() { + return $this->container['pay_schedule_id']; + } + + /** + * Sets pay_schedule_id + * + * @param int|null $pay_schedule_id Exact match against an integer ID. + * + * @return self + */ + public function setPayScheduleId($pay_schedule_id) { + if (is_null($pay_schedule_id)) { + throw new \InvalidArgumentException('non-nullable pay_schedule_id cannot be null'); + } + $this->container['pay_schedule_id'] = $pay_schedule_id; + + return $this; + } + + /** + * Gets pronouns_id + * + * @return int|null + */ + public function getPronounsId() { + return $this->container['pronouns_id']; + } + + /** + * Sets pronouns_id + * + * @param int|null $pronouns_id Exact match against an integer ID. + * + * @return self + */ + public function setPronounsId($pronouns_id) { + if (is_null($pronouns_id)) { + throw new \InvalidArgumentException('non-nullable pronouns_id cannot be null'); + } + $this->container['pronouns_id'] = $pronouns_id; + + return $this; + } + + /** + * Gets reports_to_id + * + * @return int|null + */ + public function getReportsToId() { + return $this->container['reports_to_id']; + } + + /** + * Sets reports_to_id + * + * @param int|null $reports_to_id Exact match against an integer ID. + * + * @return self + */ + public function setReportsToId($reports_to_id) { + if (is_null($reports_to_id)) { + throw new \InvalidArgumentException('non-nullable reports_to_id cannot be null'); + } + $this->container['reports_to_id'] = $reports_to_id; + + return $this; + } + + /** + * Gets shirt_size_id + * + * @return int|null + */ + public function getShirtSizeId() { + return $this->container['shirt_size_id']; + } + + /** + * Sets shirt_size_id + * + * @param int|null $shirt_size_id Exact match against an integer ID. + * + * @return self + */ + public function setShirtSizeId($shirt_size_id) { + if (is_null($shirt_size_id)) { + throw new \InvalidArgumentException('non-nullable shirt_size_id cannot be null'); + } + $this->container['shirt_size_id'] = $shirt_size_id; + + return $this; + } + + /** + * Gets state_id + * + * @return int|null + */ + public function getStateId() { + return $this->container['state_id']; + } + + /** + * Sets state_id + * + * @param int|null $state_id Exact match against an integer ID. + * + * @return self + */ + public function setStateId($state_id) { + if (is_null($state_id)) { + throw new \InvalidArgumentException('non-nullable state_id cannot be null'); + } + $this->container['state_id'] = $state_id; + + return $this; + } + + /** + * Gets tax_type_id + * + * @return int|null + */ + public function getTaxTypeId() { + return $this->container['tax_type_id']; + } + + /** + * Sets tax_type_id + * + * @param int|null $tax_type_id Exact match against an integer ID. + * + * @return self + */ + public function setTaxTypeId($tax_type_id) { + if (is_null($tax_type_id)) { + throw new \InvalidArgumentException('non-nullable tax_type_id cannot be null'); + } + $this->container['tax_type_id'] = $tax_type_id; + + return $this; + } + + /** + * Gets termination_reason_id + * + * @return int|null + */ + public function getTerminationReasonId() { + return $this->container['termination_reason_id']; + } + + /** + * Sets termination_reason_id + * + * @param int|null $termination_reason_id Exact match against an integer ID. + * + * @return self + */ + public function setTerminationReasonId($termination_reason_id) { + if (is_null($termination_reason_id)) { + throw new \InvalidArgumentException('non-nullable termination_reason_id cannot be null'); + } + $this->container['termination_reason_id'] = $termination_reason_id; + + return $this; + } + + /** + * Gets termination_regrettable_id + * + * @return int|null + */ + public function getTerminationRegrettableId() { + return $this->container['termination_regrettable_id']; + } + + /** + * Sets termination_regrettable_id + * + * @param int|null $termination_regrettable_id Exact match against an integer ID. + * + * @return self + */ + public function setTerminationRegrettableId($termination_regrettable_id) { + if (is_null($termination_regrettable_id)) { + throw new \InvalidArgumentException('non-nullable termination_regrettable_id cannot be null'); + } + $this->container['termination_regrettable_id'] = $termination_regrettable_id; + + return $this; + } + + /** + * Gets termination_type_id + * + * @return int|null + */ + public function getTerminationTypeId() { + return $this->container['termination_type_id']; + } + + /** + * Sets termination_type_id + * + * @param int|null $termination_type_id Exact match against an integer ID. + * + * @return self + */ + public function setTerminationTypeId($termination_type_id) { + if (is_null($termination_type_id)) { + throw new \InvalidArgumentException('non-nullable termination_type_id cannot be null'); + } + $this->container['termination_type_id'] = $termination_type_id; + + return $this; + } + + /** + * Gets t_shirt_size_id + * + * @return int|null + */ + public function getTShirtSizeId() { + return $this->container['t_shirt_size_id']; + } + + /** + * Sets t_shirt_size_id + * + * @param int|null $t_shirt_size_id Exact match against an integer ID. + * + * @return self + */ + public function setTShirtSizeId($t_shirt_size_id) { + if (is_null($t_shirt_size_id)) { + throw new \InvalidArgumentException('non-nullable t_shirt_size_id cannot be null'); + } + $this->container['t_shirt_size_id'] = $t_shirt_size_id; + + return $this; + } + + /** + * Gets vaccination_status_id + * + * @return int|null + */ + public function getVaccinationStatusId() { + return $this->container['vaccination_status_id']; + } + + /** + * Sets vaccination_status_id + * + * @param int|null $vaccination_status_id Exact match against an integer ID. + * + * @return self + */ + public function setVaccinationStatusId($vaccination_status_id) { + if (is_null($vaccination_status_id)) { + throw new \InvalidArgumentException('non-nullable vaccination_status_id cannot be null'); + } + $this->container['vaccination_status_id'] = $vaccination_status_id; + + return $this; + } + + /** + * Gets vaccine_received_id + * + * @return int|null + */ + public function getVaccineReceivedId() { + return $this->container['vaccine_received_id']; + } + + /** + * Sets vaccine_received_id + * + * @param int|null $vaccine_received_id Exact match against an integer ID. + * + * @return self + */ + public function setVaccineReceivedId($vaccine_received_id) { + if (is_null($vaccine_received_id)) { + throw new \InvalidArgumentException('non-nullable vaccine_received_id cannot be null'); + } + $this->container['vaccine_received_id'] = $vaccine_received_id; + + return $this; + } + + /** + * Gets is_manager + * + * @return bool|null + */ + public function getIsManager() { + return $this->container['is_manager']; + } + + /** + * Sets is_manager + * + * @param bool|null $is_manager Exact match (true/false). + * + * @return self + */ + public function setIsManager($is_manager) { + if (is_null($is_manager)) { + throw new \InvalidArgumentException('non-nullable is_manager cannot be null'); + } + $this->container['is_manager'] = $is_manager; + + return $this; + } + + /** + * Gets proof_of_vaccination + * + * @return bool|null + */ + public function getProofOfVaccination() { + return $this->container['proof_of_vaccination']; + } + + /** + * Sets proof_of_vaccination + * + * @param bool|null $proof_of_vaccination Exact match (true/false). + * + * @return self + */ + public function setProofOfVaccination($proof_of_vaccination) { + if (is_null($proof_of_vaccination)) { + throw new \InvalidArgumentException('non-nullable proof_of_vaccination cannot be null'); + } + $this->container['proof_of_vaccination'] = $proof_of_vaccination; + + return $this; + } + + /** + * Gets age + * + * @return float|null + */ + public function getAge() { + return $this->container['age']; + } + + /** + * Sets age + * + * @param float|null $age Exact numeric match. + * + * @return self + */ + public function setAge($age) { + if (is_null($age)) { + throw new \InvalidArgumentException('non-nullable age cannot be null'); + } + $this->container['age'] = $age; + + return $this; + } + + /** + * Gets tenure + * + * @return float|null + */ + public function getTenure() { + return $this->container['tenure']; + } + + /** + * Sets tenure + * + * @param float|null $tenure Exact numeric match. + * + * @return self + */ + public function setTenure($tenure) { + if (is_null($tenure)) { + throw new \InvalidArgumentException('non-nullable tenure cannot be null'); + } + $this->container['tenure'] = $tenure; + + return $this; + } + + /** + * Gets hours_per_pay_cycle + * + * @return float|null + */ + public function getHoursPerPayCycle() { + return $this->container['hours_per_pay_cycle']; + } + + /** + * Sets hours_per_pay_cycle + * + * @param float|null $hours_per_pay_cycle Exact numeric match. + * + * @return self + */ + public function setHoursPerPayCycle($hours_per_pay_cycle) { + if (is_null($hours_per_pay_cycle)) { + throw new \InvalidArgumentException('non-nullable hours_per_pay_cycle cannot be null'); + } + $this->container['hours_per_pay_cycle'] = $hours_per_pay_cycle; + + return $this; + } + + /** + * Gets birth_date + * + * @return \DateTime|null + */ + public function getBirthDate() { + return $this->container['birth_date']; + } + + /** + * Sets birth_date + * + * @param \DateTime|null $birth_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setBirthDate($birth_date) { + if (is_null($birth_date)) { + throw new \InvalidArgumentException('non-nullable birth_date cannot be null'); + } + $this->container['birth_date'] = $birth_date; + + return $this; + } + + /** + * Gets compensation_effective_date + * + * @return \DateTime|null + */ + public function getCompensationEffectiveDate() { + return $this->container['compensation_effective_date']; + } + + /** + * Sets compensation_effective_date + * + * @param \DateTime|null $compensation_effective_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setCompensationEffectiveDate($compensation_effective_date) { + if (is_null($compensation_effective_date)) { + throw new \InvalidArgumentException('non-nullable compensation_effective_date cannot be null'); + } + $this->container['compensation_effective_date'] = $compensation_effective_date; + + return $this; + } + + /** + * Gets compensation_end_date + * + * @return \DateTime|null + */ + public function getCompensationEndDate() { + return $this->container['compensation_end_date']; + } + + /** + * Sets compensation_end_date + * + * @param \DateTime|null $compensation_end_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setCompensationEndDate($compensation_end_date) { + if (is_null($compensation_end_date)) { + throw new \InvalidArgumentException('non-nullable compensation_end_date cannot be null'); + } + $this->container['compensation_end_date'] = $compensation_end_date; + + return $this; + } + + /** + * Gets contract_end_date + * + * @return \DateTime|null + */ + public function getContractEndDate() { + return $this->container['contract_end_date']; + } + + /** + * Sets contract_end_date + * + * @param \DateTime|null $contract_end_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setContractEndDate($contract_end_date) { + if (is_null($contract_end_date)) { + throw new \InvalidArgumentException('non-nullable contract_end_date cannot be null'); + } + $this->container['contract_end_date'] = $contract_end_date; + + return $this; + } + + /** + * Gets employment_status_effective_date + * + * @return \DateTime|null + */ + public function getEmploymentStatusEffectiveDate() { + return $this->container['employment_status_effective_date']; + } + + /** + * Sets employment_status_effective_date + * + * @param \DateTime|null $employment_status_effective_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setEmploymentStatusEffectiveDate($employment_status_effective_date) { + if (is_null($employment_status_effective_date)) { + throw new \InvalidArgumentException('non-nullable employment_status_effective_date cannot be null'); + } + $this->container['employment_status_effective_date'] = $employment_status_effective_date; + + return $this; + } + + /** + * Gets final_dose_administration_date + * + * @return \DateTime|null + */ + public function getFinalDoseAdministrationDate() { + return $this->container['final_dose_administration_date']; + } + + /** + * Sets final_dose_administration_date + * + * @param \DateTime|null $final_dose_administration_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setFinalDoseAdministrationDate($final_dose_administration_date) { + if (is_null($final_dose_administration_date)) { + throw new \InvalidArgumentException('non-nullable final_dose_administration_date cannot be null'); + } + $this->container['final_dose_administration_date'] = $final_dose_administration_date; + + return $this; + } + + /** + * Gets final_pay_date + * + * @return \DateTime|null + */ + public function getFinalPayDate() { + return $this->container['final_pay_date']; + } + + /** + * Sets final_pay_date + * + * @param \DateTime|null $final_pay_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setFinalPayDate($final_pay_date) { + if (is_null($final_pay_date)) { + throw new \InvalidArgumentException('non-nullable final_pay_date cannot be null'); + } + $this->container['final_pay_date'] = $final_pay_date; + + return $this; + } + + /** + * Gets hire_date + * + * @return \DateTime|null + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param \DateTime|null $hire_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + throw new \InvalidArgumentException('non-nullable hire_date cannot be null'); + } + $this->container['hire_date'] = $hire_date; + + return $this; + } + + /** + * Gets job_information_effective_date + * + * @return \DateTime|null + */ + public function getJobInformationEffectiveDate() { + return $this->container['job_information_effective_date']; + } + + /** + * Sets job_information_effective_date + * + * @param \DateTime|null $job_information_effective_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setJobInformationEffectiveDate($job_information_effective_date) { + if (is_null($job_information_effective_date)) { + throw new \InvalidArgumentException('non-nullable job_information_effective_date cannot be null'); + } + $this->container['job_information_effective_date'] = $job_information_effective_date; + + return $this; + } + + /** + * Gets original_hire_date + * + * @return \DateTime|null + */ + public function getOriginalHireDate() { + return $this->container['original_hire_date']; + } + + /** + * Sets original_hire_date + * + * @param \DateTime|null $original_hire_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setOriginalHireDate($original_hire_date) { + if (is_null($original_hire_date)) { + throw new \InvalidArgumentException('non-nullable original_hire_date cannot be null'); + } + $this->container['original_hire_date'] = $original_hire_date; + + return $this; + } + + /** + * Gets probation_end_date + * + * @return \DateTime|null + */ + public function getProbationEndDate() { + return $this->container['probation_end_date']; + } + + /** + * Sets probation_end_date + * + * @param \DateTime|null $probation_end_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setProbationEndDate($probation_end_date) { + if (is_null($probation_end_date)) { + throw new \InvalidArgumentException('non-nullable probation_end_date cannot be null'); + } + $this->container['probation_end_date'] = $probation_end_date; + + return $this; + } + + /** + * Gets termination_date + * + * @return \DateTime|null + */ + public function getTerminationDate() { + return $this->container['termination_date']; + } + + /** + * Sets termination_date + * + * @param \DateTime|null $termination_date Exact match against an ISO 8601 date (YYYY-MM-DD). + * + * @return self + */ + public function setTerminationDate($termination_date) { + if (is_null($termination_date)) { + throw new \InvalidArgumentException('non-nullable termination_date cannot be null'); + } + $this->container['termination_date'] = $termination_date; + + return $this; + } + /** * Gets first_name * @@ -451,7 +4020,7 @@ public function getIds() { /** * Sets ids * - * @param int[]|null $ids List of employee IDs for batch fetch. Accepts repeated keys (filter[ids][]=123&filter[ids][]=124) or a single comma-separated string (filter[ids]=123,124). + * @param int[]|null $ids List of employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`). * * @return self */ diff --git a/lib/Model/GetEmployeesResponseObject.php b/lib/Model/GetEmployeesResponseObject.php index d36914dd..e3359f0d 100644 --- a/lib/Model/GetEmployeesResponseObject.php +++ b/lib/Model/GetEmployeesResponseObject.php @@ -60,7 +60,7 @@ class GetEmployeesResponseObject implements ModelInterface, ArrayAccess, \JsonSe protected static $openApiTypes = [ 'data' => '\BhrSdk\Model\GetEmployeesEmployeeResponse[]', 'meta' => '\BhrSdk\Model\CursorPagedResponseMetadata', - 'links' => '\BhrSdk\Model\GetEmployeesResponseObjectLinks' + '_links' => '\BhrSdk\Model\GetEmployeesResponseObjectLinks' ]; /** @@ -73,7 +73,7 @@ class GetEmployeesResponseObject implements ModelInterface, ArrayAccess, \JsonSe protected static $openApiFormats = [ 'data' => null, 'meta' => null, - 'links' => null + '_links' => null ]; /** @@ -85,7 +85,7 @@ class GetEmployeesResponseObject implements ModelInterface, ArrayAccess, \JsonSe protected static array $openApiNullables = [ 'data' => false, 'meta' => false, - 'links' => false + '_links' => false ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'data' => 'data', 'meta' => 'meta', - 'links' => 'links' + '_links' => '_links' ]; /** @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'data' => 'setData', 'meta' => 'setMeta', - 'links' => 'setLinks' + '_links' => 'setLinks' ]; /** @@ -194,7 +194,7 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'data' => 'getData', 'meta' => 'getMeta', - 'links' => 'getLinks' + '_links' => 'getLinks' ]; /** @@ -250,7 +250,7 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('data', $data ?? [], null); $this->setIfExists('meta', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); } /** @@ -284,8 +284,8 @@ public function listInvalidProperties() { if ($this->container['meta'] === null) { $invalidProperties[] = "'meta' can't be null"; } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' can't be null"; } return $invalidProperties; } @@ -351,26 +351,26 @@ public function setMeta($meta) { } /** - * Gets links + * Gets _links * * @return \BhrSdk\Model\GetEmployeesResponseObjectLinks */ public function getLinks() { - return $this->container['links']; + return $this->container['_links']; } /** - * Sets links + * Sets _links * - * @param \BhrSdk\Model\GetEmployeesResponseObjectLinks $links links + * @param \BhrSdk\Model\GetEmployeesResponseObjectLinks $_links _links * * @return self */ - public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); } - $this->container['links'] = $links; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/GetEmployeesResponseObjectLinks.php b/lib/Model/GetEmployeesResponseObjectLinks.php index 943c7021..0502d145 100644 --- a/lib/Model/GetEmployeesResponseObjectLinks.php +++ b/lib/Model/GetEmployeesResponseObjectLinks.php @@ -50,7 +50,7 @@ class GetEmployeesResponseObjectLinks implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openApiModelName = 'GetEmployeesResponseObject_links'; + protected static $openApiModelName = 'GetEmployeesResponseObject__links'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,9 +58,9 @@ class GetEmployeesResponseObjectLinks implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openApiTypes = [ - 'self' => 'string', - 'next' => 'string', - 'prev' => 'string' + 'self' => '\BhrSdk\Model\GetEmployeesResponseObjectLinksSelf', + 'next' => '\BhrSdk\Model\GetEmployeesResponseObjectLinksNext', + 'prev' => '\BhrSdk\Model\GetEmployeesResponseObjectLinksPrev' ]; /** @@ -294,7 +294,7 @@ public function valid() { /** * Gets self * - * @return string|null + * @return \BhrSdk\Model\GetEmployeesResponseObjectLinksSelf|null */ public function getSelf() { return $this->container['self']; @@ -303,7 +303,7 @@ public function getSelf() { /** * Sets self * - * @param string|null $self Link to current page + * @param \BhrSdk\Model\GetEmployeesResponseObjectLinksSelf|null $self self * * @return self */ @@ -319,7 +319,7 @@ public function setSelf($self) { /** * Gets next * - * @return string|null + * @return \BhrSdk\Model\GetEmployeesResponseObjectLinksNext|null */ public function getNext() { return $this->container['next']; @@ -328,7 +328,7 @@ public function getNext() { /** * Sets next * - * @param string|null $next Link to next page + * @param \BhrSdk\Model\GetEmployeesResponseObjectLinksNext|null $next next * * @return self */ @@ -344,7 +344,7 @@ public function setNext($next) { /** * Gets prev * - * @return string|null + * @return \BhrSdk\Model\GetEmployeesResponseObjectLinksPrev|null */ public function getPrev() { return $this->container['prev']; @@ -353,7 +353,7 @@ public function getPrev() { /** * Sets prev * - * @param string|null $prev Link to previous page + * @param \BhrSdk\Model\GetEmployeesResponseObjectLinksPrev|null $prev prev * * @return self */ diff --git a/lib/Model/GetEmployeesResponseObjectLinksNext.php b/lib/Model/GetEmployeesResponseObjectLinksNext.php new file mode 100644 index 00000000..a93e1041 --- /dev/null +++ b/lib/Model/GetEmployeesResponseObjectLinksNext.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesResponseObjectLinksNext + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesResponseObjectLinksNext Class Doc Comment + * + * @category Class + * @description Link to next page + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesResponseObjectLinksNext implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesResponseObject__links_next'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URL of the next page + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesResponseObjectLinksPrev.php b/lib/Model/GetEmployeesResponseObjectLinksPrev.php new file mode 100644 index 00000000..c29b0ff7 --- /dev/null +++ b/lib/Model/GetEmployeesResponseObjectLinksPrev.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesResponseObjectLinksPrev + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesResponseObjectLinksPrev Class Doc Comment + * + * @category Class + * @description Link to previous page + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesResponseObjectLinksPrev implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesResponseObject__links_prev'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URL of the previous page + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetEmployeesResponseObjectLinksSelf.php b/lib/Model/GetEmployeesResponseObjectLinksSelf.php new file mode 100644 index 00000000..514561f6 --- /dev/null +++ b/lib/Model/GetEmployeesResponseObjectLinksSelf.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * GetEmployeesResponseObjectLinksSelf + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GetEmployeesResponseObjectLinksSelf Class Doc Comment + * + * @category Class + * @description Link to current page + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GetEmployeesResponseObjectLinksSelf implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GetEmployeesResponseObject__links_self'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URL of the current page + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GoalAggregateCommentsInner.php b/lib/Model/GoalAggregateCommentsInner.php index d5043214..2ea84b19 100644 --- a/lib/Model/GoalAggregateCommentsInner.php +++ b/lib/Model/GoalAggregateCommentsInner.php @@ -57,7 +57,7 @@ class GoalAggregateCommentsInner implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openApiTypes = [ - 'id' => 'int', + 'id' => 'string', 'author_user_id' => 'int', 'created_at' => 'string', 'text' => 'string', @@ -314,7 +314,7 @@ public function valid() { /** * Gets id * - * @return int|null + * @return string|null */ public function getId() { return $this->container['id']; @@ -323,7 +323,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Id of the comment. + * @param string|null $id Id of the comment. * * @return self */ @@ -373,7 +373,7 @@ public function getCreatedAt() { /** * Sets created_at * - * @param string|null $created_at The date and time that the comment was created. + * @param string|null $created_at ISO 8601 UTC timestamp when the comment was created. * * @return self */ diff --git a/lib/Model/GoalCommentResponse.php b/lib/Model/GoalCommentResponse.php new file mode 100644 index 00000000..ec8799d7 --- /dev/null +++ b/lib/Model/GoalCommentResponse.php @@ -0,0 +1,548 @@ +<?php +declare(strict_types=1); +/** + * GoalCommentResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GoalCommentResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GoalCommentResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GoalCommentResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'author_user_id' => 'int', + 'created_at' => 'string', + 'text' => 'string', + 'can_edit' => 'bool', + 'can_delete' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'author_user_id' => null, + 'created_at' => null, + 'text' => null, + 'can_edit' => null, + 'can_delete' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'author_user_id' => false, + 'created_at' => false, + 'text' => false, + 'can_edit' => false, + 'can_delete' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'author_user_id' => 'authorUserId', + 'created_at' => 'createdAt', + 'text' => 'text', + 'can_edit' => 'canEdit', + 'can_delete' => 'canDelete' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'author_user_id' => 'setAuthorUserId', + 'created_at' => 'setCreatedAt', + 'text' => 'setText', + 'can_edit' => 'setCanEdit', + 'can_delete' => 'setCanDelete' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'author_user_id' => 'getAuthorUserId', + 'created_at' => 'getCreatedAt', + 'text' => 'getText', + 'can_edit' => 'getCanEdit', + 'can_delete' => 'getCanDelete' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('author_user_id', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('can_edit', $data ?? [], null); + $this->setIfExists('can_delete', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The comment ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets author_user_id + * + * @return int|null + */ + public function getAuthorUserId() { + return $this->container['author_user_id']; + } + + /** + * Sets author_user_id + * + * @param int|null $author_user_id The user ID of the comment author. + * + * @return self + */ + public function setAuthorUserId($author_user_id) { + if (is_null($author_user_id)) { + throw new \InvalidArgumentException('non-nullable author_user_id cannot be null'); + } + $this->container['author_user_id'] = $author_user_id; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at ISO 8601 UTC timestamp when the comment was created. + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText() { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The text content of the comment. + * + * @return self + */ + public function setText($text) { + if (is_null($text)) { + throw new \InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets can_edit + * + * @return bool|null + */ + public function getCanEdit() { + return $this->container['can_edit']; + } + + /** + * Sets can_edit + * + * @param bool|null $can_edit Whether the API user can edit this comment. + * + * @return self + */ + public function setCanEdit($can_edit) { + if (is_null($can_edit)) { + throw new \InvalidArgumentException('non-nullable can_edit cannot be null'); + } + $this->container['can_edit'] = $can_edit; + + return $this; + } + + /** + * Gets can_delete + * + * @return bool|null + */ + public function getCanDelete() { + return $this->container['can_delete']; + } + + /** + * Sets can_delete + * + * @param bool|null $can_delete Whether the API user can delete this comment. + * + * @return self + */ + public function setCanDelete($can_delete) { + if (is_null($can_delete)) { + throw new \InvalidArgumentException('non-nullable can_delete cannot be null'); + } + $this->container['can_delete'] = $can_delete; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GoalCommentsResponse.php b/lib/Model/GoalCommentsResponse.php new file mode 100644 index 00000000..07a38999 --- /dev/null +++ b/lib/Model/GoalCommentsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * GoalCommentsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GoalCommentsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GoalCommentsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GoalCommentsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'comments' => '\BhrSdk\Model\GoalCommentsResponseCommentsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'comments' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'comments' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'comments' => 'comments' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'comments' => 'setComments' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'comments' => 'getComments' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('comments', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets comments + * + * @return \BhrSdk\Model\GoalCommentsResponseCommentsInner[]|null + */ + public function getComments() { + return $this->container['comments']; + } + + /** + * Sets comments + * + * @param \BhrSdk\Model\GoalCommentsResponseCommentsInner[]|null $comments Array of comment objects for the goal. + * + * @return self + */ + public function setComments($comments) { + if (is_null($comments)) { + throw new \InvalidArgumentException('non-nullable comments cannot be null'); + } + $this->container['comments'] = $comments; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GoalCommentsResponseCommentsInner.php b/lib/Model/GoalCommentsResponseCommentsInner.php new file mode 100644 index 00000000..a59b1a7b --- /dev/null +++ b/lib/Model/GoalCommentsResponseCommentsInner.php @@ -0,0 +1,548 @@ +<?php +declare(strict_types=1); +/** + * GoalCommentsResponseCommentsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GoalCommentsResponseCommentsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GoalCommentsResponseCommentsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GoalCommentsResponse_comments_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'author_user_id' => 'int', + 'created_at' => 'string', + 'text' => 'string', + 'can_edit' => 'bool', + 'can_delete' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'author_user_id' => null, + 'created_at' => null, + 'text' => null, + 'can_edit' => null, + 'can_delete' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'author_user_id' => false, + 'created_at' => false, + 'text' => false, + 'can_edit' => false, + 'can_delete' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'author_user_id' => 'authorUserId', + 'created_at' => 'createdAt', + 'text' => 'text', + 'can_edit' => 'canEdit', + 'can_delete' => 'canDelete' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'author_user_id' => 'setAuthorUserId', + 'created_at' => 'setCreatedAt', + 'text' => 'setText', + 'can_edit' => 'setCanEdit', + 'can_delete' => 'setCanDelete' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'author_user_id' => 'getAuthorUserId', + 'created_at' => 'getCreatedAt', + 'text' => 'getText', + 'can_edit' => 'getCanEdit', + 'can_delete' => 'getCanDelete' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('author_user_id', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('can_edit', $data ?? [], null); + $this->setIfExists('can_delete', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The comment ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets author_user_id + * + * @return int|null + */ + public function getAuthorUserId() { + return $this->container['author_user_id']; + } + + /** + * Sets author_user_id + * + * @param int|null $author_user_id The user ID of the comment author. + * + * @return self + */ + public function setAuthorUserId($author_user_id) { + if (is_null($author_user_id)) { + throw new \InvalidArgumentException('non-nullable author_user_id cannot be null'); + } + $this->container['author_user_id'] = $author_user_id; + + return $this; + } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at ISO 8601 UTC timestamp when the comment was created. + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText() { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The text content of the comment. + * + * @return self + */ + public function setText($text) { + if (is_null($text)) { + throw new \InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets can_edit + * + * @return bool|null + */ + public function getCanEdit() { + return $this->container['can_edit']; + } + + /** + * Sets can_edit + * + * @param bool|null $can_edit Whether the API user can edit this comment. + * + * @return self + */ + public function setCanEdit($can_edit) { + if (is_null($can_edit)) { + throw new \InvalidArgumentException('non-nullable can_edit cannot be null'); + } + $this->container['can_edit'] = $can_edit; + + return $this; + } + + /** + * Gets can_delete + * + * @return bool|null + */ + public function getCanDelete() { + return $this->container['can_delete']; + } + + /** + * Sets can_delete + * + * @param bool|null $can_delete Whether the API user can delete this comment. + * + * @return self + */ + public function setCanDelete($can_delete) { + if (is_null($can_delete)) { + throw new \InvalidArgumentException('non-nullable can_delete cannot be null'); + } + $this->container['can_delete'] = $can_delete; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GoalFiltersV11FiltersInner.php b/lib/Model/GoalFiltersV11FiltersInner.php index f84ff2cb..aad209a4 100644 --- a/lib/Model/GoalFiltersV11FiltersInner.php +++ b/lib/Model/GoalFiltersV11FiltersInner.php @@ -239,7 +239,7 @@ public function getModelName() { return self::$openApiModelName; } - public const ID_STATUS_IN_PROGRESS = 'status-in_progress'; + public const ID_STATUS_IN_PROGRESS = 'status-inProgress'; public const ID_STATUS_COMPLETED = 'status-completed'; public const ID_STATUS_CLOSED = 'status-closed'; public const NAME_IN_PROGRESS = 'In Progress'; diff --git a/lib/Model/GoalFiltersV1FiltersInner.php b/lib/Model/GoalFiltersV1FiltersInner.php index cd3bd553..dc71ceed 100644 --- a/lib/Model/GoalFiltersV1FiltersInner.php +++ b/lib/Model/GoalFiltersV1FiltersInner.php @@ -233,7 +233,7 @@ public function getModelName() { return self::$openApiModelName; } - public const ID_STATUS_IN_PROGRESS = 'status-in_progress'; + public const ID_STATUS_IN_PROGRESS = 'status-inProgress'; public const ID_STATUS_COMPLETED = 'status-completed'; public const NAME_IN_PROGRESS = 'In Progress'; public const NAME_COMPLETED = 'Completed'; diff --git a/lib/Model/GoalResponse.php b/lib/Model/GoalResponse.php new file mode 100644 index 00000000..8b05058a --- /dev/null +++ b/lib/Model/GoalResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * GoalResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * GoalResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class GoalResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'GoalResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'goal' => '\BhrSdk\Model\TransformedApiGoal' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'goal' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'goal' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'goal' => 'goal' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'goal' => 'setGoal' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'goal' => 'getGoal' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('goal', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets goal + * + * @return \BhrSdk\Model\TransformedApiGoal|null + */ + public function getGoal() { + return $this->container['goal']; + } + + /** + * Sets goal + * + * @param \BhrSdk\Model\TransformedApiGoal|null $goal goal + * + * @return self + */ + public function setGoal($goal) { + if (is_null($goal)) { + throw new \InvalidArgumentException('non-nullable goal cannot be null'); + } + $this->container['goal'] = $goal; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GoalsAggregateV12CommentsInner.php b/lib/Model/GoalsAggregateV12CommentsInner.php index 13ba2534..3b9a407a 100644 --- a/lib/Model/GoalsAggregateV12CommentsInner.php +++ b/lib/Model/GoalsAggregateV12CommentsInner.php @@ -57,7 +57,7 @@ class GoalsAggregateV12CommentsInner implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openApiTypes = [ - 'goal_id' => 'int', + 'goal_id' => 'string', 'comment_count' => 'int' ]; @@ -286,7 +286,7 @@ public function valid() { /** * Gets goal_id * - * @return int|null + * @return string|null */ public function getGoalId() { return $this->container['goal_id']; @@ -295,7 +295,7 @@ public function getGoalId() { /** * Sets goal_id * - * @param int|null $goal_id The goalId that the comments are linked to. + * @param string|null $goal_id The goalId that the comments are linked to. * * @return self */ diff --git a/lib/Model/HiringLead.php b/lib/Model/HiringLead.php index c212b90c..d48df372 100644 --- a/lib/Model/HiringLead.php +++ b/lib/Model/HiringLead.php @@ -295,7 +295,7 @@ public function getEmployeeId() { /** * Sets employee_id * - * @param int|null $employee_id The employeeId of the potential hiring lead + * @param int|null $employee_id The employee ID to use as the `hiringLead` value in the Create Job Opening request * * @return self */ @@ -320,7 +320,7 @@ public function getPreferredFullName() { /** * Sets preferred_full_name * - * @param string|null $preferred_full_name The preferred full name of the potential hiring lead + * @param string|null $preferred_full_name The employee's preferred full name * * @return self */ diff --git a/lib/Model/ImportCompensationBenchmarksResponse.php b/lib/Model/ImportCompensationBenchmarksResponse.php new file mode 100644 index 00000000..0325e035 --- /dev/null +++ b/lib/Model/ImportCompensationBenchmarksResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * ImportCompensationBenchmarksResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ImportCompensationBenchmarksResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ImportCompensationBenchmarksResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ImportCompensationBenchmarksResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'upload_data' => 'string[][]', + 'column_map' => '\BhrSdk\Model\CompensationBenchmarkingColumnMap[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'upload_data' => null, + 'column_map' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'upload_data' => false, + 'column_map' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'upload_data' => 'uploadData', + 'column_map' => 'columnMap' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'upload_data' => 'setUploadData', + 'column_map' => 'setColumnMap' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'upload_data' => 'getUploadData', + 'column_map' => 'getColumnMap' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('upload_data', $data ?? [], null); + $this->setIfExists('column_map', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets upload_data + * + * @return string[][]|null + */ + public function getUploadData() { + return $this->container['upload_data']; + } + + /** + * Sets upload_data + * + * @param string[][]|null $upload_data Parsed CSV rows. Each row is an array of cell values as strings. + * + * @return self + */ + public function setUploadData($upload_data) { + if (is_null($upload_data)) { + throw new \InvalidArgumentException('non-nullable upload_data cannot be null'); + } + $this->container['upload_data'] = $upload_data; + + return $this; + } + + /** + * Gets column_map + * + * @return \BhrSdk\Model\CompensationBenchmarkingColumnMap[]|null + */ + public function getColumnMap() { + return $this->container['column_map']; + } + + /** + * Sets column_map + * + * @param \BhrSdk\Model\CompensationBenchmarkingColumnMap[]|null $column_map Suggested mapping between expected benchmark fields and CSV column headers. + * + * @return self + */ + public function setColumnMap($column_map) { + if (is_null($column_map)) { + throw new \InvalidArgumentException('non-nullable column_map cannot be null'); + } + $this->container['column_map'] = $column_map; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingRecordSchemaProjectTask.php b/lib/Model/Industry.php similarity index 96% rename from lib/Model/TimeTrackingRecordSchemaProjectTask.php rename to lib/Model/Industry.php index 6d310529..fb81a779 100644 --- a/lib/Model/TimeTrackingRecordSchemaProjectTask.php +++ b/lib/Model/Industry.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TimeTrackingRecordSchemaProjectTask + * Industry * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TimeTrackingRecordSchemaProjectTask Class Doc Comment + * Industry Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TimeTrackingRecordSchemaProjectTask implements ModelInterface, ArrayAccess, \JsonSerializable { +class Industry implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TimeTrackingRecordSchemaProjectTask implements ModelInterface, ArrayAccess * * @var string */ - protected static $openApiModelName = 'TimeTrackingRecordSchema_project_task'; + protected static $openApiModelName = 'Industry'; /** * Array of property to type mappings. Used for (de)serialization @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param int|null $id id + * @param int|null $id Industry ID * * @return self */ @@ -320,7 +320,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name Industry name * * @return self */ diff --git a/lib/Model/InlineObjectInner.php b/lib/Model/InlineObjectInner.php new file mode 100644 index 00000000..95560247 --- /dev/null +++ b/lib/Model/InlineObjectInner.php @@ -0,0 +1,540 @@ +<?php +declare(strict_types=1); +/** + * InlineObjectInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * InlineObjectInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class InlineObjectInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'inline_object_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'type' => 'string', + 'name' => 'string', + 'carrier_name' => 'string', + 'syncing_capabilities' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'type' => null, + 'name' => null, + 'carrier_name' => null, + 'syncing_capabilities' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'type' => false, + 'name' => false, + 'carrier_name' => false, + 'syncing_capabilities' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'name' => 'name', + 'carrier_name' => 'carrierName', + 'syncing_capabilities' => 'syncingCapabilities' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'name' => 'setName', + 'carrier_name' => 'setCarrierName', + 'syncing_capabilities' => 'setSyncingCapabilities' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'name' => 'getName', + 'carrier_name' => 'getCarrierName', + 'syncing_capabilities' => 'getSyncingCapabilities' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SYNCING_CAPABILITIES_IDEON = 'ideon'; + public const SYNCING_CAPABILITIES_NOYO = 'noyo'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSyncingCapabilitiesAllowableValues() { + return [ + self::SYNCING_CAPABILITIES_IDEON, + self::SYNCING_CAPABILITIES_NOYO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('carrier_name', $data ?? [], null); + $this->setIfExists('syncing_capabilities', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Plan ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Plan category + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Plan name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets carrier_name + * + * @return string|null + */ + public function getCarrierName() { + return $this->container['carrier_name']; + } + + /** + * Sets carrier_name + * + * @param string|null $carrier_name Carrier name + * + * @return self + */ + public function setCarrierName($carrier_name) { + if (is_null($carrier_name)) { + throw new \InvalidArgumentException('non-nullable carrier_name cannot be null'); + } + $this->container['carrier_name'] = $carrier_name; + + return $this; + } + + /** + * Gets syncing_capabilities + * + * @return string[]|null + */ + public function getSyncingCapabilities() { + return $this->container['syncing_capabilities']; + } + + /** + * Sets syncing_capabilities + * + * @param string[]|null $syncing_capabilities Which integration the plan is capable of being synced with + * + * @return self + */ + public function setSyncingCapabilities($syncing_capabilities) { + if (is_null($syncing_capabilities)) { + throw new \InvalidArgumentException('non-nullable syncing_capabilities cannot be null'); + } + $allowedValues = $this->getSyncingCapabilitiesAllowableValues(); + if (array_diff($syncing_capabilities, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'syncing_capabilities', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['syncing_capabilities'] = $syncing_capabilities; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TransformedApiGoalGoal.php b/lib/Model/JobSummary.php similarity index 57% rename from lib/Model/TransformedApiGoalGoal.php rename to lib/Model/JobSummary.php index e0a50076..5677dffa 100644 --- a/lib/Model/TransformedApiGoalGoal.php +++ b/lib/Model/JobSummary.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TransformedApiGoalGoal + * JobSummary * * PHP version 8.1 * @@ -33,16 +33,15 @@ use \BhrSdk\ObjectSerializer; /** - * TransformedApiGoalGoal Class Doc Comment + * JobSummary Class Doc Comment * * @category Class - * @description An individual goal * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TransformedApiGoalGoal implements ModelInterface, ArrayAccess, \JsonSerializable { +class JobSummary implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +49,7 @@ class TransformedApiGoalGoal implements ModelInterface, ArrayAccess, \JsonSerial * * @var string */ - protected static $openApiModelName = 'TransformedApiGoal_goal'; + protected static $openApiModelName = 'JobSummary'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,17 +57,17 @@ class TransformedApiGoalGoal implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openApiTypes = [ - 'id' => 'string', - 'title' => 'string', - 'description' => 'string', - 'percent_complete' => 'int', - 'aligns_with_option_id' => 'int', - 'shared_with_employee_ids' => 'int[]', - 'due_date' => 'string', - 'completion_date' => 'string', - 'status' => 'string', - 'milestones' => '\BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]', - 'actions' => '\BhrSdk\Model\TransformedApiGoalGoalActions' + 'id' => 'int', + 'title' => '\BhrSdk\Model\ApplicationDetailsJobTitle', + 'posted_date' => '\DateTime', + 'location' => 'object', + 'department' => 'object', + 'status' => '\BhrSdk\Model\JobSummaryStatus', + 'hiring_lead' => 'object', + 'new_applicants_count' => 'int', + 'active_applicants_count' => 'int', + 'total_applicants_count' => 'int', + 'posting_url' => 'string' ]; /** @@ -81,15 +80,15 @@ class TransformedApiGoalGoal implements ModelInterface, ArrayAccess, \JsonSerial protected static $openApiFormats = [ 'id' => null, 'title' => null, - 'description' => null, - 'percent_complete' => null, - 'aligns_with_option_id' => null, - 'shared_with_employee_ids' => null, - 'due_date' => null, - 'completion_date' => null, + 'posted_date' => 'date-time', + 'location' => null, + 'department' => null, 'status' => null, - 'milestones' => null, - 'actions' => null + 'hiring_lead' => null, + 'new_applicants_count' => null, + 'active_applicants_count' => null, + 'total_applicants_count' => null, + 'posting_url' => null ]; /** @@ -101,15 +100,15 @@ class TransformedApiGoalGoal implements ModelInterface, ArrayAccess, \JsonSerial protected static array $openApiNullables = [ 'id' => false, 'title' => false, - 'description' => false, - 'percent_complete' => false, - 'aligns_with_option_id' => true, - 'shared_with_employee_ids' => false, - 'due_date' => false, - 'completion_date' => true, + 'posted_date' => false, + 'location' => true, + 'department' => true, 'status' => false, - 'milestones' => true, - 'actions' => false + 'hiring_lead' => true, + 'new_applicants_count' => false, + 'active_applicants_count' => false, + 'total_applicants_count' => false, + 'posting_url' => true ]; /** @@ -196,15 +195,15 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'id' => 'id', 'title' => 'title', - 'description' => 'description', - 'percent_complete' => 'percentComplete', - 'aligns_with_option_id' => 'alignsWithOptionId', - 'shared_with_employee_ids' => 'sharedWithEmployeeIds', - 'due_date' => 'dueDate', - 'completion_date' => 'completionDate', + 'posted_date' => 'postedDate', + 'location' => 'location', + 'department' => 'department', 'status' => 'status', - 'milestones' => 'milestones', - 'actions' => 'actions' + 'hiring_lead' => 'hiringLead', + 'new_applicants_count' => 'newApplicantsCount', + 'active_applicants_count' => 'activeApplicantsCount', + 'total_applicants_count' => 'totalApplicantsCount', + 'posting_url' => 'postingUrl' ]; /** @@ -215,15 +214,15 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'id' => 'setId', 'title' => 'setTitle', - 'description' => 'setDescription', - 'percent_complete' => 'setPercentComplete', - 'aligns_with_option_id' => 'setAlignsWithOptionId', - 'shared_with_employee_ids' => 'setSharedWithEmployeeIds', - 'due_date' => 'setDueDate', - 'completion_date' => 'setCompletionDate', + 'posted_date' => 'setPostedDate', + 'location' => 'setLocation', + 'department' => 'setDepartment', 'status' => 'setStatus', - 'milestones' => 'setMilestones', - 'actions' => 'setActions' + 'hiring_lead' => 'setHiringLead', + 'new_applicants_count' => 'setNewApplicantsCount', + 'active_applicants_count' => 'setActiveApplicantsCount', + 'total_applicants_count' => 'setTotalApplicantsCount', + 'posting_url' => 'setPostingUrl' ]; /** @@ -234,15 +233,15 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'id' => 'getId', 'title' => 'getTitle', - 'description' => 'getDescription', - 'percent_complete' => 'getPercentComplete', - 'aligns_with_option_id' => 'getAlignsWithOptionId', - 'shared_with_employee_ids' => 'getSharedWithEmployeeIds', - 'due_date' => 'getDueDate', - 'completion_date' => 'getCompletionDate', + 'posted_date' => 'getPostedDate', + 'location' => 'getLocation', + 'department' => 'getDepartment', 'status' => 'getStatus', - 'milestones' => 'getMilestones', - 'actions' => 'getActions' + 'hiring_lead' => 'getHiringLead', + 'new_applicants_count' => 'getNewApplicantsCount', + 'active_applicants_count' => 'getActiveApplicantsCount', + 'total_applicants_count' => 'getTotalApplicantsCount', + 'posting_url' => 'getPostingUrl' ]; /** @@ -282,23 +281,6 @@ public function getModelName() { return self::$openApiModelName; } - public const STATUS_IN_PROGRESS = 'in_progress'; - public const STATUS_COMPLETED = 'completed'; - public const STATUS_CLOSED = 'closed'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() { - return [ - self::STATUS_IN_PROGRESS, - self::STATUS_COMPLETED, - self::STATUS_CLOSED, - ]; - } - /** * Associative array for storing property values * @@ -315,15 +297,15 @@ public function getStatusAllowableValues() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('percent_complete', $data ?? [], null); - $this->setIfExists('aligns_with_option_id', $data ?? [], null); - $this->setIfExists('shared_with_employee_ids', $data ?? [], null); - $this->setIfExists('due_date', $data ?? [], null); - $this->setIfExists('completion_date', $data ?? [], null); + $this->setIfExists('posted_date', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('milestones', $data ?? [], null); - $this->setIfExists('actions', $data ?? [], null); + $this->setIfExists('hiring_lead', $data ?? [], null); + $this->setIfExists('new_applicants_count', $data ?? [], null); + $this->setIfExists('active_applicants_count', $data ?? [], null); + $this->setIfExists('total_applicants_count', $data ?? [], null); + $this->setIfExists('posting_url', $data ?? [], null); } /** @@ -351,15 +333,6 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'status', must be one of '%s'", - $this->container['status'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -376,7 +349,7 @@ public function valid() { /** * Gets id * - * @return string|null + * @return int|null */ public function getId() { return $this->container['id']; @@ -385,7 +358,7 @@ public function getId() { /** * Sets id * - * @param string|null $id The id of the goal. + * @param int|null $id Job opening ID * * @return self */ @@ -401,7 +374,7 @@ public function setId($id) { /** * Gets title * - * @return string|null + * @return \BhrSdk\Model\ApplicationDetailsJobTitle|null */ public function getTitle() { return $this->container['title']; @@ -410,7 +383,7 @@ public function getTitle() { /** * Sets title * - * @param string|null $title Title of the goal. + * @param \BhrSdk\Model\ApplicationDetailsJobTitle|null $title title * * @return self */ @@ -424,254 +397,250 @@ public function setTitle($title) { } /** - * Gets description + * Gets posted_date * - * @return string|null + * @return \DateTime|null */ - public function getDescription() { - return $this->container['description']; + public function getPostedDate() { + return $this->container['posted_date']; } /** - * Sets description + * Sets posted_date * - * @param string|null $description A description of the goal. + * @param \DateTime|null $posted_date ISO 8601 datetime when the job opening was posted * * @return self */ - public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + public function setPostedDate($posted_date) { + if (is_null($posted_date)) { + throw new \InvalidArgumentException('non-nullable posted_date cannot be null'); } - $this->container['description'] = $description; + $this->container['posted_date'] = $posted_date; return $this; } /** - * Gets percent_complete + * Gets location * - * @return int|null + * @return object|null */ - public function getPercentComplete() { - return $this->container['percent_complete']; + public function getLocation() { + return $this->container['location']; } /** - * Sets percent_complete + * Sets location * - * @param int|null $percent_complete A percentage (0-100) that denotes how complete the goal is. + * @param object|null $location location * * @return self */ - public function setPercentComplete($percent_complete) { - if (is_null($percent_complete)) { - throw new \InvalidArgumentException('non-nullable percent_complete cannot be null'); + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } - $this->container['percent_complete'] = $percent_complete; + $this->container['location'] = $location; return $this; } /** - * Gets aligns_with_option_id + * Gets department * - * @return int|null + * @return object|null */ - public function getAlignsWithOptionId() { - return $this->container['aligns_with_option_id']; + public function getDepartment() { + return $this->container['department']; } /** - * Sets aligns_with_option_id + * Sets department * - * @param int|null $aligns_with_option_id aligns_with_option_id + * @param object|null $department department * * @return self */ - public function setAlignsWithOptionId($aligns_with_option_id) { - if (is_null($aligns_with_option_id)) { - $this->openApiNullablesSetToNull['aligns_with_option_id'] = true; + public function setDepartment($department) { + if (is_null($department)) { + $this->openApiNullablesSetToNull['department'] = true; } else { $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['aligns_with_option_id'])) { - unset($nullablesSetToNull['aligns_with_option_id']); + if (isset($nullablesSetToNull['department'])) { + unset($nullablesSetToNull['department']); $this->setOpenApiNullablesSetToNull($nullablesSetToNull); } } - $this->container['aligns_with_option_id'] = $aligns_with_option_id; + $this->container['department'] = $department; return $this; } /** - * Gets shared_with_employee_ids + * Gets status * - * @return int[]|null + * @return \BhrSdk\Model\JobSummaryStatus|null */ - public function getSharedWithEmployeeIds() { - return $this->container['shared_with_employee_ids']; + public function getStatus() { + return $this->container['status']; } /** - * Sets shared_with_employee_ids + * Sets status * - * @param int[]|null $shared_with_employee_ids Ids of the employees that have access to this goal. + * @param \BhrSdk\Model\JobSummaryStatus|null $status status * * @return self */ - public function setSharedWithEmployeeIds($shared_with_employee_ids) { - if (is_null($shared_with_employee_ids)) { - throw new \InvalidArgumentException('non-nullable shared_with_employee_ids cannot be null'); + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['shared_with_employee_ids'] = $shared_with_employee_ids; + $this->container['status'] = $status; return $this; } /** - * Gets due_date + * Gets hiring_lead * - * @return string|null + * @return object|null */ - public function getDueDate() { - return $this->container['due_date']; + public function getHiringLead() { + return $this->container['hiring_lead']; } /** - * Sets due_date + * Sets hiring_lead * - * @param string|null $due_date The due date of the goal. + * @param object|null $hiring_lead hiring_lead * * @return self */ - public function setDueDate($due_date) { - if (is_null($due_date)) { - throw new \InvalidArgumentException('non-nullable due_date cannot be null'); + public function setHiringLead($hiring_lead) { + if (is_null($hiring_lead)) { + $this->openApiNullablesSetToNull['hiring_lead'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hiring_lead'])) { + unset($nullablesSetToNull['hiring_lead']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } - $this->container['due_date'] = $due_date; + $this->container['hiring_lead'] = $hiring_lead; return $this; } /** - * Gets completion_date + * Gets new_applicants_count * - * @return string|null + * @return int|null */ - public function getCompletionDate() { - return $this->container['completion_date']; + public function getNewApplicantsCount() { + return $this->container['new_applicants_count']; } /** - * Sets completion_date + * Sets new_applicants_count * - * @param string|null $completion_date The date the goal was completed. + * @param int|null $new_applicants_count Number of applicants in 'New' status * * @return self */ - public function setCompletionDate($completion_date) { - if (is_null($completion_date)) { - $this->openApiNullablesSetToNull['completion_date'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['completion_date'])) { - unset($nullablesSetToNull['completion_date']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + public function setNewApplicantsCount($new_applicants_count) { + if (is_null($new_applicants_count)) { + throw new \InvalidArgumentException('non-nullable new_applicants_count cannot be null'); } - $this->container['completion_date'] = $completion_date; + $this->container['new_applicants_count'] = $new_applicants_count; return $this; } /** - * Gets status + * Gets active_applicants_count * - * @return string|null + * @return int|null */ - public function getStatus() { - return $this->container['status']; + public function getActiveApplicantsCount() { + return $this->container['active_applicants_count']; } /** - * Sets status + * Sets active_applicants_count * - * @param string|null $status The status of the goal. + * @param int|null $active_applicants_count Number of applicants in an active status * * @return self */ - public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + public function setActiveApplicantsCount($active_applicants_count) { + if (is_null($active_applicants_count)) { + throw new \InvalidArgumentException('non-nullable active_applicants_count cannot be null'); } - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['active_applicants_count'] = $active_applicants_count; return $this; } /** - * Gets milestones + * Gets total_applicants_count * - * @return \BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]|null + * @return int|null */ - public function getMilestones() { - return $this->container['milestones']; + public function getTotalApplicantsCount() { + return $this->container['total_applicants_count']; } /** - * Sets milestones + * Sets total_applicants_count * - * @param \BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]|null $milestones All milestones for the individual goal. This array will not exist if milestones are not selected for this goal. + * @param int|null $total_applicants_count Total number of applicants * * @return self */ - public function setMilestones($milestones) { - if (is_null($milestones)) { - $this->openApiNullablesSetToNull['milestones'] = true; - } else { - $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); - if (isset($nullablesSetToNull['milestones'])) { - unset($nullablesSetToNull['milestones']); - $this->setOpenApiNullablesSetToNull($nullablesSetToNull); - } + public function setTotalApplicantsCount($total_applicants_count) { + if (is_null($total_applicants_count)) { + throw new \InvalidArgumentException('non-nullable total_applicants_count cannot be null'); } - $this->container['milestones'] = $milestones; + $this->container['total_applicants_count'] = $total_applicants_count; return $this; } /** - * Gets actions + * Gets posting_url * - * @return \BhrSdk\Model\TransformedApiGoalGoalActions|null + * @return string|null */ - public function getActions() { - return $this->container['actions']; + public function getPostingUrl() { + return $this->container['posting_url']; } /** - * Sets actions + * Sets posting_url * - * @param \BhrSdk\Model\TransformedApiGoalGoalActions|null $actions actions + * @param string|null $posting_url posting_url * * @return self */ - public function setActions($actions) { - if (is_null($actions)) { - throw new \InvalidArgumentException('non-nullable actions cannot be null'); + public function setPostingUrl($posting_url) { + if (is_null($posting_url)) { + $this->openApiNullablesSetToNull['posting_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['posting_url'])) { + unset($nullablesSetToNull['posting_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } - $this->container['actions'] = $actions; + $this->container['posting_url'] = $posting_url; return $this; } diff --git a/lib/Model/JobSummaryStatus.php b/lib/Model/JobSummaryStatus.php new file mode 100644 index 00000000..58b3cce1 --- /dev/null +++ b/lib/Model/JobSummaryStatus.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * JobSummaryStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * JobSummaryStatus Class Doc Comment + * + * @category Class + * @description Job opening status + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class JobSummaryStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'JobSummary_status'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Status ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Status name + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonEmployeeFiles.php b/lib/Model/JsonEmployeeFiles.php new file mode 100644 index 00000000..da4bb5b9 --- /dev/null +++ b/lib/Model/JsonEmployeeFiles.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * JsonEmployeeFiles + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * JsonEmployeeFiles Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class JsonEmployeeFiles implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'JsonEmployeeFiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee' => '\BhrSdk\Model\JsonEmployeeFilesEmployee', + 'categories' => '\BhrSdk\Model\JsonEmployeeFilesCategoriesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee' => null, + 'categories' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee' => false, + 'categories' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee' => 'employee', + 'categories' => 'categories' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee' => 'setEmployee', + 'categories' => 'setCategories' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee' => 'getEmployee', + 'categories' => 'getCategories' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('categories', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee + * + * @return \BhrSdk\Model\JsonEmployeeFilesEmployee|null + */ + public function getEmployee() { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \BhrSdk\Model\JsonEmployeeFilesEmployee|null $employee employee + * + * @return self + */ + public function setEmployee($employee) { + if (is_null($employee)) { + throw new \InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + + /** + * Gets categories + * + * @return \BhrSdk\Model\JsonEmployeeFilesCategoriesInner[]|null + */ + public function getCategories() { + return $this->container['categories']; + } + + /** + * Sets categories + * + * @param \BhrSdk\Model\JsonEmployeeFilesCategoriesInner[]|null $categories categories + * + * @return self + */ + public function setCategories($categories) { + if (is_null($categories)) { + throw new \InvalidArgumentException('non-nullable categories cannot be null'); + } + $this->container['categories'] = $categories; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonEmployeeFilesCategoriesInner.php b/lib/Model/JsonEmployeeFilesCategoriesInner.php new file mode 100644 index 00000000..fe5fe4ab --- /dev/null +++ b/lib/Model/JsonEmployeeFilesCategoriesInner.php @@ -0,0 +1,713 @@ +<?php +declare(strict_types=1); +/** + * JsonEmployeeFilesCategoriesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * JsonEmployeeFilesCategoriesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class JsonEmployeeFilesCategoriesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'JsonEmployeeFiles_categories_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'can_rename_category' => 'string', + 'can_delete_category' => 'string', + 'can_upload_files' => 'string', + 'display_if_empty' => 'string', + 'files' => '\BhrSdk\Model\JsonEmployeeFilesCategoriesInnerFilesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'can_rename_category' => null, + 'can_delete_category' => null, + 'can_upload_files' => null, + 'display_if_empty' => null, + 'files' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'can_rename_category' => false, + 'can_delete_category' => false, + 'can_upload_files' => false, + 'display_if_empty' => false, + 'files' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'can_rename_category' => 'canRenameCategory', + 'can_delete_category' => 'canDeleteCategory', + 'can_upload_files' => 'canUploadFiles', + 'display_if_empty' => 'displayIfEmpty', + 'files' => 'files' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'can_rename_category' => 'setCanRenameCategory', + 'can_delete_category' => 'setCanDeleteCategory', + 'can_upload_files' => 'setCanUploadFiles', + 'display_if_empty' => 'setDisplayIfEmpty', + 'files' => 'setFiles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'can_rename_category' => 'getCanRenameCategory', + 'can_delete_category' => 'getCanDeleteCategory', + 'can_upload_files' => 'getCanUploadFiles', + 'display_if_empty' => 'getDisplayIfEmpty', + 'files' => 'getFiles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const CAN_RENAME_CATEGORY_YES = 'yes'; + public const CAN_RENAME_CATEGORY_NO = 'no'; + public const CAN_DELETE_CATEGORY_YES = 'yes'; + public const CAN_DELETE_CATEGORY_NO = 'no'; + public const CAN_UPLOAD_FILES_YES = 'yes'; + public const CAN_UPLOAD_FILES_NO = 'no'; + public const DISPLAY_IF_EMPTY_YES = 'yes'; + public const DISPLAY_IF_EMPTY_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanRenameCategoryAllowableValues() { + return [ + self::CAN_RENAME_CATEGORY_YES, + self::CAN_RENAME_CATEGORY_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanDeleteCategoryAllowableValues() { + return [ + self::CAN_DELETE_CATEGORY_YES, + self::CAN_DELETE_CATEGORY_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanUploadFilesAllowableValues() { + return [ + self::CAN_UPLOAD_FILES_YES, + self::CAN_UPLOAD_FILES_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDisplayIfEmptyAllowableValues() { + return [ + self::DISPLAY_IF_EMPTY_YES, + self::DISPLAY_IF_EMPTY_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('can_rename_category', $data ?? [], null); + $this->setIfExists('can_delete_category', $data ?? [], null); + $this->setIfExists('can_upload_files', $data ?? [], null); + $this->setIfExists('display_if_empty', $data ?? [], null); + $this->setIfExists('files', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getCanRenameCategoryAllowableValues(); + if (!is_null($this->container['can_rename_category']) && !in_array($this->container['can_rename_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_rename_category', must be one of '%s'", + $this->container['can_rename_category'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanDeleteCategoryAllowableValues(); + if (!is_null($this->container['can_delete_category']) && !in_array($this->container['can_delete_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_delete_category', must be one of '%s'", + $this->container['can_delete_category'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!is_null($this->container['can_upload_files']) && !in_array($this->container['can_upload_files'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_upload_files', must be one of '%s'", + $this->container['can_upload_files'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDisplayIfEmptyAllowableValues(); + if (!is_null($this->container['display_if_empty']) && !in_array($this->container['display_if_empty'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'display_if_empty', must be one of '%s'", + $this->container['display_if_empty'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Category ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Category display name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets can_rename_category + * + * @return string|null + */ + public function getCanRenameCategory() { + return $this->container['can_rename_category']; + } + + /** + * Sets can_rename_category + * + * @param string|null $can_rename_category Whether the caller can rename this category. + * + * @return self + */ + public function setCanRenameCategory($can_rename_category) { + if (is_null($can_rename_category)) { + throw new \InvalidArgumentException('non-nullable can_rename_category cannot be null'); + } + $allowedValues = $this->getCanRenameCategoryAllowableValues(); + if (!in_array($can_rename_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_rename_category', must be one of '%s'", + $can_rename_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_rename_category'] = $can_rename_category; + + return $this; + } + + /** + * Gets can_delete_category + * + * @return string|null + */ + public function getCanDeleteCategory() { + return $this->container['can_delete_category']; + } + + /** + * Sets can_delete_category + * + * @param string|null $can_delete_category Whether the caller can delete this category. + * + * @return self + */ + public function setCanDeleteCategory($can_delete_category) { + if (is_null($can_delete_category)) { + throw new \InvalidArgumentException('non-nullable can_delete_category cannot be null'); + } + $allowedValues = $this->getCanDeleteCategoryAllowableValues(); + if (!in_array($can_delete_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_delete_category', must be one of '%s'", + $can_delete_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_delete_category'] = $can_delete_category; + + return $this; + } + + /** + * Gets can_upload_files + * + * @return string|null + */ + public function getCanUploadFiles() { + return $this->container['can_upload_files']; + } + + /** + * Sets can_upload_files + * + * @param string|null $can_upload_files Whether the caller can upload files to this category. + * + * @return self + */ + public function setCanUploadFiles($can_upload_files) { + if (is_null($can_upload_files)) { + throw new \InvalidArgumentException('non-nullable can_upload_files cannot be null'); + } + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!in_array($can_upload_files, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_upload_files', must be one of '%s'", + $can_upload_files, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_upload_files'] = $can_upload_files; + + return $this; + } + + /** + * Gets display_if_empty + * + * @return string|null + */ + public function getDisplayIfEmpty() { + return $this->container['display_if_empty']; + } + + /** + * Sets display_if_empty + * + * @param string|null $display_if_empty Whether to display the category when it has no files. + * + * @return self + */ + public function setDisplayIfEmpty($display_if_empty) { + if (is_null($display_if_empty)) { + throw new \InvalidArgumentException('non-nullable display_if_empty cannot be null'); + } + $allowedValues = $this->getDisplayIfEmptyAllowableValues(); + if (!in_array($display_if_empty, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'display_if_empty', must be one of '%s'", + $display_if_empty, + implode("', '", $allowedValues) + ) + ); + } + $this->container['display_if_empty'] = $display_if_empty; + + return $this; + } + + /** + * Gets files + * + * @return \BhrSdk\Model\JsonEmployeeFilesCategoriesInnerFilesInner[]|null + */ + public function getFiles() { + return $this->container['files']; + } + + /** + * Sets files + * + * @param \BhrSdk\Model\JsonEmployeeFilesCategoriesInnerFilesInner[]|null $files files + * + * @return self + */ + public function setFiles($files) { + if (is_null($files)) { + throw new \InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonEmployeeFilesCategoriesInnerFilesInner.php b/lib/Model/JsonEmployeeFilesCategoriesInnerFilesInner.php new file mode 100644 index 00000000..66783537 --- /dev/null +++ b/lib/Model/JsonEmployeeFilesCategoriesInnerFilesInner.php @@ -0,0 +1,809 @@ +<?php +declare(strict_types=1); +/** + * JsonEmployeeFilesCategoriesInnerFilesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * JsonEmployeeFilesCategoriesInnerFilesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class JsonEmployeeFilesCategoriesInnerFilesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'JsonEmployeeFiles_categories_inner_files_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'original_file_name' => 'string', + 'size' => 'int', + 'date_created' => 'string', + 'created_by' => 'string', + 'share_with_employee' => 'string', + 'can_rename_file' => 'string', + 'can_delete_file' => 'string', + 'can_change_share_with_employee_field_value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'original_file_name' => null, + 'size' => null, + 'date_created' => null, + 'created_by' => null, + 'share_with_employee' => null, + 'can_rename_file' => null, + 'can_delete_file' => null, + 'can_change_share_with_employee_field_value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'original_file_name' => false, + 'size' => false, + 'date_created' => false, + 'created_by' => false, + 'share_with_employee' => false, + 'can_rename_file' => false, + 'can_delete_file' => false, + 'can_change_share_with_employee_field_value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'original_file_name' => 'originalFileName', + 'size' => 'size', + 'date_created' => 'dateCreated', + 'created_by' => 'createdBy', + 'share_with_employee' => 'shareWithEmployee', + 'can_rename_file' => 'canRenameFile', + 'can_delete_file' => 'canDeleteFile', + 'can_change_share_with_employee_field_value' => 'canChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'original_file_name' => 'setOriginalFileName', + 'size' => 'setSize', + 'date_created' => 'setDateCreated', + 'created_by' => 'setCreatedBy', + 'share_with_employee' => 'setShareWithEmployee', + 'can_rename_file' => 'setCanRenameFile', + 'can_delete_file' => 'setCanDeleteFile', + 'can_change_share_with_employee_field_value' => 'setCanChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'original_file_name' => 'getOriginalFileName', + 'size' => 'getSize', + 'date_created' => 'getDateCreated', + 'created_by' => 'getCreatedBy', + 'share_with_employee' => 'getShareWithEmployee', + 'can_rename_file' => 'getCanRenameFile', + 'can_delete_file' => 'getCanDeleteFile', + 'can_change_share_with_employee_field_value' => 'getCanChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SHARE_WITH_EMPLOYEE_YES = 'yes'; + public const SHARE_WITH_EMPLOYEE_NO = 'no'; + public const CAN_RENAME_FILE_YES = 'yes'; + public const CAN_RENAME_FILE_NO = 'no'; + public const CAN_DELETE_FILE_YES = 'yes'; + public const CAN_DELETE_FILE_NO = 'no'; + public const CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_YES = 'yes'; + public const CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeeAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEE_YES, + self::SHARE_WITH_EMPLOYEE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanRenameFileAllowableValues() { + return [ + self::CAN_RENAME_FILE_YES, + self::CAN_RENAME_FILE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanDeleteFileAllowableValues() { + return [ + self::CAN_DELETE_FILE_YES, + self::CAN_DELETE_FILE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanChangeShareWithEmployeeFieldValueAllowableValues() { + return [ + self::CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_YES, + self::CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('original_file_name', $data ?? [], null); + $this->setIfExists('size', $data ?? [], null); + $this->setIfExists('date_created', $data ?? [], null); + $this->setIfExists('created_by', $data ?? [], null); + $this->setIfExists('share_with_employee', $data ?? [], null); + $this->setIfExists('can_rename_file', $data ?? [], null); + $this->setIfExists('can_delete_file', $data ?? [], null); + $this->setIfExists('can_change_share_with_employee_field_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!is_null($this->container['share_with_employee']) && !in_array($this->container['share_with_employee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employee', must be one of '%s'", + $this->container['share_with_employee'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!is_null($this->container['can_rename_file']) && !in_array($this->container['can_rename_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_rename_file', must be one of '%s'", + $this->container['can_rename_file'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!is_null($this->container['can_delete_file']) && !in_array($this->container['can_delete_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_delete_file', must be one of '%s'", + $this->container['can_delete_file'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanChangeShareWithEmployeeFieldValueAllowableValues(); + if (!is_null($this->container['can_change_share_with_employee_field_value']) && !in_array($this->container['can_change_share_with_employee_field_value'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_change_share_with_employee_field_value', must be one of '%s'", + $this->container['can_change_share_with_employee_field_value'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id File ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name File display name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets original_file_name + * + * @return string|null + */ + public function getOriginalFileName() { + return $this->container['original_file_name']; + } + + /** + * Sets original_file_name + * + * @param string|null $original_file_name Original uploaded filename. + * + * @return self + */ + public function setOriginalFileName($original_file_name) { + if (is_null($original_file_name)) { + throw new \InvalidArgumentException('non-nullable original_file_name cannot be null'); + } + $this->container['original_file_name'] = $original_file_name; + + return $this; + } + + /** + * Gets size + * + * @return int|null + */ + public function getSize() { + return $this->container['size']; + } + + /** + * Sets size + * + * @param int|null $size File size in bytes. + * + * @return self + */ + public function setSize($size) { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets date_created + * + * @return string|null + */ + public function getDateCreated() { + return $this->container['date_created']; + } + + /** + * Sets date_created + * + * @param string|null $date_created UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`). + * + * @return self + */ + public function setDateCreated($date_created) { + if (is_null($date_created)) { + throw new \InvalidArgumentException('non-nullable date_created cannot be null'); + } + $this->container['date_created'] = $date_created; + + return $this; + } + + /** + * Gets created_by + * + * @return string|null + */ + public function getCreatedBy() { + return $this->container['created_by']; + } + + /** + * Sets created_by + * + * @param string|null $created_by Full name of the user who uploaded the file. + * + * @return self + */ + public function setCreatedBy($created_by) { + if (is_null($created_by)) { + throw new \InvalidArgumentException('non-nullable created_by cannot be null'); + } + $this->container['created_by'] = $created_by; + + return $this; + } + + /** + * Gets share_with_employee + * + * @return string|null + */ + public function getShareWithEmployee() { + return $this->container['share_with_employee']; + } + + /** + * Sets share_with_employee + * + * @param string|null $share_with_employee Whether the file is shared with the employee. + * + * @return self + */ + public function setShareWithEmployee($share_with_employee) { + if (is_null($share_with_employee)) { + throw new \InvalidArgumentException('non-nullable share_with_employee cannot be null'); + } + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!in_array($share_with_employee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employee', must be one of '%s'", + $share_with_employee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['share_with_employee'] = $share_with_employee; + + return $this; + } + + /** + * Gets can_rename_file + * + * @return string|null + */ + public function getCanRenameFile() { + return $this->container['can_rename_file']; + } + + /** + * Sets can_rename_file + * + * @param string|null $can_rename_file Whether the caller can rename this file. + * + * @return self + */ + public function setCanRenameFile($can_rename_file) { + if (is_null($can_rename_file)) { + throw new \InvalidArgumentException('non-nullable can_rename_file cannot be null'); + } + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!in_array($can_rename_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_rename_file', must be one of '%s'", + $can_rename_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_rename_file'] = $can_rename_file; + + return $this; + } + + /** + * Gets can_delete_file + * + * @return string|null + */ + public function getCanDeleteFile() { + return $this->container['can_delete_file']; + } + + /** + * Sets can_delete_file + * + * @param string|null $can_delete_file Whether the caller can delete this file. + * + * @return self + */ + public function setCanDeleteFile($can_delete_file) { + if (is_null($can_delete_file)) { + throw new \InvalidArgumentException('non-nullable can_delete_file cannot be null'); + } + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!in_array($can_delete_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_delete_file', must be one of '%s'", + $can_delete_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_delete_file'] = $can_delete_file; + + return $this; + } + + /** + * Gets can_change_share_with_employee_field_value + * + * @return string|null + */ + public function getCanChangeShareWithEmployeeFieldValue() { + return $this->container['can_change_share_with_employee_field_value']; + } + + /** + * Sets can_change_share_with_employee_field_value + * + * @param string|null $can_change_share_with_employee_field_value Whether the caller can toggle the share-with-employee setting. + * + * @return self + */ + public function setCanChangeShareWithEmployeeFieldValue($can_change_share_with_employee_field_value) { + if (is_null($can_change_share_with_employee_field_value)) { + throw new \InvalidArgumentException('non-nullable can_change_share_with_employee_field_value cannot be null'); + } + $allowedValues = $this->getCanChangeShareWithEmployeeFieldValueAllowableValues(); + if (!in_array($can_change_share_with_employee_field_value, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_change_share_with_employee_field_value', must be one of '%s'", + $can_change_share_with_employee_field_value, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_change_share_with_employee_field_value'] = $can_change_share_with_employee_field_value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonEmployeeFilesEmployee.php b/lib/Model/JsonEmployeeFilesEmployee.php new file mode 100644 index 00000000..c5f9e245 --- /dev/null +++ b/lib/Model/JsonEmployeeFilesEmployee.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * JsonEmployeeFilesEmployee + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * JsonEmployeeFilesEmployee Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class JsonEmployeeFilesEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'JsonEmployeeFiles_employee'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Employee ID. + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsColumnMap.php b/lib/Model/LevelsAndBandsColumnMap.php new file mode 100644 index 00000000..c1a387ba --- /dev/null +++ b/lib/Model/LevelsAndBandsColumnMap.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsColumnMap + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsColumnMap Class Doc Comment + * + * @category Class + * @description Schema for levels and bands column map + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsColumnMap implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-ColumnMap'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'expected_column_key' => 'string', + 'column_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'expected_column_key' => null, + 'column_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'expected_column_key' => true, + 'column_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'expected_column_key' => 'expectedColumnKey', + 'column_name' => 'columnName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'expected_column_key' => 'setExpectedColumnKey', + 'column_name' => 'setColumnName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'expected_column_key' => 'getExpectedColumnKey', + 'column_name' => 'getColumnName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('expected_column_key', $data ?? [], null); + $this->setIfExists('column_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets expected_column_key + * + * @return string|null + */ + public function getExpectedColumnKey() { + return $this->container['expected_column_key']; + } + + /** + * Sets expected_column_key + * + * @param string|null $expected_column_key expected_column_key + * + * @return self + */ + public function setExpectedColumnKey($expected_column_key) { + if (is_null($expected_column_key)) { + $this->openApiNullablesSetToNull['expected_column_key'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['expected_column_key'])) { + unset($nullablesSetToNull['expected_column_key']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expected_column_key'] = $expected_column_key; + + return $this; + } + + /** + * Gets column_name + * + * @return string|null + */ + public function getColumnName() { + return $this->container['column_name']; + } + + /** + * Sets column_name + * + * @param string|null $column_name Column name + * + * @return self + */ + public function setColumnName($column_name) { + if (is_null($column_name)) { + throw new \InvalidArgumentException('non-nullable column_name cannot be null'); + } + $this->container['column_name'] = $column_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectInfoApiTransformerTask.php b/lib/Model/LevelsAndBandsEmployee.php similarity index 96% rename from lib/Model/ProjectInfoApiTransformerTask.php rename to lib/Model/LevelsAndBandsEmployee.php index 91910aac..72808670 100644 --- a/lib/Model/ProjectInfoApiTransformerTask.php +++ b/lib/Model/LevelsAndBandsEmployee.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ProjectInfoApiTransformerTask + * LevelsAndBandsEmployee * * PHP version 8.1 * @@ -33,16 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * ProjectInfoApiTransformerTask Class Doc Comment + * LevelsAndBandsEmployee Class Doc Comment * * @category Class - * @description Task information + * @description Job titles employee object * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ProjectInfoApiTransformerTask implements ModelInterface, ArrayAccess, \JsonSerializable { +class LevelsAndBandsEmployee implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class ProjectInfoApiTransformerTask implements ModelInterface, ArrayAccess, \Jso * * @var string */ - protected static $openApiModelName = 'ProjectInfoApiTransformer_task'; + protected static $openApiModelName = 'LevelsAndBands-Employee'; /** * Array of property to type mappings. Used for (de)serialization @@ -296,7 +296,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Task ID + * @param int|null $id Employee id * * @return self */ @@ -321,7 +321,7 @@ public function getName() { /** * Sets name * - * @param string|null $name Task name + * @param string|null $name Employee name * * @return self */ diff --git a/lib/Model/LevelsAndBandsErrorWarningIdentifier.php b/lib/Model/LevelsAndBandsErrorWarningIdentifier.php new file mode 100644 index 00000000..d65e0e72 --- /dev/null +++ b/lib/Model/LevelsAndBandsErrorWarningIdentifier.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsErrorWarningIdentifier + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsErrorWarningIdentifier Class Doc Comment + * + * @category Class + * @description Object for compensation level groups and levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsErrorWarningIdentifier implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-ErrorWarningIdentifier'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'group_id' => 'int', + 'level_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'group_id' => null, + 'level_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'group_id' => false, + 'level_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'group_id' => 'groupId', + 'level_id' => 'levelId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'group_id' => 'setGroupId', + 'level_id' => 'setLevelId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'group_id' => 'getGroupId', + 'level_id' => 'getLevelId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('group_id', $data ?? [], null); + $this->setIfExists('level_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['group_id'] === null) { + $invalidProperties[] = "'group_id' can't be null"; + } + if ($this->container['level_id'] === null) { + $invalidProperties[] = "'level_id' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets group_id + * + * @return int + */ + public function getGroupId() { + return $this->container['group_id']; + } + + /** + * Sets group_id + * + * @param int $group_id Group ID + * + * @return self + */ + public function setGroupId($group_id) { + if (is_null($group_id)) { + throw new \InvalidArgumentException('non-nullable group_id cannot be null'); + } + $this->container['group_id'] = $group_id; + + return $this; + } + + /** + * Gets level_id + * + * @return int + */ + public function getLevelId() { + return $this->container['level_id']; + } + + /** + * Sets level_id + * + * @param int $level_id Level ID + * + * @return self + */ + public function setLevelId($level_id) { + if (is_null($level_id)) { + throw new \InvalidArgumentException('non-nullable level_id cannot be null'); + } + $this->container['level_id'] = $level_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsGroup.php b/lib/Model/LevelsAndBandsGroup.php new file mode 100644 index 00000000..da379b05 --- /dev/null +++ b/lib/Model/LevelsAndBandsGroup.php @@ -0,0 +1,465 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsGroup + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsGroup Class Doc Comment + * + * @category Class + * @description Represents a compensation level group with its levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsGroup implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-Group'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'group_name' => 'string', + 'levels' => '\BhrSdk\Model\LevelsAndBandsLevel[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'group_name' => null, + 'levels' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'group_name' => true, + 'levels' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'group_name' => 'groupName', + 'levels' => 'levels' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'group_name' => 'setGroupName', + 'levels' => 'setLevels' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'group_name' => 'getGroupName', + 'levels' => 'getLevels' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('group_name', $data ?? [], null); + $this->setIfExists('levels', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets group_name + * + * @return string|null + */ + public function getGroupName() { + return $this->container['group_name']; + } + + /** + * Sets group_name + * + * @param string|null $group_name group_name + * + * @return self + */ + public function setGroupName($group_name) { + if (is_null($group_name)) { + $this->openApiNullablesSetToNull['group_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['group_name'])) { + unset($nullablesSetToNull['group_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group_name'] = $group_name; + + return $this; + } + + /** + * Gets levels + * + * @return \BhrSdk\Model\LevelsAndBandsLevel[]|null + */ + public function getLevels() { + return $this->container['levels']; + } + + /** + * Sets levels + * + * @param \BhrSdk\Model\LevelsAndBandsLevel[]|null $levels Array of levels in this group + * + * @return self + */ + public function setLevels($levels) { + if (is_null($levels)) { + throw new \InvalidArgumentException('non-nullable levels cannot be null'); + } + $this->container['levels'] = $levels; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsGroupStatusCounts.php b/lib/Model/LevelsAndBandsGroupStatusCounts.php new file mode 100644 index 00000000..f3e72dde --- /dev/null +++ b/lib/Model/LevelsAndBandsGroupStatusCounts.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsGroupStatusCounts + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsGroupStatusCounts Class Doc Comment + * + * @category Class + * @description Schema for levels and bands group status counts + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsGroupStatusCounts implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-GroupStatusCounts'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'draft' => 'int', + 'historic' => 'int', + 'published' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'draft' => null, + 'historic' => null, + 'published' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'draft' => false, + 'historic' => false, + 'published' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'draft' => 'draft', + 'historic' => 'historic', + 'published' => 'published' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'draft' => 'setDraft', + 'historic' => 'setHistoric', + 'published' => 'setPublished' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'draft' => 'getDraft', + 'historic' => 'getHistoric', + 'published' => 'getPublished' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('draft', $data ?? [], null); + $this->setIfExists('historic', $data ?? [], null); + $this->setIfExists('published', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets draft + * + * @return int|null + */ + public function getDraft() { + return $this->container['draft']; + } + + /** + * Sets draft + * + * @param int|null $draft Number of levels/bands in draft status + * + * @return self + */ + public function setDraft($draft) { + if (is_null($draft)) { + throw new \InvalidArgumentException('non-nullable draft cannot be null'); + } + $this->container['draft'] = $draft; + + return $this; + } + + /** + * Gets historic + * + * @return int|null + */ + public function getHistoric() { + return $this->container['historic']; + } + + /** + * Sets historic + * + * @param int|null $historic Number of levels/bands in historic status + * + * @return self + */ + public function setHistoric($historic) { + if (is_null($historic)) { + throw new \InvalidArgumentException('non-nullable historic cannot be null'); + } + $this->container['historic'] = $historic; + + return $this; + } + + /** + * Gets published + * + * @return int|null + */ + public function getPublished() { + return $this->container['published']; + } + + /** + * Sets published + * + * @param int|null $published Number of levels/bands in published status + * + * @return self + */ + public function setPublished($published) { + if (is_null($published)) { + throw new \InvalidArgumentException('non-nullable published cannot be null'); + } + $this->container['published'] = $published; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsJobTitle.php b/lib/Model/LevelsAndBandsJobTitle.php new file mode 100644 index 00000000..7452c7d0 --- /dev/null +++ b/lib/Model/LevelsAndBandsJobTitle.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsJobTitle + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsJobTitle Class Doc Comment + * + * @category Class + * @description Job Titles Job Title Data Object + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsJobTitle implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-JobTitle'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'job_title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'job_title' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'job_title' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'job_title' => 'jobTitle' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'job_title' => 'setJobTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'job_title' => 'getJobTitle' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('job_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Job title id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title Job title name + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + throw new \InvalidArgumentException('non-nullable job_title cannot be null'); + } + $this->container['job_title'] = $job_title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsJobTitleAssignment.php b/lib/Model/LevelsAndBandsJobTitleAssignment.php new file mode 100644 index 00000000..532b3430 --- /dev/null +++ b/lib/Model/LevelsAndBandsJobTitleAssignment.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsJobTitleAssignment + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsJobTitleAssignment Class Doc Comment + * + * @category Class + * @description Job title assignment to a level + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsJobTitleAssignment implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-JobTitleAssignment'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_title_id' => 'int', + 'level_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_title_id' => null, + 'level_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_title_id' => false, + 'level_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_title_id' => 'jobTitleId', + 'level_id' => 'levelId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_title_id' => 'setJobTitleId', + 'level_id' => 'setLevelId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_title_id' => 'getJobTitleId', + 'level_id' => 'getLevelId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('level_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_title_id + * + * @return int|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param int|null $job_title_id Job title id + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + throw new \InvalidArgumentException('non-nullable job_title_id cannot be null'); + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets level_id + * + * @return int|null + */ + public function getLevelId() { + return $this->container['level_id']; + } + + /** + * Sets level_id + * + * @param int|null $level_id Compensation level id + * + * @return self + */ + public function setLevelId($level_id) { + if (is_null($level_id)) { + throw new \InvalidArgumentException('non-nullable level_id cannot be null'); + } + $this->container['level_id'] = $level_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsJobTitleAssignmentsRequest.php b/lib/Model/LevelsAndBandsJobTitleAssignmentsRequest.php new file mode 100644 index 00000000..2d69453b --- /dev/null +++ b/lib/Model/LevelsAndBandsJobTitleAssignmentsRequest.php @@ -0,0 +1,392 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsJobTitleAssignmentsRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsJobTitleAssignmentsRequest Class Doc Comment + * + * @category Class + * @description Request to bulk assign job titles to levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsJobTitleAssignmentsRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-JobTitleAssignmentsRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'job_titles' => '\BhrSdk\Model\LevelsAndBandsJobTitleAssignment[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'job_titles' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'job_titles' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'job_titles' => 'jobTitles' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'job_titles' => 'setJobTitles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'job_titles' => 'getJobTitles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('job_titles', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['job_titles'] === null) { + $invalidProperties[] = "'job_titles' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets job_titles + * + * @return \BhrSdk\Model\LevelsAndBandsJobTitleAssignment[] + */ + public function getJobTitles() { + return $this->container['job_titles']; + } + + /** + * Sets job_titles + * + * @param \BhrSdk\Model\LevelsAndBandsJobTitleAssignment[] $job_titles Array of job title assignments + * + * @return self + */ + public function setJobTitles($job_titles) { + if (is_null($job_titles)) { + throw new \InvalidArgumentException('non-nullable job_titles cannot be null'); + } + $this->container['job_titles'] = $job_titles; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsJobTitleWithEmployees.php b/lib/Model/LevelsAndBandsJobTitleWithEmployees.php new file mode 100644 index 00000000..1b5222da --- /dev/null +++ b/lib/Model/LevelsAndBandsJobTitleWithEmployees.php @@ -0,0 +1,491 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsJobTitleWithEmployees + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsJobTitleWithEmployees Class Doc Comment + * + * @category Class + * @description Levels and bands job titles with employees object + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsJobTitleWithEmployees implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-JobTitleWithEmployees'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'title' => 'string', + 'employees' => '\BhrSdk\Model\LevelsAndBandsEmployee[]', + 'level_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'title' => null, + 'employees' => null, + 'level_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'title' => false, + 'employees' => false, + 'level_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'title' => 'title', + 'employees' => 'employees', + 'level_id' => 'levelId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'title' => 'setTitle', + 'employees' => 'setEmployees', + 'level_id' => 'setLevelId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'title' => 'getTitle', + 'employees' => 'getEmployees', + 'level_id' => 'getLevelId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('employees', $data ?? [], null); + $this->setIfExists('level_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Job id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Job title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets employees + * + * @return \BhrSdk\Model\LevelsAndBandsEmployee[]|null + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param \BhrSdk\Model\LevelsAndBandsEmployee[]|null $employees Employees with this job title + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + + /** + * Gets level_id + * + * @return int|null + */ + public function getLevelId() { + return $this->container['level_id']; + } + + /** + * Sets level_id + * + * @param int|null $level_id level_id + * + * @return self + */ + public function setLevelId($level_id) { + if (is_null($level_id)) { + $this->openApiNullablesSetToNull['level_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['level_id'])) { + unset($nullablesSetToNull['level_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['level_id'] = $level_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsJobTitlesStatus.php b/lib/Model/LevelsAndBandsJobTitlesStatus.php new file mode 100644 index 00000000..733f40e7 --- /dev/null +++ b/lib/Model/LevelsAndBandsJobTitlesStatus.php @@ -0,0 +1,462 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsJobTitlesStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsJobTitlesStatus Class Doc Comment + * + * @category Class + * @description Object for compensation level groups and levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsJobTitlesStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-JobTitlesStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'is_complete' => 'bool', + 'errors' => 'string[]', + 'warnings' => 'object[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'is_complete' => null, + 'errors' => null, + 'warnings' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'is_complete' => false, + 'errors' => false, + 'warnings' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'is_complete' => 'isComplete', + 'errors' => 'errors', + 'warnings' => 'warnings' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'is_complete' => 'setIsComplete', + 'errors' => 'setErrors', + 'warnings' => 'setWarnings' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'is_complete' => 'getIsComplete', + 'errors' => 'getErrors', + 'warnings' => 'getWarnings' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('is_complete', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('warnings', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['is_complete'] === null) { + $invalidProperties[] = "'is_complete' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + if ($this->container['warnings'] === null) { + $invalidProperties[] = "'warnings' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets is_complete + * + * @return bool + */ + public function getIsComplete() { + return $this->container['is_complete']; + } + + /** + * Sets is_complete + * + * @param bool $is_complete Is the job titles step complete + * + * @return self + */ + public function setIsComplete($is_complete) { + if (is_null($is_complete)) { + throw new \InvalidArgumentException('non-nullable is_complete cannot be null'); + } + $this->container['is_complete'] = $is_complete; + + return $this; + } + + /** + * Gets errors + * + * @return string[] + */ + public function getErrors() { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param string[] $errors Array of errors + * + * @return self + */ + public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets warnings + * + * @return object[] + */ + public function getWarnings() { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param object[] $warnings Array of warnings + * + * @return self + */ + public function setWarnings($warnings) { + if (is_null($warnings)) { + throw new \InvalidArgumentException('non-nullable warnings cannot be null'); + } + $this->container['warnings'] = $warnings; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsLevel.php b/lib/Model/LevelsAndBandsLevel.php new file mode 100644 index 00000000..7105a03d --- /dev/null +++ b/lib/Model/LevelsAndBandsLevel.php @@ -0,0 +1,561 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsLevel + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsLevel Class Doc Comment + * + * @category Class + * @description Represents a single compensation level + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsLevel implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-Level'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'level_id' => 'int', + 'level_name' => 'string', + 'pay_band' => '\BhrSdk\Model\LevelsAndBandsPayBand', + 'job_titles' => '\BhrSdk\Model\LevelsAndBandsJobTitle[]', + 'errors' => 'string[]', + 'warnings' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'level_id' => null, + 'level_name' => null, + 'pay_band' => null, + 'job_titles' => null, + 'errors' => null, + 'warnings' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'level_id' => true, + 'level_name' => true, + 'pay_band' => false, + 'job_titles' => false, + 'errors' => false, + 'warnings' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'level_id' => 'levelId', + 'level_name' => 'levelName', + 'pay_band' => 'payBand', + 'job_titles' => 'jobTitles', + 'errors' => 'errors', + 'warnings' => 'warnings' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'level_id' => 'setLevelId', + 'level_name' => 'setLevelName', + 'pay_band' => 'setPayBand', + 'job_titles' => 'setJobTitles', + 'errors' => 'setErrors', + 'warnings' => 'setWarnings' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'level_id' => 'getLevelId', + 'level_name' => 'getLevelName', + 'pay_band' => 'getPayBand', + 'job_titles' => 'getJobTitles', + 'errors' => 'getErrors', + 'warnings' => 'getWarnings' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('level_id', $data ?? [], null); + $this->setIfExists('level_name', $data ?? [], null); + $this->setIfExists('pay_band', $data ?? [], null); + $this->setIfExists('job_titles', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('warnings', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets level_id + * + * @return int|null + */ + public function getLevelId() { + return $this->container['level_id']; + } + + /** + * Sets level_id + * + * @param int|null $level_id level_id + * + * @return self + */ + public function setLevelId($level_id) { + if (is_null($level_id)) { + $this->openApiNullablesSetToNull['level_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['level_id'])) { + unset($nullablesSetToNull['level_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['level_id'] = $level_id; + + return $this; + } + + /** + * Gets level_name + * + * @return string|null + */ + public function getLevelName() { + return $this->container['level_name']; + } + + /** + * Sets level_name + * + * @param string|null $level_name level_name + * + * @return self + */ + public function setLevelName($level_name) { + if (is_null($level_name)) { + $this->openApiNullablesSetToNull['level_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['level_name'])) { + unset($nullablesSetToNull['level_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['level_name'] = $level_name; + + return $this; + } + + /** + * Gets pay_band + * + * @return \BhrSdk\Model\LevelsAndBandsPayBand|null + */ + public function getPayBand() { + return $this->container['pay_band']; + } + + /** + * Sets pay_band + * + * @param \BhrSdk\Model\LevelsAndBandsPayBand|null $pay_band Pay band associated with this level + * + * @return self + */ + public function setPayBand($pay_band) { + if (is_null($pay_band)) { + throw new \InvalidArgumentException('non-nullable pay_band cannot be null'); + } + $this->container['pay_band'] = $pay_band; + + return $this; + } + + /** + * Gets job_titles + * + * @return \BhrSdk\Model\LevelsAndBandsJobTitle[]|null + */ + public function getJobTitles() { + return $this->container['job_titles']; + } + + /** + * Sets job_titles + * + * @param \BhrSdk\Model\LevelsAndBandsJobTitle[]|null $job_titles Array of job titles associated with this level + * + * @return self + */ + public function setJobTitles($job_titles) { + if (is_null($job_titles)) { + throw new \InvalidArgumentException('non-nullable job_titles cannot be null'); + } + $this->container['job_titles'] = $job_titles; + + return $this; + } + + /** + * Gets errors + * + * @return string[]|null + */ + public function getErrors() { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param string[]|null $errors Array of validation errors for this level + * + * @return self + */ + public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets warnings + * + * @return string[]|null + */ + public function getWarnings() { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param string[]|null $warnings Array of validation warnings for this level + * + * @return self + */ + public function setWarnings($warnings) { + if (is_null($warnings)) { + throw new \InvalidArgumentException('non-nullable warnings cannot be null'); + } + $this->container['warnings'] = $warnings; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ApplicationsListApplications.php b/lib/Model/LevelsAndBandsLevelsAndBands.php similarity index 88% rename from lib/Model/ApplicationsListApplications.php rename to lib/Model/LevelsAndBandsLevelsAndBands.php index 125b498e..11d15cc9 100644 --- a/lib/Model/ApplicationsListApplications.php +++ b/lib/Model/LevelsAndBandsLevelsAndBands.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * ApplicationsListApplications + * LevelsAndBandsLevelsAndBands * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * ApplicationsListApplications Class Doc Comment + * LevelsAndBandsLevelsAndBands Class Doc Comment * * @category Class + * @description Object for compensation level groups and levels * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class ApplicationsListApplications implements ModelInterface, ArrayAccess, \JsonSerializable { +class LevelsAndBandsLevelsAndBands implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class ApplicationsListApplications implements ModelInterface, ArrayAccess, \Json * * @var string */ - protected static $openApiModelName = 'ApplicationsList_applications'; + protected static $openApiModelName = 'LevelsAndBands-LevelsAndBands'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +58,7 @@ class ApplicationsListApplications implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openApiTypes = [ - 'items' => '\BhrSdk\Model\ApplicationsListApplicationsItemsInner[]' + 'groups' => '\BhrSdk\Model\LevelsAndBandsGroup[]' ]; /** @@ -68,7 +69,7 @@ class ApplicationsListApplications implements ModelInterface, ArrayAccess, \Json * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'items' => null + 'groups' => null ]; /** @@ -78,7 +79,7 @@ class ApplicationsListApplications implements ModelInterface, ArrayAccess, \Json * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'items' => false + 'groups' => false ]; /** @@ -163,7 +164,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'items' => 'items' + 'groups' => 'groups' ]; /** @@ -172,7 +173,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'items' => 'setItems' + 'groups' => 'setGroups' ]; /** @@ -181,7 +182,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'items' => 'getItems' + 'groups' => 'getGroups' ]; /** @@ -235,7 +236,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('items', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); } /** @@ -263,6 +264,9 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['groups'] === null) { + $invalidProperties[] = "'groups' can't be null"; + } return $invalidProperties; } @@ -277,26 +281,26 @@ public function valid() { } /** - * Gets items + * Gets groups * - * @return \BhrSdk\Model\ApplicationsListApplicationsItemsInner[]|null + * @return \BhrSdk\Model\LevelsAndBandsGroup[] */ - public function getItems() { - return $this->container['items']; + public function getGroups() { + return $this->container['groups']; } /** - * Sets items + * Sets groups * - * @param \BhrSdk\Model\ApplicationsListApplicationsItemsInner[]|null $items List of application objects + * @param \BhrSdk\Model\LevelsAndBandsGroup[] $groups Array of compensation level groups to upsert * * @return self */ - public function setItems($items) { - if (is_null($items)) { - throw new \InvalidArgumentException('non-nullable items cannot be null'); + public function setGroups($groups) { + if (is_null($groups)) { + throw new \InvalidArgumentException('non-nullable groups cannot be null'); } - $this->container['items'] = $items; + $this->container['groups'] = $groups; return $this; } diff --git a/lib/Model/LevelsAndBandsLevelsAndBandsStatus.php b/lib/Model/LevelsAndBandsLevelsAndBandsStatus.php new file mode 100644 index 00000000..2c929294 --- /dev/null +++ b/lib/Model/LevelsAndBandsLevelsAndBandsStatus.php @@ -0,0 +1,497 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsLevelsAndBandsStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsLevelsAndBandsStatus Class Doc Comment + * + * @category Class + * @description Object for compensation level groups and levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsLevelsAndBandsStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-LevelsAndBandsStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'levels' => '\BhrSdk\Model\LevelsAndBandsStepStatus', + 'pay_bands' => '\BhrSdk\Model\LevelsAndBandsStepStatus', + 'job_titles' => '\BhrSdk\Model\LevelsAndBandsJobTitlesStatus', + 'review' => '\BhrSdk\Model\LevelsAndBandsStepStatus' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'levels' => null, + 'pay_bands' => null, + 'job_titles' => null, + 'review' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'levels' => false, + 'pay_bands' => false, + 'job_titles' => false, + 'review' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'levels' => 'levels', + 'pay_bands' => 'payBands', + 'job_titles' => 'jobTitles', + 'review' => 'review' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'levels' => 'setLevels', + 'pay_bands' => 'setPayBands', + 'job_titles' => 'setJobTitles', + 'review' => 'setReview' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'levels' => 'getLevels', + 'pay_bands' => 'getPayBands', + 'job_titles' => 'getJobTitles', + 'review' => 'getReview' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('levels', $data ?? [], null); + $this->setIfExists('pay_bands', $data ?? [], null); + $this->setIfExists('job_titles', $data ?? [], null); + $this->setIfExists('review', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['levels'] === null) { + $invalidProperties[] = "'levels' can't be null"; + } + if ($this->container['pay_bands'] === null) { + $invalidProperties[] = "'pay_bands' can't be null"; + } + if ($this->container['job_titles'] === null) { + $invalidProperties[] = "'job_titles' can't be null"; + } + if ($this->container['review'] === null) { + $invalidProperties[] = "'review' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets levels + * + * @return \BhrSdk\Model\LevelsAndBandsStepStatus + */ + public function getLevels() { + return $this->container['levels']; + } + + /** + * Sets levels + * + * @param \BhrSdk\Model\LevelsAndBandsStepStatus $levels Object for compensation level groups and levels + * + * @return self + */ + public function setLevels($levels) { + if (is_null($levels)) { + throw new \InvalidArgumentException('non-nullable levels cannot be null'); + } + $this->container['levels'] = $levels; + + return $this; + } + + /** + * Gets pay_bands + * + * @return \BhrSdk\Model\LevelsAndBandsStepStatus + */ + public function getPayBands() { + return $this->container['pay_bands']; + } + + /** + * Sets pay_bands + * + * @param \BhrSdk\Model\LevelsAndBandsStepStatus $pay_bands Object for compensation level groups and levels + * + * @return self + */ + public function setPayBands($pay_bands) { + if (is_null($pay_bands)) { + throw new \InvalidArgumentException('non-nullable pay_bands cannot be null'); + } + $this->container['pay_bands'] = $pay_bands; + + return $this; + } + + /** + * Gets job_titles + * + * @return \BhrSdk\Model\LevelsAndBandsJobTitlesStatus + */ + public function getJobTitles() { + return $this->container['job_titles']; + } + + /** + * Sets job_titles + * + * @param \BhrSdk\Model\LevelsAndBandsJobTitlesStatus $job_titles Object for compensation level groups and levels + * + * @return self + */ + public function setJobTitles($job_titles) { + if (is_null($job_titles)) { + throw new \InvalidArgumentException('non-nullable job_titles cannot be null'); + } + $this->container['job_titles'] = $job_titles; + + return $this; + } + + /** + * Gets review + * + * @return \BhrSdk\Model\LevelsAndBandsStepStatus + */ + public function getReview() { + return $this->container['review']; + } + + /** + * Sets review + * + * @param \BhrSdk\Model\LevelsAndBandsStepStatus $review Object for compensation level groups and levels + * + * @return self + */ + public function setReview($review) { + if (is_null($review)) { + throw new \InvalidArgumentException('non-nullable review cannot be null'); + } + $this->container['review'] = $review; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsPayBand.php b/lib/Model/LevelsAndBandsPayBand.php new file mode 100644 index 00000000..7b5f72be --- /dev/null +++ b/lib/Model/LevelsAndBandsPayBand.php @@ -0,0 +1,593 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsPayBand + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsPayBand Class Doc Comment + * + * @category Class + * @description Pay band data object + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsPayBand implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-PayBand'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'level_id' => 'int', + 'min' => 'float', + 'mid' => 'float', + 'max' => 'float', + 'currency_code' => 'string', + 'percentage_range' => 'float', + 'compensation_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'level_id' => null, + 'min' => 'float', + 'mid' => 'float', + 'max' => 'float', + 'currency_code' => null, + 'percentage_range' => 'float', + 'compensation_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'level_id' => true, + 'min' => false, + 'mid' => false, + 'max' => false, + 'currency_code' => true, + 'percentage_range' => false, + 'compensation_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'level_id' => 'levelId', + 'min' => 'min', + 'mid' => 'mid', + 'max' => 'max', + 'currency_code' => 'currencyCode', + 'percentage_range' => 'percentageRange', + 'compensation_type' => 'compensationType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'level_id' => 'setLevelId', + 'min' => 'setMin', + 'mid' => 'setMid', + 'max' => 'setMax', + 'currency_code' => 'setCurrencyCode', + 'percentage_range' => 'setPercentageRange', + 'compensation_type' => 'setCompensationType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'level_id' => 'getLevelId', + 'min' => 'getMin', + 'mid' => 'getMid', + 'max' => 'getMax', + 'currency_code' => 'getCurrencyCode', + 'percentage_range' => 'getPercentageRange', + 'compensation_type' => 'getCompensationType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('level_id', $data ?? [], null); + $this->setIfExists('min', $data ?? [], null); + $this->setIfExists('mid', $data ?? [], null); + $this->setIfExists('max', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('percentage_range', $data ?? [], null); + $this->setIfExists('compensation_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets level_id + * + * @return int|null + */ + public function getLevelId() { + return $this->container['level_id']; + } + + /** + * Sets level_id + * + * @param int|null $level_id level_id + * + * @return self + */ + public function setLevelId($level_id) { + if (is_null($level_id)) { + $this->openApiNullablesSetToNull['level_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['level_id'])) { + unset($nullablesSetToNull['level_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['level_id'] = $level_id; + + return $this; + } + + /** + * Gets min + * + * @return float|null + */ + public function getMin() { + return $this->container['min']; + } + + /** + * Sets min + * + * @param float|null $min The minimum value for the level + * + * @return self + */ + public function setMin($min) { + if (is_null($min)) { + throw new \InvalidArgumentException('non-nullable min cannot be null'); + } + $this->container['min'] = $min; + + return $this; + } + + /** + * Gets mid + * + * @return float|null + */ + public function getMid() { + return $this->container['mid']; + } + + /** + * Sets mid + * + * @param float|null $mid The middle value for the level + * + * @return self + */ + public function setMid($mid) { + if (is_null($mid)) { + throw new \InvalidArgumentException('non-nullable mid cannot be null'); + } + $this->container['mid'] = $mid; + + return $this; + } + + /** + * Gets max + * + * @return float|null + */ + public function getMax() { + return $this->container['max']; + } + + /** + * Sets max + * + * @param float|null $max The maximum value for the level + * + * @return self + */ + public function setMax($max) { + if (is_null($max)) { + throw new \InvalidArgumentException('non-nullable max cannot be null'); + } + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets percentage_range + * + * @return float|null + */ + public function getPercentageRange() { + return $this->container['percentage_range']; + } + + /** + * Sets percentage_range + * + * @param float|null $percentage_range The percentage range for the level + * + * @return self + */ + public function setPercentageRange($percentage_range) { + if (is_null($percentage_range)) { + throw new \InvalidArgumentException('non-nullable percentage_range cannot be null'); + } + $this->container['percentage_range'] = $percentage_range; + + return $this; + } + + /** + * Gets compensation_type + * + * @return string|null + */ + public function getCompensationType() { + return $this->container['compensation_type']; + } + + /** + * Sets compensation_type + * + * @param string|null $compensation_type The compensation type for the level + * + * @return self + */ + public function setCompensationType($compensation_type) { + if (is_null($compensation_type)) { + throw new \InvalidArgumentException('non-nullable compensation_type cannot be null'); + } + $this->container['compensation_type'] = $compensation_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsStepStatus.php b/lib/Model/LevelsAndBandsStepStatus.php new file mode 100644 index 00000000..26971f9d --- /dev/null +++ b/lib/Model/LevelsAndBandsStepStatus.php @@ -0,0 +1,462 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsStepStatus + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsStepStatus Class Doc Comment + * + * @category Class + * @description Object for compensation level groups and levels + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsStepStatus implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-StepStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'is_complete' => 'bool', + 'errors' => '\BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[]', + 'warnings' => '\BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'is_complete' => null, + 'errors' => null, + 'warnings' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'is_complete' => false, + 'errors' => false, + 'warnings' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'is_complete' => 'isComplete', + 'errors' => 'errors', + 'warnings' => 'warnings' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'is_complete' => 'setIsComplete', + 'errors' => 'setErrors', + 'warnings' => 'setWarnings' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'is_complete' => 'getIsComplete', + 'errors' => 'getErrors', + 'warnings' => 'getWarnings' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('is_complete', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('warnings', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['is_complete'] === null) { + $invalidProperties[] = "'is_complete' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + if ($this->container['warnings'] === null) { + $invalidProperties[] = "'warnings' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets is_complete + * + * @return bool + */ + public function getIsComplete() { + return $this->container['is_complete']; + } + + /** + * Sets is_complete + * + * @param bool $is_complete Whether the step is complete + * + * @return self + */ + public function setIsComplete($is_complete) { + if (is_null($is_complete)) { + throw new \InvalidArgumentException('non-nullable is_complete cannot be null'); + } + $this->container['is_complete'] = $is_complete; + + return $this; + } + + /** + * Gets errors + * + * @return \BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[] + */ + public function getErrors() { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[] $errors Array of errors + * + * @return self + */ + public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets warnings + * + * @return \BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[] + */ + public function getWarnings() { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param \BhrSdk\Model\LevelsAndBandsErrorWarningIdentifier[] $warnings Array of warnings + * + * @return self + */ + public function setWarnings($warnings) { + if (is_null($warnings)) { + throw new \InvalidArgumentException('non-nullable warnings cannot be null'); + } + $this->container['warnings'] = $warnings; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LevelsAndBandsUploadResponse.php b/lib/Model/LevelsAndBandsUploadResponse.php new file mode 100644 index 00000000..b644a7cc --- /dev/null +++ b/lib/Model/LevelsAndBandsUploadResponse.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * LevelsAndBandsUploadResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LevelsAndBandsUploadResponse Class Doc Comment + * + * @category Class + * @description Schema for levels and bands import upload response + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LevelsAndBandsUploadResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LevelsAndBands-UploadResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'upload_data' => 'string[]', + 'column_map' => '\BhrSdk\Model\LevelsAndBandsColumnMap[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'upload_data' => null, + 'column_map' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'upload_data' => false, + 'column_map' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'upload_data' => 'uploadData', + 'column_map' => 'columnMap' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'upload_data' => 'setUploadData', + 'column_map' => 'setColumnMap' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'upload_data' => 'getUploadData', + 'column_map' => 'getColumnMap' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('upload_data', $data ?? [], null); + $this->setIfExists('column_map', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets upload_data + * + * @return string[]|null + */ + public function getUploadData() { + return $this->container['upload_data']; + } + + /** + * Sets upload_data + * + * @param string[]|null $upload_data Upload data + * + * @return self + */ + public function setUploadData($upload_data) { + if (is_null($upload_data)) { + throw new \InvalidArgumentException('non-nullable upload_data cannot be null'); + } + $this->container['upload_data'] = $upload_data; + + return $this; + } + + /** + * Gets column_map + * + * @return \BhrSdk\Model\LevelsAndBandsColumnMap[]|null + */ + public function getColumnMap() { + return $this->container['column_map']; + } + + /** + * Sets column_map + * + * @param \BhrSdk\Model\LevelsAndBandsColumnMap[]|null $column_map Column map + * + * @return self + */ + public function setColumnMap($column_map) { + if (is_null($column_map)) { + throw new \InvalidArgumentException('non-nullable column_map cannot be null'); + } + $this->container['column_map'] = $column_map; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListFieldDetail.php b/lib/Model/ListFieldDetail.php new file mode 100644 index 00000000..cd58eb96 --- /dev/null +++ b/lib/Model/ListFieldDetail.php @@ -0,0 +1,654 @@ +<?php +declare(strict_types=1); +/** + * ListFieldDetail + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListFieldDetail Class Doc Comment + * + * @category Class + * @description A single list field and its available options. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListFieldDetail implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListFieldDetail'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'field_id' => 'int', + 'name' => 'string', + 'alias' => 'string', + 'manageable' => 'string', + 'multiple' => 'string', + 'options' => '\BhrSdk\Model\ListFieldOption[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'field_id' => null, + 'name' => null, + 'alias' => null, + 'manageable' => null, + 'multiple' => null, + 'options' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'field_id' => false, + 'name' => false, + 'alias' => true, + 'manageable' => false, + 'multiple' => false, + 'options' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'field_id' => 'fieldId', + 'name' => 'name', + 'alias' => 'alias', + 'manageable' => 'manageable', + 'multiple' => 'multiple', + 'options' => 'options' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'field_id' => 'setFieldId', + 'name' => 'setName', + 'alias' => 'setAlias', + 'manageable' => 'setManageable', + 'multiple' => 'setMultiple', + 'options' => 'setOptions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'field_id' => 'getFieldId', + 'name' => 'getName', + 'alias' => 'getAlias', + 'manageable' => 'getManageable', + 'multiple' => 'getMultiple', + 'options' => 'getOptions' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const MANAGEABLE_YES = 'yes'; + public const MANAGEABLE_NO = 'no'; + public const MULTIPLE_YES = 'yes'; + public const MULTIPLE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getManageableAllowableValues() { + return [ + self::MANAGEABLE_YES, + self::MANAGEABLE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMultipleAllowableValues() { + return [ + self::MULTIPLE_YES, + self::MULTIPLE_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('field_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('manageable', $data ?? [], null); + $this->setIfExists('multiple', $data ?? [], null); + $this->setIfExists('options', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getManageableAllowableValues(); + if (!is_null($this->container['manageable']) && !in_array($this->container['manageable'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'manageable', must be one of '%s'", + $this->container['manageable'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getMultipleAllowableValues(); + if (!is_null($this->container['multiple']) && !in_array($this->container['multiple'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'multiple', must be one of '%s'", + $this->container['multiple'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The list ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets field_id + * + * @return int|null + */ + public function getFieldId() { + return $this->container['field_id']; + } + + /** + * Sets field_id + * + * @param int|null $field_id The field ID. + * + * @return self + */ + public function setFieldId($field_id) { + if (is_null($field_id)) { + throw new \InvalidArgumentException('non-nullable field_id cannot be null'); + } + $this->container['field_id'] = $field_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The display name of the list field. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets alias + * + * @return string|null + */ + public function getAlias() { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string|null $alias alias + * + * @return self + */ + public function setAlias($alias) { + if (is_null($alias)) { + $this->openApiNullablesSetToNull['alias'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['alias'])) { + unset($nullablesSetToNull['alias']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets manageable + * + * @return string|null + */ + public function getManageable() { + return $this->container['manageable']; + } + + /** + * Sets manageable + * + * @param string|null $manageable Whether the list field options can be modified via the API. + * + * @return self + */ + public function setManageable($manageable) { + if (is_null($manageable)) { + throw new \InvalidArgumentException('non-nullable manageable cannot be null'); + } + $allowedValues = $this->getManageableAllowableValues(); + if (!in_array($manageable, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'manageable', must be one of '%s'", + $manageable, + implode("', '", $allowedValues) + ) + ); + } + $this->container['manageable'] = $manageable; + + return $this; + } + + /** + * Gets multiple + * + * @return string|null + */ + public function getMultiple() { + return $this->container['multiple']; + } + + /** + * Sets multiple + * + * @param string|null $multiple Whether this field supports multiple values. + * + * @return self + */ + public function setMultiple($multiple) { + if (is_null($multiple)) { + throw new \InvalidArgumentException('non-nullable multiple cannot be null'); + } + $allowedValues = $this->getMultipleAllowableValues(); + if (!in_array($multiple, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'multiple', must be one of '%s'", + $multiple, + implode("', '", $allowedValues) + ) + ); + } + $this->container['multiple'] = $multiple; + + return $this; + } + + /** + * Gets options + * + * @return \BhrSdk\Model\ListFieldOption[]|null + */ + public function getOptions() { + return $this->container['options']; + } + + /** + * Sets options + * + * @param \BhrSdk\Model\ListFieldOption[]|null $options The available options for this list field. + * + * @return self + */ + public function setOptions($options) { + if (is_null($options)) { + throw new \InvalidArgumentException('non-nullable options cannot be null'); + } + $this->container['options'] = $options; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListFieldOption.php b/lib/Model/ListFieldOption.php new file mode 100644 index 00000000..1c0cf40f --- /dev/null +++ b/lib/Model/ListFieldOption.php @@ -0,0 +1,666 @@ +<?php +declare(strict_types=1); +/** + * ListFieldOption + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListFieldOption Class Doc Comment + * + * @category Class + * @description A single option on a list field. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListFieldOption implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListFieldOption'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'archived' => 'string', + 'created_date' => 'string', + 'archived_date' => 'string', + 'manageable' => 'string', + 'frequency' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'archived' => null, + 'created_date' => null, + 'archived_date' => null, + 'manageable' => null, + 'frequency' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'archived' => false, + 'created_date' => true, + 'archived_date' => true, + 'manageable' => false, + 'frequency' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'archived' => 'archived', + 'created_date' => 'createdDate', + 'archived_date' => 'archivedDate', + 'manageable' => 'manageable', + 'frequency' => 'frequency' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'archived' => 'setArchived', + 'created_date' => 'setCreatedDate', + 'archived_date' => 'setArchivedDate', + 'manageable' => 'setManageable', + 'frequency' => 'setFrequency' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'archived' => 'getArchived', + 'created_date' => 'getCreatedDate', + 'archived_date' => 'getArchivedDate', + 'manageable' => 'getManageable', + 'frequency' => 'getFrequency' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const ARCHIVED_YES = 'yes'; + public const ARCHIVED_NO = 'no'; + public const MANAGEABLE_YES = 'yes'; + public const MANAGEABLE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchivedAllowableValues() { + return [ + self::ARCHIVED_YES, + self::ARCHIVED_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getManageableAllowableValues() { + return [ + self::MANAGEABLE_YES, + self::MANAGEABLE_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('created_date', $data ?? [], null); + $this->setIfExists('archived_date', $data ?? [], null); + $this->setIfExists('manageable', $data ?? [], null); + $this->setIfExists('frequency', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getArchivedAllowableValues(); + if (!is_null($this->container['archived']) && !in_array($this->container['archived'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'archived', must be one of '%s'", + $this->container['archived'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getManageableAllowableValues(); + if (!is_null($this->container['manageable']) && !in_array($this->container['manageable'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'manageable', must be one of '%s'", + $this->container['manageable'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The option ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The display value of the option. In XML format, this is the text content of the <option> element. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets archived + * + * @return string|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param string|null $archived Whether this option is archived. Archived options are preserved for historical data integrity and continue to appear in responses. Filter by archived: no to show only active options. + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $allowedValues = $this->getArchivedAllowableValues(); + if (!in_array($archived, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'archived', must be one of '%s'", + $archived, + implode("', '", $allowedValues) + ) + ); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets created_date + * + * @return string|null + */ + public function getCreatedDate() { + return $this->container['created_date']; + } + + /** + * Sets created_date + * + * @param string|null $created_date created_date + * + * @return self + */ + public function setCreatedDate($created_date) { + if (is_null($created_date)) { + $this->openApiNullablesSetToNull['created_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_date'])) { + unset($nullablesSetToNull['created_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_date'] = $created_date; + + return $this; + } + + /** + * Gets archived_date + * + * @return string|null + */ + public function getArchivedDate() { + return $this->container['archived_date']; + } + + /** + * Sets archived_date + * + * @param string|null $archived_date archived_date + * + * @return self + */ + public function setArchivedDate($archived_date) { + if (is_null($archived_date)) { + $this->openApiNullablesSetToNull['archived_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['archived_date'])) { + unset($nullablesSetToNull['archived_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['archived_date'] = $archived_date; + + return $this; + } + + /** + * Gets manageable + * + * @return string|null + */ + public function getManageable() { + return $this->container['manageable']; + } + + /** + * Sets manageable + * + * @param string|null $manageable Whether this individual option can be modified via the API. + * + * @return self + */ + public function setManageable($manageable) { + if (is_null($manageable)) { + throw new \InvalidArgumentException('non-nullable manageable cannot be null'); + } + $allowedValues = $this->getManageableAllowableValues(); + if (!in_array($manageable, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'manageable', must be one of '%s'", + $manageable, + implode("', '", $allowedValues) + ) + ); + } + $this->container['manageable'] = $manageable; + + return $this; + } + + /** + * Gets frequency + * + * @return string|null + */ + public function getFrequency() { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string|null $frequency frequency + * + * @return self + */ + public function setFrequency($frequency) { + if (is_null($frequency)) { + $this->openApiNullablesSetToNull['frequency'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['frequency'])) { + unset($nullablesSetToNull['frequency']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['frequency'] = $frequency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListFieldValues.php b/lib/Model/ListFieldValues.php index 1feaefdf..a247d252 100644 --- a/lib/Model/ListFieldValues.php +++ b/lib/Model/ListFieldValues.php @@ -36,6 +36,7 @@ * ListFieldValues Class Doc Comment * * @category Class + * @description Payload for creating, updating, or archiving options on a list field. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -288,7 +289,7 @@ public function getOptions() { /** * Sets options * - * @param \BhrSdk\Model\ListFieldValuesOptionsInner[]|null $options options + * @param \BhrSdk\Model\ListFieldValuesOptionsInner[]|null $options The list field options to create, update, or archive. * * @return self */ diff --git a/lib/Model/ListFieldValuesOptionsInner.php b/lib/Model/ListFieldValuesOptionsInner.php index dc6c6e66..2e864b72 100644 --- a/lib/Model/ListFieldValuesOptionsInner.php +++ b/lib/Model/ListFieldValuesOptionsInner.php @@ -239,6 +239,21 @@ public function getModelName() { return self::$openApiModelName; } + public const ARCHIVED_YES = 'yes'; + public const ARCHIVED_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchivedAllowableValues() { + return [ + self::ARCHIVED_YES, + self::ARCHIVED_NO, + ]; + } + /** * Associative array for storing property values * @@ -284,6 +299,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getArchivedAllowableValues(); + if (!is_null($this->container['archived']) && !in_array($this->container['archived'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'archived', must be one of '%s'", + $this->container['archived'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -309,7 +333,7 @@ public function getId() { /** * Sets id * - * @param int|null $id id + * @param int|null $id The existing option ID. Omit this field to create a new option. Required when archiving an existing option. * * @return self */ @@ -334,7 +358,7 @@ public function getValue() { /** * Sets value * - * @param string|null $value value + * @param string|null $value The display value for the option. Required when creating a new option (i.e., when id is omitted). * * @return self */ @@ -359,7 +383,7 @@ public function getArchived() { /** * Sets archived * - * @param string|null $archived archived + * @param string|null $archived Whether the option should be archived. Use `yes` to soft-delete an option or `no` to reactivate a previously archived option. Archived options continue to appear in GET responses for historical data integrity. * * @return self */ @@ -367,6 +391,16 @@ public function setArchived($archived) { if (is_null($archived)) { throw new \InvalidArgumentException('non-nullable archived cannot be null'); } + $allowedValues = $this->getArchivedAllowableValues(); + if (!in_array($archived, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'archived', must be one of '%s'", + $archived, + implode("', '", $allowedValues) + ) + ); + } $this->container['archived'] = $archived; return $this; @@ -384,7 +418,7 @@ public function getAdpCode() { /** * Sets adp_code * - * @param string|null $adp_code adp_code + * @param string|null $adp_code Optional payroll-mapping code associated with the option. * * @return self */ diff --git a/lib/Model/ListFieldValuesXml.php b/lib/Model/ListFieldValuesXml.php new file mode 100644 index 00000000..6a9668be --- /dev/null +++ b/lib/Model/ListFieldValuesXml.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * ListFieldValuesXml + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListFieldValuesXml Class Doc Comment + * + * @category Class + * @description XML payload for creating, updating, or archiving options on a list field. The root element is <options>, containing one or more <option> elements. Each <option> element carries optional id, archived, and adpCode XML attributes; the display value is the text content of the element. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListFieldValuesXml implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListFieldValuesXml'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'option' => '\BhrSdk\Model\ListFieldValuesXmlOptionInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'option' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'option' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'option' => 'option' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'option' => 'setOption' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'option' => 'getOption' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('option', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets option + * + * @return \BhrSdk\Model\ListFieldValuesXmlOptionInner[]|null + */ + public function getOption() { + return $this->container['option']; + } + + /** + * Sets option + * + * @param \BhrSdk\Model\ListFieldValuesXmlOptionInner[]|null $option One or more options to create, update, or archive. + * + * @return self + */ + public function setOption($option) { + if (is_null($option)) { + throw new \InvalidArgumentException('non-nullable option cannot be null'); + } + $this->container['option'] = $option; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListFieldValuesXmlOptionInner.php b/lib/Model/ListFieldValuesXmlOptionInner.php new file mode 100644 index 00000000..1d3d4d0a --- /dev/null +++ b/lib/Model/ListFieldValuesXmlOptionInner.php @@ -0,0 +1,518 @@ +<?php +declare(strict_types=1); +/** + * ListFieldValuesXmlOptionInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListFieldValuesXmlOptionInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListFieldValuesXmlOptionInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListFieldValuesXml_option_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'value' => 'string', + 'archived' => 'string', + 'adp_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'value' => null, + 'archived' => null, + 'adp_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'value' => false, + 'archived' => false, + 'adp_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'value' => 'value', + 'archived' => 'archived', + 'adp_code' => 'adpCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'value' => 'setValue', + 'archived' => 'setArchived', + 'adp_code' => 'setAdpCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'value' => 'getValue', + 'archived' => 'getArchived', + 'adp_code' => 'getAdpCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const ARCHIVED_YES = 'yes'; + public const ARCHIVED_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArchivedAllowableValues() { + return [ + self::ARCHIVED_YES, + self::ARCHIVED_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('adp_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getArchivedAllowableValues(); + if (!is_null($this->container['archived']) && !in_array($this->container['archived'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'archived', must be one of '%s'", + $this->container['archived'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The existing option ID. Omit to create a new option. Required when archiving. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value The display value for the option. In XML format, this is the text content of the <option> element. + * + * @return self + */ + public function setValue($value) { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets archived + * + * @return string|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param string|null $archived Whether to archive this option. Use yes to soft-delete or no to reactivate. + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $allowedValues = $this->getArchivedAllowableValues(); + if (!in_array($archived, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'archived', must be one of '%s'", + $archived, + implode("', '", $allowedValues) + ) + ); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets adp_code + * + * @return string|null + */ + public function getAdpCode() { + return $this->container['adp_code']; + } + + /** + * Sets adp_code + * + * @param string|null $adp_code Optional payroll-mapping code. + * + * @return self + */ + public function setAdpCode($adp_code) { + if (is_null($adp_code)) { + throw new \InvalidArgumentException('non-nullable adp_code cannot be null'); + } + $this->container['adp_code'] = $adp_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListUsersResponseValue.php b/lib/Model/ListUsersResponseValue.php new file mode 100644 index 00000000..accbffee --- /dev/null +++ b/lib/Model/ListUsersResponseValue.php @@ -0,0 +1,614 @@ +<?php +declare(strict_types=1); +/** + * ListUsersResponseValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListUsersResponseValue Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListUsersResponseValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListUsersResponse_value'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'first_name' => 'string', + 'last_name' => 'string', + 'email' => 'string', + 'status' => 'string', + 'last_login' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'first_name' => null, + 'last_name' => null, + 'email' => null, + 'status' => null, + 'last_login' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'first_name' => false, + 'last_name' => false, + 'email' => false, + 'status' => false, + 'last_login' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'email' => 'email', + 'status' => 'status', + 'last_login' => 'lastLogin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'email' => 'setEmail', + 'status' => 'setStatus', + 'last_login' => 'setLastLogin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'email' => 'getEmail', + 'status' => 'getStatus', + 'last_login' => 'getLastLogin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_ENABLED = 'enabled'; + public const STATUS_DISABLED = 'disabled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_ENABLED, + self::STATUS_DISABLED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('last_login', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The user ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The ID of the employee record linked to this user. Always present in the JSON response; `0` when no employee record is associated. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name First name. + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + throw new \InvalidArgumentException('non-nullable first_name cannot be null'); + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name Last name. + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The user's email address. Resolved in priority order: work email, home email, account email. + * + * @return self + */ + public function setEmail($email) { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Account status. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets last_login + * + * @return \DateTime|null + */ + public function getLastLogin() { + return $this->container['last_login']; + } + + /** + * Sets last_login + * + * @param \DateTime|null $last_login ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in. + * + * @return self + */ + public function setLastLogin($last_login) { + if (is_null($last_login)) { + throw new \InvalidArgumentException('non-nullable last_login cannot be null'); + } + $this->container['last_login'] = $last_login; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListUsersXmlResponse.php b/lib/Model/ListUsersXmlResponse.php new file mode 100644 index 00000000..33be850a --- /dev/null +++ b/lib/Model/ListUsersXmlResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * ListUsersXmlResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListUsersXmlResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListUsersXmlResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListUsersXmlResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'user' => '\BhrSdk\Model\ListUsersXmlResponseUserInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'user' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'user' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'user' => 'user' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'user' => 'setUser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'user' => 'getUser' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('user', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets user + * + * @return \BhrSdk\Model\ListUsersXmlResponseUserInner[]|null + */ + public function getUser() { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \BhrSdk\Model\ListUsersXmlResponseUserInner[]|null $user user + * + * @return self + */ + public function setUser($user) { + if (is_null($user)) { + throw new \InvalidArgumentException('non-nullable user cannot be null'); + } + $this->container['user'] = $user; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ListUsersXmlResponseUserInner.php b/lib/Model/ListUsersXmlResponseUserInner.php new file mode 100644 index 00000000..517f9962 --- /dev/null +++ b/lib/Model/ListUsersXmlResponseUserInner.php @@ -0,0 +1,614 @@ +<?php +declare(strict_types=1); +/** + * ListUsersXmlResponseUserInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ListUsersXmlResponseUserInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ListUsersXmlResponseUserInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ListUsersXmlResponse_user_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'first_name' => 'string', + 'last_name' => 'string', + 'email' => 'string', + 'status' => 'string', + 'last_login' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'first_name' => null, + 'last_name' => null, + 'email' => null, + 'status' => null, + 'last_login' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'first_name' => false, + 'last_name' => false, + 'email' => false, + 'status' => false, + 'last_login' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'email' => 'email', + 'status' => 'status', + 'last_login' => 'lastLogin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'email' => 'setEmail', + 'status' => 'setStatus', + 'last_login' => 'setLastLogin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'email' => 'getEmail', + 'status' => 'getStatus', + 'last_login' => 'getLastLogin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_ENABLED = 'enabled'; + public const STATUS_DISABLED = 'disabled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_ENABLED, + self::STATUS_DISABLED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('last_login', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The user ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The employee record ID. Present as an XML attribute only when the user has an associated employee record. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name First name. + * + * @return self + */ + public function setFirstName($first_name) { + if (is_null($first_name)) { + throw new \InvalidArgumentException('non-nullable first_name cannot be null'); + } + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name Last name. + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The user's email address. + * + * @return self + */ + public function setEmail($email) { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Account status. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets last_login + * + * @return \DateTime|null + */ + public function getLastLogin() { + return $this->container['last_login']; + } + + /** + * Sets last_login + * + * @param \DateTime|null $last_login ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in. + * + * @return self + */ + public function setLastLogin($last_login) { + if (is_null($last_login)) { + throw new \InvalidArgumentException('non-nullable last_login cannot be null'); + } + $this->container['last_login'] = $last_login; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LocationResponseObject.php b/lib/Model/LocationResponseObject.php new file mode 100644 index 00000000..fdc3b099 --- /dev/null +++ b/lib/Model/LocationResponseObject.php @@ -0,0 +1,593 @@ +<?php +declare(strict_types=1); +/** + * LocationResponseObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LocationResponseObject Class Doc Comment + * + * @category Class + * @description Transformer for location data with nested address structure + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LocationResponseObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LocationResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'label' => 'string', + 'archived' => 'bool', + 'manageable' => 'bool', + 'address' => '\BhrSdk\Model\LocationResponseObjectAddress', + 'created_at' => '\DateTime', + 'archived_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'label' => null, + 'archived' => null, + 'manageable' => null, + 'address' => null, + 'created_at' => 'date-time', + 'archived_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'label' => false, + 'archived' => false, + 'manageable' => false, + 'address' => false, + 'created_at' => true, + 'archived_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'label' => 'label', + 'archived' => 'archived', + 'manageable' => 'manageable', + 'address' => 'address', + 'created_at' => 'createdAt', + 'archived_at' => 'archivedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'label' => 'setLabel', + 'archived' => 'setArchived', + 'manageable' => 'setManageable', + 'address' => 'setAddress', + 'created_at' => 'setCreatedAt', + 'archived_at' => 'setArchivedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'label' => 'getLabel', + 'archived' => 'getArchived', + 'manageable' => 'getManageable', + 'address' => 'getAddress', + 'created_at' => 'getCreatedAt', + 'archived_at' => 'getArchivedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('manageable', $data ?? [], null); + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('archived_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for the location + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Display name for the location + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Whether the location is archived + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets manageable + * + * @return bool|null + */ + public function getManageable() { + return $this->container['manageable']; + } + + /** + * Sets manageable + * + * @param bool|null $manageable Whether the location is manageable + * + * @return self + */ + public function setManageable($manageable) { + if (is_null($manageable)) { + throw new \InvalidArgumentException('non-nullable manageable cannot be null'); + } + $this->container['manageable'] = $manageable; + + return $this; + } + + /** + * Gets address + * + * @return \BhrSdk\Model\LocationResponseObjectAddress|null + */ + public function getAddress() { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \BhrSdk\Model\LocationResponseObjectAddress|null $address address + * + * @return self + */ + public function setAddress($address) { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + $this->openApiNullablesSetToNull['created_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_at'])) { + unset($nullablesSetToNull['created_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets archived_at + * + * @return \DateTime|null + */ + public function getArchivedAt() { + return $this->container['archived_at']; + } + + /** + * Sets archived_at + * + * @param \DateTime|null $archived_at archived_at + * + * @return self + */ + public function setArchivedAt($archived_at) { + if (is_null($archived_at)) { + $this->openApiNullablesSetToNull['archived_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['archived_at'])) { + unset($nullablesSetToNull['archived_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['archived_at'] = $archived_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LocationResponseObjectAddress.php b/lib/Model/LocationResponseObjectAddress.php new file mode 100644 index 00000000..0aebe6f6 --- /dev/null +++ b/lib/Model/LocationResponseObjectAddress.php @@ -0,0 +1,719 @@ +<?php +declare(strict_types=1); +/** + * LocationResponseObjectAddress + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LocationResponseObjectAddress Class Doc Comment + * + * @category Class + * @description Address information for the location + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LocationResponseObjectAddress implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LocationResponseObject_address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'state_id' => 'string', + 'state' => '\BhrSdk\Model\LocationResponseObjectAddressState', + 'zipcode' => 'string', + 'country_id' => 'string', + 'country' => '\BhrSdk\Model\LocationResponseObjectAddressCountry', + 'timezone' => 'string', + 'remote_location' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'address1' => null, + 'address2' => null, + 'city' => null, + 'state_id' => null, + 'state' => null, + 'zipcode' => null, + 'country_id' => null, + 'country' => null, + 'timezone' => null, + 'remote_location' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'address1' => true, + 'address2' => true, + 'city' => true, + 'state_id' => true, + 'state' => false, + 'zipcode' => true, + 'country_id' => true, + 'country' => false, + 'timezone' => true, + 'remote_location' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address1' => 'address1', + 'address2' => 'address2', + 'city' => 'city', + 'state_id' => 'stateId', + 'state' => 'state', + 'zipcode' => 'zipcode', + 'country_id' => 'countryId', + 'country' => 'country', + 'timezone' => 'timezone', + 'remote_location' => 'remoteLocation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address1' => 'setAddress1', + 'address2' => 'setAddress2', + 'city' => 'setCity', + 'state_id' => 'setStateId', + 'state' => 'setState', + 'zipcode' => 'setZipcode', + 'country_id' => 'setCountryId', + 'country' => 'setCountry', + 'timezone' => 'setTimezone', + 'remote_location' => 'setRemoteLocation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address1' => 'getAddress1', + 'address2' => 'getAddress2', + 'city' => 'getCity', + 'state_id' => 'getStateId', + 'state' => 'getState', + 'zipcode' => 'getZipcode', + 'country_id' => 'getCountryId', + 'country' => 'getCountry', + 'timezone' => 'getTimezone', + 'remote_location' => 'getRemoteLocation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('address1', $data ?? [], null); + $this->setIfExists('address2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state_id', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('remote_location', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets address1 + * + * @return string|null + */ + public function getAddress1() { + return $this->container['address1']; + } + + /** + * Sets address1 + * + * @param string|null $address1 address1 + * + * @return self + */ + public function setAddress1($address1) { + if (is_null($address1)) { + $this->openApiNullablesSetToNull['address1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address1'])) { + unset($nullablesSetToNull['address1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address1'] = $address1; + + return $this; + } + + /** + * Gets address2 + * + * @return string|null + */ + public function getAddress2() { + return $this->container['address2']; + } + + /** + * Sets address2 + * + * @param string|null $address2 address2 + * + * @return self + */ + public function setAddress2($address2) { + if (is_null($address2)) { + $this->openApiNullablesSetToNull['address2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address2'])) { + unset($nullablesSetToNull['address2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address2'] = $address2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state_id + * + * @return string|null + */ + public function getStateId() { + return $this->container['state_id']; + } + + /** + * Sets state_id + * + * @param string|null $state_id state_id + * + * @return self + */ + public function setStateId($state_id) { + if (is_null($state_id)) { + $this->openApiNullablesSetToNull['state_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state_id'])) { + unset($nullablesSetToNull['state_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state_id'] = $state_id; + + return $this; + } + + /** + * Gets state + * + * @return \BhrSdk\Model\LocationResponseObjectAddressState|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param \BhrSdk\Model\LocationResponseObjectAddressState|null $state state + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode zipcode + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + $this->openApiNullablesSetToNull['zipcode'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zipcode'])) { + unset($nullablesSetToNull['zipcode']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zipcode'] = $zipcode; + + return $this; + } + + /** + * Gets country_id + * + * @return string|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param string|null $country_id country_id + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + $this->openApiNullablesSetToNull['country_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country_id'])) { + unset($nullablesSetToNull['country_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets country + * + * @return \BhrSdk\Model\LocationResponseObjectAddressCountry|null + */ + public function getCountry() { + return $this->container['country']; + } + + /** + * Sets country + * + * @param \BhrSdk\Model\LocationResponseObjectAddressCountry|null $country country + * + * @return self + */ + public function setCountry($country) { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + $this->openApiNullablesSetToNull['timezone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['timezone'])) { + unset($nullablesSetToNull['timezone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets remote_location + * + * @return bool|null + */ + public function getRemoteLocation() { + return $this->container['remote_location']; + } + + /** + * Sets remote_location + * + * @param bool|null $remote_location Whether this is a remote location + * + * @return self + */ + public function setRemoteLocation($remote_location) { + if (is_null($remote_location)) { + throw new \InvalidArgumentException('non-nullable remote_location cannot be null'); + } + $this->container['remote_location'] = $remote_location; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LocationResponseObjectAddressCountry.php b/lib/Model/LocationResponseObjectAddressCountry.php new file mode 100644 index 00000000..d313eeae --- /dev/null +++ b/lib/Model/LocationResponseObjectAddressCountry.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * LocationResponseObjectAddressCountry + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LocationResponseObjectAddressCountry Class Doc Comment + * + * @category Class + * @description Country information. Optional and requested via expand property from the request + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LocationResponseObjectAddressCountry implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LocationResponseObject_address_country'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'iso_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'iso_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'iso_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'iso_code' => 'isoCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'iso_code' => 'setIsoCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'iso_code' => 'getIsoCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('iso_code', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Country identifier + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Country name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets iso_code + * + * @return string|null + */ + public function getIsoCode() { + return $this->container['iso_code']; + } + + /** + * Sets iso_code + * + * @param string|null $iso_code Country ISO code + * + * @return self + */ + public function setIsoCode($iso_code) { + if (is_null($iso_code)) { + throw new \InvalidArgumentException('non-nullable iso_code cannot be null'); + } + $this->container['iso_code'] = $iso_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LocationResponseObjectAddressState.php b/lib/Model/LocationResponseObjectAddressState.php new file mode 100644 index 00000000..e0598e73 --- /dev/null +++ b/lib/Model/LocationResponseObjectAddressState.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * LocationResponseObjectAddressState + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LocationResponseObjectAddressState Class Doc Comment + * + * @category Class + * @description State information. Optional and requested via expand property from the request + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LocationResponseObjectAddressState implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LocationResponseObject_address_state'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'abbreviation' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'abbreviation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'abbreviation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'abbreviation' => 'abbreviation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'abbreviation' => 'setAbbreviation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'abbreviation' => 'getAbbreviation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('abbreviation', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id State identifier + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name State name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets abbreviation + * + * @return string|null + */ + public function getAbbreviation() { + return $this->container['abbreviation']; + } + + /** + * Sets abbreviation + * + * @param string|null $abbreviation State abbreviation + * + * @return self + */ + public function setAbbreviation($abbreviation) { + if (is_null($abbreviation)) { + throw new \InvalidArgumentException('non-nullable abbreviation cannot be null'); + } + $this->container['abbreviation'] = $abbreviation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LoginFailureResponse.php b/lib/Model/LoginFailureResponse.php new file mode 100644 index 00000000..fc3fbca2 --- /dev/null +++ b/lib/Model/LoginFailureResponse.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * LoginFailureResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LoginFailureResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LoginFailureResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LoginFailureResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'success' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'success' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'success' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'success' => 'success' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('success', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['success'] === null) { + $invalidProperties[] = "'success' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success Always `false`. + * + * @return self + */ + public function setSuccess($success) { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LoginFailureXmlResponse.php b/lib/Model/LoginFailureXmlResponse.php new file mode 100644 index 00000000..a85efcfe --- /dev/null +++ b/lib/Model/LoginFailureXmlResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * LoginFailureXmlResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LoginFailureXmlResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LoginFailureXmlResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LoginFailureXmlResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'response' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'response' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'response' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'response' => 'response' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'response' => 'setResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'response' => 'getResponse' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('response', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets response + * + * @return string|null + */ + public function getResponse() { + return $this->container['response']; + } + + /** + * Sets response + * + * @param string|null $response Always `declined`. + * + * @return self + */ + public function setResponse($response) { + if (is_null($response)) { + throw new \InvalidArgumentException('non-nullable response cannot be null'); + } + $this->container['response'] = $response; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LoginResponse.php b/lib/Model/LoginResponse.php new file mode 100644 index 00000000..449db408 --- /dev/null +++ b/lib/Model/LoginResponse.php @@ -0,0 +1,534 @@ +<?php +declare(strict_types=1); +/** + * LoginResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LoginResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LoginResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LoginResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'success' => 'bool', + 'user_id' => 'int', + 'employee_id' => 'int', + 'key' => 'string', + 'api_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'success' => null, + 'user_id' => null, + 'employee_id' => null, + 'key' => null, + 'api_url' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'success' => false, + 'user_id' => false, + 'employee_id' => true, + 'key' => false, + 'api_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'success' => 'success', + 'user_id' => 'userId', + 'employee_id' => 'employeeId', + 'key' => 'key', + 'api_url' => 'apiUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', + 'user_id' => 'setUserId', + 'employee_id' => 'setEmployeeId', + 'key' => 'setKey', + 'api_url' => 'setApiUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'success' => 'getSuccess', + 'user_id' => 'getUserId', + 'employee_id' => 'getEmployeeId', + 'key' => 'getKey', + 'api_url' => 'getApiUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('key', $data ?? [], null); + $this->setIfExists('api_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['success'] === null) { + $invalidProperties[] = "'success' can't be null"; + } + if ($this->container['user_id'] === null) { + $invalidProperties[] = "'user_id' can't be null"; + } + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['api_url'] === null) { + $invalidProperties[] = "'api_url' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success Always `true` on HTTP 200. + * + * @return self + */ + public function setSuccess($success) { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); + } + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets user_id + * + * @return int + */ + public function getUserId() { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param int $user_id The authenticated user ID. + * + * @return self + */ + public function setUserId($user_id) { + if (is_null($user_id)) { + throw new \InvalidArgumentException('non-nullable user_id cannot be null'); + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets key + * + * @return string + */ + public function getKey() { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key The API key to use for subsequent requests. + * + * @return self + */ + public function setKey($key) { + if (is_null($key)) { + throw new \InvalidArgumentException('non-nullable key cannot be null'); + } + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets api_url + * + * @return string + */ + public function getApiUrl() { + return $this->container['api_url']; + } + + /** + * Sets api_url + * + * @param string $api_url The base URL for subsequent API calls. + * + * @return self + */ + public function setApiUrl($api_url) { + if (is_null($api_url)) { + throw new \InvalidArgumentException('non-nullable api_url cannot be null'); + } + $this->container['api_url'] = $api_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/LoginXmlResponse.php b/lib/Model/LoginXmlResponse.php new file mode 100644 index 00000000..397bd594 --- /dev/null +++ b/lib/Model/LoginXmlResponse.php @@ -0,0 +1,516 @@ +<?php +declare(strict_types=1); +/** + * LoginXmlResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * LoginXmlResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class LoginXmlResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'LoginXmlResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'response' => 'string', + 'user_id' => 'int', + 'employee_id' => 'int', + 'key' => 'string', + 'api_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'response' => null, + 'user_id' => null, + 'employee_id' => null, + 'key' => null, + 'api_url' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'response' => false, + 'user_id' => false, + 'employee_id' => false, + 'key' => false, + 'api_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'response' => 'response', + 'user_id' => 'userId', + 'employee_id' => 'employeeId', + 'key' => 'key', + 'api_url' => 'apiUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'response' => 'setResponse', + 'user_id' => 'setUserId', + 'employee_id' => 'setEmployeeId', + 'key' => 'setKey', + 'api_url' => 'setApiUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'response' => 'getResponse', + 'user_id' => 'getUserId', + 'employee_id' => 'getEmployeeId', + 'key' => 'getKey', + 'api_url' => 'getApiUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('response', $data ?? [], null); + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('key', $data ?? [], null); + $this->setIfExists('api_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets response + * + * @return string|null + */ + public function getResponse() { + return $this->container['response']; + } + + /** + * Sets response + * + * @param string|null $response Always `authenticated` on HTTP 200. + * + * @return self + */ + public function setResponse($response) { + if (is_null($response)) { + throw new \InvalidArgumentException('non-nullable response cannot be null'); + } + $this->container['response'] = $response; + + return $this; + } + + /** + * Gets user_id + * + * @return int|null + */ + public function getUserId() { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param int|null $user_id The authenticated user ID. + * + * @return self + */ + public function setUserId($user_id) { + if (is_null($user_id)) { + throw new \InvalidArgumentException('non-nullable user_id cannot be null'); + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The employee ID linked to this user. Rendered as `<employeeId isNull=\"yes\"/>` when no employee record is associated. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets key + * + * @return string|null + */ + public function getKey() { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string|null $key The API key to use for subsequent requests. + * + * @return self + */ + public function setKey($key) { + if (is_null($key)) { + throw new \InvalidArgumentException('non-nullable key cannot be null'); + } + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets api_url + * + * @return string|null + */ + public function getApiUrl() { + return $this->container['api_url']; + } + + /** + * Sets api_url + * + * @param string|null $api_url The base URL for subsequent API calls. + * + * @return self + */ + public function setApiUrl($api_url) { + if (is_null($api_url)) { + throw new \InvalidArgumentException('non-nullable api_url cannot be null'); + } + $this->container['api_url'] = $api_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitEvent.php b/lib/Model/MemberBenefitEvent.php index 7e505782..ae073027 100644 --- a/lib/Model/MemberBenefitEvent.php +++ b/lib/Model/MemberBenefitEvent.php @@ -36,6 +36,7 @@ * MemberBenefitEvent Class Doc Comment * * @category Class + * @description A single member (employee or dependent) and their benefit coverage events across all enrolled plans. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,7 +58,8 @@ class MemberBenefitEvent implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openApiTypes = [ - 'members' => '\BhrSdk\Model\MemberBenefitEventMembersInner[]' + 'member_id' => 'string', + 'coverages' => '\BhrSdk\Model\MemberBenefitEventCoveragesInner[]' ]; /** @@ -68,7 +70,8 @@ class MemberBenefitEvent implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'members' => null + 'member_id' => null, + 'coverages' => null ]; /** @@ -78,7 +81,8 @@ class MemberBenefitEvent implements ModelInterface, ArrayAccess, \JsonSerializab * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'members' => false + 'member_id' => false, + 'coverages' => false ]; /** @@ -163,7 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'members' => 'members' + 'member_id' => 'memberId', + 'coverages' => 'coverages' ]; /** @@ -172,7 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'members' => 'setMembers' + 'member_id' => 'setMemberId', + 'coverages' => 'setCoverages' ]; /** @@ -181,7 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'members' => 'getMembers' + 'member_id' => 'getMemberId', + 'coverages' => 'getCoverages' ]; /** @@ -235,7 +242,8 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('members', $data ?? [], null); + $this->setIfExists('member_id', $data ?? [], null); + $this->setIfExists('coverages', $data ?? [], null); } /** @@ -277,26 +285,51 @@ public function valid() { } /** - * Gets members + * Gets member_id * - * @return \BhrSdk\Model\MemberBenefitEventMembersInner[]|null + * @return string|null */ - public function getMembers() { - return $this->container['members']; + public function getMemberId() { + return $this->container['member_id']; } /** - * Sets members + * Sets member_id * - * @param \BhrSdk\Model\MemberBenefitEventMembersInner[]|null $members Members + * @param string|null $member_id The unique identifier of the member. Format: 'employee.{id}' for employees, 'dependent.{id}' for dependents. * * @return self */ - public function setMembers($members) { - if (is_null($members)) { - throw new \InvalidArgumentException('non-nullable members cannot be null'); + public function setMemberId($member_id) { + if (is_null($member_id)) { + throw new \InvalidArgumentException('non-nullable member_id cannot be null'); } - $this->container['members'] = $members; + $this->container['member_id'] = $member_id; + + return $this; + } + + /** + * Gets coverages + * + * @return \BhrSdk\Model\MemberBenefitEventCoveragesInner[]|null + */ + public function getCoverages() { + return $this->container['coverages']; + } + + /** + * Sets coverages + * + * @param \BhrSdk\Model\MemberBenefitEventCoveragesInner[]|null $coverages The benefit plan coverages for this member, one entry per plan. + * + * @return self + */ + public function setCoverages($coverages) { + if (is_null($coverages)) { + throw new \InvalidArgumentException('non-nullable coverages cannot be null'); + } + $this->container['coverages'] = $coverages; return $this; } diff --git a/lib/Model/MemberBenefitEventMembersInnerCoveragesInner.php b/lib/Model/MemberBenefitEventCoveragesInner.php similarity index 91% rename from lib/Model/MemberBenefitEventMembersInnerCoveragesInner.php rename to lib/Model/MemberBenefitEventCoveragesInner.php index ca82c366..d52a8213 100644 --- a/lib/Model/MemberBenefitEventMembersInnerCoveragesInner.php +++ b/lib/Model/MemberBenefitEventCoveragesInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * MemberBenefitEventMembersInnerCoveragesInner + * MemberBenefitEventCoveragesInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * MemberBenefitEventMembersInnerCoveragesInner Class Doc Comment + * MemberBenefitEventCoveragesInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class MemberBenefitEventMembersInnerCoveragesInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class MemberBenefitEventCoveragesInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class MemberBenefitEventMembersInnerCoveragesInner implements ModelInterface, Ar * * @var string */ - protected static $openApiModelName = 'MemberBenefitEvent_members_inner_coverages_inner'; + protected static $openApiModelName = 'MemberBenefitEvent_coverages_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class MemberBenefitEventMembersInnerCoveragesInner implements ModelInterface, Ar */ protected static $openApiTypes = [ 'plan_id' => 'string', - 'events' => '\BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInnerEventsInner[]' + 'events' => '\BhrSdk\Model\MemberBenefitEventCoveragesInnerEventsInner[]' ]; /** @@ -295,7 +295,7 @@ public function getPlanId() { /** * Sets plan_id * - * @param string|null $plan_id Plan ID + * @param string|null $plan_id The ID of the benefit plan. * * @return self */ @@ -311,7 +311,7 @@ public function setPlanId($plan_id) { /** * Gets events * - * @return \BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInnerEventsInner[]|null + * @return \BhrSdk\Model\MemberBenefitEventCoveragesInnerEventsInner[]|null */ public function getEvents() { return $this->container['events']; @@ -320,7 +320,7 @@ public function getEvents() { /** * Sets events * - * @param \BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInnerEventsInner[]|null $events Events + * @param \BhrSdk\Model\MemberBenefitEventCoveragesInnerEventsInner[]|null $events Chronological list of benefit events for this member and plan, covering the past year. Event type 'enrollment' includes premiumTierId and monthlyPremiumInCents; 'eligibility' and 'loss' events include only effectiveDate and type. * * @return self */ diff --git a/lib/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.php b/lib/Model/MemberBenefitEventCoveragesInnerEventsInner.php similarity index 88% rename from lib/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.php rename to lib/Model/MemberBenefitEventCoveragesInnerEventsInner.php index bd3f745c..bea0e081 100644 --- a/lib/Model/MemberBenefitEventMembersInnerCoveragesInnerEventsInner.php +++ b/lib/Model/MemberBenefitEventCoveragesInnerEventsInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * MemberBenefitEventMembersInnerCoveragesInnerEventsInner + * MemberBenefitEventCoveragesInnerEventsInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * MemberBenefitEventMembersInnerCoveragesInnerEventsInner Class Doc Comment + * MemberBenefitEventCoveragesInnerEventsInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class MemberBenefitEventMembersInnerCoveragesInnerEventsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class MemberBenefitEventCoveragesInnerEventsInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class MemberBenefitEventMembersInnerCoveragesInnerEventsInner implements ModelIn * * @var string */ - protected static $openApiModelName = 'MemberBenefitEvent_members_inner_coverages_inner_events_inner'; + protected static $openApiModelName = 'MemberBenefitEvent_coverages_inner_events_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,10 +57,10 @@ class MemberBenefitEventMembersInnerCoveragesInnerEventsInner implements ModelIn * @var string[] */ protected static $openApiTypes = [ - 'effective_date' => 'string', + 'effective_date' => '\DateTime', 'type' => 'string', 'premium_tier_id' => 'string', - 'monthly_premium_in_cents' => 'int' + 'monthly_premium_in_cents' => 'float' ]; /** @@ -71,7 +71,7 @@ class MemberBenefitEventMembersInnerCoveragesInnerEventsInner implements ModelIn * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'effective_date' => null, + 'effective_date' => 'date', 'type' => null, 'premium_tier_id' => null, 'monthly_premium_in_cents' => null @@ -86,8 +86,8 @@ class MemberBenefitEventMembersInnerCoveragesInnerEventsInner implements ModelIn protected static array $openApiNullables = [ 'effective_date' => false, 'type' => false, - 'premium_tier_id' => false, - 'monthly_premium_in_cents' => false + 'premium_tier_id' => true, + 'monthly_premium_in_cents' => true ]; /** @@ -326,7 +326,7 @@ public function valid() { /** * Gets effective_date * - * @return string|null + * @return \DateTime|null */ public function getEffectiveDate() { return $this->container['effective_date']; @@ -335,7 +335,7 @@ public function getEffectiveDate() { /** * Sets effective_date * - * @param string|null $effective_date Event date + * @param \DateTime|null $effective_date The date this event takes effect (YYYY-MM-DD). * * @return self */ @@ -360,7 +360,7 @@ public function getType() { /** * Sets type * - * @param string|null $type Event type + * @param string|null $type The type of benefit event. * * @return self */ @@ -395,13 +395,19 @@ public function getPremiumTierId() { /** * Sets premium_tier_id * - * @param string|null $premium_tier_id Premium Tier ID + * @param string|null $premium_tier_id premium_tier_id * * @return self */ public function setPremiumTierId($premium_tier_id) { if (is_null($premium_tier_id)) { - throw new \InvalidArgumentException('non-nullable premium_tier_id cannot be null'); + $this->openApiNullablesSetToNull['premium_tier_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['premium_tier_id'])) { + unset($nullablesSetToNull['premium_tier_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['premium_tier_id'] = $premium_tier_id; @@ -411,7 +417,7 @@ public function setPremiumTierId($premium_tier_id) { /** * Gets monthly_premium_in_cents * - * @return int|null + * @return float|null */ public function getMonthlyPremiumInCents() { return $this->container['monthly_premium_in_cents']; @@ -420,13 +426,19 @@ public function getMonthlyPremiumInCents() { /** * Sets monthly_premium_in_cents * - * @param int|null $monthly_premium_in_cents Monthly Premium in cents + * @param float|null $monthly_premium_in_cents monthly_premium_in_cents * * @return self */ public function setMonthlyPremiumInCents($monthly_premium_in_cents) { if (is_null($monthly_premium_in_cents)) { - throw new \InvalidArgumentException('non-nullable monthly_premium_in_cents cannot be null'); + $this->openApiNullablesSetToNull['monthly_premium_in_cents'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['monthly_premium_in_cents'])) { + unset($nullablesSetToNull['monthly_premium_in_cents']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['monthly_premium_in_cents'] = $monthly_premium_in_cents; diff --git a/lib/Model/MemberBenefitEventsResponse.php b/lib/Model/MemberBenefitEventsResponse.php new file mode 100644 index 00000000..e420f3e4 --- /dev/null +++ b/lib/Model/MemberBenefitEventsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitEventsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitEventsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitEventsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitEventsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'members' => '\BhrSdk\Model\MemberBenefitEvent[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'members' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'members' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'members' => 'members' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'members' => 'setMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'members' => 'getMembers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('members', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets members + * + * @return \BhrSdk\Model\MemberBenefitEvent[]|null + */ + public function getMembers() { + return $this->container['members']; + } + + /** + * Sets members + * + * @param \BhrSdk\Model\MemberBenefitEvent[]|null $members List of member benefit event records, one entry per employee or dependent. + * + * @return self + */ + public function setMembers($members) { + if (is_null($members)) { + throw new \InvalidArgumentException('non-nullable members cannot be null'); + } + $this->container['members'] = $members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetPermissionDeniedResponse.php b/lib/Model/MemberBenefitsGetPermissionDeniedResponse.php new file mode 100644 index 00000000..5cf8eba2 --- /dev/null +++ b/lib/Model/MemberBenefitsGetPermissionDeniedResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetPermissionDeniedResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetPermissionDeniedResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetPermissionDeniedResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetPermissionDeniedResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponse.php b/lib/Model/MemberBenefitsGetSuccessResponse.php new file mode 100644 index 00000000..d9c6f5f4 --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInner[]', + 'meta' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseMeta', + '_links' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInner[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInner[]|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseMeta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinks|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseDataInner.php b/lib/Model/MemberBenefitsGetSuccessResponseDataInner.php new file mode 100644 index 00000000..da81750f --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseDataInner.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseDataInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseDataInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseDataInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse_data_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'member_id' => 'string', + 'subscriber_id' => 'string', + 'plans' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'member_id' => null, + 'subscriber_id' => null, + 'plans' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'member_id' => false, + 'subscriber_id' => false, + 'plans' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'member_id' => 'memberId', + 'subscriber_id' => 'subscriberId', + 'plans' => 'plans' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'member_id' => 'setMemberId', + 'subscriber_id' => 'setSubscriberId', + 'plans' => 'setPlans' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'member_id' => 'getMemberId', + 'subscriber_id' => 'getSubscriberId', + 'plans' => 'getPlans' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('member_id', $data ?? [], null); + $this->setIfExists('subscriber_id', $data ?? [], null); + $this->setIfExists('plans', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets member_id + * + * @return string|null + */ + public function getMemberId() { + return $this->container['member_id']; + } + + /** + * Sets member_id + * + * @param string|null $member_id The member identifier. Formatted as \"employee.{id}\" for employees and \"dependent.{id}\" for dependents. + * + * @return self + */ + public function setMemberId($member_id) { + if (is_null($member_id)) { + throw new \InvalidArgumentException('non-nullable member_id cannot be null'); + } + $this->container['member_id'] = $member_id; + + return $this; + } + + /** + * Gets subscriber_id + * + * @return string|null + */ + public function getSubscriberId() { + return $this->container['subscriber_id']; + } + + /** + * Sets subscriber_id + * + * @param string|null $subscriber_id The employee ID of the plan subscriber as a string. For dependent members, this is the ID of the employee they are enrolled under. + * + * @return self + */ + public function setSubscriberId($subscriber_id) { + if (is_null($subscriber_id)) { + throw new \InvalidArgumentException('non-nullable subscriber_id cannot be null'); + } + $this->container['subscriber_id'] = $subscriber_id; + + return $this; + } + + /** + * Gets plans + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInner[]|null + */ + public function getPlans() { + return $this->container['plans']; + } + + /** + * Sets plans + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInner[]|null $plans plans + * + * @return self + */ + public function setPlans($plans) { + if (is_null($plans)) { + throw new \InvalidArgumentException('non-nullable plans cannot be null'); + } + $this->container['plans'] = $plans; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.php b/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.php new file mode 100644 index 00000000..28cf253b --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInner.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseDataInnerPlansInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseDataInnerPlansInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseDataInnerPlansInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse_data_inner_plans_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'plan_id' => 'string', + 'date_ranges' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'plan_id' => null, + 'date_ranges' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'plan_id' => false, + 'date_ranges' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'plan_id' => 'planId', + 'date_ranges' => 'dateRanges' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'plan_id' => 'setPlanId', + 'date_ranges' => 'setDateRanges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'plan_id' => 'getPlanId', + 'date_ranges' => 'getDateRanges' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('plan_id', $data ?? [], null); + $this->setIfExists('date_ranges', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets plan_id + * + * @return string|null + */ + public function getPlanId() { + return $this->container['plan_id']; + } + + /** + * Sets plan_id + * + * @param string|null $plan_id The benefit plan ID. + * + * @return self + */ + public function setPlanId($plan_id) { + if (is_null($plan_id)) { + throw new \InvalidArgumentException('non-nullable plan_id cannot be null'); + } + $this->container['plan_id'] = $plan_id; + + return $this; + } + + /** + * Gets date_ranges + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner[]|null + */ + public function getDateRanges() { + return $this->container['date_ranges']; + } + + /** + * Sets date_ranges + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner[]|null $date_ranges date_ranges + * + * @return self + */ + public function setDateRanges($date_ranges) { + if (is_null($date_ranges)) { + throw new \InvalidArgumentException('non-nullable date_ranges cannot be null'); + } + $this->container['date_ranges'] = $date_ranges; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.php b/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.php new file mode 100644 index 00000000..f4b970e1 --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner.php @@ -0,0 +1,500 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse_data_inner_plans_inner_dateRanges_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'start_date' => '\DateTime', + 'end_date' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'start_date' => 'date', + 'end_date' => 'date', + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'start_date' => false, + 'end_date' => true, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'start_date' => 'startDate', + 'end_date' => 'endDate', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'start_date' => 'setStartDate', + 'end_date' => 'setEndDate', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'start_date' => 'getStartDate', + 'end_date' => 'getEndDate', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_ENROLLED = 'ENROLLED'; + public const STATUS_WAIVED = 'WAIVED'; + public const STATUS_TERMINATED = 'TERMINATED'; + public const STATUS_WITHDREW = 'WITHDREW'; + public const STATUS_ELIGIBLE = 'ELIGIBLE'; + public const STATUS_INELIGIBLE = 'INELIGIBLE'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_ENROLLED, + self::STATUS_WAIVED, + self::STATUS_TERMINATED, + self::STATUS_WITHDREW, + self::STATUS_ELIGIBLE, + self::STATUS_INELIGIBLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('start_date', $data ?? [], null); + $this->setIfExists('end_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets start_date + * + * @return \DateTime|null + */ + public function getStartDate() { + return $this->container['start_date']; + } + + /** + * Sets start_date + * + * @param \DateTime|null $start_date Start date of the enrollment period (YYYY-MM-DD). + * + * @return self + */ + public function setStartDate($start_date) { + if (is_null($start_date)) { + throw new \InvalidArgumentException('non-nullable start_date cannot be null'); + } + $this->container['start_date'] = $start_date; + + return $this; + } + + /** + * Gets end_date + * + * @return \DateTime|null + */ + public function getEndDate() { + return $this->container['end_date']; + } + + /** + * Sets end_date + * + * @param \DateTime|null $end_date end_date + * + * @return self + */ + public function setEndDate($end_date) { + if (is_null($end_date)) { + $this->openApiNullablesSetToNull['end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['end_date'])) { + unset($nullablesSetToNull['end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['end_date'] = $end_date; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The enrollment status for this date range. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseLinks.php b/lib/Model/MemberBenefitsGetSuccessResponseLinks.php new file mode 100644 index 00000000..c046a271 --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseLinks.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseLinks + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseLinks Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'next' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksNext', + 'prev' => '\BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksPrev' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'next' => null, + 'prev' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'next' => false, + 'prev' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'next' => 'next', + 'prev' => 'prev' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'next' => 'setNext', + 'prev' => 'setPrev' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'next' => 'getNext', + 'prev' => 'getPrev' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('next', $data ?? [], null); + $this->setIfExists('prev', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets next + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksNext|null + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksNext|null $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + throw new \InvalidArgumentException('non-nullable next cannot be null'); + } + $this->container['next'] = $next; + + return $this; + } + + /** + * Gets prev + * + * @return \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksPrev|null + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param \BhrSdk\Model\MemberBenefitsGetSuccessResponseLinksPrev|null $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + throw new \InvalidArgumentException('non-nullable prev cannot be null'); + } + $this->container['prev'] = $prev; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseLinksNext.php b/lib/Model/MemberBenefitsGetSuccessResponseLinksNext.php new file mode 100644 index 00000000..3b151728 --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseLinksNext.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseLinksNext + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseLinksNext Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseLinksNext implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse__links_next'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URL for the next page of results. Points to the current page when already on the last page. + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseLinksPrev.php b/lib/Model/MemberBenefitsGetSuccessResponseLinksPrev.php new file mode 100644 index 00000000..78ed6b1d --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseLinksPrev.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseLinksPrev + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseLinksPrev Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseLinksPrev implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse__links_prev'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URL for the previous page of results. Points to page 1 when already on the first page. + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetSuccessResponseMeta.php b/lib/Model/MemberBenefitsGetSuccessResponseMeta.php new file mode 100644 index 00000000..eea05c44 --- /dev/null +++ b/lib/Model/MemberBenefitsGetSuccessResponseMeta.php @@ -0,0 +1,484 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetSuccessResponseMeta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetSuccessResponseMeta Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetSuccessResponseMeta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetSuccessResponse_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'page' => 'int', + 'page_size' => 'int', + 'total_pages' => 'int', + 'total_items' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'page' => null, + 'page_size' => null, + 'total_pages' => null, + 'total_items' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'page' => false, + 'page_size' => false, + 'total_pages' => false, + 'total_items' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'page' => 'page', + 'page_size' => 'pageSize', + 'total_pages' => 'totalPages', + 'total_items' => 'totalItems' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'page' => 'setPage', + 'page_size' => 'setPageSize', + 'total_pages' => 'setTotalPages', + 'total_items' => 'setTotalItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'page' => 'getPage', + 'page_size' => 'getPageSize', + 'total_pages' => 'getTotalPages', + 'total_items' => 'getTotalItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_pages', $data ?? [], null); + $this->setIfExists('total_items', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page The current page number. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size The number of items per page. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_pages + * + * @return int|null + */ + public function getTotalPages() { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int|null $total_pages Total number of pages available. + * + * @return self + */ + public function setTotalPages($total_pages) { + if (is_null($total_pages)) { + throw new \InvalidArgumentException('non-nullable total_pages cannot be null'); + } + $this->container['total_pages'] = $total_pages; + + return $this; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items Total number of member records across all pages. + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MemberBenefitsGetValidationErrorResponse.php b/lib/Model/MemberBenefitsGetValidationErrorResponse.php new file mode 100644 index 00000000..3ed1b1f5 --- /dev/null +++ b/lib/Model/MemberBenefitsGetValidationErrorResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * MemberBenefitsGetValidationErrorResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MemberBenefitsGetValidationErrorResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MemberBenefitsGetValidationErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MemberBenefitsGetValidationErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MetaCompanyPropertiesResponse.php b/lib/Model/MetaCompanyPropertiesResponse.php new file mode 100644 index 00000000..1e54da48 --- /dev/null +++ b/lib/Model/MetaCompanyPropertiesResponse.php @@ -0,0 +1,484 @@ +<?php +declare(strict_types=1); +/** + * MetaCompanyPropertiesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MetaCompanyPropertiesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MetaCompanyPropertiesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MetaCompanyPropertiesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'domain' => 'string', + 'base_api_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'domain' => null, + 'base_api_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'domain' => false, + 'base_api_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'domain' => 'domain', + 'base_api_url' => 'baseApiUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'domain' => 'setDomain', + 'base_api_url' => 'setBaseApiUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'domain' => 'getDomain', + 'base_api_url' => 'getBaseApiUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('domain', $data ?? [], null); + $this->setIfExists('base_api_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Bamboo company identifier (numeric). + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Company display name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain Company’s Bamboo subdomain (same value used in the `baseApiUrl` path segment after `gateway.php/`) + * + * @return self + */ + public function setDomain($domain) { + if (is_null($domain)) { + throw new \InvalidArgumentException('non-nullable domain cannot be null'); + } + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets base_api_url + * + * @return string|null + */ + public function getBaseApiUrl() { + return $this->container['base_api_url']; + } + + /** + * Sets base_api_url + * + * @param string|null $base_api_url Full HTTPS URL of the public API gateway for this company, typically `https://` + the data-center–specific API host for this tenant + ` /api/gateway.php/` + the company’s `domain` from this response. This is the entry point the integrator uses for legacy gateway-style API traffic, not a generic “base URL” name alone. + * + * @return self + */ + public function setBaseApiUrl($base_api_url) { + if (is_null($base_api_url)) { + throw new \InvalidArgumentException('non-nullable base_api_url cannot be null'); + } + $this->container['base_api_url'] = $base_api_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/MetaCurrencyTypeItem.php b/lib/Model/MetaCurrencyTypeItem.php new file mode 100644 index 00000000..b4c160aa --- /dev/null +++ b/lib/Model/MetaCurrencyTypeItem.php @@ -0,0 +1,550 @@ +<?php +declare(strict_types=1); +/** + * MetaCurrencyTypeItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MetaCurrencyTypeItem Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MetaCurrencyTypeItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MetaCurrencyTypeItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'code' => 'string', + 'name' => 'string', + 'symbol' => 'string', + 'symbol_position' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'code' => null, + 'name' => null, + 'symbol' => null, + 'symbol_position' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'code' => false, + 'name' => false, + 'symbol' => false, + 'symbol_position' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'code' => 'code', + 'name' => 'name', + 'symbol' => 'symbol', + 'symbol_position' => 'symbolPosition' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'code' => 'setCode', + 'name' => 'setName', + 'symbol' => 'setSymbol', + 'symbol_position' => 'setSymbolPosition' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'code' => 'getCode', + 'name' => 'getName', + 'symbol' => 'getSymbol', + 'symbol_position' => 'getSymbolPosition' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SYMBOL_POSITION_NUMBER_0 = 0; + public const SYMBOL_POSITION_NUMBER_1 = 1; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSymbolPositionAllowableValues() { + return [ + self::SYMBOL_POSITION_NUMBER_0, + self::SYMBOL_POSITION_NUMBER_1, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('symbol', $data ?? [], null); + $this->setIfExists('symbol_position', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getSymbolPositionAllowableValues(); + if (!is_null($this->container['symbol_position']) && !in_array($this->container['symbol_position'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'symbol_position', must be one of '%s'", + $this->container['symbol_position'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Internal currency id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code ISO 4217-style currency code (e.g. USD, EUR) + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Human-readable currency name (HTML entities decoded in the response) + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets symbol + * + * @return string|null + */ + public function getSymbol() { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string|null $symbol Display symbol for the currency in UI + * + * @return self + */ + public function setSymbol($symbol) { + if (is_null($symbol)) { + throw new \InvalidArgumentException('non-nullable symbol cannot be null'); + } + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets symbol_position + * + * @return int|null + */ + public function getSymbolPosition() { + return $this->container['symbol_position']; + } + + /** + * Sets symbol_position + * + * @param int|null $symbol_position Placement of the symbol relative to the amount: 0 = prefix, 1 = postfix (this is a numeric code, not a string label). + * + * @return self + */ + public function setSymbolPosition($symbol_position) { + if (is_null($symbol_position)) { + throw new \InvalidArgumentException('non-nullable symbol_position cannot be null'); + } + $allowedValues = $this->getSymbolPositionAllowableValues(); + if (!in_array($symbol_position, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'symbol_position', must be one of '%s'", + $symbol_position, + implode("', '", $allowedValues) + ) + ); + } + $this->container['symbol_position'] = $symbol_position; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingTypeList.php b/lib/Model/MonitorFieldList.php similarity index 89% rename from lib/Model/TrainingTypeList.php rename to lib/Model/MonitorFieldList.php index 9e7ae2f7..349e346a 100644 --- a/lib/Model/TrainingTypeList.php +++ b/lib/Model/MonitorFieldList.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TrainingTypeList + * MonitorFieldList * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TrainingTypeList Class Doc Comment + * MonitorFieldList Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TrainingTypeList implements ModelInterface, ArrayAccess, \JsonSerializable { +class MonitorFieldList implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TrainingTypeList implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openApiModelName = 'TrainingTypeList'; + protected static $openApiModelName = 'MonitorFieldList'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class TrainingTypeList implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openApiTypes = [ - 'training_id' => '\BhrSdk\Model\TrainingType' + 'fields' => '\BhrSdk\Model\MonitorFieldListFieldsInner[]' ]; /** @@ -68,7 +68,7 @@ class TrainingTypeList implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'training_id' => null + 'fields' => null ]; /** @@ -78,7 +78,7 @@ class TrainingTypeList implements ModelInterface, ArrayAccess, \JsonSerializable * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'training_id' => false + 'fields' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'training_id' => 'trainingId' + 'fields' => 'fields' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'training_id' => 'setTrainingId' + 'fields' => 'setFields' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'training_id' => 'getTrainingId' + 'fields' => 'getFields' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('training_id', $data ?? [], null); + $this->setIfExists('fields', $data ?? [], null); } /** @@ -263,6 +263,9 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['fields'] === null) { + $invalidProperties[] = "'fields' can't be null"; + } return $invalidProperties; } @@ -277,26 +280,26 @@ public function valid() { } /** - * Gets training_id + * Gets fields * - * @return \BhrSdk\Model\TrainingType|null + * @return \BhrSdk\Model\MonitorFieldListFieldsInner[] */ - public function getTrainingId() { - return $this->container['training_id']; + public function getFields() { + return $this->container['fields']; } /** - * Sets training_id + * Sets fields * - * @param \BhrSdk\Model\TrainingType|null $training_id training_id + * @param \BhrSdk\Model\MonitorFieldListFieldsInner[] $fields The list of employee fields available for webhook monitoring. * * @return self */ - public function setTrainingId($training_id) { - if (is_null($training_id)) { - throw new \InvalidArgumentException('non-nullable training_id cannot be null'); + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); } - $this->container['training_id'] = $training_id; + $this->container['fields'] = $fields; return $this; } diff --git a/lib/Model/MonitorFieldListFieldsInner.php b/lib/Model/MonitorFieldListFieldsInner.php new file mode 100644 index 00000000..22008fd4 --- /dev/null +++ b/lib/Model/MonitorFieldListFieldsInner.php @@ -0,0 +1,467 @@ +<?php +declare(strict_types=1); +/** + * MonitorFieldListFieldsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * MonitorFieldListFieldsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class MonitorFieldListFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'MonitorFieldList_fields_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'alias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'alias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'alias' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'alias' => 'alias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'alias' => 'setAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'alias' => 'getAlias' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('alias', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['alias'] === null) { + $invalidProperties[] = "'alias' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The field ID, returned as a string. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The human-readable field name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets alias + * + * @return string + */ + public function getAlias() { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string $alias alias + * + * @return self + */ + public function setAlias($alias) { + if (is_null($alias)) { + $this->openApiNullablesSetToNull['alias'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['alias'])) { + unset($nullablesSetToNull['alias']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['alias'] = $alias; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketGtkyAnswerVisibilityItem.php b/lib/Model/NewHirePacketGtkyAnswerVisibilityItem.php new file mode 100644 index 00000000..009b1e74 --- /dev/null +++ b/lib/Model/NewHirePacketGtkyAnswerVisibilityItem.php @@ -0,0 +1,467 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketGtkyAnswerVisibilityItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketGtkyAnswerVisibilityItem Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketGtkyAnswerVisibilityItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketGtkyAnswerVisibilityItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'response_id' => 'int', + 'question_id' => 'int', + 'hidden' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'response_id' => 'int64', + 'question_id' => 'int64', + 'hidden' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'response_id' => false, + 'question_id' => false, + 'hidden' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'response_id' => 'responseId', + 'question_id' => 'questionId', + 'hidden' => 'hidden' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'response_id' => 'setResponseId', + 'question_id' => 'setQuestionId', + 'hidden' => 'setHidden' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'response_id' => 'getResponseId', + 'question_id' => 'getQuestionId', + 'hidden' => 'getHidden' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('response_id', $data ?? [], null); + $this->setIfExists('question_id', $data ?? [], null); + $this->setIfExists('hidden', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['response_id'] === null) { + $invalidProperties[] = "'response_id' can't be null"; + } + if ($this->container['question_id'] === null) { + $invalidProperties[] = "'question_id' can't be null"; + } + if ($this->container['hidden'] === null) { + $invalidProperties[] = "'hidden' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets response_id + * + * @return int + */ + public function getResponseId() { + return $this->container['response_id']; + } + + /** + * Sets response_id + * + * @param int $response_id response_id + * + * @return self + */ + public function setResponseId($response_id) { + if (is_null($response_id)) { + throw new \InvalidArgumentException('non-nullable response_id cannot be null'); + } + $this->container['response_id'] = $response_id; + + return $this; + } + + /** + * Gets question_id + * + * @return int + */ + public function getQuestionId() { + return $this->container['question_id']; + } + + /** + * Sets question_id + * + * @param int $question_id question_id + * + * @return self + */ + public function setQuestionId($question_id) { + if (is_null($question_id)) { + throw new \InvalidArgumentException('non-nullable question_id cannot be null'); + } + $this->container['question_id'] = $question_id; + + return $this; + } + + /** + * Gets hidden + * + * @return bool + */ + public function getHidden() { + return $this->container['hidden']; + } + + /** + * Sets hidden + * + * @param bool $hidden hidden + * + * @return self + */ + public function setHidden($hidden) { + if (is_null($hidden)) { + $this->openApiNullablesSetToNull['hidden'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hidden'])) { + unset($nullablesSetToNull['hidden']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hidden'] = $hidden; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketGtkyAnswerVisibilityRequest.php b/lib/Model/NewHirePacketGtkyAnswerVisibilityRequest.php new file mode 100644 index 00000000..2757bc76 --- /dev/null +++ b/lib/Model/NewHirePacketGtkyAnswerVisibilityRequest.php @@ -0,0 +1,429 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketGtkyAnswerVisibilityRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketGtkyAnswerVisibilityRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketGtkyAnswerVisibilityRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketGtkyAnswerVisibilityRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'hidden' => 'bool', + 'question_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'hidden' => null, + 'question_ids' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'hidden' => false, + 'question_ids' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'hidden' => 'hidden', + 'question_ids' => 'questionIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'hidden' => 'setHidden', + 'question_ids' => 'setQuestionIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'hidden' => 'getHidden', + 'question_ids' => 'getQuestionIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('hidden', $data ?? [], null); + $this->setIfExists('question_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['hidden'] === null) { + $invalidProperties[] = "'hidden' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets hidden + * + * @return bool + */ + public function getHidden() { + return $this->container['hidden']; + } + + /** + * Sets hidden + * + * @param bool $hidden When true, answers are hidden from typical manager views; when false, answers are shown. + * + * @return self + */ + public function setHidden($hidden) { + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + } + $this->container['hidden'] = $hidden; + + return $this; + } + + /** + * Gets question_ids + * + * @return int[]|null + */ + public function getQuestionIds() { + return $this->container['question_ids']; + } + + /** + * Sets question_ids + * + * @param int[]|null $question_ids question_ids + * + * @return self + */ + public function setQuestionIds($question_ids) { + if (is_null($question_ids)) { + $this->openApiNullablesSetToNull['question_ids'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['question_ids'])) { + unset($nullablesSetToNull['question_ids']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['question_ids'] = $question_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketGtkyAnswerVisibilityResponse.php b/lib/Model/NewHirePacketGtkyAnswerVisibilityResponse.php new file mode 100644 index 00000000..23044d81 --- /dev/null +++ b/lib/Model/NewHirePacketGtkyAnswerVisibilityResponse.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketGtkyAnswerVisibilityResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketGtkyAnswerVisibilityResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketGtkyAnswerVisibilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketGtkyAnswerVisibilityResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'gtkys' => '\BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'gtkys' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'gtkys' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'gtkys' => 'gtkys' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'gtkys' => 'setGtkys' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'gtkys' => 'getGtkys' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('gtkys', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['gtkys'] === null) { + $invalidProperties[] = "'gtkys' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets gtkys + * + * @return \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityItem[] + */ + public function getGtkys() { + return $this->container['gtkys']; + } + + /** + * Sets gtkys + * + * @param \BhrSdk\Model\NewHirePacketGtkyAnswerVisibilityItem[] $gtkys GTKY personal-question answer rows with visibility flags. + * + * @return self + */ + public function setGtkys($gtkys) { + if (is_null($gtkys)) { + throw new \InvalidArgumentException('non-nullable gtkys cannot be null'); + } + $this->container['gtkys'] = $gtkys; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketPublicApi.php b/lib/Model/NewHirePacketPublicApi.php new file mode 100644 index 00000000..fddfb63b --- /dev/null +++ b/lib/Model/NewHirePacketPublicApi.php @@ -0,0 +1,1259 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketPublicApi + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketPublicApi Class Doc Comment + * + * @category Class + * @description Flat new hire packet instance for public read APIs (list and detail). + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketPublicApi implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketPublicApi'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'contact_employee_id' => 'int', + 'requires_personal_information' => 'bool', + 'requires_photo' => 'bool', + 'requires_personal_questions' => 'bool', + 'arrive_by_time' => 'string', + 'location' => 'string', + 'sent_datetime' => 'string', + 'viewed_datetime' => 'string', + 'completed_datetime' => 'string', + 'created_by_user_id' => 'int', + 'created_datetime' => 'string', + 'send_get_to_know_you_email' => 'bool', + 'get_to_know_you_email_sent' => 'bool', + 'show_payroll_state' => 'bool', + 'show_payroll_federal' => 'bool', + 'show_payroll_direct_deposit' => 'bool', + 'nhp_configuration_id' => 'int', + 'nhp_template_id' => 'int', + 'count_nhp_gtky_sent' => 'int', + 'cancelled' => 'bool', + 'include_photo_option' => 'bool', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'contact_employee_id' => null, + 'requires_personal_information' => null, + 'requires_photo' => null, + 'requires_personal_questions' => null, + 'arrive_by_time' => null, + 'location' => null, + 'sent_datetime' => null, + 'viewed_datetime' => null, + 'completed_datetime' => null, + 'created_by_user_id' => null, + 'created_datetime' => null, + 'send_get_to_know_you_email' => null, + 'get_to_know_you_email_sent' => null, + 'show_payroll_state' => null, + 'show_payroll_federal' => null, + 'show_payroll_direct_deposit' => null, + 'nhp_configuration_id' => null, + 'nhp_template_id' => null, + 'count_nhp_gtky_sent' => null, + 'cancelled' => null, + 'include_photo_option' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'employee_id' => false, + 'contact_employee_id' => true, + 'requires_personal_information' => false, + 'requires_photo' => false, + 'requires_personal_questions' => false, + 'arrive_by_time' => true, + 'location' => true, + 'sent_datetime' => true, + 'viewed_datetime' => true, + 'completed_datetime' => true, + 'created_by_user_id' => true, + 'created_datetime' => true, + 'send_get_to_know_you_email' => false, + 'get_to_know_you_email_sent' => true, + 'show_payroll_state' => true, + 'show_payroll_federal' => true, + 'show_payroll_direct_deposit' => true, + 'nhp_configuration_id' => true, + 'nhp_template_id' => true, + 'count_nhp_gtky_sent' => true, + 'cancelled' => false, + 'include_photo_option' => false, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'contact_employee_id' => 'contactEmployeeId', + 'requires_personal_information' => 'requiresPersonalInformation', + 'requires_photo' => 'requiresPhoto', + 'requires_personal_questions' => 'requiresPersonalQuestions', + 'arrive_by_time' => 'arriveByTime', + 'location' => 'location', + 'sent_datetime' => 'sentDatetime', + 'viewed_datetime' => 'viewedDatetime', + 'completed_datetime' => 'completedDatetime', + 'created_by_user_id' => 'createdByUserId', + 'created_datetime' => 'createdDatetime', + 'send_get_to_know_you_email' => 'sendGetToKnowYouEmail', + 'get_to_know_you_email_sent' => 'getToKnowYouEmailSent', + 'show_payroll_state' => 'showPayrollState', + 'show_payroll_federal' => 'showPayrollFederal', + 'show_payroll_direct_deposit' => 'showPayrollDirectDeposit', + 'nhp_configuration_id' => 'nhpConfigurationId', + 'nhp_template_id' => 'nhpTemplateId', + 'count_nhp_gtky_sent' => 'countNhpGtkySent', + 'cancelled' => 'cancelled', + 'include_photo_option' => 'includePhotoOption', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'contact_employee_id' => 'setContactEmployeeId', + 'requires_personal_information' => 'setRequiresPersonalInformation', + 'requires_photo' => 'setRequiresPhoto', + 'requires_personal_questions' => 'setRequiresPersonalQuestions', + 'arrive_by_time' => 'setArriveByTime', + 'location' => 'setLocation', + 'sent_datetime' => 'setSentDatetime', + 'viewed_datetime' => 'setViewedDatetime', + 'completed_datetime' => 'setCompletedDatetime', + 'created_by_user_id' => 'setCreatedByUserId', + 'created_datetime' => 'setCreatedDatetime', + 'send_get_to_know_you_email' => 'setSendGetToKnowYouEmail', + 'get_to_know_you_email_sent' => 'setGetToKnowYouEmailSent', + 'show_payroll_state' => 'setShowPayrollState', + 'show_payroll_federal' => 'setShowPayrollFederal', + 'show_payroll_direct_deposit' => 'setShowPayrollDirectDeposit', + 'nhp_configuration_id' => 'setNhpConfigurationId', + 'nhp_template_id' => 'setNhpTemplateId', + 'count_nhp_gtky_sent' => 'setCountNhpGtkySent', + 'cancelled' => 'setCancelled', + 'include_photo_option' => 'setIncludePhotoOption', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'contact_employee_id' => 'getContactEmployeeId', + 'requires_personal_information' => 'getRequiresPersonalInformation', + 'requires_photo' => 'getRequiresPhoto', + 'requires_personal_questions' => 'getRequiresPersonalQuestions', + 'arrive_by_time' => 'getArriveByTime', + 'location' => 'getLocation', + 'sent_datetime' => 'getSentDatetime', + 'viewed_datetime' => 'getViewedDatetime', + 'completed_datetime' => 'getCompletedDatetime', + 'created_by_user_id' => 'getCreatedByUserId', + 'created_datetime' => 'getCreatedDatetime', + 'send_get_to_know_you_email' => 'getSendGetToKnowYouEmail', + 'get_to_know_you_email_sent' => 'getGetToKnowYouEmailSent', + 'show_payroll_state' => 'getShowPayrollState', + 'show_payroll_federal' => 'getShowPayrollFederal', + 'show_payroll_direct_deposit' => 'getShowPayrollDirectDeposit', + 'nhp_configuration_id' => 'getNhpConfigurationId', + 'nhp_template_id' => 'getNhpTemplateId', + 'count_nhp_gtky_sent' => 'getCountNhpGtkySent', + 'cancelled' => 'getCancelled', + 'include_photo_option' => 'getIncludePhotoOption', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_SENT = 'sent'; + public const STATUS_DRAFT = 'draft'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_CANCELLED, + self::STATUS_COMPLETED, + self::STATUS_SENT, + self::STATUS_DRAFT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('contact_employee_id', $data ?? [], null); + $this->setIfExists('requires_personal_information', $data ?? [], null); + $this->setIfExists('requires_photo', $data ?? [], null); + $this->setIfExists('requires_personal_questions', $data ?? [], null); + $this->setIfExists('arrive_by_time', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('sent_datetime', $data ?? [], null); + $this->setIfExists('viewed_datetime', $data ?? [], null); + $this->setIfExists('completed_datetime', $data ?? [], null); + $this->setIfExists('created_by_user_id', $data ?? [], null); + $this->setIfExists('created_datetime', $data ?? [], null); + $this->setIfExists('send_get_to_know_you_email', $data ?? [], null); + $this->setIfExists('get_to_know_you_email_sent', $data ?? [], null); + $this->setIfExists('show_payroll_state', $data ?? [], null); + $this->setIfExists('show_payroll_federal', $data ?? [], null); + $this->setIfExists('show_payroll_direct_deposit', $data ?? [], null); + $this->setIfExists('nhp_configuration_id', $data ?? [], null); + $this->setIfExists('nhp_template_id', $data ?? [], null); + $this->setIfExists('count_nhp_gtky_sent', $data ?? [], null); + $this->setIfExists('cancelled', $data ?? [], null); + $this->setIfExists('include_photo_option', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id Employee this packet belongs to. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets contact_employee_id + * + * @return int|null + */ + public function getContactEmployeeId() { + return $this->container['contact_employee_id']; + } + + /** + * Sets contact_employee_id + * + * @param int|null $contact_employee_id contact_employee_id + * + * @return self + */ + public function setContactEmployeeId($contact_employee_id) { + if (is_null($contact_employee_id)) { + $this->openApiNullablesSetToNull['contact_employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['contact_employee_id'])) { + unset($nullablesSetToNull['contact_employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contact_employee_id'] = $contact_employee_id; + + return $this; + } + + /** + * Gets requires_personal_information + * + * @return bool|null + */ + public function getRequiresPersonalInformation() { + return $this->container['requires_personal_information']; + } + + /** + * Sets requires_personal_information + * + * @param bool|null $requires_personal_information requires_personal_information + * + * @return self + */ + public function setRequiresPersonalInformation($requires_personal_information) { + if (is_null($requires_personal_information)) { + throw new \InvalidArgumentException('non-nullable requires_personal_information cannot be null'); + } + $this->container['requires_personal_information'] = $requires_personal_information; + + return $this; + } + + /** + * Gets requires_photo + * + * @return bool|null + */ + public function getRequiresPhoto() { + return $this->container['requires_photo']; + } + + /** + * Sets requires_photo + * + * @param bool|null $requires_photo requires_photo + * + * @return self + */ + public function setRequiresPhoto($requires_photo) { + if (is_null($requires_photo)) { + throw new \InvalidArgumentException('non-nullable requires_photo cannot be null'); + } + $this->container['requires_photo'] = $requires_photo; + + return $this; + } + + /** + * Gets requires_personal_questions + * + * @return bool|null + */ + public function getRequiresPersonalQuestions() { + return $this->container['requires_personal_questions']; + } + + /** + * Sets requires_personal_questions + * + * @param bool|null $requires_personal_questions requires_personal_questions + * + * @return self + */ + public function setRequiresPersonalQuestions($requires_personal_questions) { + if (is_null($requires_personal_questions)) { + throw new \InvalidArgumentException('non-nullable requires_personal_questions cannot be null'); + } + $this->container['requires_personal_questions'] = $requires_personal_questions; + + return $this; + } + + /** + * Gets arrive_by_time + * + * @return string|null + */ + public function getArriveByTime() { + return $this->container['arrive_by_time']; + } + + /** + * Sets arrive_by_time + * + * @param string|null $arrive_by_time arrive_by_time + * + * @return self + */ + public function setArriveByTime($arrive_by_time) { + if (is_null($arrive_by_time)) { + $this->openApiNullablesSetToNull['arrive_by_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['arrive_by_time'])) { + unset($nullablesSetToNull['arrive_by_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['arrive_by_time'] = $arrive_by_time; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets sent_datetime + * + * @return string|null + */ + public function getSentDatetime() { + return $this->container['sent_datetime']; + } + + /** + * Sets sent_datetime + * + * @param string|null $sent_datetime sent_datetime + * + * @return self + */ + public function setSentDatetime($sent_datetime) { + if (is_null($sent_datetime)) { + $this->openApiNullablesSetToNull['sent_datetime'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['sent_datetime'])) { + unset($nullablesSetToNull['sent_datetime']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['sent_datetime'] = $sent_datetime; + + return $this; + } + + /** + * Gets viewed_datetime + * + * @return string|null + */ + public function getViewedDatetime() { + return $this->container['viewed_datetime']; + } + + /** + * Sets viewed_datetime + * + * @param string|null $viewed_datetime viewed_datetime + * + * @return self + */ + public function setViewedDatetime($viewed_datetime) { + if (is_null($viewed_datetime)) { + $this->openApiNullablesSetToNull['viewed_datetime'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['viewed_datetime'])) { + unset($nullablesSetToNull['viewed_datetime']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['viewed_datetime'] = $viewed_datetime; + + return $this; + } + + /** + * Gets completed_datetime + * + * @return string|null + */ + public function getCompletedDatetime() { + return $this->container['completed_datetime']; + } + + /** + * Sets completed_datetime + * + * @param string|null $completed_datetime completed_datetime + * + * @return self + */ + public function setCompletedDatetime($completed_datetime) { + if (is_null($completed_datetime)) { + $this->openApiNullablesSetToNull['completed_datetime'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['completed_datetime'])) { + unset($nullablesSetToNull['completed_datetime']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['completed_datetime'] = $completed_datetime; + + return $this; + } + + /** + * Gets created_by_user_id + * + * @return int|null + */ + public function getCreatedByUserId() { + return $this->container['created_by_user_id']; + } + + /** + * Sets created_by_user_id + * + * @param int|null $created_by_user_id created_by_user_id + * + * @return self + */ + public function setCreatedByUserId($created_by_user_id) { + if (is_null($created_by_user_id)) { + $this->openApiNullablesSetToNull['created_by_user_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_by_user_id'])) { + unset($nullablesSetToNull['created_by_user_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_by_user_id'] = $created_by_user_id; + + return $this; + } + + /** + * Gets created_datetime + * + * @return string|null + */ + public function getCreatedDatetime() { + return $this->container['created_datetime']; + } + + /** + * Sets created_datetime + * + * @param string|null $created_datetime created_datetime + * + * @return self + */ + public function setCreatedDatetime($created_datetime) { + if (is_null($created_datetime)) { + $this->openApiNullablesSetToNull['created_datetime'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_datetime'])) { + unset($nullablesSetToNull['created_datetime']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_datetime'] = $created_datetime; + + return $this; + } + + /** + * Gets send_get_to_know_you_email + * + * @return bool|null + */ + public function getSendGetToKnowYouEmail() { + return $this->container['send_get_to_know_you_email']; + } + + /** + * Sets send_get_to_know_you_email + * + * @param bool|null $send_get_to_know_you_email send_get_to_know_you_email + * + * @return self + */ + public function setSendGetToKnowYouEmail($send_get_to_know_you_email) { + if (is_null($send_get_to_know_you_email)) { + throw new \InvalidArgumentException('non-nullable send_get_to_know_you_email cannot be null'); + } + $this->container['send_get_to_know_you_email'] = $send_get_to_know_you_email; + + return $this; + } + + /** + * Gets get_to_know_you_email_sent + * + * @return bool|null + */ + public function getGetToKnowYouEmailSent() { + return $this->container['get_to_know_you_email_sent']; + } + + /** + * Sets get_to_know_you_email_sent + * + * @param bool|null $get_to_know_you_email_sent get_to_know_you_email_sent + * + * @return self + */ + public function setGetToKnowYouEmailSent($get_to_know_you_email_sent) { + if (is_null($get_to_know_you_email_sent)) { + $this->openApiNullablesSetToNull['get_to_know_you_email_sent'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['get_to_know_you_email_sent'])) { + unset($nullablesSetToNull['get_to_know_you_email_sent']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['get_to_know_you_email_sent'] = $get_to_know_you_email_sent; + + return $this; + } + + /** + * Gets show_payroll_state + * + * @return bool|null + */ + public function getShowPayrollState() { + return $this->container['show_payroll_state']; + } + + /** + * Sets show_payroll_state + * + * @param bool|null $show_payroll_state show_payroll_state + * + * @return self + */ + public function setShowPayrollState($show_payroll_state) { + if (is_null($show_payroll_state)) { + $this->openApiNullablesSetToNull['show_payroll_state'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['show_payroll_state'])) { + unset($nullablesSetToNull['show_payroll_state']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['show_payroll_state'] = $show_payroll_state; + + return $this; + } + + /** + * Gets show_payroll_federal + * + * @return bool|null + */ + public function getShowPayrollFederal() { + return $this->container['show_payroll_federal']; + } + + /** + * Sets show_payroll_federal + * + * @param bool|null $show_payroll_federal show_payroll_federal + * + * @return self + */ + public function setShowPayrollFederal($show_payroll_federal) { + if (is_null($show_payroll_federal)) { + $this->openApiNullablesSetToNull['show_payroll_federal'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['show_payroll_federal'])) { + unset($nullablesSetToNull['show_payroll_federal']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['show_payroll_federal'] = $show_payroll_federal; + + return $this; + } + + /** + * Gets show_payroll_direct_deposit + * + * @return bool|null + */ + public function getShowPayrollDirectDeposit() { + return $this->container['show_payroll_direct_deposit']; + } + + /** + * Sets show_payroll_direct_deposit + * + * @param bool|null $show_payroll_direct_deposit show_payroll_direct_deposit + * + * @return self + */ + public function setShowPayrollDirectDeposit($show_payroll_direct_deposit) { + if (is_null($show_payroll_direct_deposit)) { + $this->openApiNullablesSetToNull['show_payroll_direct_deposit'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['show_payroll_direct_deposit'])) { + unset($nullablesSetToNull['show_payroll_direct_deposit']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['show_payroll_direct_deposit'] = $show_payroll_direct_deposit; + + return $this; + } + + /** + * Gets nhp_configuration_id + * + * @return int|null + */ + public function getNhpConfigurationId() { + return $this->container['nhp_configuration_id']; + } + + /** + * Sets nhp_configuration_id + * + * @param int|null $nhp_configuration_id nhp_configuration_id + * + * @return self + */ + public function setNhpConfigurationId($nhp_configuration_id) { + if (is_null($nhp_configuration_id)) { + $this->openApiNullablesSetToNull['nhp_configuration_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nhp_configuration_id'])) { + unset($nullablesSetToNull['nhp_configuration_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nhp_configuration_id'] = $nhp_configuration_id; + + return $this; + } + + /** + * Gets nhp_template_id + * + * @return int|null + */ + public function getNhpTemplateId() { + return $this->container['nhp_template_id']; + } + + /** + * Sets nhp_template_id + * + * @param int|null $nhp_template_id nhp_template_id + * + * @return self + */ + public function setNhpTemplateId($nhp_template_id) { + if (is_null($nhp_template_id)) { + $this->openApiNullablesSetToNull['nhp_template_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nhp_template_id'])) { + unset($nullablesSetToNull['nhp_template_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nhp_template_id'] = $nhp_template_id; + + return $this; + } + + /** + * Gets count_nhp_gtky_sent + * + * @return int|null + */ + public function getCountNhpGtkySent() { + return $this->container['count_nhp_gtky_sent']; + } + + /** + * Sets count_nhp_gtky_sent + * + * @param int|null $count_nhp_gtky_sent count_nhp_gtky_sent + * + * @return self + */ + public function setCountNhpGtkySent($count_nhp_gtky_sent) { + if (is_null($count_nhp_gtky_sent)) { + $this->openApiNullablesSetToNull['count_nhp_gtky_sent'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['count_nhp_gtky_sent'])) { + unset($nullablesSetToNull['count_nhp_gtky_sent']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['count_nhp_gtky_sent'] = $count_nhp_gtky_sent; + + return $this; + } + + /** + * Gets cancelled + * + * @return bool|null + */ + public function getCancelled() { + return $this->container['cancelled']; + } + + /** + * Sets cancelled + * + * @param bool|null $cancelled cancelled + * + * @return self + */ + public function setCancelled($cancelled) { + if (is_null($cancelled)) { + throw new \InvalidArgumentException('non-nullable cancelled cannot be null'); + } + $this->container['cancelled'] = $cancelled; + + return $this; + } + + /** + * Gets include_photo_option + * + * @return bool|null + */ + public function getIncludePhotoOption() { + return $this->container['include_photo_option']; + } + + /** + * Sets include_photo_option + * + * @param bool|null $include_photo_option Whether photo collection is offered based on configuration. + * + * @return self + */ + public function setIncludePhotoOption($include_photo_option) { + if (is_null($include_photo_option)) { + throw new \InvalidArgumentException('non-nullable include_photo_option cannot be null'); + } + $this->container['include_photo_option'] = $include_photo_option; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Derived lifecycle status for the instance. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketPublicApiWritableBody.php b/lib/Model/NewHirePacketPublicApiWritableBody.php new file mode 100644 index 00000000..528481d6 --- /dev/null +++ b/lib/Model/NewHirePacketPublicApiWritableBody.php @@ -0,0 +1,733 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketPublicApiWritableBody + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketPublicApiWritableBody Class Doc Comment + * + * @category Class + * @description Optional fields that may be set when creating or updating a new hire packet instance. All properties are optional for PUT; for POST, employeeId is required and supplied via a second schema in the request body allOf. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketPublicApiWritableBody implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketPublicApiWritableBody'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'contact_employee_id' => 'int', + 'requires_personal_information' => 'bool', + 'requires_photo' => 'bool', + 'requires_personal_questions' => 'bool', + 'arrive_by_time' => 'string', + 'location' => 'string', + 'send_get_to_know_you_email' => 'bool', + 'show_payroll_state' => 'bool', + 'show_payroll_federal' => 'bool', + 'show_payroll_direct_deposit' => 'bool', + 'nhp_template_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'contact_employee_id' => null, + 'requires_personal_information' => null, + 'requires_photo' => null, + 'requires_personal_questions' => null, + 'arrive_by_time' => null, + 'location' => null, + 'send_get_to_know_you_email' => null, + 'show_payroll_state' => null, + 'show_payroll_federal' => null, + 'show_payroll_direct_deposit' => null, + 'nhp_template_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'contact_employee_id' => true, + 'requires_personal_information' => false, + 'requires_photo' => false, + 'requires_personal_questions' => false, + 'arrive_by_time' => true, + 'location' => true, + 'send_get_to_know_you_email' => false, + 'show_payroll_state' => false, + 'show_payroll_federal' => false, + 'show_payroll_direct_deposit' => false, + 'nhp_template_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contact_employee_id' => 'contactEmployeeId', + 'requires_personal_information' => 'requiresPersonalInformation', + 'requires_photo' => 'requiresPhoto', + 'requires_personal_questions' => 'requiresPersonalQuestions', + 'arrive_by_time' => 'arriveByTime', + 'location' => 'location', + 'send_get_to_know_you_email' => 'sendGetToKnowYouEmail', + 'show_payroll_state' => 'showPayrollState', + 'show_payroll_federal' => 'showPayrollFederal', + 'show_payroll_direct_deposit' => 'showPayrollDirectDeposit', + 'nhp_template_id' => 'nhpTemplateId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contact_employee_id' => 'setContactEmployeeId', + 'requires_personal_information' => 'setRequiresPersonalInformation', + 'requires_photo' => 'setRequiresPhoto', + 'requires_personal_questions' => 'setRequiresPersonalQuestions', + 'arrive_by_time' => 'setArriveByTime', + 'location' => 'setLocation', + 'send_get_to_know_you_email' => 'setSendGetToKnowYouEmail', + 'show_payroll_state' => 'setShowPayrollState', + 'show_payroll_federal' => 'setShowPayrollFederal', + 'show_payroll_direct_deposit' => 'setShowPayrollDirectDeposit', + 'nhp_template_id' => 'setNhpTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contact_employee_id' => 'getContactEmployeeId', + 'requires_personal_information' => 'getRequiresPersonalInformation', + 'requires_photo' => 'getRequiresPhoto', + 'requires_personal_questions' => 'getRequiresPersonalQuestions', + 'arrive_by_time' => 'getArriveByTime', + 'location' => 'getLocation', + 'send_get_to_know_you_email' => 'getSendGetToKnowYouEmail', + 'show_payroll_state' => 'getShowPayrollState', + 'show_payroll_federal' => 'getShowPayrollFederal', + 'show_payroll_direct_deposit' => 'getShowPayrollDirectDeposit', + 'nhp_template_id' => 'getNhpTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('contact_employee_id', $data ?? [], null); + $this->setIfExists('requires_personal_information', $data ?? [], null); + $this->setIfExists('requires_photo', $data ?? [], null); + $this->setIfExists('requires_personal_questions', $data ?? [], null); + $this->setIfExists('arrive_by_time', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('send_get_to_know_you_email', $data ?? [], null); + $this->setIfExists('show_payroll_state', $data ?? [], null); + $this->setIfExists('show_payroll_federal', $data ?? [], null); + $this->setIfExists('show_payroll_direct_deposit', $data ?? [], null); + $this->setIfExists('nhp_template_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets contact_employee_id + * + * @return int|null + */ + public function getContactEmployeeId() { + return $this->container['contact_employee_id']; + } + + /** + * Sets contact_employee_id + * + * @param int|null $contact_employee_id contact_employee_id + * + * @return self + */ + public function setContactEmployeeId($contact_employee_id) { + if (is_null($contact_employee_id)) { + $this->openApiNullablesSetToNull['contact_employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['contact_employee_id'])) { + unset($nullablesSetToNull['contact_employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contact_employee_id'] = $contact_employee_id; + + return $this; + } + + /** + * Gets requires_personal_information + * + * @return bool|null + */ + public function getRequiresPersonalInformation() { + return $this->container['requires_personal_information']; + } + + /** + * Sets requires_personal_information + * + * @param bool|null $requires_personal_information Whether personal information collection is required. + * + * @return self + */ + public function setRequiresPersonalInformation($requires_personal_information) { + if (is_null($requires_personal_information)) { + throw new \InvalidArgumentException('non-nullable requires_personal_information cannot be null'); + } + $this->container['requires_personal_information'] = $requires_personal_information; + + return $this; + } + + /** + * Gets requires_photo + * + * @return bool|null + */ + public function getRequiresPhoto() { + return $this->container['requires_photo']; + } + + /** + * Sets requires_photo + * + * @param bool|null $requires_photo Whether a photo is required. + * + * @return self + */ + public function setRequiresPhoto($requires_photo) { + if (is_null($requires_photo)) { + throw new \InvalidArgumentException('non-nullable requires_photo cannot be null'); + } + $this->container['requires_photo'] = $requires_photo; + + return $this; + } + + /** + * Gets requires_personal_questions + * + * @return bool|null + */ + public function getRequiresPersonalQuestions() { + return $this->container['requires_personal_questions']; + } + + /** + * Sets requires_personal_questions + * + * @param bool|null $requires_personal_questions Whether personal questions are required. + * + * @return self + */ + public function setRequiresPersonalQuestions($requires_personal_questions) { + if (is_null($requires_personal_questions)) { + throw new \InvalidArgumentException('non-nullable requires_personal_questions cannot be null'); + } + $this->container['requires_personal_questions'] = $requires_personal_questions; + + return $this; + } + + /** + * Gets arrive_by_time + * + * @return string|null + */ + public function getArriveByTime() { + return $this->container['arrive_by_time']; + } + + /** + * Sets arrive_by_time + * + * @param string|null $arrive_by_time arrive_by_time + * + * @return self + */ + public function setArriveByTime($arrive_by_time) { + if (is_null($arrive_by_time)) { + $this->openApiNullablesSetToNull['arrive_by_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['arrive_by_time'])) { + unset($nullablesSetToNull['arrive_by_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['arrive_by_time'] = $arrive_by_time; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets send_get_to_know_you_email + * + * @return bool|null + */ + public function getSendGetToKnowYouEmail() { + return $this->container['send_get_to_know_you_email']; + } + + /** + * Sets send_get_to_know_you_email + * + * @param bool|null $send_get_to_know_you_email Whether to send the Get To Know You email. + * + * @return self + */ + public function setSendGetToKnowYouEmail($send_get_to_know_you_email) { + if (is_null($send_get_to_know_you_email)) { + throw new \InvalidArgumentException('non-nullable send_get_to_know_you_email cannot be null'); + } + $this->container['send_get_to_know_you_email'] = $send_get_to_know_you_email; + + return $this; + } + + /** + * Gets show_payroll_state + * + * @return bool|null + */ + public function getShowPayrollState() { + return $this->container['show_payroll_state']; + } + + /** + * Sets show_payroll_state + * + * @param bool|null $show_payroll_state Whether to show state payroll fields. + * + * @return self + */ + public function setShowPayrollState($show_payroll_state) { + if (is_null($show_payroll_state)) { + throw new \InvalidArgumentException('non-nullable show_payroll_state cannot be null'); + } + $this->container['show_payroll_state'] = $show_payroll_state; + + return $this; + } + + /** + * Gets show_payroll_federal + * + * @return bool|null + */ + public function getShowPayrollFederal() { + return $this->container['show_payroll_federal']; + } + + /** + * Sets show_payroll_federal + * + * @param bool|null $show_payroll_federal Whether to show federal payroll fields. + * + * @return self + */ + public function setShowPayrollFederal($show_payroll_federal) { + if (is_null($show_payroll_federal)) { + throw new \InvalidArgumentException('non-nullable show_payroll_federal cannot be null'); + } + $this->container['show_payroll_federal'] = $show_payroll_federal; + + return $this; + } + + /** + * Gets show_payroll_direct_deposit + * + * @return bool|null + */ + public function getShowPayrollDirectDeposit() { + return $this->container['show_payroll_direct_deposit']; + } + + /** + * Sets show_payroll_direct_deposit + * + * @param bool|null $show_payroll_direct_deposit Whether to show direct deposit payroll fields. + * + * @return self + */ + public function setShowPayrollDirectDeposit($show_payroll_direct_deposit) { + if (is_null($show_payroll_direct_deposit)) { + throw new \InvalidArgumentException('non-nullable show_payroll_direct_deposit cannot be null'); + } + $this->container['show_payroll_direct_deposit'] = $show_payroll_direct_deposit; + + return $this; + } + + /** + * Gets nhp_template_id + * + * @return int|null + */ + public function getNhpTemplateId() { + return $this->container['nhp_template_id']; + } + + /** + * Sets nhp_template_id + * + * @param int|null $nhp_template_id nhp_template_id + * + * @return self + */ + public function setNhpTemplateId($nhp_template_id) { + if (is_null($nhp_template_id)) { + $this->openApiNullablesSetToNull['nhp_template_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nhp_template_id'])) { + unset($nullablesSetToNull['nhp_template_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nhp_template_id'] = $nhp_template_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHirePacketsListResponse.php b/lib/Model/NewHirePacketsListResponse.php new file mode 100644 index 00000000..23af65c8 --- /dev/null +++ b/lib/Model/NewHirePacketsListResponse.php @@ -0,0 +1,484 @@ +<?php +declare(strict_types=1); +/** + * NewHirePacketsListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHirePacketsListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHirePacketsListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHirePacketsListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'new_hire_packets' => '\BhrSdk\Model\NewHirePacketPublicApi[]', + 'page' => 'int', + 'page_size' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'new_hire_packets' => null, + 'page' => null, + 'page_size' => null, + 'total_count' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'new_hire_packets' => false, + 'page' => false, + 'page_size' => false, + 'total_count' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'new_hire_packets' => 'newHirePackets', + 'page' => 'page', + 'page_size' => 'pageSize', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'new_hire_packets' => 'setNewHirePackets', + 'page' => 'setPage', + 'page_size' => 'setPageSize', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'new_hire_packets' => 'getNewHirePackets', + 'page' => 'getPage', + 'page_size' => 'getPageSize', + 'total_count' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('new_hire_packets', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_count', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets new_hire_packets + * + * @return \BhrSdk\Model\NewHirePacketPublicApi[]|null + */ + public function getNewHirePackets() { + return $this->container['new_hire_packets']; + } + + /** + * Sets new_hire_packets + * + * @param \BhrSdk\Model\NewHirePacketPublicApi[]|null $new_hire_packets Packet summaries for the current page. + * + * @return self + */ + public function setNewHirePackets($new_hire_packets) { + if (is_null($new_hire_packets)) { + throw new \InvalidArgumentException('non-nullable new_hire_packets cannot be null'); + } + $this->container['new_hire_packets'] = $new_hire_packets; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page Current page number (1-based). + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size Page size used for this response. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_count + * + * @return int|null + */ + public function getTotalCount() { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int|null $total_count Total packet rows matching visibility (across all pages). + * + * @return self + */ + public function setTotalCount($total_count) { + if (is_null($total_count)) { + throw new \InvalidArgumentException('non-nullable total_count cannot be null'); + } + $this->container['total_count'] = $total_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHireWidgetItem.php b/lib/Model/NewHireWidgetItem.php new file mode 100644 index 00000000..8fed8d07 --- /dev/null +++ b/lib/Model/NewHireWidgetItem.php @@ -0,0 +1,690 @@ +<?php +declare(strict_types=1); +/** + * NewHireWidgetItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHireWidgetItem Class Doc Comment + * + * @category Class + * @description Single upcoming new hire as projected for the public welcome-new-hires widget endpoint. Strips sensitive contact fields (work email, home email) and normalizes the domain's dynamic BasicEmployee decorations into a stable shape. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHireWidgetItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHireWidgetItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'preferred_first_name' => 'string', + 'last_name' => 'string', + 'hire_date' => '\DateTime', + 'profile_picture_url' => 'string', + 'department' => 'string', + 'location' => 'string', + 'can_see_employee' => 'bool', + 'get_to_know_you' => '\BhrSdk\Model\CompletedQuestionsAndResponseDataObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'preferred_first_name' => null, + 'last_name' => null, + 'hire_date' => 'date', + 'profile_picture_url' => null, + 'department' => null, + 'location' => null, + 'can_see_employee' => null, + 'get_to_know_you' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'preferred_first_name' => false, + 'last_name' => false, + 'hire_date' => true, + 'profile_picture_url' => true, + 'department' => true, + 'location' => true, + 'can_see_employee' => false, + 'get_to_know_you' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'preferred_first_name' => 'preferredFirstName', + 'last_name' => 'lastName', + 'hire_date' => 'hireDate', + 'profile_picture_url' => 'profilePictureUrl', + 'department' => 'department', + 'location' => 'location', + 'can_see_employee' => 'canSeeEmployee', + 'get_to_know_you' => 'getToKnowYou' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'preferred_first_name' => 'setPreferredFirstName', + 'last_name' => 'setLastName', + 'hire_date' => 'setHireDate', + 'profile_picture_url' => 'setProfilePictureUrl', + 'department' => 'setDepartment', + 'location' => 'setLocation', + 'can_see_employee' => 'setCanSeeEmployee', + 'get_to_know_you' => 'setGetToKnowYou' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'preferred_first_name' => 'getPreferredFirstName', + 'last_name' => 'getLastName', + 'hire_date' => 'getHireDate', + 'profile_picture_url' => 'getProfilePictureUrl', + 'department' => 'getDepartment', + 'location' => 'getLocation', + 'can_see_employee' => 'getCanSeeEmployee', + 'get_to_know_you' => 'getGetToKnowYou' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('preferred_first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); + $this->setIfExists('profile_picture_url', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('can_see_employee', $data ?? [], null); + $this->setIfExists('get_to_know_you', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['preferred_first_name'] === null) { + $invalidProperties[] = "'preferred_first_name' can't be null"; + } + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; + } + if ($this->container['hire_date'] === null) { + $invalidProperties[] = "'hire_date' can't be null"; + } + if ($this->container['can_see_employee'] === null) { + $invalidProperties[] = "'can_see_employee' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Employee id. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets preferred_first_name + * + * @return string + */ + public function getPreferredFirstName() { + return $this->container['preferred_first_name']; + } + + /** + * Sets preferred_first_name + * + * @param string $preferred_first_name Nickname when set, otherwise first name. + * + * @return self + */ + public function setPreferredFirstName($preferred_first_name) { + if (is_null($preferred_first_name)) { + throw new \InvalidArgumentException('non-nullable preferred_first_name cannot be null'); + } + $this->container['preferred_first_name'] = $preferred_first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string $last_name last_name + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets hire_date + * + * @return \DateTime + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param \DateTime $hire_date hire_date + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + $this->openApiNullablesSetToNull['hire_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hire_date'])) { + unset($nullablesSetToNull['hire_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hire_date'] = $hire_date; + + return $this; + } + + /** + * Gets profile_picture_url + * + * @return string|null + */ + public function getProfilePictureUrl() { + return $this->container['profile_picture_url']; + } + + /** + * Sets profile_picture_url + * + * @param string|null $profile_picture_url profile_picture_url + * + * @return self + */ + public function setProfilePictureUrl($profile_picture_url) { + if (is_null($profile_picture_url)) { + $this->openApiNullablesSetToNull['profile_picture_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['profile_picture_url'])) { + unset($nullablesSetToNull['profile_picture_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['profile_picture_url'] = $profile_picture_url; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment() { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department department + * + * @return self + */ + public function setDepartment($department) { + if (is_null($department)) { + $this->openApiNullablesSetToNull['department'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['department'])) { + unset($nullablesSetToNull['department']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation() { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location location + * + * @return self + */ + public function setLocation($location) { + if (is_null($location)) { + $this->openApiNullablesSetToNull['location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['location'])) { + unset($nullablesSetToNull['location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets can_see_employee + * + * @return bool + */ + public function getCanSeeEmployee() { + return $this->container['can_see_employee']; + } + + /** + * Sets can_see_employee + * + * @param bool $can_see_employee Whether the authenticated user can navigate to the employee's profile. + * + * @return self + */ + public function setCanSeeEmployee($can_see_employee) { + if (is_null($can_see_employee)) { + throw new \InvalidArgumentException('non-nullable can_see_employee cannot be null'); + } + $this->container['can_see_employee'] = $can_see_employee; + + return $this; + } + + /** + * Gets get_to_know_you + * + * @return \BhrSdk\Model\CompletedQuestionsAndResponseDataObject[]|null + */ + public function getGetToKnowYou() { + return $this->container['get_to_know_you']; + } + + /** + * Sets get_to_know_you + * + * @param \BhrSdk\Model\CompletedQuestionsAndResponseDataObject[]|null $get_to_know_you get_to_know_you + * + * @return self + */ + public function setGetToKnowYou($get_to_know_you) { + if (is_null($get_to_know_you)) { + $this->openApiNullablesSetToNull['get_to_know_you'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['get_to_know_you'])) { + unset($nullablesSetToNull['get_to_know_you']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['get_to_know_you'] = $get_to_know_you; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewHireWidgetResponse.php b/lib/Model/NewHireWidgetResponse.php new file mode 100644 index 00000000..5ffadc04 --- /dev/null +++ b/lib/Model/NewHireWidgetResponse.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * NewHireWidgetResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * NewHireWidgetResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class NewHireWidgetResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'NewHireWidgetResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'new_hires' => '\BhrSdk\Model\NewHireWidgetItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'new_hires' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'new_hires' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'new_hires' => 'newHires' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'new_hires' => 'setNewHires' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'new_hires' => 'getNewHires' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('new_hires', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['new_hires'] === null) { + $invalidProperties[] = "'new_hires' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets new_hires + * + * @return \BhrSdk\Model\NewHireWidgetItem[] + */ + public function getNewHires() { + return $this->container['new_hires']; + } + + /** + * Sets new_hires + * + * @param \BhrSdk\Model\NewHireWidgetItem[] $new_hires Upcoming new hires visible to the authenticated user, sorted by hire date descending. Empty when the user lacks new-hire-packet or company-directory access. + * + * @return self + */ + public function setNewHires($new_hires) { + if (is_null($new_hires)) { + throw new \InvalidArgumentException('non-nullable new_hires cannot be null'); + } + $this->container['new_hires'] = $new_hires; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/NewWebHook.php b/lib/Model/NewWebHook.php index b68c6638..3336cfc5 100644 --- a/lib/Model/NewWebHook.php +++ b/lib/Model/NewWebHook.php @@ -62,7 +62,8 @@ class NewWebHook implements ModelInterface, ArrayAccess, \JsonSerializable { 'post_fields' => 'object', 'url' => 'string', 'format' => 'string', - 'include_company_domain' => 'bool' + 'include_company_domain' => 'bool', + 'events' => '\BhrSdk\Model\WebhookEventType[]' ]; /** @@ -78,7 +79,8 @@ class NewWebHook implements ModelInterface, ArrayAccess, \JsonSerializable { 'post_fields' => null, 'url' => null, 'format' => null, - 'include_company_domain' => null + 'include_company_domain' => null, + 'events' => null ]; /** @@ -93,7 +95,8 @@ class NewWebHook implements ModelInterface, ArrayAccess, \JsonSerializable { 'post_fields' => false, 'url' => false, 'format' => false, - 'include_company_domain' => false + 'include_company_domain' => false, + 'events' => false ]; /** @@ -183,7 +186,8 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'postFields', 'url' => 'url', 'format' => 'format', - 'include_company_domain' => 'includeCompanyDomain' + 'include_company_domain' => 'includeCompanyDomain', + 'events' => 'events' ]; /** @@ -197,7 +201,8 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'setPostFields', 'url' => 'setUrl', 'format' => 'setFormat', - 'include_company_domain' => 'setIncludeCompanyDomain' + 'include_company_domain' => 'setIncludeCompanyDomain', + 'events' => 'setEvents' ]; /** @@ -211,7 +216,8 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'getPostFields', 'url' => 'getUrl', 'format' => 'getFormat', - 'include_company_domain' => 'getIncludeCompanyDomain' + 'include_company_domain' => 'getIncludeCompanyDomain', + 'events' => 'getEvents' ]; /** @@ -286,6 +292,7 @@ public function __construct(?array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('format', $data ?? [], null); $this->setIfExists('include_company_domain', $data ?? [], null); + $this->setIfExists('events', $data ?? [], null); } /** @@ -316,12 +323,12 @@ public function listInvalidProperties() { if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['monitor_fields'] === null) { - $invalidProperties[] = "'monitor_fields' can't be null"; - } if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } + if ($this->container['format'] === null) { + $invalidProperties[] = "'format' can't be null"; + } $allowedValues = $this->getFormatAllowableValues(); if (!is_null($this->container['format']) && !in_array($this->container['format'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -372,7 +379,7 @@ public function setName($name) { /** * Gets monitor_fields * - * @return string[] + * @return string[]|null */ public function getMonitorFields() { return $this->container['monitor_fields']; @@ -381,7 +388,7 @@ public function getMonitorFields() { /** * Sets monitor_fields * - * @param string[] $monitor_fields A list of fields to monitor. + * @param string[]|null $monitor_fields A list of fields to monitor. At least one field is required to be monitored if events is empty or contains employee_with_fields.updated or employee.updated. * * @return self */ @@ -406,7 +413,7 @@ public function getPostFields() { /** * Sets post_fields * - * @param object|null $post_fields A list of fields to post to the webhook url. Field ID or alias: external name + * @param object|null $post_fields An object map of field ID or alias to the external name used in the webhook payload (e.g. `{\"firstName\": \"First Name\"}`). Omit or send an empty object to include no extra fields. * * @return self */ @@ -447,7 +454,7 @@ public function setUrl($url) { /** * Gets format * - * @return string|null + * @return string */ public function getFormat() { return $this->container['format']; @@ -456,7 +463,7 @@ public function getFormat() { /** * Sets format * - * @param string|null $format The format the webhook should use (json - default, form-encoded). + * @param string $format The payload format the webhook uses. Required. * * @return self */ @@ -491,7 +498,7 @@ public function getIncludeCompanyDomain() { /** * Sets include_company_domain * - * @param bool|null $include_company_domain If set to true, the company domain will be added to the header. + * @param bool|null $include_company_domain If set to true, the company domain will be added to the webhook request header. * * @return self */ @@ -503,6 +510,31 @@ public function setIncludeCompanyDomain($include_company_domain) { return $this; } + + /** + * Gets events + * + * @return \BhrSdk\Model\WebhookEventType[]|null + */ + public function getEvents() { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \BhrSdk\Model\WebhookEventType[]|null $events Events that trigger this webhook. Defaults to ['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created'] if not specified. Cannot mix employee_with_fields events with employee events. + * + * @return self + */ + public function setEvents($events) { + if (is_null($events)) { + throw new \InvalidArgumentException('non-nullable events cannot be null'); + } + $this->container['events'] = $events; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/OnboardingExperiencePublicApi.php b/lib/Model/OnboardingExperiencePublicApi.php new file mode 100644 index 00000000..bed174ae --- /dev/null +++ b/lib/Model/OnboardingExperiencePublicApi.php @@ -0,0 +1,599 @@ +<?php +declare(strict_types=1); +/** + * OnboardingExperiencePublicApi + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * OnboardingExperiencePublicApi Class Doc Comment + * + * @category Class + * @description Onboarding experience for public APIs; links to the new hire packet instance by id only. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class OnboardingExperiencePublicApi implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'OnboardingExperiencePublicApi'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'new_hire_packet_id' => 'int', + 'nhp_template_id' => 'int', + 'nhp_configuration_id' => 'int', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'new_hire_packet_id' => null, + 'nhp_template_id' => null, + 'nhp_configuration_id' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'new_hire_packet_id' => false, + 'nhp_template_id' => true, + 'nhp_configuration_id' => true, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'new_hire_packet_id' => 'newHirePacketId', + 'nhp_template_id' => 'nhpTemplateId', + 'nhp_configuration_id' => 'nhpConfigurationId', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'new_hire_packet_id' => 'setNewHirePacketId', + 'nhp_template_id' => 'setNhpTemplateId', + 'nhp_configuration_id' => 'setNhpConfigurationId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'new_hire_packet_id' => 'getNewHirePacketId', + 'nhp_template_id' => 'getNhpTemplateId', + 'nhp_configuration_id' => 'getNhpConfigurationId', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_SENT = 'sent'; + public const STATUS_DRAFT = 'draft'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_CANCELLED, + self::STATUS_COMPLETED, + self::STATUS_SENT, + self::STATUS_DRAFT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('new_hire_packet_id', $data ?? [], null); + $this->setIfExists('nhp_template_id', $data ?? [], null); + $this->setIfExists('nhp_configuration_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Onboarding experience id (same as the new hire packet instance primary key). + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id Employee this onboarding experience belongs to. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets new_hire_packet_id + * + * @return int|null + */ + public function getNewHirePacketId() { + return $this->container['new_hire_packet_id']; + } + + /** + * Sets new_hire_packet_id + * + * @param int|null $new_hire_packet_id Primary key of the linked new hire packet instance (NHP row). + * + * @return self + */ + public function setNewHirePacketId($new_hire_packet_id) { + if (is_null($new_hire_packet_id)) { + throw new \InvalidArgumentException('non-nullable new_hire_packet_id cannot be null'); + } + $this->container['new_hire_packet_id'] = $new_hire_packet_id; + + return $this; + } + + /** + * Gets nhp_template_id + * + * @return int|null + */ + public function getNhpTemplateId() { + return $this->container['nhp_template_id']; + } + + /** + * Sets nhp_template_id + * + * @param int|null $nhp_template_id nhp_template_id + * + * @return self + */ + public function setNhpTemplateId($nhp_template_id) { + if (is_null($nhp_template_id)) { + $this->openApiNullablesSetToNull['nhp_template_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nhp_template_id'])) { + unset($nullablesSetToNull['nhp_template_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nhp_template_id'] = $nhp_template_id; + + return $this; + } + + /** + * Gets nhp_configuration_id + * + * @return int|null + */ + public function getNhpConfigurationId() { + return $this->container['nhp_configuration_id']; + } + + /** + * Sets nhp_configuration_id + * + * @param int|null $nhp_configuration_id nhp_configuration_id + * + * @return self + */ + public function setNhpConfigurationId($nhp_configuration_id) { + if (is_null($nhp_configuration_id)) { + $this->openApiNullablesSetToNull['nhp_configuration_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['nhp_configuration_id'])) { + unset($nullablesSetToNull['nhp_configuration_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nhp_configuration_id'] = $nhp_configuration_id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Derived lifecycle status for the linked new hire packet instance. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/OnboardingExperiencesListResponse.php b/lib/Model/OnboardingExperiencesListResponse.php new file mode 100644 index 00000000..1d0c5f95 --- /dev/null +++ b/lib/Model/OnboardingExperiencesListResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * OnboardingExperiencesListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * OnboardingExperiencesListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class OnboardingExperiencesListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'OnboardingExperiencesListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'onboarding_experiences' => '\BhrSdk\Model\OnboardingExperiencePublicApi[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'onboarding_experiences' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'onboarding_experiences' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'onboarding_experiences' => 'onboardingExperiences' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'onboarding_experiences' => 'setOnboardingExperiences' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'onboarding_experiences' => 'getOnboardingExperiences' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('onboarding_experiences', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets onboarding_experiences + * + * @return \BhrSdk\Model\OnboardingExperiencePublicApi[]|null + */ + public function getOnboardingExperiences() { + return $this->container['onboarding_experiences']; + } + + /** + * Sets onboarding_experiences + * + * @param \BhrSdk\Model\OnboardingExperiencePublicApi[]|null $onboarding_experiences Onboarding experience summaries (empty when no running workflow for this employee). + * + * @return self + */ + public function setOnboardingExperiences($onboarding_experiences) { + if (is_null($onboarding_experiences)) { + throw new \InvalidArgumentException('non-nullable onboarding_experiences cannot be null'); + } + $this->container['onboarding_experiences'] = $onboarding_experiences; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PagedLocationResponse.php b/lib/Model/PagedLocationResponse.php new file mode 100644 index 00000000..64cbebfd --- /dev/null +++ b/lib/Model/PagedLocationResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * PagedLocationResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PagedLocationResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PagedLocationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PagedLocationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\LocationResponseObject[]', + 'meta' => '\BhrSdk\Model\PaginationMetaData', + '_links' => 'array<string,\BhrSdk\Model\AvailableAction>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\LocationResponseObject[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\LocationResponseObject[]|null $data Array of location resources for the current page + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\PaginationMetaData|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\PaginationMetaData|null $meta The pagination metadata for the response. + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return array<string,\BhrSdk\Model\AvailableAction>|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array<string,\BhrSdk\Model\AvailableAction>|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PagedResponse.php b/lib/Model/PagedResponse.php new file mode 100644 index 00000000..9f6ae583 --- /dev/null +++ b/lib/Model/PagedResponse.php @@ -0,0 +1,459 @@ +<?php +declare(strict_types=1); +/** + * PagedResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PagedResponse Class Doc Comment + * + * @category Class + * @description A response object that contains a paginated list of results. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PagedResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => 'object[]', + 'meta' => '\BhrSdk\Model\PaginationMetaData', + '_links' => 'array<string,\BhrSdk\Model\AvailableAction>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return object[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param object[]|null $data The data for the current page. + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\PaginationMetaData|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\PaginationMetaData|null $meta The pagination metadata for the response. + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return array<string,\BhrSdk\Model\AvailableAction>|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array<string,\BhrSdk\Model\AvailableAction>|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + $this->openApiNullablesSetToNull['_links'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['_links'])) { + unset($nullablesSetToNull['_links']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Pagination.php b/lib/Model/Pagination.php index 680fa790..c1dfb152 100644 --- a/lib/Model/Pagination.php +++ b/lib/Model/Pagination.php @@ -89,8 +89,8 @@ class Pagination implements ModelInterface, ArrayAccess, \JsonSerializable { 'total_records' => false, 'current_page' => false, 'total_pages' => false, - 'next_page' => false, - 'prev_page' => false + 'next_page' => true, + 'prev_page' => true ]; /** @@ -397,7 +397,13 @@ public function getNextPage() { */ public function setNextPage($next_page) { if (is_null($next_page)) { - throw new \InvalidArgumentException('non-nullable next_page cannot be null'); + $this->openApiNullablesSetToNull['next_page'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['next_page'])) { + unset($nullablesSetToNull['next_page']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['next_page'] = $next_page; @@ -422,7 +428,13 @@ public function getPrevPage() { */ public function setPrevPage($prev_page) { if (is_null($prev_page)) { - throw new \InvalidArgumentException('non-nullable prev_page cannot be null'); + $this->openApiNullablesSetToNull['prev_page'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['prev_page'])) { + unset($nullablesSetToNull['prev_page']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['prev_page'] = $prev_page; diff --git a/lib/Model/PaginationMetaData.php b/lib/Model/PaginationMetaData.php new file mode 100644 index 00000000..1eb68a82 --- /dev/null +++ b/lib/Model/PaginationMetaData.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * PaginationMetaData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PaginationMetaData Class Doc Comment + * + * @category Class + * @description A response object that contains pagination metadata. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PaginationMetaData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PaginationMetaData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'page' => 'int', + 'page_size' => 'int', + 'total_pages' => 'int', + 'total_items' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'page' => null, + 'page_size' => null, + 'total_pages' => null, + 'total_items' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'page' => false, + 'page_size' => false, + 'total_pages' => false, + 'total_items' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'page' => 'page', + 'page_size' => 'pageSize', + 'total_pages' => 'totalPages', + 'total_items' => 'totalItems' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'page' => 'setPage', + 'page_size' => 'setPageSize', + 'total_pages' => 'setTotalPages', + 'total_items' => 'setTotalItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'page' => 'getPage', + 'page_size' => 'getPageSize', + 'total_pages' => 'getTotalPages', + 'total_items' => 'getTotalItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_pages', $data ?? [], null); + $this->setIfExists('total_items', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page The page number of the results. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size The number of items per page. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_pages + * + * @return int|null + */ + public function getTotalPages() { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int|null $total_pages The total number of pages available. + * + * @return self + */ + public function setTotalPages($total_pages) { + if (is_null($total_pages)) { + throw new \InvalidArgumentException('non-nullable total_pages cannot be null'); + } + $this->container['total_pages'] = $total_pages; + + return $this; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items The total number of items available. + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PatchCompanyProfileCompanyInformationRequest.php b/lib/Model/PatchCompanyProfileCompanyInformationRequest.php new file mode 100644 index 00000000..a6ae0511 --- /dev/null +++ b/lib/Model/PatchCompanyProfileCompanyInformationRequest.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * PatchCompanyProfileCompanyInformationRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PatchCompanyProfileCompanyInformationRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PatchCompanyProfileCompanyInformationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'patch_company_profile_company_information_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'legal_name' => 'string', + 'phone' => 'string', + 'address' => '\BhrSdk\Model\PatchCompanyProfileCompanyInformationRequestAddress' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'legal_name' => null, + 'phone' => null, + 'address' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'legal_name' => false, + 'phone' => false, + 'address' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'legal_name' => 'legalName', + 'phone' => 'phone', + 'address' => 'address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'legal_name' => 'setLegalName', + 'phone' => 'setPhone', + 'address' => 'setAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'legal_name' => 'getLegalName', + 'phone' => 'getPhone', + 'address' => 'getAddress' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('legal_name', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('address', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets legal_name + * + * @return string|null + */ + public function getLegalName() { + return $this->container['legal_name']; + } + + /** + * Sets legal_name + * + * @param string|null $legal_name Legal name of the company (name_of_employer). Required (non-empty) when this field is present in the patch. + * + * @return self + */ + public function setLegalName($legal_name) { + if (is_null($legal_name)) { + throw new \InvalidArgumentException('non-nullable legal_name cannot be null'); + } + $this->container['legal_name'] = $legal_name; + + return $this; + } + + /** + * Gets phone + * + * @return string|null + */ + public function getPhone() { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string|null $phone Contact phone number. Required (non-empty) when this field is present in the patch. + * + * @return self + */ + public function setPhone($phone) { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets address + * + * @return \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequestAddress|null + */ + public function getAddress() { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \BhrSdk\Model\PatchCompanyProfileCompanyInformationRequestAddress|null $address address + * + * @return self + */ + public function setAddress($address) { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PatchCompanyProfileCompanyInformationRequestAddress.php b/lib/Model/PatchCompanyProfileCompanyInformationRequestAddress.php new file mode 100644 index 00000000..120ad189 --- /dev/null +++ b/lib/Model/PatchCompanyProfileCompanyInformationRequestAddress.php @@ -0,0 +1,529 @@ +<?php +declare(strict_types=1); +/** + * PatchCompanyProfileCompanyInformationRequestAddress + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PatchCompanyProfileCompanyInformationRequestAddress Class Doc Comment + * + * @category Class + * @description Company address. When `address` is included in the patch (non-null object), `city`, `state`, and `zip` must all be sent as non-empty strings. `line1` and `line2` are optional (JSON null removes a line per merge-patch). + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PatchCompanyProfileCompanyInformationRequestAddress implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'patch_company_profile_company_information_request_address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'line1' => 'string', + 'line2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'line1' => null, + 'line2' => null, + 'city' => null, + 'state' => null, + 'zip' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'line1' => true, + 'line2' => true, + 'city' => false, + 'state' => false, + 'zip' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'line1' => 'line1', + 'line2' => 'line2', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'line1' => 'setLine1', + 'line2' => 'setLine2', + 'city' => 'setCity', + 'state' => 'setState', + 'zip' => 'setZip' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'line1' => 'getLine1', + 'line2' => 'getLine2', + 'city' => 'getCity', + 'state' => 'getState', + 'zip' => 'getZip' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('line1', $data ?? [], null); + $this->setIfExists('line2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zip', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1() { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 line1 + * + * @return self + */ + public function setLine1($line1) { + if (is_null($line1)) { + $this->openApiNullablesSetToNull['line1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['line1'])) { + unset($nullablesSetToNull['line1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2() { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 line2 + * + * @return self + */ + public function setLine2($line2) { + if (is_null($line2)) { + $this->openApiNullablesSetToNull['line2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['line2'])) { + unset($nullablesSetToNull['line2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line2'] = $line2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city City. Required (non-empty) when address is patched. + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state State. Required (non-empty) when address is patched. + * + * @return self + */ + public function setState($state) { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zip + * + * @return string|null + */ + public function getZip() { + return $this->container['zip']; + } + + /** + * Sets zip + * + * @param string|null $zip Zip or postal code. Required (non-empty) when address is patched. + * + * @return self + */ + public function setZip($zip) { + if (is_null($zip)) { + throw new \InvalidArgumentException('non-nullable zip cannot be null'); + } + $this->container['zip'] = $zip; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PayGradesAndBandsPublishResponse.php b/lib/Model/PayGradesAndBandsPublishResponse.php new file mode 100644 index 00000000..6a86a08d --- /dev/null +++ b/lib/Model/PayGradesAndBandsPublishResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * PayGradesAndBandsPublishResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PayGradesAndBandsPublishResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PayGradesAndBandsPublishResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PayGradesAndBandsPublishResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + 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 string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PayGradesAndBandsSaveLevelsResponse.php b/lib/Model/PayGradesAndBandsSaveLevelsResponse.php new file mode 100644 index 00000000..19668075 --- /dev/null +++ b/lib/Model/PayGradesAndBandsSaveLevelsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * PayGradesAndBandsSaveLevelsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PayGradesAndBandsSaveLevelsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PayGradesAndBandsSaveLevelsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PayGradesAndBandsSaveLevelsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + 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 string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PayGradesAndBandsUpdateJobTitlesResponse.php b/lib/Model/PayGradesAndBandsUpdateJobTitlesResponse.php new file mode 100644 index 00000000..8ea20a6c --- /dev/null +++ b/lib/Model/PayGradesAndBandsUpdateJobTitlesResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * PayGradesAndBandsUpdateJobTitlesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PayGradesAndBandsUpdateJobTitlesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PayGradesAndBandsUpdateJobTitlesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PayGradesAndBandsUpdateJobTitlesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + 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 string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PayGradesAndBandsUpdatePayBandsResponse.php b/lib/Model/PayGradesAndBandsUpdatePayBandsResponse.php new file mode 100644 index 00000000..131652f2 --- /dev/null +++ b/lib/Model/PayGradesAndBandsUpdatePayBandsResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * PayGradesAndBandsUpdatePayBandsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PayGradesAndBandsUpdatePayBandsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PayGradesAndBandsUpdatePayBandsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PayGradesAndBandsUpdatePayBandsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) { + 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 string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PersonInfoApiTransformer.php b/lib/Model/PersonInfoApiTransformer.php new file mode 100644 index 00000000..7a682f5f --- /dev/null +++ b/lib/Model/PersonInfoApiTransformer.php @@ -0,0 +1,528 @@ +<?php +declare(strict_types=1); +/** + * PersonInfoApiTransformer + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PersonInfoApiTransformer Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PersonInfoApiTransformer implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'PersonInfoApiTransformer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'int', + 'user_id' => 'int', + 'display_first_name' => 'string', + 'last_name' => 'string', + 'photo_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'user_id' => null, + 'display_first_name' => null, + 'last_name' => null, + 'photo_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'user_id' => true, + 'display_first_name' => false, + 'last_name' => false, + 'photo_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'user_id' => 'userId', + 'display_first_name' => 'displayFirstName', + 'last_name' => 'lastName', + 'photo_url' => 'photoUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'user_id' => 'setUserId', + 'display_first_name' => 'setDisplayFirstName', + 'last_name' => 'setLastName', + 'photo_url' => 'setPhotoUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'user_id' => 'getUserId', + 'display_first_name' => 'getDisplayFirstName', + 'last_name' => 'getLastName', + 'photo_url' => 'getPhotoUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('user_id', $data ?? [], null); + $this->setIfExists('display_first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('photo_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets user_id + * + * @return int|null + */ + public function getUserId() { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param int|null $user_id user_id + * + * @return self + */ + public function setUserId($user_id) { + if (is_null($user_id)) { + $this->openApiNullablesSetToNull['user_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['user_id'])) { + unset($nullablesSetToNull['user_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['user_id'] = $user_id; + + return $this; + } + + /** + * Gets display_first_name + * + * @return string|null + */ + public function getDisplayFirstName() { + return $this->container['display_first_name']; + } + + /** + * Sets display_first_name + * + * @param string|null $display_first_name Display first name + * + * @return self + */ + public function setDisplayFirstName($display_first_name) { + if (is_null($display_first_name)) { + throw new \InvalidArgumentException('non-nullable display_first_name cannot be null'); + } + $this->container['display_first_name'] = $display_first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name Last name + * + * @return self + */ + public function setLastName($last_name) { + if (is_null($last_name)) { + throw new \InvalidArgumentException('non-nullable last_name cannot be null'); + } + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets photo_url + * + * @return string|null + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string|null $photo_url Photo URL + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + throw new \InvalidArgumentException('non-nullable photo_url cannot be null'); + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PostNewEmployee.php b/lib/Model/PostNewEmployee.php index 6255880d..5d30e7ba 100644 --- a/lib/Model/PostNewEmployee.php +++ b/lib/Model/PostNewEmployee.php @@ -36,6 +36,7 @@ * PostNewEmployee Class Doc Comment * * @category Class + * @description A dictionary of employee field names and their values for the new employee. At minimum, firstName and lastName are required. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Additional fields may use string, number, boolean, array, object, or null values depending on the field type. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. Photo data is not writable through this schema: photo-related keys are silently ignored. After creation, use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to attach a profile photo. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -58,7 +59,11 @@ class PostNewEmployee implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openApiTypes = [ 'first_name' => 'string', - 'last_name' => 'string' + 'last_name' => 'string', + 'work_email' => 'string', + 'job_title' => 'string', + 'department' => 'string', + 'hire_date' => '\DateTime' ]; /** @@ -70,7 +75,11 @@ class PostNewEmployee implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openApiFormats = [ 'first_name' => null, - 'last_name' => null + 'last_name' => null, + 'work_email' => null, + 'job_title' => null, + 'department' => null, + 'hire_date' => 'date' ]; /** @@ -81,7 +90,11 @@ class PostNewEmployee implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openApiNullables = [ 'first_name' => false, - 'last_name' => false + 'last_name' => false, + 'work_email' => false, + 'job_title' => false, + 'department' => false, + 'hire_date' => false ]; /** @@ -167,7 +180,11 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'first_name' => 'firstName', - 'last_name' => 'lastName' + 'last_name' => 'lastName', + 'work_email' => 'workEmail', + 'job_title' => 'jobTitle', + 'department' => 'department', + 'hire_date' => 'hireDate' ]; /** @@ -177,7 +194,11 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'first_name' => 'setFirstName', - 'last_name' => 'setLastName' + 'last_name' => 'setLastName', + 'work_email' => 'setWorkEmail', + 'job_title' => 'setJobTitle', + 'department' => 'setDepartment', + 'hire_date' => 'setHireDate' ]; /** @@ -187,7 +208,11 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'first_name' => 'getFirstName', - 'last_name' => 'getLastName' + 'last_name' => 'getLastName', + 'work_email' => 'getWorkEmail', + 'job_title' => 'getJobTitle', + 'department' => 'getDepartment', + 'hire_date' => 'getHireDate' ]; /** @@ -243,6 +268,10 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('first_name', $data ?? [], null); $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('work_email', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('hire_date', $data ?? [], null); } /** @@ -270,6 +299,12 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; + } + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; + } return $invalidProperties; } @@ -286,7 +321,7 @@ public function valid() { /** * Gets first_name * - * @return string|null + * @return string */ public function getFirstName() { return $this->container['first_name']; @@ -295,7 +330,7 @@ public function getFirstName() { /** * Sets first_name * - * @param string|null $first_name first_name + * @param string $first_name Legal first name (required). * * @return self */ @@ -311,7 +346,7 @@ public function setFirstName($first_name) { /** * Gets last_name * - * @return string|null + * @return string */ public function getLastName() { return $this->container['last_name']; @@ -320,7 +355,7 @@ public function getLastName() { /** * Sets last_name * - * @param string|null $last_name last_name + * @param string $last_name Legal last name (required). * * @return self */ @@ -332,6 +367,106 @@ public function setLastName($last_name) { return $this; } + + /** + * Gets work_email + * + * @return string|null + */ + public function getWorkEmail() { + return $this->container['work_email']; + } + + /** + * Sets work_email + * + * @param string|null $work_email Work email address. + * + * @return self + */ + public function setWorkEmail($work_email) { + if (is_null($work_email)) { + throw new \InvalidArgumentException('non-nullable work_email cannot be null'); + } + $this->container['work_email'] = $work_email; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title Job title. + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + throw new \InvalidArgumentException('non-nullable job_title cannot be null'); + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment() { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department Department name. + * + * @return self + */ + public function setDepartment($department) { + if (is_null($department)) { + throw new \InvalidArgumentException('non-nullable department cannot be null'); + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets hire_date + * + * @return \DateTime|null + */ + public function getHireDate() { + return $this->container['hire_date']; + } + + /** + * Sets hire_date + * + * @param \DateTime|null $hire_date Hire date in YYYY-MM-DD format. + * + * @return self + */ + public function setHireDate($hire_date) { + if (is_null($hire_date)) { + throw new \InvalidArgumentException('non-nullable hire_date cannot be null'); + } + $this->container['hire_date'] = $hire_date; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ProblemDetailsResponse.php b/lib/Model/ProblemDetailsResponse.php new file mode 100644 index 00000000..ba551ae7 --- /dev/null +++ b/lib/Model/ProblemDetailsResponse.php @@ -0,0 +1,581 @@ +<?php +declare(strict_types=1); +/** + * ProblemDetailsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProblemDetailsResponse Class Doc Comment + * + * @category Class + * @description problem fields shared by problem responses and record-level errors. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProblemDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ProblemDetailsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'title' => 'string', + 'status' => 'int', + 'detail' => 'string', + 'instance' => 'string', + 'code' => 'string', + 'fields' => 'array<string,string>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'title' => null, + 'status' => null, + 'detail' => null, + 'instance' => null, + 'code' => null, + 'fields' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'title' => false, + 'status' => false, + 'detail' => false, + 'instance' => false, + 'code' => false, + 'fields' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'title' => 'title', + 'status' => 'status', + 'detail' => 'detail', + 'instance' => 'instance', + 'code' => 'code', + 'fields' => 'fields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'title' => 'setTitle', + 'status' => 'setStatus', + 'detail' => 'setDetail', + 'instance' => 'setInstance', + 'code' => 'setCode', + 'fields' => 'setFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'title' => 'getTitle', + 'status' => 'getStatus', + 'detail' => 'getDetail', + 'instance' => 'getInstance', + 'code' => 'getCode', + 'fields' => 'getFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('detail', $data ?? [], null); + $this->setIfExists('instance', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('fields', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Problem type URI identifying the error category + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Short, human-readable summary of the problem type + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status HTTP status code for the error + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets detail + * + * @return string|null + */ + public function getDetail() { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string|null $detail Detailed, human-readable explanation specific to this occurrence of the problem + * + * @return self + */ + public function setDetail($detail) { + if (is_null($detail)) { + throw new \InvalidArgumentException('non-nullable detail cannot be null'); + } + $this->container['detail'] = $detail; + + return $this; + } + + /** + * Gets instance + * + * @return string|null + */ + public function getInstance() { + return $this->container['instance']; + } + + /** + * Sets instance + * + * @param string|null $instance URI reference that identifies the specific occurrence of the problem + * + * @return self + */ + public function setInstance($instance) { + if (is_null($instance)) { + throw new \InvalidArgumentException('non-nullable instance cannot be null'); + } + $this->container['instance'] = $instance; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code Application-specific error code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets fields + * + * @return array<string,string>|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param array<string,string>|null $fields fields + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectCreateRequestSchema.php b/lib/Model/ProjectCreateRequestSchema.php index be26d4a2..ffc4baea 100644 --- a/lib/Model/ProjectCreateRequestSchema.php +++ b/lib/Model/ProjectCreateRequestSchema.php @@ -302,6 +302,10 @@ public function listInvalidProperties() { if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if ((mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + return $invalidProperties; } @@ -327,7 +331,7 @@ public function getName() { /** * Sets name * - * @param string $name Name of the project. + * @param string $name Name of the project. Must be unique and no more than 50 characters. * * @return self */ @@ -335,6 +339,10 @@ public function setName($name) { 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 ProjectCreateRequestSchema., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; @@ -402,7 +410,7 @@ public function getEmployeeIds() { /** * Sets employee_ids * - * @param int[]|null $employee_ids A list of employee IDs that can log time for this project. + * @param int[]|null $employee_ids A list of employee IDs that can log time for this project. Only used when `allowAllEmployees` is false. * * @return self */ diff --git a/lib/Model/ProjectCreateTimeTrackingProjectTaskV1.php b/lib/Model/ProjectCreateTimeTrackingProjectTaskV1.php new file mode 100644 index 00000000..f7e90831 --- /dev/null +++ b/lib/Model/ProjectCreateTimeTrackingProjectTaskV1.php @@ -0,0 +1,438 @@ +<?php +declare(strict_types=1); +/** + * ProjectCreateTimeTrackingProjectTaskV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectCreateTimeTrackingProjectTaskV1 Class Doc Comment + * + * @category Class + * @description Payload to create a task on a time tracking project. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectCreateTimeTrackingProjectTaskV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-CreateTimeTrackingProjectTask-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'billable' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'billable' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'billable' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'billable' => 'billable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'billable' => 'setBillable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'billable' => 'getBillable' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Display name of the task. + * + * @return self + */ + public function setName($name) { + 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 ProjectCreateTimeTrackingProjectTaskV1., must be smaller than or equal to 50.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable billable + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + $this->openApiNullablesSetToNull['billable'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['billable'])) { + unset($nullablesSetToNull['billable']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['billable'] = $billable; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectCreateTimeTrackingProjectV1.php b/lib/Model/ProjectCreateTimeTrackingProjectV1.php new file mode 100644 index 00000000..a67590b0 --- /dev/null +++ b/lib/Model/ProjectCreateTimeTrackingProjectV1.php @@ -0,0 +1,583 @@ +<?php +declare(strict_types=1); +/** + * ProjectCreateTimeTrackingProjectV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectCreateTimeTrackingProjectV1 Class Doc Comment + * + * @category Class + * @description Request body for creating a time tracking project. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectCreateTimeTrackingProjectV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-CreateTimeTrackingProject-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'billable' => 'bool', + 'include_in_payroll' => 'bool', + 'all_employees_assigned' => 'bool', + 'employee_ids' => 'int[]', + 'tasks' => '\BhrSdk\Model\ProjectCreateTimeTrackingProjectV1TasksInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'billable' => null, + 'include_in_payroll' => null, + 'all_employees_assigned' => null, + 'employee_ids' => null, + 'tasks' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'billable' => false, + 'include_in_payroll' => false, + 'all_employees_assigned' => false, + 'employee_ids' => false, + 'tasks' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'billable' => 'billable', + 'include_in_payroll' => 'includeInPayroll', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'employee_ids' => 'employeeIds', + 'tasks' => 'tasks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'billable' => 'setBillable', + 'include_in_payroll' => 'setIncludeInPayroll', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'employee_ids' => 'setEmployeeIds', + 'tasks' => 'setTasks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'billable' => 'getBillable', + 'include_in_payroll' => 'getIncludeInPayroll', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'employee_ids' => 'getEmployeeIds', + 'tasks' => 'getTasks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $data ?? [], false); + $this->setIfExists('include_in_payroll', $data ?? [], false); + $this->setIfExists('all_employees_assigned', $data ?? [], false); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('tasks', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + 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['employee_ids']) && (count($this->container['employee_ids']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_ids', number of items must be greater than or equal to 1."; + } + + if (!is_null($this->container['tasks']) && (count($this->container['tasks']) < 1)) { + $invalidProperties[] = "invalid value for 'tasks', number of items must be greater 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) { + 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 ProjectCreateTimeTrackingProjectV1., must be smaller than or equal to 50.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling ProjectCreateTimeTrackingProjectV1., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable billable + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + + /** + * Gets include_in_payroll + * + * @return bool|null + */ + public function getIncludeInPayroll() { + return $this->container['include_in_payroll']; + } + + /** + * Sets include_in_payroll + * + * @param bool|null $include_in_payroll include_in_payroll + * + * @return self + */ + public function setIncludeInPayroll($include_in_payroll) { + if (is_null($include_in_payroll)) { + throw new \InvalidArgumentException('non-nullable include_in_payroll cannot be null'); + } + $this->container['include_in_payroll'] = $include_in_payroll; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned If true, every time-tracked employee is assigned to the project. Ignored when `employeeIds` is provided. + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Specific employee IDs to assign. Minimum 1 entry required when provided. Takes precedence over `allEmployeesAssigned`. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + + if ((count($employee_ids) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_ids when calling ProjectCreateTimeTrackingProjectV1., number of items must be greater than or equal to 1.'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets tasks + * + * @return \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1TasksInner[]|null + */ + public function getTasks() { + return $this->container['tasks']; + } + + /** + * Sets tasks + * + * @param \BhrSdk\Model\ProjectCreateTimeTrackingProjectV1TasksInner[]|null $tasks Tasks to create alongside the project. Minimum 1 entry required when provided. + * + * @return self + */ + public function setTasks($tasks) { + if (is_null($tasks)) { + throw new \InvalidArgumentException('non-nullable tasks cannot be null'); + } + + if ((count($tasks) < 1)) { + throw new \InvalidArgumentException('invalid length for $tasks when calling ProjectCreateTimeTrackingProjectV1., number of items must be greater than or equal to 1.'); + } + $this->container['tasks'] = $tasks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectCreateTimeTrackingProjectV1TasksInner.php b/lib/Model/ProjectCreateTimeTrackingProjectV1TasksInner.php new file mode 100644 index 00000000..cfe143ba --- /dev/null +++ b/lib/Model/ProjectCreateTimeTrackingProjectV1TasksInner.php @@ -0,0 +1,438 @@ +<?php +declare(strict_types=1); +/** + * ProjectCreateTimeTrackingProjectV1TasksInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectCreateTimeTrackingProjectV1TasksInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectCreateTimeTrackingProjectV1TasksInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_CreateTimeTrackingProject_V1_tasks_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'billable' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'billable' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'billable' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'billable' => 'billable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'billable' => 'setBillable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'billable' => 'getBillable' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $data ?? [], false); + } + + /** + * 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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) { + 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 ProjectCreateTimeTrackingProjectV1TasksInner., must be smaller than or equal to 50.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling ProjectCreateTimeTrackingProjectV1TasksInner., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable billable + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectInfoApiTransformer.php b/lib/Model/ProjectInfoApiTransformer.php index 5843fd23..c33804cf 100644 --- a/lib/Model/ProjectInfoApiTransformer.php +++ b/lib/Model/ProjectInfoApiTransformer.php @@ -59,7 +59,7 @@ class ProjectInfoApiTransformer implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openApiTypes = [ 'project' => '\BhrSdk\Model\ProjectInfoApiTransformerProject', - 'task' => '\BhrSdk\Model\ProjectInfoApiTransformerTask' + 'task' => 'object' ]; /** @@ -82,7 +82,7 @@ class ProjectInfoApiTransformer implements ModelInterface, ArrayAccess, \JsonSer */ protected static array $openApiNullables = [ 'project' => false, - 'task' => false + 'task' => true ]; /** @@ -312,7 +312,7 @@ public function setProject($project) { /** * Gets task * - * @return \BhrSdk\Model\ProjectInfoApiTransformerTask|null + * @return object|null */ public function getTask() { return $this->container['task']; @@ -321,13 +321,19 @@ public function getTask() { /** * Sets task * - * @param \BhrSdk\Model\ProjectInfoApiTransformerTask|null $task task + * @param object|null $task task * * @return self */ public function setTask($task) { if (is_null($task)) { - throw new \InvalidArgumentException('non-nullable task cannot be null'); + $this->openApiNullablesSetToNull['task'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['task'])) { + unset($nullablesSetToNull['task']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['task'] = $task; diff --git a/lib/Model/MemberBenefitEventMembersInner.php b/lib/Model/ProjectPaginatedResponseDataV1.php similarity index 83% rename from lib/Model/MemberBenefitEventMembersInner.php rename to lib/Model/ProjectPaginatedResponseDataV1.php index 0f380ea8..e6816cd5 100644 --- a/lib/Model/MemberBenefitEventMembersInner.php +++ b/lib/Model/ProjectPaginatedResponseDataV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * MemberBenefitEventMembersInner + * ProjectPaginatedResponseDataV1 * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * MemberBenefitEventMembersInner Class Doc Comment + * ProjectPaginatedResponseDataV1 Class Doc Comment * * @category Class + * @description Pagination envelope shared by paginated Project endpoints. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class MemberBenefitEventMembersInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class ProjectPaginatedResponseDataV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class MemberBenefitEventMembersInner implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openApiModelName = 'MemberBenefitEvent_members_inner'; + protected static $openApiModelName = 'Project-PaginatedResponseData-V1'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,8 +58,8 @@ class MemberBenefitEventMembersInner implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openApiTypes = [ - 'member_id' => 'string', - 'coverages' => '\BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInner[]' + 'meta' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1Links' ]; /** @@ -69,8 +70,8 @@ class MemberBenefitEventMembersInner implements ModelInterface, ArrayAccess, \Js * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'member_id' => null, - 'coverages' => null + 'meta' => null, + '_links' => null ]; /** @@ -80,8 +81,8 @@ class MemberBenefitEventMembersInner implements ModelInterface, ArrayAccess, \Js * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'member_id' => false, - 'coverages' => false + 'meta' => false, + '_links' => false ]; /** @@ -166,8 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'member_id' => 'memberId', - 'coverages' => 'coverages' + 'meta' => 'meta', + '_links' => '_links' ]; /** @@ -176,8 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'member_id' => 'setMemberId', - 'coverages' => 'setCoverages' + 'meta' => 'setMeta', + '_links' => 'setLinks' ]; /** @@ -186,8 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'member_id' => 'getMemberId', - 'coverages' => 'getCoverages' + 'meta' => 'getMeta', + '_links' => 'getLinks' ]; /** @@ -241,8 +242,8 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('member_id', $data ?? [], null); - $this->setIfExists('coverages', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); } /** @@ -284,51 +285,51 @@ public function valid() { } /** - * Gets member_id + * Gets meta * - * @return string|null + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1Meta|null */ - public function getMemberId() { - return $this->container['member_id']; + public function getMeta() { + return $this->container['meta']; } /** - * Sets member_id + * Sets meta * - * @param string|null $member_id Member ID + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1Meta|null $meta meta * * @return self */ - public function setMemberId($member_id) { - if (is_null($member_id)) { - throw new \InvalidArgumentException('non-nullable member_id cannot be null'); + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); } - $this->container['member_id'] = $member_id; + $this->container['meta'] = $meta; return $this; } /** - * Gets coverages + * Gets _links * - * @return \BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInner[]|null + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1Links|null */ - public function getCoverages() { - return $this->container['coverages']; + public function getLinks() { + return $this->container['_links']; } /** - * Sets coverages + * Sets _links * - * @param \BhrSdk\Model\MemberBenefitEventMembersInnerCoveragesInner[]|null $coverages Coverages + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1Links|null $_links _links * * @return self */ - public function setCoverages($coverages) { - if (is_null($coverages)) { - throw new \InvalidArgumentException('non-nullable coverages cannot be null'); + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); } - $this->container['coverages'] = $coverages; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/ProjectPaginatedResponseDataV1Links.php b/lib/Model/ProjectPaginatedResponseDataV1Links.php new file mode 100644 index 00000000..05a7b038 --- /dev/null +++ b/lib/Model/ProjectPaginatedResponseDataV1Links.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedResponseDataV1Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedResponseDataV1Links Class Doc Comment + * + * @category Class + * @description Pagination links. Keys are omitted when there is no previous/next page. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedResponseDataV1Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedResponseData_V1__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prev' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1LinksPrev', + 'next' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1LinksNext' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prev' => null, + 'next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prev' => false, + 'next' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prev' => 'prev', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prev' => 'setPrev', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prev' => 'getPrev', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prev', $data ?? [], null); + $this->setIfExists('next', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prev + * + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1LinksPrev|null + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1LinksPrev|null $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + throw new \InvalidArgumentException('non-nullable prev cannot be null'); + } + $this->container['prev'] = $prev; + + return $this; + } + + /** + * Gets next + * + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1LinksNext|null + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1LinksNext|null $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + throw new \InvalidArgumentException('non-nullable next cannot be null'); + } + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedResponseDataV1LinksNext.php b/lib/Model/ProjectPaginatedResponseDataV1LinksNext.php new file mode 100644 index 00000000..8713dfb2 --- /dev/null +++ b/lib/Model/ProjectPaginatedResponseDataV1LinksNext.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedResponseDataV1LinksNext + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedResponseDataV1LinksNext Class Doc Comment + * + * @category Class + * @description Link object for the next page. Omitted on the last page. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedResponseDataV1LinksNext implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedResponseData_V1__links_next'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href href + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedResponseDataV1LinksPrev.php b/lib/Model/ProjectPaginatedResponseDataV1LinksPrev.php new file mode 100644 index 00000000..1cae2013 --- /dev/null +++ b/lib/Model/ProjectPaginatedResponseDataV1LinksPrev.php @@ -0,0 +1,389 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedResponseDataV1LinksPrev + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedResponseDataV1LinksPrev Class Doc Comment + * + * @category Class + * @description Link object for the previous page. Omitted on the first page. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedResponseDataV1LinksPrev implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedResponseData_V1__links_prev'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href href + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedResponseDataV1Meta.php b/lib/Model/ProjectPaginatedResponseDataV1Meta.php new file mode 100644 index 00000000..9f80d287 --- /dev/null +++ b/lib/Model/ProjectPaginatedResponseDataV1Meta.php @@ -0,0 +1,497 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedResponseDataV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedResponseDataV1Meta Class Doc Comment + * + * @category Class + * @description Pagination metadata. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedResponseDataV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedResponseData_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'total_pages' => 'int', + 'page' => 'int', + 'page_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'total_pages' => null, + 'page' => null, + 'page_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'total_pages' => false, + 'page' => false, + 'page_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'total_pages' => 'totalPages', + 'page' => 'page', + 'page_size' => 'pageSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'total_pages' => 'setTotalPages', + 'page' => 'setPage', + 'page_size' => 'setPageSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'total_pages' => 'getTotalPages', + 'page' => 'getPage', + 'page_size' => 'getPageSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('total_pages', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['total_items'] === null) { + $invalidProperties[] = "'total_items' can't be null"; + } + if ($this->container['total_pages'] === null) { + $invalidProperties[] = "'total_pages' can't be null"; + } + if ($this->container['page'] === null) { + $invalidProperties[] = "'page' can't be null"; + } + if ($this->container['page_size'] === null) { + $invalidProperties[] = "'page_size' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int $total_items total_items + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets total_pages + * + * @return int + */ + public function getTotalPages() { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int $total_pages total_pages + * + * @return self + */ + public function setTotalPages($total_pages) { + if (is_null($total_pages)) { + throw new \InvalidArgumentException('non-nullable total_pages cannot be null'); + } + $this->container['total_pages'] = $total_pages; + + return $this; + } + + /** + * Gets page + * + * @return int + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int $page page + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size page_size + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedTasksResponseV1.php b/lib/Model/ProjectPaginatedTasksResponseV1.php new file mode 100644 index 00000000..6f7c1e0c --- /dev/null +++ b/lib/Model/ProjectPaginatedTasksResponseV1.php @@ -0,0 +1,461 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedTasksResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedTasksResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedTasksResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedTasksResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\ProjectTimeTrackingTaskV1[]', + 'meta' => '\BhrSdk\Model\ProjectPaginatedTasksResponseV1Meta', + '_links' => '\BhrSdk\Model\ProjectPaginatedTasksResponseV1Links' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['meta'] === null) { + $invalidProperties[] = "'meta' can't be null"; + } + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\ProjectTimeTrackingTaskV1[] + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\ProjectTimeTrackingTaskV1[] $data Collection of time tracking tasks for a project. + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\ProjectPaginatedTasksResponseV1Meta + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\ProjectPaginatedTasksResponseV1Meta $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\ProjectPaginatedTasksResponseV1Links + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\ProjectPaginatedTasksResponseV1Links $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedTasksResponseV1Links.php b/lib/Model/ProjectPaginatedTasksResponseV1Links.php new file mode 100644 index 00000000..6f7b76e3 --- /dev/null +++ b/lib/Model/ProjectPaginatedTasksResponseV1Links.php @@ -0,0 +1,438 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedTasksResponseV1Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedTasksResponseV1Links Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedTasksResponseV1Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedTasksResponse_V1__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prev' => 'object', + 'next' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prev' => null, + 'next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prev' => true, + 'next' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prev' => 'prev', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prev' => 'setPrev', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prev' => 'getPrev', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prev', $data ?? [], null); + $this->setIfExists('next', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['prev'] === null) { + $invalidProperties[] = "'prev' can't be null"; + } + if ($this->container['next'] === null) { + $invalidProperties[] = "'next' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prev + * + * @return object + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param object $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + $this->openApiNullablesSetToNull['prev'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['prev'])) { + unset($nullablesSetToNull['prev']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['prev'] = $prev; + + return $this; + } + + /** + * Gets next + * + * @return object + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param object $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + $this->openApiNullablesSetToNull['next'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['next'])) { + unset($nullablesSetToNull['next']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedTasksResponseV1Meta.php b/lib/Model/ProjectPaginatedTasksResponseV1Meta.php new file mode 100644 index 00000000..f90efd64 --- /dev/null +++ b/lib/Model/ProjectPaginatedTasksResponseV1Meta.php @@ -0,0 +1,532 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedTasksResponseV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedTasksResponseV1Meta Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedTasksResponseV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedTasksResponse_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'page' => 'int', + 'page_size' => 'int', + 'total_pages' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'page' => null, + 'page_size' => null, + 'total_pages' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'page' => false, + 'page_size' => false, + 'total_pages' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'page' => 'page', + 'page_size' => 'pageSize', + 'total_pages' => 'totalPages' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'page' => 'setPage', + 'page_size' => 'setPageSize', + 'total_pages' => 'setTotalPages' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'page' => 'getPage', + 'page_size' => 'getPageSize', + 'total_pages' => 'getTotalPages' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_pages', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['total_items'] === null) { + $invalidProperties[] = "'total_items' can't be null"; + } + if (($this->container['total_items'] < 0)) { + $invalidProperties[] = "invalid value for 'total_items', must be bigger than or equal to 0."; + } + + if ($this->container['page'] === null) { + $invalidProperties[] = "'page' can't be null"; + } + if (($this->container['page'] < 1)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 1."; + } + + if ($this->container['page_size'] === null) { + $invalidProperties[] = "'page_size' can't be null"; + } + if (($this->container['page_size'] < 1)) { + $invalidProperties[] = "invalid value for 'page_size', must be bigger than or equal to 1."; + } + + if ($this->container['total_pages'] === null) { + $invalidProperties[] = "'total_pages' can't be null"; + } + if (($this->container['total_pages'] < 0)) { + $invalidProperties[] = "invalid value for 'total_pages', must be bigger than or equal to 0."; + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int $total_items total_items + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + + if (($total_items < 0)) { + throw new \InvalidArgumentException('invalid value for $total_items when calling ProjectPaginatedTasksResponseV1Meta., must be bigger than or equal to 0.'); + } + + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets page + * + * @return int + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int $page page + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + + if (($page < 1)) { + throw new \InvalidArgumentException('invalid value for $page when calling ProjectPaginatedTasksResponseV1Meta., must be bigger than or equal to 1.'); + } + + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size page_size + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + + if (($page_size < 1)) { + throw new \InvalidArgumentException('invalid value for $page_size when calling ProjectPaginatedTasksResponseV1Meta., must be bigger than or equal to 1.'); + } + + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_pages + * + * @return int + */ + public function getTotalPages() { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int $total_pages total_pages + * + * @return self + */ + public function setTotalPages($total_pages) { + if (is_null($total_pages)) { + throw new \InvalidArgumentException('non-nullable total_pages cannot be null'); + } + + if (($total_pages < 0)) { + throw new \InvalidArgumentException('invalid value for $total_pages when calling ProjectPaginatedTasksResponseV1Meta., must be bigger than or equal to 0.'); + } + + $this->container['total_pages'] = $total_pages; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.php b/lib/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.php new file mode 100644 index 00000000..3705f683 --- /dev/null +++ b/lib/Model/ProjectPaginatedTimeTrackingProjectsResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * ProjectPaginatedTimeTrackingProjectsResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectPaginatedTimeTrackingProjectsResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectPaginatedTimeTrackingProjectsResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project_PaginatedTimeTrackingProjectsResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\ProjectPaginatedResponseDataV1Links', + 'data' => '\BhrSdk\Model\ProjectTimeTrackingProjectV1[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\ProjectPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\ProjectPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\ProjectTimeTrackingProjectV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\ProjectTimeTrackingProjectV1[]|null $data Collection of time tracking projects. + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectTimeTrackingProjectV1.php b/lib/Model/ProjectTimeTrackingProjectV1.php new file mode 100644 index 00000000..b46891e1 --- /dev/null +++ b/lib/Model/ProjectTimeTrackingProjectV1.php @@ -0,0 +1,727 @@ +<?php +declare(strict_types=1); +/** + * ProjectTimeTrackingProjectV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectTimeTrackingProjectV1 Class Doc Comment + * + * @category Class + * @description A time tracking project. Projects are organizational units used to classify hours worked. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectTimeTrackingProjectV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-TimeTrackingProject-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'billable' => 'bool', + 'include_in_payroll' => 'bool', + 'all_employees_assigned' => 'bool', + 'archived' => 'bool', + 'has_tasks' => 'bool', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'billable' => null, + 'include_in_payroll' => null, + 'all_employees_assigned' => null, + 'archived' => null, + 'has_tasks' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time', + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'billable' => false, + 'include_in_payroll' => false, + 'all_employees_assigned' => false, + 'archived' => false, + 'has_tasks' => false, + 'created_at' => true, + 'updated_at' => true, + 'deleted_at' => true, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'billable' => 'billable', + 'include_in_payroll' => 'includeInPayroll', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'archived' => 'archived', + 'has_tasks' => 'hasTasks', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'billable' => 'setBillable', + 'include_in_payroll' => 'setIncludeInPayroll', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'archived' => 'setArchived', + 'has_tasks' => 'setHasTasks', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'billable' => 'getBillable', + 'include_in_payroll' => 'getIncludeInPayroll', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'archived' => 'getArchived', + 'has_tasks' => 'getHasTasks', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $data ?? [], null); + $this->setIfExists('include_in_payroll', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('has_tasks', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The ID of the project. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the project. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable Whether or not the project is billable. + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + + /** + * Gets include_in_payroll + * + * @return bool|null + */ + public function getIncludeInPayroll() { + return $this->container['include_in_payroll']; + } + + /** + * Sets include_in_payroll + * + * @param bool|null $include_in_payroll Whether hours logged to this project will show in payroll and payroll reports. + * + * @return self + */ + public function setIncludeInPayroll($include_in_payroll) { + if (is_null($include_in_payroll)) { + throw new \InvalidArgumentException('non-nullable include_in_payroll cannot be null'); + } + $this->container['include_in_payroll'] = $include_in_payroll; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all time & attendance employees are assigned or not. + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Whether or not the project is archived. + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets has_tasks + * + * @return bool|null + */ + public function getHasTasks() { + return $this->container['has_tasks']; + } + + /** + * Sets has_tasks + * + * @param bool|null $has_tasks Whether time is logged to tasks under the project (true) or directly to the project (false). + * + * @return self + */ + public function setHasTasks($has_tasks) { + if (is_null($has_tasks)) { + throw new \InvalidArgumentException('non-nullable has_tasks cannot be null'); + } + $this->container['has_tasks'] = $has_tasks; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + $this->openApiNullablesSetToNull['created_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_at'])) { + unset($nullablesSetToNull['created_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Array of employeeIds assigned to the project. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectTimeTrackingTaskV1.php b/lib/Model/ProjectTimeTrackingTaskV1.php new file mode 100644 index 00000000..22c7406e --- /dev/null +++ b/lib/Model/ProjectTimeTrackingTaskV1.php @@ -0,0 +1,599 @@ +<?php +declare(strict_types=1); +/** + * ProjectTimeTrackingTaskV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectTimeTrackingTaskV1 Class Doc Comment + * + * @category Class + * @description A task within a time tracking project. Tasks are sub-organizational units used to further classify hours worked. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectTimeTrackingTaskV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-TimeTrackingTask-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'project_id' => 'int', + 'billable' => 'bool', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'project_id' => null, + 'billable' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'project_id' => false, + 'billable' => false, + 'created_at' => true, + 'updated_at' => true, + 'deleted_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'project_id' => 'projectId', + 'billable' => 'billable', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'project_id' => 'setProjectId', + 'billable' => 'setBillable', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'project_id' => 'getProjectId', + 'billable' => 'getBillable', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('project_id', $data ?? [], null); + $this->setIfExists('billable', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The ID of the task. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the task. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets project_id + * + * @return int|null + */ + public function getProjectId() { + return $this->container['project_id']; + } + + /** + * Sets project_id + * + * @param int|null $project_id The ID of the project this task belongs to. + * + * @return self + */ + public function setProjectId($project_id) { + if (is_null($project_id)) { + throw new \InvalidArgumentException('non-nullable project_id cannot be null'); + } + $this->container['project_id'] = $project_id; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable Whether the task is billable. + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + $this->openApiNullablesSetToNull['created_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_at'])) { + unset($nullablesSetToNull['created_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectUpdateTimeTrackingProjectTaskV1.php b/lib/Model/ProjectUpdateTimeTrackingProjectTaskV1.php new file mode 100644 index 00000000..3f562bcd --- /dev/null +++ b/lib/Model/ProjectUpdateTimeTrackingProjectTaskV1.php @@ -0,0 +1,429 @@ +<?php +declare(strict_types=1); +/** + * ProjectUpdateTimeTrackingProjectTaskV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectUpdateTimeTrackingProjectTaskV1 Class Doc Comment + * + * @category Class + * @description Payload to partially update a task on a time tracking project. All fields are optional; at least one field must be provided. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectUpdateTimeTrackingProjectTaskV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-UpdateTimeTrackingProjectTask-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'billable' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'billable' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'billable' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'billable' => 'billable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'billable' => 'setBillable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'billable' => 'getBillable' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Display name of the task. + * + * @return self + */ + public function setName($name) { + 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 ProjectUpdateTimeTrackingProjectTaskV1., must be smaller than or equal to 50.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable Whether hours on this task are billable. + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProjectUpdateTimeTrackingProjectV1.php b/lib/Model/ProjectUpdateTimeTrackingProjectV1.php new file mode 100644 index 00000000..0fa57ae3 --- /dev/null +++ b/lib/Model/ProjectUpdateTimeTrackingProjectV1.php @@ -0,0 +1,581 @@ +<?php +declare(strict_types=1); +/** + * ProjectUpdateTimeTrackingProjectV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProjectUpdateTimeTrackingProjectV1 Class Doc Comment + * + * @category Class + * @description Data contract for partially updating a time tracking project. All fields are optional; only fields present in the request body will be updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProjectUpdateTimeTrackingProjectV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Project-UpdateTimeTrackingProject-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'billable' => 'bool', + 'include_in_payroll' => 'bool', + 'all_employees_assigned' => 'bool', + 'archived' => 'bool', + 'employee_ids' => 'int[]', + 'has_tasks' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'billable' => null, + 'include_in_payroll' => null, + 'all_employees_assigned' => null, + 'archived' => null, + 'employee_ids' => null, + 'has_tasks' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'billable' => false, + 'include_in_payroll' => false, + 'all_employees_assigned' => false, + 'archived' => false, + 'employee_ids' => false, + 'has_tasks' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'billable' => 'billable', + 'include_in_payroll' => 'includeInPayroll', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'archived' => 'archived', + 'employee_ids' => 'employeeIds', + 'has_tasks' => 'hasTasks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'billable' => 'setBillable', + 'include_in_payroll' => 'setIncludeInPayroll', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'archived' => 'setArchived', + 'employee_ids' => 'setEmployeeIds', + 'has_tasks' => 'setHasTasks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'billable' => 'getBillable', + 'include_in_payroll' => 'getIncludeInPayroll', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'archived' => 'getArchived', + 'employee_ids' => 'getEmployeeIds', + 'has_tasks' => 'getHasTasks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('billable', $data ?? [], null); + $this->setIfExists('include_in_payroll', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('has_tasks', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the project. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets billable + * + * @return bool|null + */ + public function getBillable() { + return $this->container['billable']; + } + + /** + * Sets billable + * + * @param bool|null $billable Whether or not the project is billable. + * + * @return self + */ + public function setBillable($billable) { + if (is_null($billable)) { + throw new \InvalidArgumentException('non-nullable billable cannot be null'); + } + $this->container['billable'] = $billable; + + return $this; + } + + /** + * Gets include_in_payroll + * + * @return bool|null + */ + public function getIncludeInPayroll() { + return $this->container['include_in_payroll']; + } + + /** + * Sets include_in_payroll + * + * @param bool|null $include_in_payroll Whether hours logged to this project will show in payroll and payroll reports. + * + * @return self + */ + public function setIncludeInPayroll($include_in_payroll) { + if (is_null($include_in_payroll)) { + throw new \InvalidArgumentException('non-nullable include_in_payroll cannot be null'); + } + $this->container['include_in_payroll'] = $include_in_payroll; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all time & attendance employees are assigned or not. + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Whether or not the project is archived. + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Array of employee IDs to assign to the project. Replaces the current assignment list when present; an empty array clears all assignments. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets has_tasks + * + * @return bool|null + */ + public function getHasTasks() { + return $this->container['has_tasks']; + } + + /** + * Sets has_tasks + * + * @param bool|null $has_tasks Toggles whether time is logged directly to the project (false) or to specific tasks on the project (true). Setting to true requires the project to already have at least one active task; setting to false leaves existing tasks unchanged. + * + * @return self + */ + public function setHasTasks($has_tasks) { + if (is_null($has_tasks)) { + throw new \InvalidArgumentException('non-nullable has_tasks cannot be null'); + } + $this->container['has_tasks'] = $has_tasks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/ProvinceItem.php b/lib/Model/ProvinceItem.php new file mode 100644 index 00000000..a4958a24 --- /dev/null +++ b/lib/Model/ProvinceItem.php @@ -0,0 +1,516 @@ +<?php +declare(strict_types=1); +/** + * ProvinceItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * ProvinceItem Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class ProvinceItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'ProvinceItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'country_id' => 'string', + 'label' => 'string', + 'iso' => 'string', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'country_id' => null, + 'label' => null, + 'iso' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'country_id' => false, + 'label' => false, + 'iso' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'country_id' => 'countryId', + 'label' => 'label', + 'iso' => 'iso', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'country_id' => 'setCountryId', + 'label' => 'setLabel', + 'iso' => 'setIso', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'country_id' => 'getCountryId', + 'label' => 'getLabel', + 'iso' => 'getIso', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('iso', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id State/province ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets country_id + * + * @return string|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param string|null $country_id ID of the country this state/province belongs to + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + throw new \InvalidArgumentException('non-nullable country_id cannot be null'); + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label State/province abbreviation (e.g. \"UT\") + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets iso + * + * @return string|null + */ + public function getIso() { + return $this->container['iso']; + } + + /** + * Sets iso + * + * @param string|null $iso ISO 3166-2 code (e.g. \"US-UT\") + * + * @return self + */ + public function setIso($iso) { + if (is_null($iso)) { + throw new \InvalidArgumentException('non-nullable iso cannot be null'); + } + $this->container['iso'] = $iso; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Full name of the state/province + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PutCompanyIndustryCodesRequest.php b/lib/Model/PutCompanyIndustryCodesRequest.php new file mode 100644 index 00000000..0a47b880 --- /dev/null +++ b/lib/Model/PutCompanyIndustryCodesRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * PutCompanyIndustryCodesRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PutCompanyIndustryCodesRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PutCompanyIndustryCodesRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'put_company_industry_codes_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'industry_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'industry_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'industry_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'industry_ids' => 'industryIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'industry_ids' => 'setIndustryIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'industry_ids' => 'getIndustryIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('industry_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['industry_ids'] === null) { + $invalidProperties[] = "'industry_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets industry_ids + * + * @return int[] + */ + public function getIndustryIds() { + return $this->container['industry_ids']; + } + + /** + * Sets industry_ids + * + * @param int[] $industry_ids List of industry IDs associated with the company. Currently limited to a single entry. + * + * @return self + */ + public function setIndustryIds($industry_ids) { + if (is_null($industry_ids)) { + throw new \InvalidArgumentException('non-nullable industry_ids cannot be null'); + } + $this->container['industry_ids'] = $industry_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PutCompanyProfileDisplayNameRequest.php b/lib/Model/PutCompanyProfileDisplayNameRequest.php new file mode 100644 index 00000000..e8cd9fe6 --- /dev/null +++ b/lib/Model/PutCompanyProfileDisplayNameRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * PutCompanyProfileDisplayNameRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * PutCompanyProfileDisplayNameRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class PutCompanyProfileDisplayNameRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'put_company_profile_display_name_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_name' => 'companyName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_name' => 'setCompanyName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_name' => 'getCompanyName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['company_name'] === null) { + $invalidProperties[] = "'company_name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_name + * + * @return string + */ + public function getCompanyName() { + return $this->container['company_name']; + } + + /** + * Sets company_name + * + * @param string $company_name The new display name for the company. Must be a non-empty string with a maximum length of 255 characters (character count, not bytes, so multibyte UTF-8 characters are properly supported). + * + * @return self + */ + public function setCompanyName($company_name) { + if (is_null($company_name)) { + throw new \InvalidArgumentException('non-nullable company_name cannot be null'); + } + $this->container['company_name'] = $company_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/RemoveCycleAdminSelfResponse.php b/lib/Model/RemoveCycleAdminSelfResponse.php new file mode 100644 index 00000000..ff705a27 --- /dev/null +++ b/lib/Model/RemoveCycleAdminSelfResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * RemoveCycleAdminSelfResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * RemoveCycleAdminSelfResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class RemoveCycleAdminSelfResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'RemoveCycleAdminSelfResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'self_removed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'self_removed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'self_removed' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self_removed' => 'selfRemoved' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self_removed' => 'setSelfRemoved' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self_removed' => 'getSelfRemoved' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('self_removed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets self_removed + * + * @return bool|null + */ + public function getSelfRemoved() { + return $this->container['self_removed']; + } + + /** + * Sets self_removed + * + * @param bool|null $self_removed self_removed + * + * @return self + */ + public function setSelfRemoved($self_removed) { + if (is_null($self_removed)) { + $this->openApiNullablesSetToNull['self_removed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['self_removed'])) { + unset($nullablesSetToNull['self_removed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['self_removed'] = $self_removed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/RemoveTotalRewardsEmployeesRequest.php b/lib/Model/RemoveTotalRewardsEmployeesRequest.php new file mode 100644 index 00000000..1b506454 --- /dev/null +++ b/lib/Model/RemoveTotalRewardsEmployeesRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * RemoveTotalRewardsEmployeesRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * RemoveTotalRewardsEmployeesRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class RemoveTotalRewardsEmployeesRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'remove_total_rewards_employees_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return int[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[] $employee_ids List of employee IDs to remove from Total Rewards. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/Report.php b/lib/Model/Report.php index 0ac9af98..925429b5 100644 --- a/lib/Model/Report.php +++ b/lib/Model/Report.php @@ -57,7 +57,7 @@ class Report implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'id' => 'string', + 'id' => 'int', 'name' => 'string' ]; @@ -286,7 +286,7 @@ public function valid() { /** * Gets id * - * @return string|null + * @return int|null */ public function getId() { return $this->container['id']; @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param string|null $id id + * @param int|null $id id * * @return self */ diff --git a/lib/Model/Request.php b/lib/Model/Request.php index 2a3d4312..37f4626d 100644 --- a/lib/Model/Request.php +++ b/lib/Model/Request.php @@ -227,6 +227,27 @@ public function getModelName() { return self::$openApiModelName; } + public const STATUS_APPROVED = 'approved'; + public const STATUS_DENIED = 'denied'; + public const STATUS_DECLINED = 'declined'; + public const STATUS_CANCELED = 'canceled'; + public const STATUS_CANCELLED = 'cancelled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_APPROVED, + self::STATUS_DENIED, + self::STATUS_DECLINED, + self::STATUS_CANCELED, + self::STATUS_CANCELLED, + ]; + } + /** * Associative array for storing property values * @@ -270,6 +291,18 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -286,7 +319,7 @@ public function valid() { /** * Gets status * - * @return string|null + * @return string */ public function getStatus() { return $this->container['status']; @@ -295,7 +328,7 @@ public function getStatus() { /** * Sets status * - * @param string|null $status One of approved, cancelled, denied + * @param string $status The new status for the time off request. * * @return self */ @@ -303,6 +336,16 @@ public function setStatus($status) { if (is_null($status)) { throw new \InvalidArgumentException('non-nullable status cannot be null'); } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; @@ -320,7 +363,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note A note to attach to the change in status + * @param string|null $note A note to attach to the change in status. * * @return self */ diff --git a/lib/Model/RequestCustomReport.php b/lib/Model/RequestCustomReport.php index 900a4a32..7cd0aa04 100644 --- a/lib/Model/RequestCustomReport.php +++ b/lib/Model/RequestCustomReport.php @@ -36,6 +36,7 @@ * RequestCustomReport Class Doc Comment * * @category Class + * @description Report definition for an ad-hoc custom report. Specify the fields to include and optionally filter the employee set. Field IDs are the internal BambooHR field names (e.g. `firstName`, `lastName`, `department`). See the fields metadata endpoint for available field IDs. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -58,8 +59,9 @@ class RequestCustomReport implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openApiTypes = [ 'title' => 'string', + 'fields' => 'string[]', 'filters' => '\BhrSdk\Model\RequestCustomReportFilters', - 'fields' => 'string[]' + 'filter_duplicates' => 'string' ]; /** @@ -71,8 +73,9 @@ class RequestCustomReport implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openApiFormats = [ 'title' => null, + 'fields' => null, 'filters' => null, - 'fields' => null + 'filter_duplicates' => null ]; /** @@ -83,8 +86,9 @@ class RequestCustomReport implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static array $openApiNullables = [ 'title' => false, + 'fields' => false, 'filters' => false, - 'fields' => false + 'filter_duplicates' => false ]; /** @@ -170,8 +174,9 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'title' => 'title', + 'fields' => 'fields', 'filters' => 'filters', - 'fields' => 'fields' + 'filter_duplicates' => 'filterDuplicates' ]; /** @@ -181,8 +186,9 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'title' => 'setTitle', + 'fields' => 'setFields', 'filters' => 'setFilters', - 'fields' => 'setFields' + 'filter_duplicates' => 'setFilterDuplicates' ]; /** @@ -192,8 +198,9 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'title' => 'getTitle', + 'fields' => 'getFields', 'filters' => 'getFilters', - 'fields' => 'getFields' + 'filter_duplicates' => 'getFilterDuplicates' ]; /** @@ -233,6 +240,21 @@ public function getModelName() { return self::$openApiModelName; } + public const FILTER_DUPLICATES_YES = 'yes'; + public const FILTER_DUPLICATES_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFilterDuplicatesAllowableValues() { + return [ + self::FILTER_DUPLICATES_YES, + self::FILTER_DUPLICATES_NO, + ]; + } + /** * Associative array for storing property values * @@ -248,8 +270,9 @@ public function getModelName() { */ public function __construct(?array $data = null) { $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('filters', $data ?? [], null); $this->setIfExists('fields', $data ?? [], null); + $this->setIfExists('filters', $data ?? [], null); + $this->setIfExists('filter_duplicates', $data ?? [], null); } /** @@ -277,6 +300,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getFilterDuplicatesAllowableValues(); + if (!is_null($this->container['filter_duplicates']) && !in_array($this->container['filter_duplicates'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'filter_duplicates', must be one of '%s'", + $this->container['filter_duplicates'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -302,7 +334,7 @@ public function getTitle() { /** * Sets title * - * @param string|null $title title + * @param string|null $title A label for the report. Included in the response and used as the file name for downloaded reports. * * @return self */ @@ -315,6 +347,31 @@ public function setTitle($title) { return $this; } + /** + * Gets fields + * + * @return string[]|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param string[]|null $fields Array of field IDs to include as columns in the report. Maximum of 400 fields. + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + /** * Gets filters * @@ -341,26 +398,36 @@ public function setFilters($filters) { } /** - * Gets fields + * Gets filter_duplicates * - * @return string[]|null + * @return string|null */ - public function getFields() { - return $this->container['fields']; + public function getFilterDuplicates() { + return $this->container['filter_duplicates']; } /** - * Sets fields + * Sets filter_duplicates * - * @param string[]|null $fields fields + * @param string|null $filter_duplicates Whether to apply standard duplicate row filtering. Defaults to enabled. Set to `no` to return raw results without deduplication. * * @return self */ - public function setFields($fields) { - if (is_null($fields)) { - throw new \InvalidArgumentException('non-nullable fields cannot be null'); + public function setFilterDuplicates($filter_duplicates) { + if (is_null($filter_duplicates)) { + throw new \InvalidArgumentException('non-nullable filter_duplicates cannot be null'); } - $this->container['fields'] = $fields; + $allowedValues = $this->getFilterDuplicatesAllowableValues(); + if (!in_array($filter_duplicates, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'filter_duplicates', must be one of '%s'", + $filter_duplicates, + implode("', '", $allowedValues) + ) + ); + } + $this->container['filter_duplicates'] = $filter_duplicates; return $this; } diff --git a/lib/Model/RequestCustomReportFilters.php b/lib/Model/RequestCustomReportFilters.php index 601d1de6..a3136532 100644 --- a/lib/Model/RequestCustomReportFilters.php +++ b/lib/Model/RequestCustomReportFilters.php @@ -36,6 +36,7 @@ * RequestCustomReportFilters Class Doc Comment * * @category Class + * @description Optional filters to restrict which employees appear in the report. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,7 +58,8 @@ class RequestCustomReportFilters implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openApiTypes = [ - 'last_changed' => '\BhrSdk\Model\RequestCustomReportFiltersLastChanged' + 'last_changed' => '\BhrSdk\Model\RequestCustomReportFiltersLastChanged', + 'employee_ids' => 'int[]' ]; /** @@ -68,7 +70,8 @@ class RequestCustomReportFilters implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'last_changed' => null + 'last_changed' => null, + 'employee_ids' => null ]; /** @@ -78,7 +81,8 @@ class RequestCustomReportFilters implements ModelInterface, ArrayAccess, \JsonSe * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'last_changed' => false + 'last_changed' => false, + 'employee_ids' => false ]; /** @@ -163,7 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'last_changed' => 'lastChanged' + 'last_changed' => 'lastChanged', + 'employee_ids' => 'employeeIds' ]; /** @@ -172,7 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'last_changed' => 'setLastChanged' + 'last_changed' => 'setLastChanged', + 'employee_ids' => 'setEmployeeIds' ]; /** @@ -181,7 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'last_changed' => 'getLastChanged' + 'last_changed' => 'getLastChanged', + 'employee_ids' => 'getEmployeeIds' ]; /** @@ -236,6 +243,7 @@ public function getModelName() { */ public function __construct(?array $data = null) { $this->setIfExists('last_changed', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); } /** @@ -300,6 +308,31 @@ public function setLastChanged($last_changed) { return $this; } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Restricts the report to only the specified employee IDs. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RequestCustomReportFiltersLastChanged.php b/lib/Model/RequestCustomReportFiltersLastChanged.php index 88036caa..e113cbd7 100644 --- a/lib/Model/RequestCustomReportFiltersLastChanged.php +++ b/lib/Model/RequestCustomReportFiltersLastChanged.php @@ -36,6 +36,7 @@ * RequestCustomReportFiltersLastChanged Class Doc Comment * * @category Class + * @description Filters employees to those whose data was last changed on or after the given date/time. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,8 +58,8 @@ class RequestCustomReportFiltersLastChanged implements ModelInterface, ArrayAcce * @var string[] */ protected static $openApiTypes = [ - 'include_null' => 'string', - 'value' => 'string' + 'value' => '\DateTime', + 'include_null' => 'string' ]; /** @@ -69,8 +70,8 @@ class RequestCustomReportFiltersLastChanged implements ModelInterface, ArrayAcce * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'include_null' => null, - 'value' => null + 'value' => 'date-time', + 'include_null' => null ]; /** @@ -80,8 +81,8 @@ class RequestCustomReportFiltersLastChanged implements ModelInterface, ArrayAcce * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'include_null' => false, - 'value' => false + 'value' => false, + 'include_null' => false ]; /** @@ -166,8 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'include_null' => 'includeNull', - 'value' => 'value' + 'value' => 'value', + 'include_null' => 'includeNull' ]; /** @@ -176,8 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'include_null' => 'setIncludeNull', - 'value' => 'setValue' + 'value' => 'setValue', + 'include_null' => 'setIncludeNull' ]; /** @@ -186,8 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'include_null' => 'getIncludeNull', - 'value' => 'getValue' + 'value' => 'getValue', + 'include_null' => 'getIncludeNull' ]; /** @@ -227,6 +228,21 @@ public function getModelName() { return self::$openApiModelName; } + public const INCLUDE_NULL_YES = 'yes'; + public const INCLUDE_NULL_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIncludeNullAllowableValues() { + return [ + self::INCLUDE_NULL_YES, + self::INCLUDE_NULL_NO, + ]; + } + /** * Associative array for storing property values * @@ -241,8 +257,8 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('include_null', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('include_null', $data ?? [], null); } /** @@ -270,6 +286,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getIncludeNullAllowableValues(); + if (!is_null($this->container['include_null']) && !in_array($this->container['include_null'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'include_null', must be one of '%s'", + $this->container['include_null'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -284,51 +309,61 @@ public function valid() { } /** - * Gets include_null + * Gets value * - * @return string|null + * @return \DateTime|null */ - public function getIncludeNull() { - return $this->container['include_null']; + public function getValue() { + return $this->container['value']; } /** - * Sets include_null + * Sets value * - * @param string|null $include_null yes|no + * @param \DateTime|null $value ISO 8601 date-time value. Only employees whose data has changed at or after this date-time will be included. * * @return self */ - public function setIncludeNull($include_null) { - if (is_null($include_null)) { - throw new \InvalidArgumentException('non-nullable include_null cannot be null'); + public function setValue($value) { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['include_null'] = $include_null; + $this->container['value'] = $value; return $this; } /** - * Gets value + * Gets include_null * * @return string|null */ - public function getValue() { - return $this->container['value']; + public function getIncludeNull() { + return $this->container['include_null']; } /** - * Sets value + * Sets include_null * - * @param string|null $value Date last changed + * @param string|null $include_null Whether to include employees with no last-changed date. `yes` (default) includes them; `no` excludes them. * * @return self */ - public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); + public function setIncludeNull($include_null) { + if (is_null($include_null)) { + throw new \InvalidArgumentException('non-nullable include_null cannot be null'); } - $this->container['value'] = $value; + $allowedValues = $this->getIncludeNullAllowableValues(); + if (!in_array($include_null, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'include_null', must be one of '%s'", + $include_null, + implode("', '", $allowedValues) + ) + ); + } + $this->container['include_null'] = $include_null; return $this; } diff --git a/lib/Model/RequestCustomReportResponse.php b/lib/Model/RequestCustomReportResponse.php new file mode 100644 index 00000000..70918054 --- /dev/null +++ b/lib/Model/RequestCustomReportResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * RequestCustomReportResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * RequestCustomReportResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class RequestCustomReportResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'RequestCustomReportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'fields' => '\BhrSdk\Model\RequestCustomReportResponseFieldsInner[]', + 'employees' => '\BhrSdk\Model\RequestCustomReportResponseEmployeesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'fields' => null, + 'employees' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'fields' => false, + 'employees' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'fields' => 'fields', + 'employees' => 'employees' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'fields' => 'setFields', + 'employees' => 'setEmployees' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'fields' => 'getFields', + 'employees' => 'getEmployees' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('fields', $data ?? [], null); + $this->setIfExists('employees', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title The report title. + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets fields + * + * @return \BhrSdk\Model\RequestCustomReportResponseFieldsInner[]|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param \BhrSdk\Model\RequestCustomReportResponseFieldsInner[]|null $fields Metadata for each field included in the report. + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + + /** + * Gets employees + * + * @return \BhrSdk\Model\RequestCustomReportResponseEmployeesInner[]|null + */ + public function getEmployees() { + return $this->container['employees']; + } + + /** + * Sets employees + * + * @param \BhrSdk\Model\RequestCustomReportResponseEmployeesInner[]|null $employees One object per employee. Each object contains an `id` property plus one key per requested field. + * + * @return self + */ + public function setEmployees($employees) { + if (is_null($employees)) { + throw new \InvalidArgumentException('non-nullable employees cannot be null'); + } + $this->container['employees'] = $employees; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/RequestCustomReportResponseEmployeesInner.php b/lib/Model/RequestCustomReportResponseEmployeesInner.php new file mode 100644 index 00000000..e81bb560 --- /dev/null +++ b/lib/Model/RequestCustomReportResponseEmployeesInner.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * RequestCustomReportResponseEmployeesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * RequestCustomReportResponseEmployeesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class RequestCustomReportResponseEmployeesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'RequestCustomReportResponse_employees_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The employee ID. + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/JsonDirectoryEmployeeFieldsInner.php b/lib/Model/RequestCustomReportResponseFieldsInner.php similarity index 95% rename from lib/Model/JsonDirectoryEmployeeFieldsInner.php rename to lib/Model/RequestCustomReportResponseFieldsInner.php index b99d0b86..72954431 100644 --- a/lib/Model/JsonDirectoryEmployeeFieldsInner.php +++ b/lib/Model/RequestCustomReportResponseFieldsInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * JsonDirectoryEmployeeFieldsInner + * RequestCustomReportResponseFieldsInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * JsonDirectoryEmployeeFieldsInner Class Doc Comment + * RequestCustomReportResponseFieldsInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class JsonDirectoryEmployeeFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class RequestCustomReportResponseFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class JsonDirectoryEmployeeFieldsInner implements ModelInterface, ArrayAccess, \ * * @var string */ - protected static $openApiModelName = 'JsonDirectoryEmployee_fields_inner'; + protected static $openApiModelName = 'RequestCustomReportResponse_fields_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -302,7 +302,7 @@ public function getId() { /** * Sets id * - * @param string|null $id Field identifier + * @param string|null $id The field ID. * * @return self */ @@ -327,7 +327,7 @@ public function getType() { /** * Sets type * - * @param string|null $type Field data type + * @param string|null $type The field data type. * * @return self */ @@ -352,7 +352,7 @@ public function getName() { /** * Sets name * - * @param string|null $name Field display name + * @param string|null $name The human-readable field label. * * @return self */ diff --git a/lib/Model/SaveChangeCommTemplateResponse.php b/lib/Model/SaveChangeCommTemplateResponse.php new file mode 100644 index 00000000..f5430e9a --- /dev/null +++ b/lib/Model/SaveChangeCommTemplateResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * SaveChangeCommTemplateResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SaveChangeCommTemplateResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SaveChangeCommTemplateResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'SaveChangeCommTemplateResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingCreateScheduleRequestV1.php b/lib/Model/SchedulingCreateScheduleRequestV1.php new file mode 100644 index 00000000..6aec1616 --- /dev/null +++ b/lib/Model/SchedulingCreateScheduleRequestV1.php @@ -0,0 +1,596 @@ +<?php +declare(strict_types=1); +/** + * SchedulingCreateScheduleRequestV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingCreateScheduleRequestV1 Class Doc Comment + * + * @category Class + * @description Request object for creating or updating a schedule + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingCreateScheduleRequestV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-CreateScheduleRequest-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'location_id' => 'int', + 'timezone' => 'string', + 'start_of_week' => 'string', + 'early_clock_in_threshold' => 'int', + 'manager_user_ids' => 'int[]', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'location_id' => null, + 'timezone' => null, + 'start_of_week' => null, + 'early_clock_in_threshold' => null, + 'manager_user_ids' => null, + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'location_id' => false, + 'timezone' => true, + 'start_of_week' => false, + 'early_clock_in_threshold' => false, + 'manager_user_ids' => false, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'location_id' => 'locationId', + 'timezone' => 'timezone', + 'start_of_week' => 'startOfWeek', + 'early_clock_in_threshold' => 'earlyClockInThreshold', + 'manager_user_ids' => 'managerUserIds', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'location_id' => 'setLocationId', + 'timezone' => 'setTimezone', + 'start_of_week' => 'setStartOfWeek', + 'early_clock_in_threshold' => 'setEarlyClockInThreshold', + 'manager_user_ids' => 'setManagerUserIds', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'location_id' => 'getLocationId', + 'timezone' => 'getTimezone', + 'start_of_week' => 'getStartOfWeek', + 'early_clock_in_threshold' => 'getEarlyClockInThreshold', + 'manager_user_ids' => 'getManagerUserIds', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('start_of_week', $data ?? [], null); + $this->setIfExists('early_clock_in_threshold', $data ?? [], null); + $this->setIfExists('manager_user_ids', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['location_id'] === null) { + $invalidProperties[] = "'location_id' can't be null"; + } + if ($this->container['start_of_week'] === null) { + $invalidProperties[] = "'start_of_week' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the schedule + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets location_id + * + * @return int + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int $location_id The ID of the location the schedule belongs to + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + throw new \InvalidArgumentException('non-nullable location_id cannot be null'); + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + $this->openApiNullablesSetToNull['timezone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['timezone'])) { + unset($nullablesSetToNull['timezone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets start_of_week + * + * @return string + */ + public function getStartOfWeek() { + return $this->container['start_of_week']; + } + + /** + * Sets start_of_week + * + * @param string $start_of_week The starting day of the week for the schedule + * + * @return self + */ + public function setStartOfWeek($start_of_week) { + if (is_null($start_of_week)) { + throw new \InvalidArgumentException('non-nullable start_of_week cannot be null'); + } + $this->container['start_of_week'] = $start_of_week; + + return $this; + } + + /** + * Gets early_clock_in_threshold + * + * @return int|null + */ + public function getEarlyClockInThreshold() { + return $this->container['early_clock_in_threshold']; + } + + /** + * Sets early_clock_in_threshold + * + * @param int|null $early_clock_in_threshold The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule + * + * @return self + */ + public function setEarlyClockInThreshold($early_clock_in_threshold) { + if (is_null($early_clock_in_threshold)) { + throw new \InvalidArgumentException('non-nullable early_clock_in_threshold cannot be null'); + } + $this->container['early_clock_in_threshold'] = $early_clock_in_threshold; + + return $this; + } + + /** + * Gets manager_user_ids + * + * @return int[]|null + */ + public function getManagerUserIds() { + return $this->container['manager_user_ids']; + } + + /** + * Sets manager_user_ids + * + * @param int[]|null $manager_user_ids User IDs of managers for this schedule + * + * @return self + */ + public function setManagerUserIds($manager_user_ids) { + if (is_null($manager_user_ids)) { + throw new \InvalidArgumentException('non-nullable manager_user_ids cannot be null'); + } + $this->container['manager_user_ids'] = $manager_user_ids; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Employee IDs assigned to this schedule + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingCreateSchedulingShiftRequestV1.php b/lib/Model/SchedulingCreateSchedulingShiftRequestV1.php new file mode 100644 index 00000000..0293c187 --- /dev/null +++ b/lib/Model/SchedulingCreateSchedulingShiftRequestV1.php @@ -0,0 +1,891 @@ +<?php +declare(strict_types=1); +/** + * SchedulingCreateSchedulingShiftRequestV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingCreateSchedulingShiftRequestV1 Class Doc Comment + * + * @category Class + * @description Fields required to create a scheduling shift. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingCreateSchedulingShiftRequestV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-CreateSchedulingShiftRequest-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'schedule_id' => 'string', + 'name' => 'string', + 'status' => 'string', + 'color' => 'string', + 'timezone' => 'mixed', + 'capacity' => 'int', + 'employee_ids' => 'int[]', + 'start' => '\DateTime', + 'end' => '\DateTime', + 'recurrence_rule' => 'string', + 'recurrence_dtstart' => 'string', + 'recurrence_dtend' => 'string', + 'recurrence_until' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'schedule_id' => 'uuid', + 'name' => null, + 'status' => null, + 'color' => null, + 'timezone' => null, + 'capacity' => null, + 'employee_ids' => null, + 'start' => 'date-time', + 'end' => 'date-time', + 'recurrence_rule' => null, + 'recurrence_dtstart' => null, + 'recurrence_dtend' => null, + 'recurrence_until' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'schedule_id' => false, + 'name' => true, + 'status' => false, + 'color' => false, + 'timezone' => true, + 'capacity' => true, + 'employee_ids' => false, + 'start' => false, + 'end' => false, + 'recurrence_rule' => true, + 'recurrence_dtstart' => true, + 'recurrence_dtend' => true, + 'recurrence_until' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'schedule_id' => 'scheduleId', + 'name' => 'name', + 'status' => 'status', + 'color' => 'color', + 'timezone' => 'timezone', + 'capacity' => 'capacity', + 'employee_ids' => 'employeeIds', + 'start' => 'start', + 'end' => 'end', + 'recurrence_rule' => 'recurrenceRule', + 'recurrence_dtstart' => 'recurrenceDtstart', + 'recurrence_dtend' => 'recurrenceDtend', + 'recurrence_until' => 'recurrenceUntil' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'schedule_id' => 'setScheduleId', + 'name' => 'setName', + 'status' => 'setStatus', + 'color' => 'setColor', + 'timezone' => 'setTimezone', + 'capacity' => 'setCapacity', + 'employee_ids' => 'setEmployeeIds', + 'start' => 'setStart', + 'end' => 'setEnd', + 'recurrence_rule' => 'setRecurrenceRule', + 'recurrence_dtstart' => 'setRecurrenceDtstart', + 'recurrence_dtend' => 'setRecurrenceDtend', + 'recurrence_until' => 'setRecurrenceUntil' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'schedule_id' => 'getScheduleId', + 'name' => 'getName', + 'status' => 'getStatus', + 'color' => 'getColor', + 'timezone' => 'getTimezone', + 'capacity' => 'getCapacity', + 'employee_ids' => 'getEmployeeIds', + 'start' => 'getStart', + 'end' => 'getEnd', + 'recurrence_rule' => 'getRecurrenceRule', + 'recurrence_dtstart' => 'getRecurrenceDtstart', + 'recurrence_dtend' => 'getRecurrenceDtend', + 'recurrence_until' => 'getRecurrenceUntil' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_PLANNED = 'planned'; + public const STATUS_PUBLISHED = 'published'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_PLANNED, + self::STATUS_PUBLISHED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('schedule_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('capacity', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('recurrence_rule', $data ?? [], null); + $this->setIfExists('recurrence_dtstart', $data ?? [], null); + $this->setIfExists('recurrence_dtend', $data ?? [], null); + $this->setIfExists('recurrence_until', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['schedule_id'] === null) { + $invalidProperties[] = "'schedule_id' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['color'] === null) { + $invalidProperties[] = "'color' can't be null"; + } + if ((mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + + if ((mb_strlen($this->container['color']) < 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be bigger than or equal to 6."; + } + + if ($this->container['timezone'] === null) { + $invalidProperties[] = "'timezone' can't be null"; + } + if (!is_null($this->container['capacity']) && ($this->container['capacity'] < 1)) { + $invalidProperties[] = "invalid value for 'capacity', must be bigger than or equal to 1."; + } + + if ($this->container['start'] === null) { + $invalidProperties[] = "'start' can't be null"; + } + if ($this->container['end'] === null) { + $invalidProperties[] = "'end' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets schedule_id + * + * @return string + */ + public function getScheduleId() { + return $this->container['schedule_id']; + } + + /** + * Sets schedule_id + * + * @param string $schedule_id The ID of the schedule the shift belongs to. + * + * @return self + */ + public function setScheduleId($schedule_id) { + if (is_null($schedule_id)) { + throw new \InvalidArgumentException('non-nullable schedule_id cannot be null'); + } + $this->container['schedule_id'] = $schedule_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the shift. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets color + * + * @return string + */ + public function getColor() { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string $color 6 character color hex code. + * + * @return self + */ + public function setColor($color) { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + if ((mb_strlen($color) > 6)) { + throw new \InvalidArgumentException('invalid length for $color when calling SchedulingCreateSchedulingShiftRequestV1., must be smaller than or equal to 6.'); + } + if ((mb_strlen($color) < 6)) { + throw new \InvalidArgumentException('invalid length for $color when calling SchedulingCreateSchedulingShiftRequestV1., must be bigger than or equal to 6.'); + } + + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets timezone + * + * @return mixed + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param mixed $timezone timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + $this->openApiNullablesSetToNull['timezone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['timezone'])) { + unset($nullablesSetToNull['timezone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets capacity + * + * @return int|null + */ + public function getCapacity() { + return $this->container['capacity']; + } + + /** + * Sets capacity + * + * @param int|null $capacity capacity + * + * @return self + */ + public function setCapacity($capacity) { + if (is_null($capacity)) { + $this->openApiNullablesSetToNull['capacity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['capacity'])) { + unset($nullablesSetToNull['capacity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($capacity) && ($capacity < 1)) { + throw new \InvalidArgumentException('invalid value for $capacity when calling SchedulingCreateSchedulingShiftRequestV1., must be bigger than or equal to 1.'); + } + + $this->container['capacity'] = $capacity; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids What employees are assigned to this shift? + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime $start UTC timestamp of the start of the shift. + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime $end UTC timestamp of the end of the shift. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets recurrence_rule + * + * @return string|null + */ + public function getRecurrenceRule() { + return $this->container['recurrence_rule']; + } + + /** + * Sets recurrence_rule + * + * @param string|null $recurrence_rule recurrence_rule + * + * @return self + */ + public function setRecurrenceRule($recurrence_rule) { + if (is_null($recurrence_rule)) { + $this->openApiNullablesSetToNull['recurrence_rule'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_rule'])) { + unset($nullablesSetToNull['recurrence_rule']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_rule'] = $recurrence_rule; + + return $this; + } + + /** + * Gets recurrence_dtstart + * + * @return string|null + */ + public function getRecurrenceDtstart() { + return $this->container['recurrence_dtstart']; + } + + /** + * Sets recurrence_dtstart + * + * @param string|null $recurrence_dtstart recurrence_dtstart + * + * @return self + */ + public function setRecurrenceDtstart($recurrence_dtstart) { + if (is_null($recurrence_dtstart)) { + $this->openApiNullablesSetToNull['recurrence_dtstart'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtstart'])) { + unset($nullablesSetToNull['recurrence_dtstart']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtstart'] = $recurrence_dtstart; + + return $this; + } + + /** + * Gets recurrence_dtend + * + * @return string|null + */ + public function getRecurrenceDtend() { + return $this->container['recurrence_dtend']; + } + + /** + * Sets recurrence_dtend + * + * @param string|null $recurrence_dtend recurrence_dtend + * + * @return self + */ + public function setRecurrenceDtend($recurrence_dtend) { + if (is_null($recurrence_dtend)) { + $this->openApiNullablesSetToNull['recurrence_dtend'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtend'])) { + unset($nullablesSetToNull['recurrence_dtend']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtend'] = $recurrence_dtend; + + return $this; + } + + /** + * Gets recurrence_until + * + * @return string|null + */ + public function getRecurrenceUntil() { + return $this->container['recurrence_until']; + } + + /** + * Sets recurrence_until + * + * @param string|null $recurrence_until recurrence_until + * + * @return self + */ + public function setRecurrenceUntil($recurrence_until) { + if (is_null($recurrence_until)) { + $this->openApiNullablesSetToNull['recurrence_until'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_until'])) { + unset($nullablesSetToNull['recurrence_until']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_until'] = $recurrence_until; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingPublishShiftsFailureV1.php b/lib/Model/SchedulingPublishShiftsFailureV1.php new file mode 100644 index 00000000..614954e9 --- /dev/null +++ b/lib/Model/SchedulingPublishShiftsFailureV1.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * SchedulingPublishShiftsFailureV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingPublishShiftsFailureV1 Class Doc Comment + * + * @category Class + * @description A shift that failed to publish due to a conflict + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingPublishShiftsFailureV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-PublishShiftsFailure-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'shift_id' => 'string', + 'reason' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'shift_id' => null, + 'reason' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'shift_id' => false, + 'reason' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'shift_id' => 'shiftId', + 'reason' => 'reason' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'shift_id' => 'setShiftId', + 'reason' => 'setReason' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'shift_id' => 'getShiftId', + 'reason' => 'getReason' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('shift_id', $data ?? [], null); + $this->setIfExists('reason', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['shift_id'] === null) { + $invalidProperties[] = "'shift_id' can't be null"; + } + if ($this->container['reason'] === null) { + $invalidProperties[] = "'reason' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets shift_id + * + * @return string + */ + public function getShiftId() { + return $this->container['shift_id']; + } + + /** + * Sets shift_id + * + * @param string $shift_id The ID of the shift that failed to publish. + * + * @return self + */ + public function setShiftId($shift_id) { + if (is_null($shift_id)) { + throw new \InvalidArgumentException('non-nullable shift_id cannot be null'); + } + $this->container['shift_id'] = $shift_id; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason() { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason The reason the shift failed to publish. + * + * @return self + */ + public function setReason($reason) { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingPublishShiftsRequest.php b/lib/Model/SchedulingPublishShiftsRequest.php new file mode 100644 index 00000000..0807ec7d --- /dev/null +++ b/lib/Model/SchedulingPublishShiftsRequest.php @@ -0,0 +1,406 @@ +<?php +declare(strict_types=1); +/** + * SchedulingPublishShiftsRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingPublishShiftsRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingPublishShiftsRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'scheduling_publish_shifts_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'shift_ids' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'shift_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'shift_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'shift_ids' => 'shiftIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'shift_ids' => 'setShiftIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'shift_ids' => 'getShiftIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('shift_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['shift_ids'] === null) { + $invalidProperties[] = "'shift_ids' can't be null"; + } + if ((count($this->container['shift_ids']) > 100)) { + $invalidProperties[] = "invalid value for 'shift_ids', number of items must be less than or equal to 100."; + } + + if ((count($this->container['shift_ids']) < 1)) { + $invalidProperties[] = "invalid value for 'shift_ids', number of items must be greater 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets shift_ids + * + * @return string[] + */ + public function getShiftIds() { + return $this->container['shift_ids']; + } + + /** + * Sets shift_ids + * + * @param string[] $shift_ids Shift IDs to publish. + * + * @return self + */ + public function setShiftIds($shift_ids) { + if (is_null($shift_ids)) { + throw new \InvalidArgumentException('non-nullable shift_ids cannot be null'); + } + + if ((count($shift_ids) > 100)) { + throw new \InvalidArgumentException('invalid value for $shift_ids when calling SchedulingPublishShiftsRequest., number of items must be less than or equal to 100.'); + } + if ((count($shift_ids) < 1)) { + throw new \InvalidArgumentException('invalid length for $shift_ids when calling SchedulingPublishShiftsRequest., number of items must be greater than or equal to 1.'); + } + $this->container['shift_ids'] = $shift_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingPublishShiftsResultV1.php b/lib/Model/SchedulingPublishShiftsResultV1.php new file mode 100644 index 00000000..768e613a --- /dev/null +++ b/lib/Model/SchedulingPublishShiftsResultV1.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * SchedulingPublishShiftsResultV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingPublishShiftsResultV1 Class Doc Comment + * + * @category Class + * @description Result of a bulk publish operation, containing both successfully published shifts and any failures + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingPublishShiftsResultV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-PublishShiftsResult-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'published' => '\BhrSdk\Model\SchedulingSchedulingShiftV1[]', + 'failed' => '\BhrSdk\Model\SchedulingPublishShiftsFailureV1[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'published' => null, + 'failed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'published' => false, + 'failed' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'published' => 'published', + 'failed' => 'failed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'published' => 'setPublished', + 'failed' => 'setFailed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'published' => 'getPublished', + 'failed' => 'getFailed' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('published', $data ?? [], null); + $this->setIfExists('failed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['published'] === null) { + $invalidProperties[] = "'published' can't be null"; + } + if ($this->container['failed'] === null) { + $invalidProperties[] = "'failed' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets published + * + * @return \BhrSdk\Model\SchedulingSchedulingShiftV1[] + */ + public function getPublished() { + return $this->container['published']; + } + + /** + * Sets published + * + * @param \BhrSdk\Model\SchedulingSchedulingShiftV1[] $published The shifts that were successfully published. + * + * @return self + */ + public function setPublished($published) { + if (is_null($published)) { + throw new \InvalidArgumentException('non-nullable published cannot be null'); + } + $this->container['published'] = $published; + + return $this; + } + + /** + * Gets failed + * + * @return \BhrSdk\Model\SchedulingPublishShiftsFailureV1[] + */ + public function getFailed() { + return $this->container['failed']; + } + + /** + * Sets failed + * + * @param \BhrSdk\Model\SchedulingPublishShiftsFailureV1[] $failed The shifts that failed to publish due to conflicts. + * + * @return self + */ + public function setFailed($failed) { + if (is_null($failed)) { + throw new \InvalidArgumentException('non-nullable failed cannot be null'); + } + $this->container['failed'] = $failed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingScheduleListResponseV1.php b/lib/Model/SchedulingScheduleListResponseV1.php new file mode 100644 index 00000000..3582270f --- /dev/null +++ b/lib/Model/SchedulingScheduleListResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingScheduleListResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingScheduleListResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingScheduleListResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ScheduleListResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\SchedulingScheduleV1[]', + 'meta' => '\BhrSdk\Model\SchedulingScheduleListResponseV1Meta', + '_links' => '\BhrSdk\Model\SchedulingScheduleListResponseV1Links' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\SchedulingScheduleV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\SchedulingScheduleV1[]|null $data Array of schedule resource objects + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\SchedulingScheduleListResponseV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\SchedulingScheduleListResponseV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\SchedulingScheduleListResponseV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\SchedulingScheduleListResponseV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingScheduleListResponseV1Links.php b/lib/Model/SchedulingScheduleListResponseV1Links.php new file mode 100644 index 00000000..00d02c81 --- /dev/null +++ b/lib/Model/SchedulingScheduleListResponseV1Links.php @@ -0,0 +1,432 @@ +<?php +declare(strict_types=1); +/** + * SchedulingScheduleListResponseV1Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingScheduleListResponseV1Links Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingScheduleListResponseV1Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ScheduleListResponse_V1__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prev' => 'object', + 'next' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prev' => null, + 'next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prev' => true, + 'next' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prev' => 'prev', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prev' => 'setPrev', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prev' => 'getPrev', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prev', $data ?? [], null); + $this->setIfExists('next', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prev + * + * @return object|null + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param object|null $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + $this->openApiNullablesSetToNull['prev'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['prev'])) { + unset($nullablesSetToNull['prev']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['prev'] = $prev; + + return $this; + } + + /** + * Gets next + * + * @return object|null + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param object|null $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + $this->openApiNullablesSetToNull['next'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['next'])) { + unset($nullablesSetToNull['next']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingScheduleListResponseV1Meta.php b/lib/Model/SchedulingScheduleListResponseV1Meta.php new file mode 100644 index 00000000..5ab87047 --- /dev/null +++ b/lib/Model/SchedulingScheduleListResponseV1Meta.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingScheduleListResponseV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingScheduleListResponseV1Meta Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingScheduleListResponseV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ScheduleListResponse_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'page' => 'int', + 'page_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'page' => null, + 'page_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'page' => false, + 'page_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'page' => 'page', + 'page_size' => 'pageSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'page' => 'setPage', + 'page_size' => 'setPageSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'page' => 'getPage', + 'page_size' => 'getPageSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items Total number of schedules matching the filter. + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page Current page number. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size Number of items per page. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingScheduleV1.php b/lib/Model/SchedulingScheduleV1.php new file mode 100644 index 00000000..bafdb779 --- /dev/null +++ b/lib/Model/SchedulingScheduleV1.php @@ -0,0 +1,721 @@ +<?php +declare(strict_types=1); +/** + * SchedulingScheduleV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingScheduleV1 Class Doc Comment + * + * @category Class + * @description A shift schedule for a specific location, which organizes shifts for employees + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingScheduleV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-Schedule-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'location_id' => 'int', + 'timezone' => 'string', + 'start_of_week' => 'string', + 'early_clock_in_threshold' => 'int', + 'manager_user_ids' => 'int[]', + 'employee_ids' => 'int[]', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'location_id' => null, + 'timezone' => null, + 'start_of_week' => null, + 'early_clock_in_threshold' => null, + 'manager_user_ids' => null, + 'employee_ids' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'location_id' => false, + 'timezone' => false, + 'start_of_week' => false, + 'early_clock_in_threshold' => false, + 'manager_user_ids' => false, + 'employee_ids' => false, + 'created_at' => false, + 'updated_at' => true, + 'deleted_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'location_id' => 'locationId', + 'timezone' => 'timezone', + 'start_of_week' => 'startOfWeek', + 'early_clock_in_threshold' => 'earlyClockInThreshold', + 'manager_user_ids' => 'managerUserIds', + 'employee_ids' => 'employeeIds', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'location_id' => 'setLocationId', + 'timezone' => 'setTimezone', + 'start_of_week' => 'setStartOfWeek', + 'early_clock_in_threshold' => 'setEarlyClockInThreshold', + 'manager_user_ids' => 'setManagerUserIds', + 'employee_ids' => 'setEmployeeIds', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'location_id' => 'getLocationId', + 'timezone' => 'getTimezone', + 'start_of_week' => 'getStartOfWeek', + 'early_clock_in_threshold' => 'getEarlyClockInThreshold', + 'manager_user_ids' => 'getManagerUserIds', + 'employee_ids' => 'getEmployeeIds', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('start_of_week', $data ?? [], null); + $this->setIfExists('early_clock_in_threshold', $data ?? [], null); + $this->setIfExists('manager_user_ids', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The UUID of the schedule + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the schedule + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets location_id + * + * @return int|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int|null $location_id The ID of the location the schedule belongs to + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + throw new \InvalidArgumentException('non-nullable location_id cannot be null'); + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone of the schedule, provide if location is missing timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets start_of_week + * + * @return string|null + */ + public function getStartOfWeek() { + return $this->container['start_of_week']; + } + + /** + * Sets start_of_week + * + * @param string|null $start_of_week The starting day of the week for the schedule + * + * @return self + */ + public function setStartOfWeek($start_of_week) { + if (is_null($start_of_week)) { + throw new \InvalidArgumentException('non-nullable start_of_week cannot be null'); + } + $this->container['start_of_week'] = $start_of_week; + + return $this; + } + + /** + * Gets early_clock_in_threshold + * + * @return int|null + */ + public function getEarlyClockInThreshold() { + return $this->container['early_clock_in_threshold']; + } + + /** + * Sets early_clock_in_threshold + * + * @param int|null $early_clock_in_threshold The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule + * + * @return self + */ + public function setEarlyClockInThreshold($early_clock_in_threshold) { + if (is_null($early_clock_in_threshold)) { + throw new \InvalidArgumentException('non-nullable early_clock_in_threshold cannot be null'); + } + $this->container['early_clock_in_threshold'] = $early_clock_in_threshold; + + return $this; + } + + /** + * Gets manager_user_ids + * + * @return int[]|null + */ + public function getManagerUserIds() { + return $this->container['manager_user_ids']; + } + + /** + * Sets manager_user_ids + * + * @param int[]|null $manager_user_ids What users manage this schedule + * + * @return self + */ + public function setManagerUserIds($manager_user_ids) { + if (is_null($manager_user_ids)) { + throw new \InvalidArgumentException('non-nullable manager_user_ids cannot be null'); + } + $this->container['manager_user_ids'] = $manager_user_ids; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids What employees are assigned to this schedule + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at UTC timestamp when the schedule was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingSchedulingShiftV1.php b/lib/Model/SchedulingSchedulingShiftV1.php new file mode 100644 index 00000000..00f1ef06 --- /dev/null +++ b/lib/Model/SchedulingSchedulingShiftV1.php @@ -0,0 +1,1096 @@ +<?php +declare(strict_types=1); +/** + * SchedulingSchedulingShiftV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingSchedulingShiftV1 Class Doc Comment + * + * @category Class + * @description A shift for scheduling + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingSchedulingShiftV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-SchedulingShift-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'schedule_id' => 'string', + 'name' => 'string', + 'status' => 'string', + 'color' => 'string', + 'capacity' => 'int', + 'start' => '\DateTime', + 'end' => '\DateTime', + 'timezone' => 'string', + 'recurrence_rule' => 'string', + 'recurrence_id' => 'string', + 'recurrence_dtstart' => 'string', + 'recurrence_dtend' => 'string', + 'recurrence_until' => 'string', + 'employee_ids' => 'int[]', + 'unpublished_changes' => 'object', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'schedule_id' => 'uuid', + 'name' => null, + 'status' => null, + 'color' => null, + 'capacity' => null, + 'start' => 'date-time', + 'end' => 'date-time', + 'timezone' => null, + 'recurrence_rule' => null, + 'recurrence_id' => null, + 'recurrence_dtstart' => null, + 'recurrence_dtend' => null, + 'recurrence_until' => null, + 'employee_ids' => null, + 'unpublished_changes' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'schedule_id' => false, + 'name' => true, + 'status' => false, + 'color' => false, + 'capacity' => true, + 'start' => true, + 'end' => true, + 'timezone' => false, + 'recurrence_rule' => true, + 'recurrence_id' => true, + 'recurrence_dtstart' => true, + 'recurrence_dtend' => true, + 'recurrence_until' => true, + 'employee_ids' => false, + 'unpublished_changes' => true, + 'created_at' => false, + 'updated_at' => true, + 'deleted_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'schedule_id' => 'scheduleId', + 'name' => 'name', + 'status' => 'status', + 'color' => 'color', + 'capacity' => 'capacity', + 'start' => 'start', + 'end' => 'end', + 'timezone' => 'timezone', + 'recurrence_rule' => 'recurrenceRule', + 'recurrence_id' => 'recurrenceId', + 'recurrence_dtstart' => 'recurrenceDtstart', + 'recurrence_dtend' => 'recurrenceDtend', + 'recurrence_until' => 'recurrenceUntil', + 'employee_ids' => 'employeeIds', + 'unpublished_changes' => 'unpublishedChanges', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'schedule_id' => 'setScheduleId', + 'name' => 'setName', + 'status' => 'setStatus', + 'color' => 'setColor', + 'capacity' => 'setCapacity', + 'start' => 'setStart', + 'end' => 'setEnd', + 'timezone' => 'setTimezone', + 'recurrence_rule' => 'setRecurrenceRule', + 'recurrence_id' => 'setRecurrenceId', + 'recurrence_dtstart' => 'setRecurrenceDtstart', + 'recurrence_dtend' => 'setRecurrenceDtend', + 'recurrence_until' => 'setRecurrenceUntil', + 'employee_ids' => 'setEmployeeIds', + 'unpublished_changes' => 'setUnpublishedChanges', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'schedule_id' => 'getScheduleId', + 'name' => 'getName', + 'status' => 'getStatus', + 'color' => 'getColor', + 'capacity' => 'getCapacity', + 'start' => 'getStart', + 'end' => 'getEnd', + 'timezone' => 'getTimezone', + 'recurrence_rule' => 'getRecurrenceRule', + 'recurrence_id' => 'getRecurrenceId', + 'recurrence_dtstart' => 'getRecurrenceDtstart', + 'recurrence_dtend' => 'getRecurrenceDtend', + 'recurrence_until' => 'getRecurrenceUntil', + 'employee_ids' => 'getEmployeeIds', + 'unpublished_changes' => 'getUnpublishedChanges', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const STATUS_PLANNED = 'planned'; + public const STATUS_PUBLISHED = 'published'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_DELETED = 'deleted'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_PLANNED, + self::STATUS_PUBLISHED, + self::STATUS_CANCELLED, + self::STATUS_DELETED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('schedule_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('capacity', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('recurrence_rule', $data ?? [], null); + $this->setIfExists('recurrence_id', $data ?? [], null); + $this->setIfExists('recurrence_dtstart', $data ?? [], null); + $this->setIfExists('recurrence_dtend', $data ?? [], null); + $this->setIfExists('recurrence_until', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('unpublished_changes', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['schedule_id'] === null) { + $invalidProperties[] = "'schedule_id' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['color'] === null) { + $invalidProperties[] = "'color' can't be null"; + } + if ($this->container['start'] === null) { + $invalidProperties[] = "'start' can't be null"; + } + if ($this->container['end'] === null) { + $invalidProperties[] = "'end' can't be null"; + } + if ($this->container['timezone'] === null) { + $invalidProperties[] = "'timezone' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The ID of the shift. This can be the UUIDv7 of the shift instance, or a composite ID (<recurringShiftDefinitionId>_<recurrenceId>) for uninstantiated recurring shifts. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets schedule_id + * + * @return string + */ + public function getScheduleId() { + return $this->container['schedule_id']; + } + + /** + * Sets schedule_id + * + * @param string $schedule_id The ID of the schedule the shift belongs to. + * + * @return self + */ + public function setScheduleId($schedule_id) { + if (is_null($schedule_id)) { + throw new \InvalidArgumentException('non-nullable schedule_id cannot be null'); + } + $this->container['schedule_id'] = $schedule_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the shift. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets color + * + * @return string + */ + public function getColor() { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string $color 6 character color hex code. + * + * @return self + */ + public function setColor($color) { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets capacity + * + * @return int|null + */ + public function getCapacity() { + return $this->container['capacity']; + } + + /** + * Sets capacity + * + * @param int|null $capacity capacity + * + * @return self + */ + public function setCapacity($capacity) { + if (is_null($capacity)) { + $this->openApiNullablesSetToNull['capacity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['capacity'])) { + unset($nullablesSetToNull['capacity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['capacity'] = $capacity; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime $start start + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + $this->openApiNullablesSetToNull['start'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['start'])) { + unset($nullablesSetToNull['start']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime $end end + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + $this->openApiNullablesSetToNull['end'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['end'])) { + unset($nullablesSetToNull['end']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets timezone + * + * @return string + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string $timezone The timezone for the shift. + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets recurrence_rule + * + * @return string|null + */ + public function getRecurrenceRule() { + return $this->container['recurrence_rule']; + } + + /** + * Sets recurrence_rule + * + * @param string|null $recurrence_rule recurrence_rule + * + * @return self + */ + public function setRecurrenceRule($recurrence_rule) { + if (is_null($recurrence_rule)) { + $this->openApiNullablesSetToNull['recurrence_rule'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_rule'])) { + unset($nullablesSetToNull['recurrence_rule']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_rule'] = $recurrence_rule; + + return $this; + } + + /** + * Gets recurrence_id + * + * @return string|null + */ + public function getRecurrenceId() { + return $this->container['recurrence_id']; + } + + /** + * Sets recurrence_id + * + * @param string|null $recurrence_id recurrence_id + * + * @return self + */ + public function setRecurrenceId($recurrence_id) { + if (is_null($recurrence_id)) { + $this->openApiNullablesSetToNull['recurrence_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_id'])) { + unset($nullablesSetToNull['recurrence_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_id'] = $recurrence_id; + + return $this; + } + + /** + * Gets recurrence_dtstart + * + * @return string|null + */ + public function getRecurrenceDtstart() { + return $this->container['recurrence_dtstart']; + } + + /** + * Sets recurrence_dtstart + * + * @param string|null $recurrence_dtstart recurrence_dtstart + * + * @return self + */ + public function setRecurrenceDtstart($recurrence_dtstart) { + if (is_null($recurrence_dtstart)) { + $this->openApiNullablesSetToNull['recurrence_dtstart'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtstart'])) { + unset($nullablesSetToNull['recurrence_dtstart']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtstart'] = $recurrence_dtstart; + + return $this; + } + + /** + * Gets recurrence_dtend + * + * @return string|null + */ + public function getRecurrenceDtend() { + return $this->container['recurrence_dtend']; + } + + /** + * Sets recurrence_dtend + * + * @param string|null $recurrence_dtend recurrence_dtend + * + * @return self + */ + public function setRecurrenceDtend($recurrence_dtend) { + if (is_null($recurrence_dtend)) { + $this->openApiNullablesSetToNull['recurrence_dtend'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtend'])) { + unset($nullablesSetToNull['recurrence_dtend']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtend'] = $recurrence_dtend; + + return $this; + } + + /** + * Gets recurrence_until + * + * @return string|null + */ + public function getRecurrenceUntil() { + return $this->container['recurrence_until']; + } + + /** + * Sets recurrence_until + * + * @param string|null $recurrence_until recurrence_until + * + * @return self + */ + public function setRecurrenceUntil($recurrence_until) { + if (is_null($recurrence_until)) { + $this->openApiNullablesSetToNull['recurrence_until'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_until'])) { + unset($nullablesSetToNull['recurrence_until']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_until'] = $recurrence_until; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids The list of employee IDs currently assigned. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets unpublished_changes + * + * @return object|null + */ + public function getUnpublishedChanges() { + return $this->container['unpublished_changes']; + } + + /** + * Sets unpublished_changes + * + * @param object|null $unpublished_changes unpublished_changes + * + * @return self + */ + public function setUnpublishedChanges($unpublished_changes) { + if (is_null($unpublished_changes)) { + $this->openApiNullablesSetToNull['unpublished_changes'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unpublished_changes'])) { + unset($nullablesSetToNull['unpublished_changes']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unpublished_changes'] = $unpublished_changes; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at UTC timestamp when the shift was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingShiftListResponseV1.php b/lib/Model/SchedulingShiftListResponseV1.php new file mode 100644 index 00000000..0f3f89c0 --- /dev/null +++ b/lib/Model/SchedulingShiftListResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingShiftListResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingShiftListResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingShiftListResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ShiftListResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\SchedulingSchedulingShiftV1[]', + 'meta' => '\BhrSdk\Model\SchedulingShiftListResponseV1Meta', + '_links' => '\BhrSdk\Model\SchedulingShiftListResponseV1Links' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\SchedulingSchedulingShiftV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\SchedulingSchedulingShiftV1[]|null $data Array of shifts + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\SchedulingShiftListResponseV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\SchedulingShiftListResponseV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\SchedulingShiftListResponseV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\SchedulingShiftListResponseV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingShiftListResponseV1Links.php b/lib/Model/SchedulingShiftListResponseV1Links.php new file mode 100644 index 00000000..26a7b204 --- /dev/null +++ b/lib/Model/SchedulingShiftListResponseV1Links.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * SchedulingShiftListResponseV1Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingShiftListResponseV1Links Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingShiftListResponseV1Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ShiftListResponse_V1__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prev' => '\BhrSdk\Model\SchedulingShiftListResponseV1LinksPrev', + 'next' => '\BhrSdk\Model\SchedulingShiftListResponseV1LinksNext' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prev' => null, + 'next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prev' => false, + 'next' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prev' => 'prev', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prev' => 'setPrev', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prev' => 'getPrev', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prev', $data ?? [], null); + $this->setIfExists('next', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prev + * + * @return \BhrSdk\Model\SchedulingShiftListResponseV1LinksPrev|null + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param \BhrSdk\Model\SchedulingShiftListResponseV1LinksPrev|null $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + throw new \InvalidArgumentException('non-nullable prev cannot be null'); + } + $this->container['prev'] = $prev; + + return $this; + } + + /** + * Gets next + * + * @return \BhrSdk\Model\SchedulingShiftListResponseV1LinksNext|null + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param \BhrSdk\Model\SchedulingShiftListResponseV1LinksNext|null $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + throw new \InvalidArgumentException('non-nullable next cannot be null'); + } + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingShiftListResponseV1LinksNext.php b/lib/Model/SchedulingShiftListResponseV1LinksNext.php new file mode 100644 index 00000000..996cae3a --- /dev/null +++ b/lib/Model/SchedulingShiftListResponseV1LinksNext.php @@ -0,0 +1,395 @@ +<?php +declare(strict_types=1); +/** + * SchedulingShiftListResponseV1LinksNext + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingShiftListResponseV1LinksNext Class Doc Comment + * + * @category Class + * @description Link to the next page. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingShiftListResponseV1LinksNext implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ShiftListResponse_V1__links_next'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href href + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + $this->openApiNullablesSetToNull['href'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['href'])) { + unset($nullablesSetToNull['href']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingShiftListResponseV1LinksPrev.php b/lib/Model/SchedulingShiftListResponseV1LinksPrev.php new file mode 100644 index 00000000..fe63d9e7 --- /dev/null +++ b/lib/Model/SchedulingShiftListResponseV1LinksPrev.php @@ -0,0 +1,395 @@ +<?php +declare(strict_types=1); +/** + * SchedulingShiftListResponseV1LinksPrev + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingShiftListResponseV1LinksPrev Class Doc Comment + * + * @category Class + * @description Link to the previous page. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingShiftListResponseV1LinksPrev implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ShiftListResponse_V1__links_prev'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'href' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'href' => 'getHref' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('href', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref() { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href href + * + * @return self + */ + public function setHref($href) { + if (is_null($href)) { + $this->openApiNullablesSetToNull['href'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['href'])) { + unset($nullablesSetToNull['href']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingShiftListResponseV1Meta.php b/lib/Model/SchedulingShiftListResponseV1Meta.php new file mode 100644 index 00000000..9ae3616e --- /dev/null +++ b/lib/Model/SchedulingShiftListResponseV1Meta.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingShiftListResponseV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingShiftListResponseV1Meta Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingShiftListResponseV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_ShiftListResponse_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'page' => 'int', + 'page_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'page' => null, + 'page_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'page' => false, + 'page_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'page' => 'page', + 'page_size' => 'pageSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'page' => 'setPage', + 'page_size' => 'setPageSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'page' => 'getPage', + 'page_size' => 'getPageSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items Total number of shifts matching the filter. + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page Current page number. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size Number of items per page. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingTimezoneListResponseV1.php b/lib/Model/SchedulingTimezoneListResponseV1.php new file mode 100644 index 00000000..1eb65adb --- /dev/null +++ b/lib/Model/SchedulingTimezoneListResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingTimezoneListResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingTimezoneListResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingTimezoneListResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_TimezoneListResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\SchedulingTimezoneV1[]', + 'meta' => '\BhrSdk\Model\SchedulingTimezoneListResponseV1Meta', + '_links' => '\BhrSdk\Model\SchedulingScheduleListResponseV1Links' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\SchedulingTimezoneV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\SchedulingTimezoneV1[]|null $data data + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\SchedulingTimezoneListResponseV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\SchedulingTimezoneListResponseV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\SchedulingScheduleListResponseV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\SchedulingScheduleListResponseV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingTimezoneListResponseV1Meta.php b/lib/Model/SchedulingTimezoneListResponseV1Meta.php new file mode 100644 index 00000000..66963043 --- /dev/null +++ b/lib/Model/SchedulingTimezoneListResponseV1Meta.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * SchedulingTimezoneListResponseV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingTimezoneListResponseV1Meta Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingTimezoneListResponseV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling_TimezoneListResponse_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'page' => 'int', + 'page_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'page' => null, + 'page_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'page' => false, + 'page_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'page' => 'page', + 'page_size' => 'pageSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'page' => 'setPage', + 'page_size' => 'setPageSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'page' => 'getPage', + 'page_size' => 'getPageSize' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('page_size', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int|null + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int|null $total_items Total number of timezones matching the filter. + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets page + * + * @return int|null + */ + public function getPage() { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int|null $page Current page number. + * + * @return self + */ + public function setPage($page) { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets page_size + * + * @return int|null + */ + public function getPageSize() { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int|null $page_size Number of items per page. + * + * @return self + */ + public function setPageSize($page_size) { + if (is_null($page_size)) { + throw new \InvalidArgumentException('non-nullable page_size cannot be null'); + } + $this->container['page_size'] = $page_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingTimezoneV1.php b/lib/Model/SchedulingTimezoneV1.php new file mode 100644 index 00000000..0559278a --- /dev/null +++ b/lib/Model/SchedulingTimezoneV1.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * SchedulingTimezoneV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingTimezoneV1 Class Doc Comment + * + * @category Class + * @description A timezone resource with its name and current UTC offset. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingTimezoneV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-Timezone-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'offset' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'offset' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'offset' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'offset' => 'offset' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'offset' => 'setOffset' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'offset' => 'getOffset' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('offset', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['offset'] === null) { + $invalidProperties[] = "'offset' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The timezone identifier. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets offset + * + * @return string + */ + public function getOffset() { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param string $offset The current UTC offset for this timezone. + * + * @return self + */ + public function setOffset($offset) { + if (is_null($offset)) { + throw new \InvalidArgumentException('non-nullable offset cannot be null'); + } + $this->container['offset'] = $offset; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingUpdateScheduleRequestV1.php b/lib/Model/SchedulingUpdateScheduleRequestV1.php new file mode 100644 index 00000000..20e1cb1f --- /dev/null +++ b/lib/Model/SchedulingUpdateScheduleRequestV1.php @@ -0,0 +1,581 @@ +<?php +declare(strict_types=1); +/** + * SchedulingUpdateScheduleRequestV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingUpdateScheduleRequestV1 Class Doc Comment + * + * @category Class + * @description Request object for updating a schedule + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingUpdateScheduleRequestV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-UpdateScheduleRequest-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'location_id' => 'int', + 'timezone' => 'string', + 'start_of_week' => 'string', + 'early_clock_in_threshold' => 'int', + 'manager_user_ids' => 'int[]', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'location_id' => null, + 'timezone' => null, + 'start_of_week' => null, + 'early_clock_in_threshold' => null, + 'manager_user_ids' => null, + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'location_id' => false, + 'timezone' => false, + 'start_of_week' => false, + 'early_clock_in_threshold' => false, + 'manager_user_ids' => false, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'location_id' => 'locationId', + 'timezone' => 'timezone', + 'start_of_week' => 'startOfWeek', + 'early_clock_in_threshold' => 'earlyClockInThreshold', + 'manager_user_ids' => 'managerUserIds', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'location_id' => 'setLocationId', + 'timezone' => 'setTimezone', + 'start_of_week' => 'setStartOfWeek', + 'early_clock_in_threshold' => 'setEarlyClockInThreshold', + 'manager_user_ids' => 'setManagerUserIds', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'location_id' => 'getLocationId', + 'timezone' => 'getTimezone', + 'start_of_week' => 'getStartOfWeek', + 'early_clock_in_threshold' => 'getEarlyClockInThreshold', + 'manager_user_ids' => 'getManagerUserIds', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('location_id', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('start_of_week', $data ?? [], null); + $this->setIfExists('early_clock_in_threshold', $data ?? [], null); + $this->setIfExists('manager_user_ids', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the schedule + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets location_id + * + * @return int|null + */ + public function getLocationId() { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int|null $location_id The ID of the location the schedule belongs to + * + * @return self + */ + public function setLocationId($location_id) { + if (is_null($location_id)) { + throw new \InvalidArgumentException('non-nullable location_id cannot be null'); + } + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone of the schedule. Required if location does not have a timezone. Error if location already has a timezone. + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets start_of_week + * + * @return string|null + */ + public function getStartOfWeek() { + return $this->container['start_of_week']; + } + + /** + * Sets start_of_week + * + * @param string|null $start_of_week The starting day of the week for the schedule + * + * @return self + */ + public function setStartOfWeek($start_of_week) { + if (is_null($start_of_week)) { + throw new \InvalidArgumentException('non-nullable start_of_week cannot be null'); + } + $this->container['start_of_week'] = $start_of_week; + + return $this; + } + + /** + * Gets early_clock_in_threshold + * + * @return int|null + */ + public function getEarlyClockInThreshold() { + return $this->container['early_clock_in_threshold']; + } + + /** + * Sets early_clock_in_threshold + * + * @param int|null $early_clock_in_threshold The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule + * + * @return self + */ + public function setEarlyClockInThreshold($early_clock_in_threshold) { + if (is_null($early_clock_in_threshold)) { + throw new \InvalidArgumentException('non-nullable early_clock_in_threshold cannot be null'); + } + $this->container['early_clock_in_threshold'] = $early_clock_in_threshold; + + return $this; + } + + /** + * Gets manager_user_ids + * + * @return int[]|null + */ + public function getManagerUserIds() { + return $this->container['manager_user_ids']; + } + + /** + * Sets manager_user_ids + * + * @param int[]|null $manager_user_ids User IDs of managers for this schedule + * + * @return self + */ + public function setManagerUserIds($manager_user_ids) { + if (is_null($manager_user_ids)) { + throw new \InvalidArgumentException('non-nullable manager_user_ids cannot be null'); + } + $this->container['manager_user_ids'] = $manager_user_ids; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids Employee IDs assigned to this schedule + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SchedulingUpdateSchedulingShiftRequestV1.php b/lib/Model/SchedulingUpdateSchedulingShiftRequestV1.php new file mode 100644 index 00000000..6f860230 --- /dev/null +++ b/lib/Model/SchedulingUpdateSchedulingShiftRequestV1.php @@ -0,0 +1,875 @@ +<?php +declare(strict_types=1); +/** + * SchedulingUpdateSchedulingShiftRequestV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SchedulingUpdateSchedulingShiftRequestV1 Class Doc Comment + * + * @category Class + * @description Fields for updating a scheduling shift. All fields are optional, and only provided fields will be updated. recurrenceEditOption is required when the shift already has recurrence settings. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SchedulingUpdateSchedulingShiftRequestV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Scheduling-UpdateSchedulingShiftRequest-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'color' => 'string', + 'capacity' => 'int', + 'start' => '\DateTime', + 'end' => '\DateTime', + 'timezone' => 'string', + 'recurrence_rule' => 'string', + 'recurrence_edit_option' => 'string', + 'recurrence_dtstart' => '\DateTime', + 'recurrence_dtend' => '\DateTime', + 'recurrence_until' => '\DateTime', + 'employee_ids' => 'int[]', + 'unpublished_changes' => 'mixed' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'color' => null, + 'capacity' => null, + 'start' => 'date-time', + 'end' => 'date-time', + 'timezone' => null, + 'recurrence_rule' => null, + 'recurrence_edit_option' => null, + 'recurrence_dtstart' => 'date-time', + 'recurrence_dtend' => 'date-time', + 'recurrence_until' => 'date-time', + 'employee_ids' => null, + 'unpublished_changes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => true, + 'color' => false, + 'capacity' => true, + 'start' => false, + 'end' => false, + 'timezone' => false, + 'recurrence_rule' => true, + 'recurrence_edit_option' => false, + 'recurrence_dtstart' => true, + 'recurrence_dtend' => true, + 'recurrence_until' => true, + 'employee_ids' => false, + 'unpublished_changes' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'color' => 'color', + 'capacity' => 'capacity', + 'start' => 'start', + 'end' => 'end', + 'timezone' => 'timezone', + 'recurrence_rule' => 'recurrenceRule', + 'recurrence_edit_option' => 'recurrenceEditOption', + 'recurrence_dtstart' => 'recurrenceDtstart', + 'recurrence_dtend' => 'recurrenceDtend', + 'recurrence_until' => 'recurrenceUntil', + 'employee_ids' => 'employeeIds', + 'unpublished_changes' => 'unpublishedChanges' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'color' => 'setColor', + 'capacity' => 'setCapacity', + 'start' => 'setStart', + 'end' => 'setEnd', + 'timezone' => 'setTimezone', + 'recurrence_rule' => 'setRecurrenceRule', + 'recurrence_edit_option' => 'setRecurrenceEditOption', + 'recurrence_dtstart' => 'setRecurrenceDtstart', + 'recurrence_dtend' => 'setRecurrenceDtend', + 'recurrence_until' => 'setRecurrenceUntil', + 'employee_ids' => 'setEmployeeIds', + 'unpublished_changes' => 'setUnpublishedChanges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'color' => 'getColor', + 'capacity' => 'getCapacity', + 'start' => 'getStart', + 'end' => 'getEnd', + 'timezone' => 'getTimezone', + 'recurrence_rule' => 'getRecurrenceRule', + 'recurrence_edit_option' => 'getRecurrenceEditOption', + 'recurrence_dtstart' => 'getRecurrenceDtstart', + 'recurrence_dtend' => 'getRecurrenceDtend', + 'recurrence_until' => 'getRecurrenceUntil', + 'employee_ids' => 'getEmployeeIds', + 'unpublished_changes' => 'getUnpublishedChanges' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const RECURRENCE_EDIT_OPTION_INSTANCE = 'instance'; + public const RECURRENCE_EDIT_OPTION_FUTURE = 'future'; + public const RECURRENCE_EDIT_OPTION_ALL = 'all'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurrenceEditOptionAllowableValues() { + return [ + self::RECURRENCE_EDIT_OPTION_INSTANCE, + self::RECURRENCE_EDIT_OPTION_FUTURE, + self::RECURRENCE_EDIT_OPTION_ALL, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('capacity', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('recurrence_rule', $data ?? [], null); + $this->setIfExists('recurrence_edit_option', $data ?? [], null); + $this->setIfExists('recurrence_dtstart', $data ?? [], null); + $this->setIfExists('recurrence_dtend', $data ?? [], null); + $this->setIfExists('recurrence_until', $data ?? [], null); + $this->setIfExists('employee_ids', $data ?? [], null); + $this->setIfExists('unpublished_changes', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + 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['color']) && (mb_strlen($this->container['color']) < 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be bigger than or equal to 6."; + } + + if (!is_null($this->container['capacity']) && ($this->container['capacity'] < 1)) { + $invalidProperties[] = "invalid value for 'capacity', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getRecurrenceEditOptionAllowableValues(); + if (!is_null($this->container['recurrence_edit_option']) && !in_array($this->container['recurrence_edit_option'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'recurrence_edit_option', must be one of '%s'", + $this->container['recurrence_edit_option'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets color + * + * @return string|null + */ + public function getColor() { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string|null $color 6 character color hex code. + * + * @return self + */ + public function setColor($color) { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + if ((mb_strlen($color) > 6)) { + throw new \InvalidArgumentException('invalid length for $color when calling SchedulingUpdateSchedulingShiftRequestV1., must be smaller than or equal to 6.'); + } + if ((mb_strlen($color) < 6)) { + throw new \InvalidArgumentException('invalid length for $color when calling SchedulingUpdateSchedulingShiftRequestV1., must be bigger than or equal to 6.'); + } + + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets capacity + * + * @return int|null + */ + public function getCapacity() { + return $this->container['capacity']; + } + + /** + * Sets capacity + * + * @param int|null $capacity capacity + * + * @return self + */ + public function setCapacity($capacity) { + if (is_null($capacity)) { + $this->openApiNullablesSetToNull['capacity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['capacity'])) { + unset($nullablesSetToNull['capacity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($capacity) && ($capacity < 1)) { + throw new \InvalidArgumentException('invalid value for $capacity when calling SchedulingUpdateSchedulingShiftRequestV1., must be bigger than or equal to 1.'); + } + + $this->container['capacity'] = $capacity; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime|null + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime|null $start UTC timestamp of the start of the shift. + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime|null + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime|null $end UTC timestamp of the end of the shift. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone for the shift. + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets recurrence_rule + * + * @return string|null + */ + public function getRecurrenceRule() { + return $this->container['recurrence_rule']; + } + + /** + * Sets recurrence_rule + * + * @param string|null $recurrence_rule recurrence_rule + * + * @return self + */ + public function setRecurrenceRule($recurrence_rule) { + if (is_null($recurrence_rule)) { + $this->openApiNullablesSetToNull['recurrence_rule'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_rule'])) { + unset($nullablesSetToNull['recurrence_rule']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_rule'] = $recurrence_rule; + + return $this; + } + + /** + * Gets recurrence_edit_option + * + * @return string|null + */ + public function getRecurrenceEditOption() { + return $this->container['recurrence_edit_option']; + } + + /** + * Sets recurrence_edit_option + * + * @param string|null $recurrence_edit_option How should recurrence edits be effective? Edits will not affect any realized shifts regardless of option. + * + * @return self + */ + public function setRecurrenceEditOption($recurrence_edit_option) { + if (is_null($recurrence_edit_option)) { + throw new \InvalidArgumentException('non-nullable recurrence_edit_option cannot be null'); + } + $allowedValues = $this->getRecurrenceEditOptionAllowableValues(); + if (!in_array($recurrence_edit_option, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'recurrence_edit_option', must be one of '%s'", + $recurrence_edit_option, + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurrence_edit_option'] = $recurrence_edit_option; + + return $this; + } + + /** + * Gets recurrence_dtstart + * + * @return \DateTime|null + */ + public function getRecurrenceDtstart() { + return $this->container['recurrence_dtstart']; + } + + /** + * Sets recurrence_dtstart + * + * @param \DateTime|null $recurrence_dtstart recurrence_dtstart + * + * @return self + */ + public function setRecurrenceDtstart($recurrence_dtstart) { + if (is_null($recurrence_dtstart)) { + $this->openApiNullablesSetToNull['recurrence_dtstart'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtstart'])) { + unset($nullablesSetToNull['recurrence_dtstart']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtstart'] = $recurrence_dtstart; + + return $this; + } + + /** + * Gets recurrence_dtend + * + * @return \DateTime|null + */ + public function getRecurrenceDtend() { + return $this->container['recurrence_dtend']; + } + + /** + * Sets recurrence_dtend + * + * @param \DateTime|null $recurrence_dtend recurrence_dtend + * + * @return self + */ + public function setRecurrenceDtend($recurrence_dtend) { + if (is_null($recurrence_dtend)) { + $this->openApiNullablesSetToNull['recurrence_dtend'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_dtend'])) { + unset($nullablesSetToNull['recurrence_dtend']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_dtend'] = $recurrence_dtend; + + return $this; + } + + /** + * Gets recurrence_until + * + * @return \DateTime|null + */ + public function getRecurrenceUntil() { + return $this->container['recurrence_until']; + } + + /** + * Sets recurrence_until + * + * @param \DateTime|null $recurrence_until recurrence_until + * + * @return self + */ + public function setRecurrenceUntil($recurrence_until) { + if (is_null($recurrence_until)) { + $this->openApiNullablesSetToNull['recurrence_until'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recurrence_until'])) { + unset($nullablesSetToNull['recurrence_until']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recurrence_until'] = $recurrence_until; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids What employees are assigned to this shift? + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + + /** + * Gets unpublished_changes + * + * @return mixed|null + */ + public function getUnpublishedChanges() { + return $this->container['unpublished_changes']; + } + + /** + * Sets unpublished_changes + * + * @param mixed|null $unpublished_changes The pending changes that have not been published. Only accepts null to clear unpublished changes. + * + * @return self + */ + public function setUnpublishedChanges($unpublished_changes) { + if (is_null($unpublished_changes)) { + $this->openApiNullablesSetToNull['unpublished_changes'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unpublished_changes'])) { + unset($nullablesSetToNull['unpublished_changes']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unpublished_changes'] = $unpublished_changes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.php b/lib/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.php new file mode 100644 index 00000000..2fdb1f55 --- /dev/null +++ b/lib/Model/SendEmployeeVerificationLifecycleEmailByUserRequest.php @@ -0,0 +1,425 @@ +<?php +declare(strict_types=1); +/** + * SendEmployeeVerificationLifecycleEmailByUserRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SendEmployeeVerificationLifecycleEmailByUserRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SendEmployeeVerificationLifecycleEmailByUserRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'send_employee_verification_lifecycle_email_by_user_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'email_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'email_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'email_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email_type' => 'emailType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email_type' => 'setEmailType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email_type' => 'getEmailType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const EMAIL_TYPE_SIGNUP_SURVEY = 'signup_survey'; + public const EMAIL_TYPE_APP_INSTALLED = 'app_installed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEmailTypeAllowableValues() { + return [ + self::EMAIL_TYPE_SIGNUP_SURVEY, + self::EMAIL_TYPE_APP_INSTALLED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('email_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['email_type'] === null) { + $invalidProperties[] = "'email_type' can't be null"; + } + $allowedValues = $this->getEmailTypeAllowableValues(); + if (!is_null($this->container['email_type']) && !in_array($this->container['email_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'email_type', must be one of '%s'", + $this->container['email_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets email_type + * + * @return string + */ + public function getEmailType() { + return $this->container['email_type']; + } + + /** + * Sets email_type + * + * @param string $email_type Which employee verification lifecycle email to send; must be {@see EverifyEmailType::SIGNUP_SURVEY} or {@see EverifyEmailType::APP_INSTALLED} (string values `signup_survey`, `app_installed`). + * + * @return self + */ + public function setEmailType($email_type) { + if (is_null($email_type)) { + throw new \InvalidArgumentException('non-nullable email_type cannot be null'); + } + $allowedValues = $this->getEmailTypeAllowableValues(); + if (!in_array($email_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'email_type', must be one of '%s'", + $email_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['email_type'] = $email_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SendRecommendationsResponse.php b/lib/Model/SendRecommendationsResponse.php new file mode 100644 index 00000000..c2bfdf9d --- /dev/null +++ b/lib/Model/SendRecommendationsResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * SendRecommendationsResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SendRecommendationsResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SendRecommendationsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'SendRecommendationsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SetBreakPolicyEmployeesRequest.php b/lib/Model/SetBreakPolicyEmployeesRequest.php new file mode 100644 index 00000000..867b6aea --- /dev/null +++ b/lib/Model/SetBreakPolicyEmployeesRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * SetBreakPolicyEmployeesRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SetBreakPolicyEmployeesRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SetBreakPolicyEmployeesRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'set_break_policy_employees_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return int[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[] $employee_ids Array of employee IDs to assign to the break policy. Replaces all existing assignments. + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SetTotalRewardsCustomDisclaimerRequest.php b/lib/Model/SetTotalRewardsCustomDisclaimerRequest.php new file mode 100644 index 00000000..08c332d9 --- /dev/null +++ b/lib/Model/SetTotalRewardsCustomDisclaimerRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * SetTotalRewardsCustomDisclaimerRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SetTotalRewardsCustomDisclaimerRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SetTotalRewardsCustomDisclaimerRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'set_total_rewards_custom_disclaimer_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'custom_disclaimer' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'custom_disclaimer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'custom_disclaimer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'custom_disclaimer' => 'customDisclaimer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'custom_disclaimer' => 'setCustomDisclaimer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'custom_disclaimer' => 'getCustomDisclaimer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('custom_disclaimer', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['custom_disclaimer'] === null) { + $invalidProperties[] = "'custom_disclaimer' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets custom_disclaimer + * + * @return string + */ + public function getCustomDisclaimer() { + return $this->container['custom_disclaimer']; + } + + /** + * Sets custom_disclaimer + * + * @param string $custom_disclaimer Custom disclaimer text. + * + * @return self + */ + public function setCustomDisclaimer($custom_disclaimer) { + if (is_null($custom_disclaimer)) { + throw new \InvalidArgumentException('non-nullable custom_disclaimer cannot be null'); + } + $this->container['custom_disclaimer'] = $custom_disclaimer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/SetTotalRewardsOnboardingStepRequest.php b/lib/Model/SetTotalRewardsOnboardingStepRequest.php new file mode 100644 index 00000000..ac2c346f --- /dev/null +++ b/lib/Model/SetTotalRewardsOnboardingStepRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * SetTotalRewardsOnboardingStepRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * SetTotalRewardsOnboardingStepRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class SetTotalRewardsOnboardingStepRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'set_total_rewards_onboarding_step_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'completed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'completed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'completed' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'completed' => 'completed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'completed' => 'setCompleted' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'completed' => 'getCompleted' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('completed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['completed'] === null) { + $invalidProperties[] = "'completed' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets completed + * + * @return bool + */ + public function getCompleted() { + return $this->container['completed']; + } + + /** + * Sets completed + * + * @param bool $completed Whether the step is completed. + * + * @return self + */ + public function setCompleted($completed) { + if (is_null($completed)) { + throw new \InvalidArgumentException('non-nullable completed cannot be null'); + } + $this->container['completed'] = $completed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingCategoryList.php b/lib/Model/ShareOptionsResponse.php similarity index 89% rename from lib/Model/TrainingCategoryList.php rename to lib/Model/ShareOptionsResponse.php index bf0cd460..0bf0a823 100644 --- a/lib/Model/TrainingCategoryList.php +++ b/lib/Model/ShareOptionsResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TrainingCategoryList + * ShareOptionsResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TrainingCategoryList Class Doc Comment + * ShareOptionsResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TrainingCategoryList implements ModelInterface, ArrayAccess, \JsonSerializable { +class ShareOptionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TrainingCategoryList implements ModelInterface, ArrayAccess, \JsonSerializ * * @var string */ - protected static $openApiModelName = 'TrainingCategoryList'; + protected static $openApiModelName = 'ShareOptionsResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class TrainingCategoryList implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openApiTypes = [ - 'category_id' => '\BhrSdk\Model\TrainingCategory' + 'persons' => '\BhrSdk\Model\PersonInfoApiTransformer[]' ]; /** @@ -68,7 +68,7 @@ class TrainingCategoryList implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'category_id' => null + 'persons' => null ]; /** @@ -78,7 +78,7 @@ class TrainingCategoryList implements ModelInterface, ArrayAccess, \JsonSerializ * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'category_id' => false + 'persons' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'category_id' => 'categoryId' + 'persons' => 'persons' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'category_id' => 'setCategoryId' + 'persons' => 'setPersons' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'category_id' => 'getCategoryId' + 'persons' => 'getPersons' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('category_id', $data ?? [], null); + $this->setIfExists('persons', $data ?? [], null); } /** @@ -277,26 +277,26 @@ public function valid() { } /** - * Gets category_id + * Gets persons * - * @return \BhrSdk\Model\TrainingCategory|null + * @return \BhrSdk\Model\PersonInfoApiTransformer[]|null */ - public function getCategoryId() { - return $this->container['category_id']; + public function getPersons() { + return $this->container['persons']; } /** - * Sets category_id + * Sets persons * - * @param \BhrSdk\Model\TrainingCategory|null $category_id category_id + * @param \BhrSdk\Model\PersonInfoApiTransformer[]|null $persons List of employees with whom goals can be shared. * * @return self */ - public function setCategoryId($category_id) { - if (is_null($category_id)) { - throw new \InvalidArgumentException('non-nullable category_id cannot be null'); + public function setPersons($persons) { + if (is_null($persons)) { + throw new \InvalidArgumentException('non-nullable persons cannot be null'); } - $this->container['category_id'] = $category_id; + $this->container['persons'] = $persons; return $this; } diff --git a/lib/Model/StateProvinceResponseSchema.php b/lib/Model/StateProvinceResponseSchema.php index 2e2b3c66..3fe08c03 100644 --- a/lib/Model/StateProvinceResponseSchema.php +++ b/lib/Model/StateProvinceResponseSchema.php @@ -36,7 +36,7 @@ * StateProvinceResponseSchema Class Doc Comment * * @category Class - * @description Schema for states/provinces response + * @description Response from `GET /api/v1/meta/provinces/{countryId}`. The `options` list is sorted by `label` (subdivision abbreviation). * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -289,7 +289,7 @@ public function getOptions() { /** * Sets options * - * @param \BhrSdk\Model\StateProvinceSchema[]|null $options Array of state/province options + * @param \BhrSdk\Model\StateProvinceSchema[]|null $options Subdivisions for the requested `countryId`. Each object matches StateProvinceSchema; `label` is the subdivision abbreviation, `name` the full name, `iso` the ISO 3166-2 code. * * @return self */ diff --git a/lib/Model/StateProvinceSchema.php b/lib/Model/StateProvinceSchema.php index 9a8b767f..e60fedee 100644 --- a/lib/Model/StateProvinceSchema.php +++ b/lib/Model/StateProvinceSchema.php @@ -36,7 +36,7 @@ * StateProvinceSchema Class Doc Comment * * @category Class - * @description Schema for state/province data + * @description One state or province (subdivision) row. The same field meanings as each element of `StateProvinceResponseSchema.options` from `GET /api/v1/meta/provinces/{countryId}`. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -335,7 +335,7 @@ public function getLabel() { /** * Sets label * - * @param string|null $label State/province abbreviation + * @param string|null $label Subdivision abbreviation (e.g. \"UT\" for Utah). This is the short code used in `options[].label`, not the full name (see `name`). * * @return self */ @@ -360,7 +360,7 @@ public function getIso() { /** * Sets iso * - * @param string|null $iso ISO code for the state/province + * @param string|null $iso ISO 3166-2 subdivision code (e.g. \"US-UT\" for Utah). * * @return self */ @@ -385,7 +385,7 @@ public function getName() { /** * Sets name * - * @param string|null $name Full name of the state/province + * @param string|null $name Full subdivision name (e.g. \"Utah\"), distinct from the abbreviation in `label`. * * @return self */ diff --git a/lib/Model/TableRowDeleteResponse.php b/lib/Model/TableRowDeleteResponse.php index 824888f4..96c80e4a 100644 --- a/lib/Model/TableRowDeleteResponse.php +++ b/lib/Model/TableRowDeleteResponse.php @@ -36,6 +36,7 @@ * TableRowDeleteResponse Class Doc Comment * * @category Class + * @description Response from deleting an employee table row. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,7 +58,8 @@ class TableRowDeleteResponse implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openApiTypes = [ - 'sucess' => 'bool' + 'success' => 'bool', + 'error' => 'string' ]; /** @@ -68,7 +70,8 @@ class TableRowDeleteResponse implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'sucess' => null + 'success' => null, + 'error' => null ]; /** @@ -78,7 +81,8 @@ class TableRowDeleteResponse implements ModelInterface, ArrayAccess, \JsonSerial * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'sucess' => false + 'success' => false, + 'error' => false ]; /** @@ -163,7 +167,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'sucess' => 'sucess' + 'success' => 'success', + 'error' => 'error' ]; /** @@ -172,7 +177,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'sucess' => 'setSucess' + 'success' => 'setSuccess', + 'error' => 'setError' ]; /** @@ -181,7 +187,8 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'sucess' => 'getSucess' + 'success' => 'getSuccess', + 'error' => 'getError' ]; /** @@ -235,7 +242,8 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('sucess', $data ?? [], null); + $this->setIfExists('success', $data ?? [], null); + $this->setIfExists('error', $data ?? [], null); } /** @@ -277,26 +285,51 @@ public function valid() { } /** - * Gets sucess + * Gets success * * @return bool|null */ - public function getSucess() { - return $this->container['sucess']; + public function getSuccess() { + return $this->container['success']; } /** - * Sets sucess + * Sets success * - * @param bool|null $sucess sucess + * @param bool|null $success Whether the row was successfully deleted. * * @return self */ - public function setSucess($sucess) { - if (is_null($sucess)) { - throw new \InvalidArgumentException('non-nullable sucess cannot be null'); + public function setSuccess($success) { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); } - $this->container['sucess'] = $sucess; + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets error + * + * @return string|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string|null $error Error message when success is false. Absent when success is true. + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; return $this; } diff --git a/lib/Model/TableRowUpdate.php b/lib/Model/TableRowUpdate.php index e5cd5651..d1ce8926 100644 --- a/lib/Model/TableRowUpdate.php +++ b/lib/Model/TableRowUpdate.php @@ -36,6 +36,7 @@ * TableRowUpdate Class Doc Comment * * @category Class + * @description A dictionary of table field names and values for creating or updating a row in an employee table. The listed properties are common examples, but accepted fields depend on the specific table being targeted. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,12 +58,13 @@ class TableRowUpdate implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'date' => 'string', + 'date' => '\DateTime', 'location' => 'string', 'division' => 'string', 'department' => 'string', 'job_title' => 'string', - 'reports_to' => 'string' + 'reports_to' => 'string', + 'teams' => 'string[]' ]; /** @@ -73,12 +75,13 @@ class TableRowUpdate implements ModelInterface, ArrayAccess, \JsonSerializable { * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'date' => null, + 'date' => 'date', 'location' => null, 'division' => null, 'department' => null, 'job_title' => null, - 'reports_to' => null + 'reports_to' => null, + 'teams' => null ]; /** @@ -93,7 +96,8 @@ class TableRowUpdate implements ModelInterface, ArrayAccess, \JsonSerializable { 'division' => false, 'department' => false, 'job_title' => false, - 'reports_to' => false + 'reports_to' => false, + 'teams' => false ]; /** @@ -183,7 +187,8 @@ public function isNullableSetToNull(string $property): bool { 'division' => 'division', 'department' => 'department', 'job_title' => 'jobTitle', - 'reports_to' => 'reportsTo' + 'reports_to' => 'reportsTo', + 'teams' => 'teams' ]; /** @@ -197,7 +202,8 @@ public function isNullableSetToNull(string $property): bool { 'division' => 'setDivision', 'department' => 'setDepartment', 'job_title' => 'setJobTitle', - 'reports_to' => 'setReportsTo' + 'reports_to' => 'setReportsTo', + 'teams' => 'setTeams' ]; /** @@ -211,7 +217,8 @@ public function isNullableSetToNull(string $property): bool { 'division' => 'getDivision', 'department' => 'getDepartment', 'job_title' => 'getJobTitle', - 'reports_to' => 'getReportsTo' + 'reports_to' => 'getReportsTo', + 'teams' => 'getTeams' ]; /** @@ -271,6 +278,7 @@ public function __construct(?array $data = null) { $this->setIfExists('department', $data ?? [], null); $this->setIfExists('job_title', $data ?? [], null); $this->setIfExists('reports_to', $data ?? [], null); + $this->setIfExists('teams', $data ?? [], null); } /** @@ -314,7 +322,7 @@ public function valid() { /** * Gets date * - * @return string|null + * @return \DateTime|null */ public function getDate() { return $this->container['date']; @@ -323,7 +331,7 @@ public function getDate() { /** * Sets date * - * @param string|null $date date + * @param \DateTime|null $date The effective date for the row in YYYY-MM-DD format. * * @return self */ @@ -348,7 +356,7 @@ public function getLocation() { /** * Sets location * - * @param string|null $location location + * @param string|null $location The employee location value for the row. * * @return self */ @@ -373,7 +381,7 @@ public function getDivision() { /** * Sets division * - * @param string|null $division division + * @param string|null $division The division value for the row. * * @return self */ @@ -398,7 +406,7 @@ public function getDepartment() { /** * Sets department * - * @param string|null $department department + * @param string|null $department The department value for the row. * * @return self */ @@ -423,7 +431,7 @@ public function getJobTitle() { /** * Sets job_title * - * @param string|null $job_title job_title + * @param string|null $job_title The job title value for the row. * * @return self */ @@ -448,7 +456,7 @@ public function getReportsTo() { /** * Sets reports_to * - * @param string|null $reports_to reports_to + * @param string|null $reports_to The manager or reports-to value for the row. * * @return self */ @@ -460,6 +468,31 @@ public function setReportsTo($reports_to) { return $this; } + + /** + * Gets teams + * + * @return string[]|null + */ + public function getTeams() { + return $this->container['teams']; + } + + /** + * Sets teams + * + * @param string[]|null $teams Team values associated with the row. + * + * @return self + */ + public function setTeams($teams) { + if (is_null($teams)) { + throw new \InvalidArgumentException('non-nullable teams cannot be null'); + } + $this->container['teams'] = $teams; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TabularField.php b/lib/Model/TabularField.php new file mode 100644 index 00000000..b97d0d66 --- /dev/null +++ b/lib/Model/TabularField.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * TabularField + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TabularField Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TabularField implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TabularField'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'alias' => 'string', + 'fields' => '\BhrSdk\Model\TabularFieldFieldsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'alias' => null, + 'fields' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'alias' => false, + 'fields' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'alias' => 'alias', + 'fields' => 'fields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'alias' => 'setAlias', + 'fields' => 'setFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'alias' => 'getAlias', + 'fields' => 'getFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('fields', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets alias + * + * @return string|null + */ + public function getAlias() { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string|null $alias The API alias for the table (e.g., jobInfo, compensation). + * + * @return self + */ + public function setAlias($alias) { + if (is_null($alias)) { + throw new \InvalidArgumentException('non-nullable alias cannot be null'); + } + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets fields + * + * @return \BhrSdk\Model\TabularFieldFieldsInner[]|null + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param \BhrSdk\Model\TabularFieldFieldsInner[]|null $fields The fields in this table. + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/AddTrainingTypeRequestCategory.php b/lib/Model/TabularFieldFieldsInner.php similarity index 85% rename from lib/Model/AddTrainingTypeRequestCategory.php rename to lib/Model/TabularFieldFieldsInner.php index abab2efb..761fb864 100644 --- a/lib/Model/AddTrainingTypeRequestCategory.php +++ b/lib/Model/TabularFieldFieldsInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * AddTrainingTypeRequestCategory + * TabularFieldFieldsInner * * PHP version 8.1 * @@ -33,16 +33,15 @@ use \BhrSdk\ObjectSerializer; /** - * AddTrainingTypeRequestCategory Class Doc Comment + * TabularFieldFieldsInner Class Doc Comment * * @category Class - * @description The category is optional and you can pass either a category id or a category name. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class AddTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \JsonSerializable { +class TabularFieldFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +49,7 @@ class AddTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openApiModelName = 'add_training_type_request_category'; + protected static $openApiModelName = 'TabularField_fields_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -60,8 +59,8 @@ class AddTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \Js protected static $openApiTypes = [ 'id' => 'int', 'name' => 'string', - 'accuracy' => 'int', - 'address' => 'string' + 'alias' => 'string', + 'type' => 'string' ]; /** @@ -74,8 +73,8 @@ class AddTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \Js protected static $openApiFormats = [ 'id' => null, 'name' => null, - 'accuracy' => null, - 'address' => null + 'alias' => null, + 'type' => null ]; /** @@ -87,8 +86,8 @@ class AddTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, \Js protected static array $openApiNullables = [ 'id' => false, 'name' => false, - 'accuracy' => false, - 'address' => false + 'alias' => false, + 'type' => false ]; /** @@ -175,8 +174,8 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'accuracy' => 'accuracy', - 'address' => 'address' + 'alias' => 'alias', + 'type' => 'type' ]; /** @@ -187,8 +186,8 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'accuracy' => 'setAccuracy', - 'address' => 'setAddress' + 'alias' => 'setAlias', + 'type' => 'setType' ]; /** @@ -199,8 +198,8 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'accuracy' => 'getAccuracy', - 'address' => 'getAddress' + 'alias' => 'getAlias', + 'type' => 'getType' ]; /** @@ -256,8 +255,8 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('accuracy', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,7 +309,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Category ID + * @param int|null $id The field ID. * * @return self */ @@ -335,7 +334,7 @@ public function getName() { /** * Sets name * - * @param string|null $name Category Name + * @param string|null $name The display name of the field. * * @return self */ @@ -349,51 +348,51 @@ public function setName($name) { } /** - * Gets accuracy + * Gets alias * - * @return int|null + * @return string|null */ - public function getAccuracy() { - return $this->container['accuracy']; + public function getAlias() { + return $this->container['alias']; } /** - * Sets accuracy + * Sets alias * - * @param int|null $accuracy Accuracy in meters of the clock in location + * @param string|null $alias The API alias for the field within this table. * * @return self */ - public function setAccuracy($accuracy) { - if (is_null($accuracy)) { - throw new \InvalidArgumentException('non-nullable accuracy cannot be null'); + public function setAlias($alias) { + if (is_null($alias)) { + throw new \InvalidArgumentException('non-nullable alias cannot be null'); } - $this->container['accuracy'] = $accuracy; + $this->container['alias'] = $alias; return $this; } /** - * Gets address + * Gets type * * @return string|null */ - public function getAddress() { - return $this->container['address']; + public function getType() { + return $this->container['type']; } /** - * Sets address + * Sets type * - * @param string|null $address Address... + * @param string|null $type The data type of the field (e.g., text, date, list). * * @return self */ - public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['address'] = $address; + $this->container['type'] = $type; return $this; } diff --git a/lib/Model/TimeOffBalanceEntry.php b/lib/Model/TimeOffBalanceEntry.php new file mode 100644 index 00000000..63201245 --- /dev/null +++ b/lib/Model/TimeOffBalanceEntry.php @@ -0,0 +1,616 @@ +<?php +declare(strict_types=1); +/** + * TimeOffBalanceEntry + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffBalanceEntry Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffBalanceEntry implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffBalanceEntry'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_type' => 'string', + 'name' => 'string', + 'units' => 'string', + 'balance' => 'string', + 'end' => '\DateTime', + 'policy_type' => 'string', + 'used_year_to_date' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_type' => null, + 'name' => null, + 'units' => null, + 'balance' => null, + 'end' => 'date', + 'policy_type' => null, + 'used_year_to_date' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_type' => false, + 'name' => false, + 'units' => false, + 'balance' => false, + 'end' => false, + 'policy_type' => false, + 'used_year_to_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_type' => 'timeOffType', + 'name' => 'name', + 'units' => 'units', + 'balance' => 'balance', + 'end' => 'end', + 'policy_type' => 'policyType', + 'used_year_to_date' => 'usedYearToDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_type' => 'setTimeOffType', + 'name' => 'setName', + 'units' => 'setUnits', + 'balance' => 'setBalance', + 'end' => 'setEnd', + 'policy_type' => 'setPolicyType', + 'used_year_to_date' => 'setUsedYearToDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_type' => 'getTimeOffType', + 'name' => 'getName', + 'units' => 'getUnits', + 'balance' => 'getBalance', + 'end' => 'getEnd', + 'policy_type' => 'getPolicyType', + 'used_year_to_date' => 'getUsedYearToDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const POLICY_TYPE_ACCRUING = 'accruing'; + public const POLICY_TYPE_DISCRETIONARY = 'discretionary'; + public const POLICY_TYPE_MANUAL = 'manual'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPolicyTypeAllowableValues() { + return [ + self::POLICY_TYPE_ACCRUING, + self::POLICY_TYPE_DISCRETIONARY, + self::POLICY_TYPE_MANUAL, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_type', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('units', $data ?? [], null); + $this->setIfExists('balance', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('policy_type', $data ?? [], null); + $this->setIfExists('used_year_to_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getPolicyTypeAllowableValues(); + if (!is_null($this->container['policy_type']) && !in_array($this->container['policy_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'policy_type', must be one of '%s'", + $this->container['policy_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_type + * + * @return string|null + */ + public function getTimeOffType() { + return $this->container['time_off_type']; + } + + /** + * Sets time_off_type + * + * @param string|null $time_off_type The ID of the time off type. + * + * @return self + */ + public function setTimeOffType($time_off_type) { + if (is_null($time_off_type)) { + throw new \InvalidArgumentException('non-nullable time_off_type cannot be null'); + } + $this->container['time_off_type'] = $time_off_type; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the time off type. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets units + * + * @return string|null + */ + public function getUnits() { + return $this->container['units']; + } + + /** + * Sets units + * + * @param string|null $units The unit of measurement for the balance (e.g. 'hours' or 'days'). + * + * @return self + */ + public function setUnits($units) { + if (is_null($units)) { + throw new \InvalidArgumentException('non-nullable units cannot be null'); + } + $this->container['units'] = $units; + + return $this; + } + + /** + * Gets balance + * + * @return string|null + */ + public function getBalance() { + return $this->container['balance']; + } + + /** + * Sets balance + * + * @param string|null $balance The calculated time off balance as of the specified date, rounded using `precision`. + * + * @return self + */ + public function setBalance($balance) { + if (is_null($balance)) { + throw new \InvalidArgumentException('non-nullable balance cannot be null'); + } + $this->container['balance'] = $balance; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime|null + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime|null $end The date the balance was calculated as of, in YYYY-MM-DD format. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets policy_type + * + * @return string|null + */ + public function getPolicyType() { + return $this->container['policy_type']; + } + + /** + * Sets policy_type + * + * @param string|null $policy_type The type of time off policy assigned to the employee for this time off type. + * + * @return self + */ + public function setPolicyType($policy_type) { + if (is_null($policy_type)) { + throw new \InvalidArgumentException('non-nullable policy_type cannot be null'); + } + $allowedValues = $this->getPolicyTypeAllowableValues(); + if (!in_array($policy_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'policy_type', must be one of '%s'", + $policy_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['policy_type'] = $policy_type; + + return $this; + } + + /** + * Gets used_year_to_date + * + * @return string|null + */ + public function getUsedYearToDate() { + return $this->container['used_year_to_date']; + } + + /** + * Sets used_year_to_date + * + * @param string|null $used_year_to_date The amount of time off used year-to-date as of the specified date, rounded using `precision`. + * + * @return self + */ + public function setUsedYearToDate($used_year_to_date) { + if (is_null($used_year_to_date)) { + throw new \InvalidArgumentException('non-nullable used_year_to_date cannot be null'); + } + $this->container['used_year_to_date'] = $used_year_to_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffHistory.php b/lib/Model/TimeOffHistory.php index 268708a7..04f7d555 100644 --- a/lib/Model/TimeOffHistory.php +++ b/lib/Model/TimeOffHistory.php @@ -57,8 +57,11 @@ class TimeOffHistory implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'date' => 'string', + 'date' => '\DateTime', + 'event_type' => 'string', 'time_off_request_id' => 'int', + 'time_off_type_id' => 'int', + 'amount' => 'float', 'note' => 'string' ]; @@ -70,8 +73,11 @@ class TimeOffHistory implements ModelInterface, ArrayAccess, \JsonSerializable { * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'date' => null, + 'date' => 'date', + 'event_type' => null, 'time_off_request_id' => null, + 'time_off_type_id' => null, + 'amount' => null, 'note' => null ]; @@ -83,7 +89,10 @@ class TimeOffHistory implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static array $openApiNullables = [ 'date' => false, + 'event_type' => false, 'time_off_request_id' => false, + 'time_off_type_id' => false, + 'amount' => false, 'note' => false ]; @@ -170,7 +179,10 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'date' => 'date', + 'event_type' => 'eventType', 'time_off_request_id' => 'timeOffRequestId', + 'time_off_type_id' => 'timeOffTypeId', + 'amount' => 'amount', 'note' => 'note' ]; @@ -181,7 +193,10 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'date' => 'setDate', + 'event_type' => 'setEventType', 'time_off_request_id' => 'setTimeOffRequestId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'amount' => 'setAmount', 'note' => 'setNote' ]; @@ -192,7 +207,10 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'date' => 'getDate', + 'event_type' => 'getEventType', 'time_off_request_id' => 'getTimeOffRequestId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'amount' => 'getAmount', 'note' => 'getNote' ]; @@ -233,6 +251,21 @@ public function getModelName() { return self::$openApiModelName; } + public const EVENT_TYPE_USED = 'used'; + public const EVENT_TYPE_OVERRIDE = 'override'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventTypeAllowableValues() { + return [ + self::EVENT_TYPE_USED, + self::EVENT_TYPE_OVERRIDE, + ]; + } + /** * Associative array for storing property values * @@ -248,7 +281,10 @@ public function getModelName() { */ public function __construct(?array $data = null) { $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('event_type', $data ?? [], null); $this->setIfExists('time_off_request_id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('note', $data ?? [], null); } @@ -280,9 +316,15 @@ public function listInvalidProperties() { if ($this->container['date'] === null) { $invalidProperties[] = "'date' can't be null"; } - if ($this->container['time_off_request_id'] === null) { - $invalidProperties[] = "'time_off_request_id' can't be null"; + $allowedValues = $this->getEventTypeAllowableValues(); + if (!is_null($this->container['event_type']) && !in_array($this->container['event_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'event_type', must be one of '%s'", + $this->container['event_type'], + implode("', '", $allowedValues) + ); } + return $invalidProperties; } @@ -299,7 +341,7 @@ public function valid() { /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { return $this->container['date']; @@ -308,7 +350,7 @@ public function getDate() { /** * Sets date * - * @param string $date The date the request should be added in history. This will usually be the first date of the request. Should be in ISO8601 date format (YYYY-MM-DD). + * @param \DateTime $date The date for the history item in YYYY-MM-DD format. * * @return self */ @@ -321,10 +363,45 @@ public function setDate($date) { return $this; } + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType() { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The type of history event. Defaults to `used` for the /history path and `override` for the /balance_adjustment path when omitted. + * + * @return self + */ + public function setEventType($event_type) { + if (is_null($event_type)) { + throw new \InvalidArgumentException('non-nullable event_type cannot be null'); + } + $allowedValues = $this->getEventTypeAllowableValues(); + if (!in_array($event_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'event_type', must be one of '%s'", + $event_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['event_type'] = $event_type; + + return $this; + } + /** * Gets time_off_request_id * - * @return int + * @return int|null */ public function getTimeOffRequestId() { return $this->container['time_off_request_id']; @@ -333,7 +410,7 @@ public function getTimeOffRequestId() { /** * Sets time_off_request_id * - * @param int $time_off_request_id The ID of the time off request. + * @param int|null $time_off_request_id The ID of an approved time off request. Required when eventType is `used`. * * @return self */ @@ -346,6 +423,56 @@ public function setTimeOffRequestId($time_off_request_id) { return $this; } + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type. Required when eventType is `override`. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount The number of hours/days to record. Required when eventType is `override`. + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + /** * Gets note * @@ -358,7 +485,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note This is an optional note to show in history. + * @param string|null $note An optional note to show in history. * * @return self */ diff --git a/lib/Model/TimeOffPolicy.php b/lib/Model/TimeOffPolicy.php new file mode 100644 index 00000000..9db90eb5 --- /dev/null +++ b/lib/Model/TimeOffPolicy.php @@ -0,0 +1,558 @@ +<?php +declare(strict_types=1); +/** + * TimeOffPolicy + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffPolicy Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffPolicy implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffPolicy'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'time_off_type_id' => 'int', + 'name' => 'string', + 'effective_date' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'time_off_type_id' => null, + 'name' => null, + 'effective_date' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'time_off_type_id' => false, + 'name' => false, + 'effective_date' => true, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'time_off_type_id' => 'timeOffTypeId', + 'name' => 'name', + 'effective_date' => 'effectiveDate', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'time_off_type_id' => 'setTimeOffTypeId', + 'name' => 'setName', + 'effective_date' => 'setEffectiveDate', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'time_off_type_id' => 'getTimeOffTypeId', + 'name' => 'getName', + 'effective_date' => 'getEffectiveDate', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_ACCRUING = 'accruing'; + public const TYPE_DISCRETIONARY = 'discretionary'; + public const TYPE_MANUAL = 'manual'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_ACCRUING, + self::TYPE_DISCRETIONARY, + self::TYPE_MANUAL, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('time_off_type_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('effective_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The policy ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets time_off_type_id + * + * @return int|null + */ + public function getTimeOffTypeId() { + return $this->container['time_off_type_id']; + } + + /** + * Sets time_off_type_id + * + * @param int|null $time_off_type_id The ID of the time off type this policy belongs to. + * + * @return self + */ + public function setTimeOffTypeId($time_off_type_id) { + if (is_null($time_off_type_id)) { + throw new \InvalidArgumentException('non-nullable time_off_type_id cannot be null'); + } + $this->container['time_off_type_id'] = $time_off_type_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The policy name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets effective_date + * + * @return string|null + */ + public function getEffectiveDate() { + return $this->container['effective_date']; + } + + /** + * Sets effective_date + * + * @param string|null $effective_date effective_date + * + * @return self + */ + public function setEffectiveDate($effective_date) { + if (is_null($effective_date)) { + $this->openApiNullablesSetToNull['effective_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['effective_date'])) { + unset($nullablesSetToNull['effective_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['effective_date'] = $effective_date; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The policy type. + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffRequest.php b/lib/Model/TimeOffRequest.php index ef5033d5..d871970d 100644 --- a/lib/Model/TimeOffRequest.php +++ b/lib/Model/TimeOffRequest.php @@ -58,10 +58,11 @@ class TimeOffRequest implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiTypes = [ 'status' => 'string', - 'start' => 'string', - 'end' => 'string', + 'start' => '\DateTime', + 'end' => '\DateTime', 'time_off_type_id' => 'int', - 'amount' => 'int', + 'amount' => 'float', + 'previous_request' => 'int', 'notes' => '\BhrSdk\Model\TimeOffRequestNotesInner[]', 'dates' => '\BhrSdk\Model\TimeOffRequestDatesInner[]' ]; @@ -75,10 +76,11 @@ class TimeOffRequest implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiFormats = [ 'status' => null, - 'start' => null, - 'end' => null, + 'start' => 'date', + 'end' => 'date', 'time_off_type_id' => null, 'amount' => null, + 'previous_request' => null, 'notes' => null, 'dates' => null ]; @@ -95,6 +97,7 @@ class TimeOffRequest implements ModelInterface, ArrayAccess, \JsonSerializable { 'end' => false, 'time_off_type_id' => false, 'amount' => false, + 'previous_request' => false, 'notes' => false, 'dates' => false ]; @@ -186,6 +189,7 @@ public function isNullableSetToNull(string $property): bool { 'end' => 'end', 'time_off_type_id' => 'timeOffTypeId', 'amount' => 'amount', + 'previous_request' => 'previousRequest', 'notes' => 'notes', 'dates' => 'dates' ]; @@ -201,6 +205,7 @@ public function isNullableSetToNull(string $property): bool { 'end' => 'setEnd', 'time_off_type_id' => 'setTimeOffTypeId', 'amount' => 'setAmount', + 'previous_request' => 'setPreviousRequest', 'notes' => 'setNotes', 'dates' => 'setDates' ]; @@ -216,6 +221,7 @@ public function isNullableSetToNull(string $property): bool { 'end' => 'getEnd', 'time_off_type_id' => 'getTimeOffTypeId', 'amount' => 'getAmount', + 'previous_request' => 'getPreviousRequest', 'notes' => 'getNotes', 'dates' => 'getDates' ]; @@ -257,6 +263,25 @@ public function getModelName() { return self::$openApiModelName; } + public const STATUS_APPROVED = 'approved'; + public const STATUS_DENIED = 'denied'; + public const STATUS_DECLINED = 'declined'; + public const STATUS_REQUESTED = 'requested'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_APPROVED, + self::STATUS_DENIED, + self::STATUS_DECLINED, + self::STATUS_REQUESTED, + ]; + } + /** * Associative array for storing property values * @@ -276,6 +301,7 @@ public function __construct(?array $data = null) { $this->setIfExists('end', $data ?? [], null); $this->setIfExists('time_off_type_id', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('previous_request', $data ?? [], null); $this->setIfExists('notes', $data ?? [], null); $this->setIfExists('dates', $data ?? [], null); } @@ -305,6 +331,27 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['start'] === null) { + $invalidProperties[] = "'start' can't be null"; + } + if ($this->container['end'] === null) { + $invalidProperties[] = "'end' can't be null"; + } + if ($this->container['time_off_type_id'] === null) { + $invalidProperties[] = "'time_off_type_id' can't be null"; + } return $invalidProperties; } @@ -321,7 +368,7 @@ public function valid() { /** * Gets status * - * @return string|null + * @return string */ public function getStatus() { return $this->container['status']; @@ -330,7 +377,7 @@ public function getStatus() { /** * Sets status * - * @param string|null $status status + * @param string $status The initial status of the request. * * @return self */ @@ -338,6 +385,16 @@ public function setStatus($status) { if (is_null($status)) { throw new \InvalidArgumentException('non-nullable status cannot be null'); } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; @@ -346,7 +403,7 @@ public function setStatus($status) { /** * Gets start * - * @return string|null + * @return \DateTime */ public function getStart() { return $this->container['start']; @@ -355,7 +412,7 @@ public function getStart() { /** * Sets start * - * @param string|null $start start + * @param \DateTime $start Start date in YYYY-MM-DD format. * * @return self */ @@ -371,7 +428,7 @@ public function setStart($start) { /** * Gets end * - * @return string|null + * @return \DateTime */ public function getEnd() { return $this->container['end']; @@ -380,7 +437,7 @@ public function getEnd() { /** * Sets end * - * @param string|null $end end + * @param \DateTime $end End date in YYYY-MM-DD format. Must be on or after the start date. * * @return self */ @@ -396,7 +453,7 @@ public function setEnd($end) { /** * Gets time_off_type_id * - * @return int|null + * @return int */ public function getTimeOffTypeId() { return $this->container['time_off_type_id']; @@ -405,7 +462,7 @@ public function getTimeOffTypeId() { /** * Sets time_off_type_id * - * @param int|null $time_off_type_id time_off_type_id + * @param int $time_off_type_id The ID of the time off type for this request. * * @return self */ @@ -421,7 +478,7 @@ public function setTimeOffTypeId($time_off_type_id) { /** * Gets amount * - * @return int|null + * @return float|null */ public function getAmount() { return $this->container['amount']; @@ -430,7 +487,7 @@ public function getAmount() { /** * Sets amount * - * @param int|null $amount amount + * @param float|null $amount Total hours or days requested. Ignored when `dates` array is provided (sum of daily amounts is used instead). * * @return self */ @@ -443,6 +500,31 @@ public function setAmount($amount) { return $this; } + /** + * Gets previous_request + * + * @return int|null + */ + public function getPreviousRequest() { + return $this->container['previous_request']; + } + + /** + * Sets previous_request + * + * @param int|null $previous_request The ID of a previous time off request to supersede. The previous request will be cancelled. + * + * @return self + */ + public function setPreviousRequest($previous_request) { + if (is_null($previous_request)) { + throw new \InvalidArgumentException('non-nullable previous_request cannot be null'); + } + $this->container['previous_request'] = $previous_request; + + return $this; + } + /** * Gets notes * @@ -455,7 +537,7 @@ public function getNotes() { /** * Sets notes * - * @param \BhrSdk\Model\TimeOffRequestNotesInner[]|null $notes notes + * @param \BhrSdk\Model\TimeOffRequestNotesInner[]|null $notes Optional notes from the employee or manager. * * @return self */ @@ -480,7 +562,7 @@ public function getDates() { /** * Sets dates * - * @param \BhrSdk\Model\TimeOffRequestDatesInner[]|null $dates dates + * @param \BhrSdk\Model\TimeOffRequestDatesInner[]|null $dates Optional per-day breakdown. When provided, the top-level `amount` is ignored and the sum of daily amounts is used. * * @return self */ diff --git a/lib/Model/TimeOffRequest1.php b/lib/Model/TimeOffRequest1.php new file mode 100644 index 00000000..4fba7670 --- /dev/null +++ b/lib/Model/TimeOffRequest1.php @@ -0,0 +1,740 @@ +<?php +declare(strict_types=1); +/** + * TimeOffRequest1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffRequest1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffRequest1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffRequest_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'employee_id' => 'int', + 'name' => 'string', + 'start' => '\DateTime', + 'end' => '\DateTime', + 'created' => '\DateTime', + 'status' => '\BhrSdk\Model\TimeOffRequest1Status', + 'type' => '\BhrSdk\Model\TimeOffRequest1Type', + 'amount' => '\BhrSdk\Model\TimeOffRequest1Amount', + 'actions' => '\BhrSdk\Model\TimeOffRequest1Actions', + 'dates' => 'array<string,float>', + 'notes' => '\BhrSdk\Model\TimeOffRequest1Notes' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'name' => null, + 'start' => 'date', + 'end' => 'date', + 'created' => 'date', + 'status' => null, + 'type' => null, + 'amount' => null, + 'actions' => null, + 'dates' => null, + 'notes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'employee_id' => false, + 'name' => false, + 'start' => false, + 'end' => false, + 'created' => false, + 'status' => false, + 'type' => false, + 'amount' => false, + 'actions' => false, + 'dates' => false, + 'notes' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'name' => 'name', + 'start' => 'start', + 'end' => 'end', + 'created' => 'created', + 'status' => 'status', + 'type' => 'type', + 'amount' => 'amount', + 'actions' => 'actions', + 'dates' => 'dates', + 'notes' => 'notes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'name' => 'setName', + 'start' => 'setStart', + 'end' => 'setEnd', + 'created' => 'setCreated', + 'status' => 'setStatus', + 'type' => 'setType', + 'amount' => 'setAmount', + 'actions' => 'setActions', + 'dates' => 'setDates', + 'notes' => 'setNotes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'name' => 'getName', + 'start' => 'getStart', + 'end' => 'getEnd', + 'created' => 'getCreated', + 'status' => 'getStatus', + 'type' => 'getType', + 'amount' => 'getAmount', + 'actions' => 'getActions', + 'dates' => 'getDates', + 'notes' => 'getNotes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('created', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('actions', $data ?? [], null); + $this->setIfExists('dates', $data ?? [], null); + $this->setIfExists('notes', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The time off request ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The ID of the employee. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The employee's full name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime|null + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime|null $start The start date of the request in YYYY-MM-DD format. + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime|null + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime|null $end The end date of the request in YYYY-MM-DD format. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime|null + */ + public function getCreated() { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime|null $created The date the request was created in YYYY-MM-DD format (company timezone). + * + * @return self + */ + public function setCreated($created) { + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); + } + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets status + * + * @return \BhrSdk\Model\TimeOffRequest1Status|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \BhrSdk\Model\TimeOffRequest1Status|null $status status + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return \BhrSdk\Model\TimeOffRequest1Type|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \BhrSdk\Model\TimeOffRequest1Type|null $type type + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets amount + * + * @return \BhrSdk\Model\TimeOffRequest1Amount|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \BhrSdk\Model\TimeOffRequest1Amount|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets actions + * + * @return \BhrSdk\Model\TimeOffRequest1Actions|null + */ + public function getActions() { + return $this->container['actions']; + } + + /** + * Sets actions + * + * @param \BhrSdk\Model\TimeOffRequest1Actions|null $actions actions + * + * @return self + */ + public function setActions($actions) { + if (is_null($actions)) { + throw new \InvalidArgumentException('non-nullable actions cannot be null'); + } + $this->container['actions'] = $actions; + + return $this; + } + + /** + * Gets dates + * + * @return array<string,float>|null + */ + public function getDates() { + return $this->container['dates']; + } + + /** + * Sets dates + * + * @param array<string,float>|null $dates A map of dates (YYYY-MM-DD) to daily amounts. + * + * @return self + */ + public function setDates($dates) { + if (is_null($dates)) { + throw new \InvalidArgumentException('non-nullable dates cannot be null'); + } + $this->container['dates'] = $dates; + + return $this; + } + + /** + * Gets notes + * + * @return \BhrSdk\Model\TimeOffRequest1Notes|null + */ + public function getNotes() { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param \BhrSdk\Model\TimeOffRequest1Notes|null $notes notes + * + * @return self + */ + public function setNotes($notes) { + if (is_null($notes)) { + throw new \InvalidArgumentException('non-nullable notes cannot be null'); + } + $this->container['notes'] = $notes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffRequest1Actions.php b/lib/Model/TimeOffRequest1Actions.php new file mode 100644 index 00000000..c490b2a6 --- /dev/null +++ b/lib/Model/TimeOffRequest1Actions.php @@ -0,0 +1,549 @@ +<?php +declare(strict_types=1); +/** + * TimeOffRequest1Actions + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffRequest1Actions Class Doc Comment + * + * @category Class + * @description Actions the current user can perform on this request. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffRequest1Actions implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffRequest_1_actions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'view' => 'bool', + 'edit' => 'bool', + 'cancel' => 'bool', + 'approve' => 'bool', + 'deny' => 'bool', + 'bypass' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'view' => null, + 'edit' => null, + 'cancel' => null, + 'approve' => null, + 'deny' => null, + 'bypass' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'view' => false, + 'edit' => false, + 'cancel' => false, + 'approve' => false, + 'deny' => false, + 'bypass' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'view' => 'view', + 'edit' => 'edit', + 'cancel' => 'cancel', + 'approve' => 'approve', + 'deny' => 'deny', + 'bypass' => 'bypass' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'view' => 'setView', + 'edit' => 'setEdit', + 'cancel' => 'setCancel', + 'approve' => 'setApprove', + 'deny' => 'setDeny', + 'bypass' => 'setBypass' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'view' => 'getView', + 'edit' => 'getEdit', + 'cancel' => 'getCancel', + 'approve' => 'getApprove', + 'deny' => 'getDeny', + 'bypass' => 'getBypass' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('view', $data ?? [], null); + $this->setIfExists('edit', $data ?? [], null); + $this->setIfExists('cancel', $data ?? [], null); + $this->setIfExists('approve', $data ?? [], null); + $this->setIfExists('deny', $data ?? [], null); + $this->setIfExists('bypass', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets view + * + * @return bool|null + */ + public function getView() { + return $this->container['view']; + } + + /** + * Sets view + * + * @param bool|null $view Whether the user can view this request. + * + * @return self + */ + public function setView($view) { + if (is_null($view)) { + throw new \InvalidArgumentException('non-nullable view cannot be null'); + } + $this->container['view'] = $view; + + return $this; + } + + /** + * Gets edit + * + * @return bool|null + */ + public function getEdit() { + return $this->container['edit']; + } + + /** + * Sets edit + * + * @param bool|null $edit Whether the user can edit this request. + * + * @return self + */ + public function setEdit($edit) { + if (is_null($edit)) { + throw new \InvalidArgumentException('non-nullable edit cannot be null'); + } + $this->container['edit'] = $edit; + + return $this; + } + + /** + * Gets cancel + * + * @return bool|null + */ + public function getCancel() { + return $this->container['cancel']; + } + + /** + * Sets cancel + * + * @param bool|null $cancel Whether the user can cancel this request. + * + * @return self + */ + public function setCancel($cancel) { + if (is_null($cancel)) { + throw new \InvalidArgumentException('non-nullable cancel cannot be null'); + } + $this->container['cancel'] = $cancel; + + return $this; + } + + /** + * Gets approve + * + * @return bool|null + */ + public function getApprove() { + return $this->container['approve']; + } + + /** + * Sets approve + * + * @param bool|null $approve Whether the user can approve this request. + * + * @return self + */ + public function setApprove($approve) { + if (is_null($approve)) { + throw new \InvalidArgumentException('non-nullable approve cannot be null'); + } + $this->container['approve'] = $approve; + + return $this; + } + + /** + * Gets deny + * + * @return bool|null + */ + public function getDeny() { + return $this->container['deny']; + } + + /** + * Sets deny + * + * @param bool|null $deny Whether the user can deny this request. + * + * @return self + */ + public function setDeny($deny) { + if (is_null($deny)) { + throw new \InvalidArgumentException('non-nullable deny cannot be null'); + } + $this->container['deny'] = $deny; + + return $this; + } + + /** + * Gets bypass + * + * @return bool|null + */ + public function getBypass() { + return $this->container['bypass']; + } + + /** + * Sets bypass + * + * @param bool|null $bypass Whether the user can bypass the approval workflow. + * + * @return self + */ + public function setBypass($bypass) { + if (is_null($bypass)) { + throw new \InvalidArgumentException('non-nullable bypass cannot be null'); + } + $this->container['bypass'] = $bypass; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffRequest1Amount.php b/lib/Model/TimeOffRequest1Amount.php new file mode 100644 index 00000000..50a4f2f7 --- /dev/null +++ b/lib/Model/TimeOffRequest1Amount.php @@ -0,0 +1,455 @@ +<?php +declare(strict_types=1); +/** + * TimeOffRequest1Amount + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffRequest1Amount Class Doc Comment + * + * @category Class + * @description The amount of time off requested. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffRequest1Amount implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffRequest_1_amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'unit' => 'string', + 'amount' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'unit' => null, + 'amount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'unit' => false, + 'amount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'unit' => 'unit', + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'unit' => 'setUnit', + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'unit' => 'getUnit', + 'amount' => 'getAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const UNIT_HOURS = 'hours'; + public const UNIT_DAYS = 'days'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnitAllowableValues() { + return [ + self::UNIT_HOURS, + self::UNIT_DAYS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('unit', $data ?? [], null); + $this->setIfExists('amount', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getUnitAllowableValues(); + if (!is_null($this->container['unit']) && !in_array($this->container['unit'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'unit', must be one of '%s'", + $this->container['unit'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets unit + * + * @return string|null + */ + public function getUnit() { + return $this->container['unit']; + } + + /** + * Sets unit + * + * @param string|null $unit The unit of measurement. + * + * @return self + */ + public function setUnit($unit) { + if (is_null($unit)) { + throw new \InvalidArgumentException('non-nullable unit cannot be null'); + } + $allowedValues = $this->getUnitAllowableValues(); + if (!in_array($unit, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'unit', must be one of '%s'", + $unit, + implode("', '", $allowedValues) + ) + ); + } + $this->container['unit'] = $unit; + + return $this; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount The total amount requested. + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffRequest1Notes.php b/lib/Model/TimeOffRequest1Notes.php new file mode 100644 index 00000000..f84f72f1 --- /dev/null +++ b/lib/Model/TimeOffRequest1Notes.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * TimeOffRequest1Notes + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffRequest1Notes Class Doc Comment + * + * @category Class + * @description Notes from employee and/or manager. Omitted when `excludeNote` is set. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffRequest1Notes implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffRequest_1_notes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee' => 'string', + 'manager' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee' => null, + 'manager' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee' => false, + 'manager' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee' => 'employee', + 'manager' => 'manager' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee' => 'setEmployee', + 'manager' => 'setManager' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee' => 'getEmployee', + 'manager' => 'getManager' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('manager', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee + * + * @return string|null + */ + public function getEmployee() { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param string|null $employee Note from the employee. + * + * @return self + */ + public function setEmployee($employee) { + if (is_null($employee)) { + throw new \InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + + /** + * Gets manager + * + * @return string|null + */ + public function getManager() { + return $this->container['manager']; + } + + /** + * Sets manager + * + * @param string|null $manager Note from the manager. + * + * @return self + */ + public function setManager($manager) { + if (is_null($manager)) { + throw new \InvalidArgumentException('non-nullable manager cannot be null'); + } + $this->container['manager'] = $manager; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffRequest1Status.php b/lib/Model/TimeOffRequest1Status.php new file mode 100644 index 00000000..f2b0a946 --- /dev/null +++ b/lib/Model/TimeOffRequest1Status.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * TimeOffRequest1Status + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffRequest1Status Class Doc Comment + * + * @category Class + * @description The current status of the request. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffRequest1Status implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeOffRequest_1_status'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'last_changed' => '\DateTime', + 'last_changed_by_user_id' => 'int', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'last_changed' => 'date', + 'last_changed_by_user_id' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'last_changed' => false, + 'last_changed_by_user_id' => false, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'last_changed' => 'lastChanged', + 'last_changed_by_user_id' => 'lastChangedByUserId', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'last_changed' => 'setLastChanged', + 'last_changed_by_user_id' => 'setLastChangedByUserId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'last_changed' => 'getLastChanged', + 'last_changed_by_user_id' => 'getLastChangedByUserId', + '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() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('last_changed', $data ?? [], null); + $this->setIfExists('last_changed_by_user_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets last_changed + * + * @return \DateTime|null + */ + public function getLastChanged() { + return $this->container['last_changed']; + } + + /** + * Sets last_changed + * + * @param \DateTime|null $last_changed The date the status was last changed (company timezone). + * + * @return self + */ + public function setLastChanged($last_changed) { + if (is_null($last_changed)) { + throw new \InvalidArgumentException('non-nullable last_changed cannot be null'); + } + $this->container['last_changed'] = $last_changed; + + return $this; + } + + /** + * Gets last_changed_by_user_id + * + * @return int|null + */ + public function getLastChangedByUserId() { + return $this->container['last_changed_by_user_id']; + } + + /** + * Sets last_changed_by_user_id + * + * @param int|null $last_changed_by_user_id The user ID who last changed the status. + * + * @return self + */ + public function setLastChangedByUserId($last_changed_by_user_id) { + if (is_null($last_changed_by_user_id)) { + throw new \InvalidArgumentException('non-nullable last_changed_by_user_id cannot be null'); + } + $this->container['last_changed_by_user_id'] = $last_changed_by_user_id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status value. + * + * @return self + */ + public function setStatus($status) { + 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 string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingRecordSchemaProject.php b/lib/Model/TimeOffRequest1Type.php similarity index 89% rename from lib/Model/TimeTrackingRecordSchemaProject.php rename to lib/Model/TimeOffRequest1Type.php index 4cea4e0d..db1e1a39 100644 --- a/lib/Model/TimeTrackingRecordSchemaProject.php +++ b/lib/Model/TimeOffRequest1Type.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TimeTrackingRecordSchemaProject + * TimeOffRequest1Type * * PHP version 8.1 * @@ -33,16 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * TimeTrackingRecordSchemaProject Class Doc Comment + * TimeOffRequest1Type Class Doc Comment * * @category Class - * @description Project information associated with this time tracking record + * @description The time off type for this request. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TimeTrackingRecordSchemaProject implements ModelInterface, ArrayAccess, \JsonSerializable { +class TimeOffRequest1Type implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -50,7 +50,7 @@ class TimeTrackingRecordSchemaProject implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openApiModelName = 'TimeTrackingRecordSchema_project'; + protected static $openApiModelName = 'TimeOffRequest_1_type'; /** * Array of property to type mappings. Used for (de)serialization @@ -60,7 +60,7 @@ class TimeTrackingRecordSchemaProject implements ModelInterface, ArrayAccess, \J protected static $openApiTypes = [ 'id' => 'int', 'name' => 'string', - 'task' => '\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask' + 'icon' => 'string' ]; /** @@ -73,7 +73,7 @@ class TimeTrackingRecordSchemaProject implements ModelInterface, ArrayAccess, \J protected static $openApiFormats = [ 'id' => null, 'name' => null, - 'task' => null + 'icon' => null ]; /** @@ -85,7 +85,7 @@ class TimeTrackingRecordSchemaProject implements ModelInterface, ArrayAccess, \J protected static array $openApiNullables = [ 'id' => false, 'name' => false, - 'task' => false + 'icon' => false ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'task' => 'task' + 'icon' => 'icon' ]; /** @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool { protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'task' => 'setTask' + 'icon' => 'setIcon' ]; /** @@ -194,7 +194,7 @@ public function isNullableSetToNull(string $property): bool { protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'task' => 'getTask' + 'icon' => 'getIcon' ]; /** @@ -250,7 +250,7 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('task', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); } /** @@ -303,7 +303,7 @@ public function getId() { /** * Sets id * - * @param int|null $id Project information + * @param int|null $id The time off type ID. * * @return self */ @@ -328,7 +328,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name The time off type name. * * @return self */ @@ -342,26 +342,26 @@ public function setName($name) { } /** - * Gets task + * Gets icon * - * @return \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask|null + * @return string|null */ - public function getTask() { - return $this->container['task']; + public function getIcon() { + return $this->container['icon']; } /** - * Sets task + * Sets icon * - * @param \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask|null $task task + * @param string|null $icon The icon name for the time off type. * * @return self */ - public function setTask($task) { - if (is_null($task)) { - throw new \InvalidArgumentException('non-nullable task cannot be null'); + public function setIcon($icon) { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); } - $this->container['task'] = $task; + $this->container['icon'] = $icon; return $this; } diff --git a/lib/Model/TimeOffRequestDatesInner.php b/lib/Model/TimeOffRequestDatesInner.php index 0fe9699b..af8c202c 100644 --- a/lib/Model/TimeOffRequestDatesInner.php +++ b/lib/Model/TimeOffRequestDatesInner.php @@ -57,8 +57,8 @@ class TimeOffRequestDatesInner implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openApiTypes = [ - 'ymd' => 'string', - 'amount' => 'int' + 'ymd' => '\DateTime', + 'amount' => 'float' ]; /** @@ -69,7 +69,7 @@ class TimeOffRequestDatesInner implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'ymd' => null, + 'ymd' => 'date', 'amount' => null ]; @@ -286,7 +286,7 @@ public function valid() { /** * Gets ymd * - * @return string|null + * @return \DateTime|null */ public function getYmd() { return $this->container['ymd']; @@ -295,7 +295,7 @@ public function getYmd() { /** * Sets ymd * - * @param string|null $ymd ymd + * @param \DateTime|null $ymd Date in YYYY-MM-DD format. * * @return self */ @@ -311,7 +311,7 @@ public function setYmd($ymd) { /** * Gets amount * - * @return int|null + * @return float|null */ public function getAmount() { return $this->container['amount']; @@ -320,7 +320,7 @@ public function getAmount() { /** * Sets amount * - * @param int|null $amount amount + * @param float|null $amount Hours or days for this date. * * @return self */ diff --git a/lib/Model/TimeOffRequestNotesInner.php b/lib/Model/TimeOffRequestNotesInner.php index fed4d1eb..b288333d 100644 --- a/lib/Model/TimeOffRequestNotesInner.php +++ b/lib/Model/TimeOffRequestNotesInner.php @@ -227,6 +227,21 @@ public function getModelName() { return self::$openApiModelName; } + public const FROM_EMPLOYEE = 'employee'; + public const FROM_MANAGER = 'manager'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFromAllowableValues() { + return [ + self::FROM_EMPLOYEE, + self::FROM_MANAGER, + ]; + } + /** * Associative array for storing property values * @@ -270,6 +285,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getFromAllowableValues(); + if (!is_null($this->container['from']) && !in_array($this->container['from'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'from', must be one of '%s'", + $this->container['from'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -295,7 +319,7 @@ public function getFrom() { /** * Sets from * - * @param string|null $from from + * @param string|null $from Who the note is from. * * @return self */ @@ -303,6 +327,16 @@ public function setFrom($from) { if (is_null($from)) { throw new \InvalidArgumentException('non-nullable from cannot be null'); } + $allowedValues = $this->getFromAllowableValues(); + if (!in_array($from, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'from', must be one of '%s'", + $from, + implode("', '", $allowedValues) + ) + ); + } $this->container['from'] = $from; return $this; @@ -320,7 +354,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note note + * @param string|null $note The note text. * * @return self */ diff --git a/lib/Model/TimeOffTypesAndDefaultHours.php b/lib/Model/TimeOffTypesAndDefaultHours.php new file mode 100644 index 00000000..b46075aa --- /dev/null +++ b/lib/Model/TimeOffTypesAndDefaultHours.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * TimeOffTypesAndDefaultHours + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffTypesAndDefaultHours Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffTypesAndDefaultHours implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Time_Off_Types_and_Default_Hours'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'time_off_types' => '\BhrSdk\Model\TimeOffTypesAndDefaultHoursTimeOffTypesInner[]', + 'default_hours' => '\BhrSdk\Model\TimeOffTypesAndDefaultHoursDefaultHoursInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'time_off_types' => null, + 'default_hours' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'time_off_types' => false, + 'default_hours' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'time_off_types' => 'timeOffTypes', + 'default_hours' => 'defaultHours' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'time_off_types' => 'setTimeOffTypes', + 'default_hours' => 'setDefaultHours' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'time_off_types' => 'getTimeOffTypes', + 'default_hours' => 'getDefaultHours' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('time_off_types', $data ?? [], null); + $this->setIfExists('default_hours', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['time_off_types'] === null) { + $invalidProperties[] = "'time_off_types' can't be null"; + } + if ($this->container['default_hours'] === null) { + $invalidProperties[] = "'default_hours' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets time_off_types + * + * @return \BhrSdk\Model\TimeOffTypesAndDefaultHoursTimeOffTypesInner[] + */ + public function getTimeOffTypes() { + return $this->container['time_off_types']; + } + + /** + * Sets time_off_types + * + * @param \BhrSdk\Model\TimeOffTypesAndDefaultHoursTimeOffTypesInner[] $time_off_types time_off_types + * + * @return self + */ + public function setTimeOffTypes($time_off_types) { + if (is_null($time_off_types)) { + throw new \InvalidArgumentException('non-nullable time_off_types cannot be null'); + } + $this->container['time_off_types'] = $time_off_types; + + return $this; + } + + /** + * Gets default_hours + * + * @return \BhrSdk\Model\TimeOffTypesAndDefaultHoursDefaultHoursInner[] + */ + public function getDefaultHours() { + return $this->container['default_hours']; + } + + /** + * Sets default_hours + * + * @param \BhrSdk\Model\TimeOffTypesAndDefaultHoursDefaultHoursInner[] $default_hours default_hours + * + * @return self + */ + public function setDefaultHours($default_hours) { + if (is_null($default_hours)) { + throw new \InvalidArgumentException('non-nullable default_hours cannot be null'); + } + $this->container['default_hours'] = $default_hours; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.php b/lib/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.php new file mode 100644 index 00000000..ec3a7635 --- /dev/null +++ b/lib/Model/TimeOffTypesAndDefaultHoursDefaultHoursInner.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * TimeOffTypesAndDefaultHoursDefaultHoursInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffTypesAndDefaultHoursDefaultHoursInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffTypesAndDefaultHoursDefaultHoursInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Time_Off_Types_and_Default_Hours_defaultHours_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'amount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'amount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'amount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'amount' => 'getAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('amount', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Day of week + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets amount + * + * @return string + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount Default hours for the day. Returned as a stringified decimal value. + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.php b/lib/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.php new file mode 100644 index 00000000..b422c929 --- /dev/null +++ b/lib/Model/TimeOffTypesAndDefaultHoursTimeOffTypesInner.php @@ -0,0 +1,645 @@ +<?php +declare(strict_types=1); +/** + * TimeOffTypesAndDefaultHoursTimeOffTypesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeOffTypesAndDefaultHoursTimeOffTypesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeOffTypesAndDefaultHoursTimeOffTypesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'Time_Off_Types_and_Default_Hours_timeOffTypes_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'units' => 'string', + 'color' => 'string', + 'icon' => 'string', + 'source' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'units' => null, + 'color' => null, + 'icon' => null, + 'source' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'units' => false, + 'color' => true, + 'icon' => true, + 'source' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'units' => 'units', + 'color' => 'color', + 'icon' => 'icon', + 'source' => 'source' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'units' => 'setUnits', + 'color' => 'setColor', + 'icon' => 'setIcon', + 'source' => 'setSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'units' => 'getUnits', + 'color' => 'getColor', + 'icon' => 'getIcon', + 'source' => 'getSource' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const UNITS_HOURS = 'hours'; + public const UNITS_DAYS = 'days'; + public const SOURCE_INTERNAL = 'internal'; + public const SOURCE_REMOTE = 'remote'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnitsAllowableValues() { + return [ + self::UNITS_HOURS, + self::UNITS_DAYS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() { + return [ + self::SOURCE_INTERNAL, + self::SOURCE_REMOTE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('units', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('source', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['units'] === null) { + $invalidProperties[] = "'units' can't be null"; + } + $allowedValues = $this->getUnitsAllowableValues(); + if (!is_null($this->container['units']) && !in_array($this->container['units'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'units', must be one of '%s'", + $this->container['units'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['color'] === null) { + $invalidProperties[] = "'color' can't be null"; + } + if ($this->container['icon'] === null) { + $invalidProperties[] = "'icon' can't be null"; + } + if ($this->container['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Time off type ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Time off type name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets units + * + * @return string + */ + public function getUnits() { + return $this->container['units']; + } + + /** + * Sets units + * + * @param string $units Units for time off + * + * @return self + */ + public function setUnits($units) { + if (is_null($units)) { + throw new \InvalidArgumentException('non-nullable units cannot be null'); + } + $allowedValues = $this->getUnitsAllowableValues(); + if (!in_array($units, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'units', must be one of '%s'", + $units, + implode("', '", $allowedValues) + ) + ); + } + $this->container['units'] = $units; + + return $this; + } + + /** + * Gets color + * + * @return string + */ + public function getColor() { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string $color color + * + * @return self + */ + public function setColor($color) { + if (is_null($color)) { + $this->openApiNullablesSetToNull['color'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['color'])) { + unset($nullablesSetToNull['color']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets icon + * + * @return string + */ + public function getIcon() { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string $icon icon + * + * @return self + */ + public function setIcon($icon) { + if (is_null($icon)) { + $this->openApiNullablesSetToNull['icon'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['icon'])) { + unset($nullablesSetToNull['icon']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source Source of the time off type + * + * @return self + */ + public function setSource($source) { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.php b/lib/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.php new file mode 100644 index 00000000..04cfded1 --- /dev/null +++ b/lib/Model/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.php @@ -0,0 +1,473 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingBreakPolicyEmployeeCollectionV1Inner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingBreakPolicyEmployeeCollectionV1Inner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingBreakPolicyEmployeeCollectionV1Inner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_BreakPolicyEmployeeCollection_V1_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string', + 'photo_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'photo_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => true, + 'photo_url' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'photo_url' => 'photoUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'photo_url' => 'setPhotoUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'photo_url' => 'getPhotoUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('photo_url', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['photo_url'] === null) { + $invalidProperties[] = "'photo_url' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The employee ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets photo_url + * + * @return string + */ + public function getPhotoUrl() { + return $this->container['photo_url']; + } + + /** + * Sets photo_url + * + * @param string $photo_url photo_url + * + * @return self + */ + public function setPhotoUrl($photo_url) { + if (is_null($photo_url)) { + $this->openApiNullablesSetToNull['photo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['photo_url'])) { + unset($nullablesSetToNull['photo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['photo_url'] = $photo_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1.php b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1.php new file mode 100644 index 00000000..68be99a5 --- /dev/null +++ b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingBreakPolicySuggestionsResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingBreakPolicySuggestionsResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingBreakPolicySuggestionsResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_BreakPolicySuggestionsResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'suggested_policies' => '\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'suggested_policies' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'suggested_policies' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'suggested_policies' => 'suggestedPolicies' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'suggested_policies' => 'setSuggestedPolicies' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'suggested_policies' => 'getSuggestedPolicies' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('suggested_policies', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets suggested_policies + * + * @return \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner[]|null + */ + public function getSuggestedPolicies() { + return $this->container['suggested_policies']; + } + + /** + * Sets suggested_policies + * + * @param \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner[]|null $suggested_policies suggested_policies + * + * @return self + */ + public function setSuggestedPolicies($suggested_policies) { + if (is_null($suggested_policies)) { + throw new \InvalidArgumentException('non-nullable suggested_policies cannot be null'); + } + $this->container['suggested_policies'] = $suggested_policies; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.php b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.php new file mode 100644 index 00000000..7504a64e --- /dev/null +++ b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.php @@ -0,0 +1,511 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_BreakPolicySuggestionsResponse_V1_suggestedPolicies_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'title' => 'string', + 'description' => 'string', + 'breaks' => '\BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'title' => null, + 'description' => null, + 'breaks' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'title' => true, + 'description' => true, + 'breaks' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'title' => 'title', + 'description' => 'description', + 'breaks' => 'breaks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'title' => 'setTitle', + 'description' => 'setDescription', + 'breaks' => 'setBreaks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'title' => 'getTitle', + 'description' => 'getDescription', + 'breaks' => 'getBreaks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('breaks', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ($this->container['breaks'] === null) { + $invalidProperties[] = "'breaks' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + $this->openApiNullablesSetToNull['title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['title'])) { + unset($nullablesSetToNull['title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets breaks + * + * @return \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner[] + */ + public function getBreaks() { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \BhrSdk\Model\TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner[] $breaks breaks + * + * @return self + */ + public function setBreaks($breaks) { + if (is_null($breaks)) { + throw new \InvalidArgumentException('non-nullable breaks cannot be null'); + } + $this->container['breaks'] = $breaks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.php b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.php new file mode 100644 index 00000000..584e4eb7 --- /dev/null +++ b/lib/Model/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.php @@ -0,0 +1,588 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_BreakPolicySuggestionsResponse_V1_suggestedPolicies_inner_breaks_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'duration' => 'int', + 'paid' => 'bool', + 'availability_type' => 'string', + 'availability_min_hours_worked' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'duration' => null, + 'paid' => null, + 'availability_type' => null, + 'availability_min_hours_worked' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => true, + 'duration' => true, + 'paid' => true, + 'availability_type' => false, + 'availability_min_hours_worked' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'duration' => 'duration', + 'paid' => 'paid', + 'availability_type' => 'availabilityType', + 'availability_min_hours_worked' => 'availabilityMinHoursWorked' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'duration' => 'setDuration', + 'paid' => 'setPaid', + 'availability_type' => 'setAvailabilityType', + 'availability_min_hours_worked' => 'setAvailabilityMinHoursWorked' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'duration' => 'getDuration', + 'paid' => 'getPaid', + 'availability_type' => 'getAvailabilityType', + 'availability_min_hours_worked' => 'getAvailabilityMinHoursWorked' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('availability_min_hours_worked', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['duration'] === null) { + $invalidProperties[] = "'duration' can't be null"; + } + if ($this->container['paid'] === null) { + $invalidProperties[] = "'paid' can't be null"; + } + if ($this->container['availability_type'] === null) { + $invalidProperties[] = "'availability_type' can't be null"; + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets duration + * + * @return int + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int $duration duration + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + $this->openApiNullablesSetToNull['duration'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['duration'])) { + unset($nullablesSetToNull['duration']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets paid + * + * @return bool + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool $paid paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + $this->openApiNullablesSetToNull['paid'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['paid'])) { + unset($nullablesSetToNull['paid']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets availability_type + * + * @return string + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string $availability_type availability_type + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets availability_min_hours_worked + * + * @return float|null + */ + public function getAvailabilityMinHoursWorked() { + return $this->container['availability_min_hours_worked']; + } + + /** + * Sets availability_min_hours_worked + * + * @param float|null $availability_min_hours_worked availability_min_hours_worked + * + * @return self + */ + public function setAvailabilityMinHoursWorked($availability_min_hours_worked) { + if (is_null($availability_min_hours_worked)) { + $this->openApiNullablesSetToNull['availability_min_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_min_hours_worked'])) { + unset($nullablesSetToNull['availability_min_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_min_hours_worked'] = $availability_min_hours_worked; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingBulkResponseSchemaResponse.php b/lib/Model/TimeTrackingBulkResponseSchemaResponse.php index 2b83f02b..7dd1de84 100644 --- a/lib/Model/TimeTrackingBulkResponseSchemaResponse.php +++ b/lib/Model/TimeTrackingBulkResponseSchemaResponse.php @@ -321,7 +321,7 @@ public function getMessage() { /** * Sets message * - * @param string|null $message Response message, typically used for error details + * @param string|null $message message * * @return self */ diff --git a/lib/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.php b/lib/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.php new file mode 100644 index 00000000..7381faa8 --- /dev/null +++ b/lib/Model/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.php @@ -0,0 +1,711 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 Class Doc Comment + * + * @category Class + * @description Data contract for creating or updating a break + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'paid' => 'bool', + 'duration' => 'int', + 'availability_type' => 'string', + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'string', + 'availability_end_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'paid' => null, + 'duration' => null, + 'availability_type' => null, + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'time', + 'availability_end_time' => 'time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'name' => false, + 'paid' => false, + 'duration' => false, + 'availability_type' => false, + 'availability_min_hours_worked' => true, + 'availability_max_hours_worked' => true, + 'availability_start_time' => true, + 'availability_end_time' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'paid' => 'paid', + 'duration' => 'duration', + 'availability_type' => 'availabilityType', + 'availability_min_hours_worked' => 'availabilityMinHoursWorked', + 'availability_max_hours_worked' => 'availabilityMaxHoursWorked', + 'availability_start_time' => 'availabilityStartTime', + 'availability_end_time' => 'availabilityEndTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'paid' => 'setPaid', + 'duration' => 'setDuration', + 'availability_type' => 'setAvailabilityType', + 'availability_min_hours_worked' => 'setAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'setAvailabilityMaxHoursWorked', + 'availability_start_time' => 'setAvailabilityStartTime', + 'availability_end_time' => 'setAvailabilityEndTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'paid' => 'getPaid', + 'duration' => 'getDuration', + 'availability_type' => 'getAvailabilityType', + 'availability_min_hours_worked' => 'getAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'getAvailabilityMaxHoursWorked', + 'availability_start_time' => 'getAvailabilityStartTime', + 'availability_end_time' => 'getAvailabilityEndTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('availability_min_hours_worked', $data ?? [], null); + $this->setIfExists('availability_max_hours_worked', $data ?? [], null); + $this->setIfExists('availability_start_time', $data ?? [], null); + $this->setIfExists('availability_end_time', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the break + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets paid + * + * @return bool|null + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool|null $paid Whether the break is paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + throw new \InvalidArgumentException('non-nullable paid cannot be null'); + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets duration + * + * @return int|null + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int|null $duration Duration of the break in minutes + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + throw new \InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets availability_type + * + * @return string|null + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string|null $availability_type When the break is available to be taken + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets availability_min_hours_worked + * + * @return float|null + */ + public function getAvailabilityMinHoursWorked() { + return $this->container['availability_min_hours_worked']; + } + + /** + * Sets availability_min_hours_worked + * + * @param float|null $availability_min_hours_worked availability_min_hours_worked + * + * @return self + */ + public function setAvailabilityMinHoursWorked($availability_min_hours_worked) { + if (is_null($availability_min_hours_worked)) { + $this->openApiNullablesSetToNull['availability_min_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_min_hours_worked'])) { + unset($nullablesSetToNull['availability_min_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_min_hours_worked'] = $availability_min_hours_worked; + + return $this; + } + + /** + * Gets availability_max_hours_worked + * + * @return float|null + */ + public function getAvailabilityMaxHoursWorked() { + return $this->container['availability_max_hours_worked']; + } + + /** + * Sets availability_max_hours_worked + * + * @param float|null $availability_max_hours_worked availability_max_hours_worked + * + * @return self + */ + public function setAvailabilityMaxHoursWorked($availability_max_hours_worked) { + if (is_null($availability_max_hours_worked)) { + $this->openApiNullablesSetToNull['availability_max_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_max_hours_worked'])) { + unset($nullablesSetToNull['availability_max_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_max_hours_worked'] = $availability_max_hours_worked; + + return $this; + } + + /** + * Gets availability_start_time + * + * @return string|null + */ + public function getAvailabilityStartTime() { + return $this->container['availability_start_time']; + } + + /** + * Sets availability_start_time + * + * @param string|null $availability_start_time availability_start_time + * + * @return self + */ + public function setAvailabilityStartTime($availability_start_time) { + if (is_null($availability_start_time)) { + $this->openApiNullablesSetToNull['availability_start_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_start_time'])) { + unset($nullablesSetToNull['availability_start_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_start_time'] = $availability_start_time; + + return $this; + } + + /** + * Gets availability_end_time + * + * @return string|null + */ + public function getAvailabilityEndTime() { + return $this->container['availability_end_time']; + } + + /** + * Sets availability_end_time + * + * @param string|null $availability_end_time availability_end_time + * + * @return self + */ + public function setAvailabilityEndTime($availability_end_time) { + if (is_null($availability_end_time)) { + $this->openApiNullablesSetToNull['availability_end_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_end_time'])) { + unset($nullablesSetToNull['availability_end_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_end_time'] = $availability_end_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.php b/lib/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.php new file mode 100644 index 00000000..e345e29a --- /dev/null +++ b/lib/Model/TimeTrackingCreateTimeTrackingBreakPolicyV1.php @@ -0,0 +1,526 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingCreateTimeTrackingBreakPolicyV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingCreateTimeTrackingBreakPolicyV1 Class Doc Comment + * + * @category Class + * @description Data contract for creating a break policy + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingCreateTimeTrackingBreakPolicyV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-CreateTimeTrackingBreakPolicy-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'description' => 'string', + 'all_employees_assigned' => 'bool', + 'breaks' => '\BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'description' => null, + 'all_employees_assigned' => null, + 'breaks' => null, + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'description' => true, + 'all_employees_assigned' => false, + 'breaks' => false, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'breaks' => 'breaks', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'breaks' => 'setBreaks', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'breaks' => 'getBreaks', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('breaks', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the break policy + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all employees are assigned to this break policy + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets breaks + * + * @return \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]|null + */ + public function getBreaks() { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]|null $breaks Collection of time tracking breaks to create or update without a policy + * + * @return self + */ + public function setBreaks($breaks) { + if (is_null($breaks)) { + throw new \InvalidArgumentException('non-nullable breaks cannot be null'); + } + $this->container['breaks'] = $breaks; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids The employees that should be assigned to this policy + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingCreateTimeTrackingBreakV1.php b/lib/Model/TimeTrackingCreateTimeTrackingBreakV1.php new file mode 100644 index 00000000..89d5adbb --- /dev/null +++ b/lib/Model/TimeTrackingCreateTimeTrackingBreakV1.php @@ -0,0 +1,705 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingCreateTimeTrackingBreakV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingCreateTimeTrackingBreakV1 Class Doc Comment + * + * @category Class + * @description Data contract for creating a break + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingCreateTimeTrackingBreakV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-CreateTimeTrackingBreak-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'policy_id' => 'string', + 'paid' => 'bool', + 'duration' => 'int', + 'availability_type' => 'string', + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'string', + 'availability_end_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'policy_id' => 'uuid', + 'paid' => null, + 'duration' => null, + 'availability_type' => null, + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'time', + 'availability_end_time' => 'time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'policy_id' => false, + 'paid' => false, + 'duration' => false, + 'availability_type' => false, + 'availability_min_hours_worked' => true, + 'availability_max_hours_worked' => true, + 'availability_start_time' => true, + 'availability_end_time' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'policy_id' => 'policyId', + 'paid' => 'paid', + 'duration' => 'duration', + 'availability_type' => 'availabilityType', + 'availability_min_hours_worked' => 'availabilityMinHoursWorked', + 'availability_max_hours_worked' => 'availabilityMaxHoursWorked', + 'availability_start_time' => 'availabilityStartTime', + 'availability_end_time' => 'availabilityEndTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'policy_id' => 'setPolicyId', + 'paid' => 'setPaid', + 'duration' => 'setDuration', + 'availability_type' => 'setAvailabilityType', + 'availability_min_hours_worked' => 'setAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'setAvailabilityMaxHoursWorked', + 'availability_start_time' => 'setAvailabilityStartTime', + 'availability_end_time' => 'setAvailabilityEndTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'policy_id' => 'getPolicyId', + 'paid' => 'getPaid', + 'duration' => 'getDuration', + 'availability_type' => 'getAvailabilityType', + 'availability_min_hours_worked' => 'getAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'getAvailabilityMaxHoursWorked', + 'availability_start_time' => 'getAvailabilityStartTime', + 'availability_end_time' => 'getAvailabilityEndTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('policy_id', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('availability_min_hours_worked', $data ?? [], null); + $this->setIfExists('availability_max_hours_worked', $data ?? [], null); + $this->setIfExists('availability_start_time', $data ?? [], null); + $this->setIfExists('availability_end_time', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the break + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets policy_id + * + * @return string|null + */ + public function getPolicyId() { + return $this->container['policy_id']; + } + + /** + * Sets policy_id + * + * @param string|null $policy_id The unique identifier of the break policy this break belongs to + * + * @return self + */ + public function setPolicyId($policy_id) { + if (is_null($policy_id)) { + throw new \InvalidArgumentException('non-nullable policy_id cannot be null'); + } + $this->container['policy_id'] = $policy_id; + + return $this; + } + + /** + * Gets paid + * + * @return bool|null + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool|null $paid Whether the break is paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + throw new \InvalidArgumentException('non-nullable paid cannot be null'); + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets duration + * + * @return int|null + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int|null $duration Duration of the break in minutes + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + throw new \InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets availability_type + * + * @return string|null + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string|null $availability_type When the break is available to be taken + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets availability_min_hours_worked + * + * @return float|null + */ + public function getAvailabilityMinHoursWorked() { + return $this->container['availability_min_hours_worked']; + } + + /** + * Sets availability_min_hours_worked + * + * @param float|null $availability_min_hours_worked availability_min_hours_worked + * + * @return self + */ + public function setAvailabilityMinHoursWorked($availability_min_hours_worked) { + if (is_null($availability_min_hours_worked)) { + $this->openApiNullablesSetToNull['availability_min_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_min_hours_worked'])) { + unset($nullablesSetToNull['availability_min_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_min_hours_worked'] = $availability_min_hours_worked; + + return $this; + } + + /** + * Gets availability_max_hours_worked + * + * @return float|null + */ + public function getAvailabilityMaxHoursWorked() { + return $this->container['availability_max_hours_worked']; + } + + /** + * Sets availability_max_hours_worked + * + * @param float|null $availability_max_hours_worked availability_max_hours_worked + * + * @return self + */ + public function setAvailabilityMaxHoursWorked($availability_max_hours_worked) { + if (is_null($availability_max_hours_worked)) { + $this->openApiNullablesSetToNull['availability_max_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_max_hours_worked'])) { + unset($nullablesSetToNull['availability_max_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_max_hours_worked'] = $availability_max_hours_worked; + + return $this; + } + + /** + * Gets availability_start_time + * + * @return string|null + */ + public function getAvailabilityStartTime() { + return $this->container['availability_start_time']; + } + + /** + * Sets availability_start_time + * + * @param string|null $availability_start_time availability_start_time + * + * @return self + */ + public function setAvailabilityStartTime($availability_start_time) { + if (is_null($availability_start_time)) { + $this->openApiNullablesSetToNull['availability_start_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_start_time'])) { + unset($nullablesSetToNull['availability_start_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_start_time'] = $availability_start_time; + + return $this; + } + + /** + * Gets availability_end_time + * + * @return string|null + */ + public function getAvailabilityEndTime() { + return $this->container['availability_end_time']; + } + + /** + * Sets availability_end_time + * + * @param string|null $availability_end_time availability_end_time + * + * @return self + */ + public function setAvailabilityEndTime($availability_end_time) { + if (is_null($availability_end_time)) { + $this->openApiNullablesSetToNull['availability_end_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_end_time'])) { + unset($nullablesSetToNull['availability_end_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_end_time'] = $availability_end_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1.php b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1.php new file mode 100644 index 00000000..29c0b603 --- /dev/null +++ b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingOffsetPaginatedResponseDataV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingOffsetPaginatedResponseDataV1 Class Doc Comment + * + * @category Class + * @description Additional data for paginated responses + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingOffsetPaginatedResponseDataV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-OffsetPaginatedResponseData-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.php b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.php new file mode 100644 index 00000000..c576901d --- /dev/null +++ b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Links.php @@ -0,0 +1,439 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingOffsetPaginatedResponseDataV1Links + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingOffsetPaginatedResponseDataV1Links Class Doc Comment + * + * @category Class + * @description Pagination links + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingOffsetPaginatedResponseDataV1Links implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_OffsetPaginatedResponseData_V1__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'prev' => 'object', + 'next' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'prev' => null, + 'next' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'prev' => true, + 'next' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prev' => 'prev', + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prev' => 'setPrev', + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prev' => 'getPrev', + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('prev', $data ?? [], null); + $this->setIfExists('next', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['prev'] === null) { + $invalidProperties[] = "'prev' can't be null"; + } + if ($this->container['next'] === null) { + $invalidProperties[] = "'next' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets prev + * + * @return object + */ + public function getPrev() { + return $this->container['prev']; + } + + /** + * Sets prev + * + * @param object $prev prev + * + * @return self + */ + public function setPrev($prev) { + if (is_null($prev)) { + $this->openApiNullablesSetToNull['prev'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['prev'])) { + unset($nullablesSetToNull['prev']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['prev'] = $prev; + + return $this; + } + + /** + * Gets next + * + * @return object + */ + public function getNext() { + return $this->container['next']; + } + + /** + * Sets next + * + * @param object $next next + * + * @return self + */ + public function setNext($next) { + if (is_null($next)) { + $this->openApiNullablesSetToNull['next'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['next'])) { + unset($nullablesSetToNull['next']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.php b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.php new file mode 100644 index 00000000..b5d83d61 --- /dev/null +++ b/lib/Model/TimeTrackingOffsetPaginatedResponseDataV1Meta.php @@ -0,0 +1,462 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingOffsetPaginatedResponseDataV1Meta + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingOffsetPaginatedResponseDataV1Meta Class Doc Comment + * + * @category Class + * @description Pagination metadata + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingOffsetPaginatedResponseDataV1Meta implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_OffsetPaginatedResponseData_V1_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'total_items' => 'int', + 'offset' => 'int', + 'limit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'total_items' => null, + 'offset' => null, + 'limit' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'total_items' => false, + 'offset' => false, + 'limit' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'total_items' => 'totalItems', + 'offset' => 'offset', + 'limit' => 'limit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total_items' => 'setTotalItems', + 'offset' => 'setOffset', + 'limit' => 'setLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total_items' => 'getTotalItems', + 'offset' => 'getOffset', + 'limit' => 'getLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('total_items', $data ?? [], null); + $this->setIfExists('offset', $data ?? [], null); + $this->setIfExists('limit', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['total_items'] === null) { + $invalidProperties[] = "'total_items' can't be null"; + } + if ($this->container['offset'] === null) { + $invalidProperties[] = "'offset' can't be null"; + } + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets total_items + * + * @return int + */ + public function getTotalItems() { + return $this->container['total_items']; + } + + /** + * Sets total_items + * + * @param int $total_items total_items + * + * @return self + */ + public function setTotalItems($total_items) { + if (is_null($total_items)) { + throw new \InvalidArgumentException('non-nullable total_items cannot be null'); + } + $this->container['total_items'] = $total_items; + + return $this; + } + + /** + * Gets offset + * + * @return int + */ + public function getOffset() { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int $offset offset + * + * @return self + */ + public function setOffset($offset) { + if (is_null($offset)) { + throw new \InvalidArgumentException('non-nullable offset cannot be null'); + } + $this->container['offset'] = $offset; + + return $this; + } + + /** + * Gets limit + * + * @return int + */ + public function getLimit() { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int $limit limit + * + * @return self + */ + public function setLimit($limit) { + if (is_null($limit)) { + throw new \InvalidArgumentException('non-nullable limit cannot be null'); + } + $this->container['limit'] = $limit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.php b/lib/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.php new file mode 100644 index 00000000..31cf9882 --- /dev/null +++ b/lib/Model/TimeTrackingPaginatedBreakAssessmentsResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingPaginatedBreakAssessmentsResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingPaginatedBreakAssessmentsResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingPaginatedBreakAssessmentsResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_PaginatedBreakAssessmentsResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links', + 'data' => '\BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentV1[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentV1[]|null $data Collection of time tracking break assessments + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.php b/lib/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.php new file mode 100644 index 00000000..2e448630 --- /dev/null +++ b/lib/Model/TimeTrackingPaginatedBreakPoliciesResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingPaginatedBreakPoliciesResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingPaginatedBreakPoliciesResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingPaginatedBreakPoliciesResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_PaginatedBreakPoliciesResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links', + 'data' => '\BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\TimeTrackingTimeTrackingBreakPolicyV1[]|null $data Collection of time tracking break policies + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.php b/lib/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.php new file mode 100644 index 00000000..e72f0174 --- /dev/null +++ b/lib/Model/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_PaginatedBreakPolicyEmployeesResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links', + 'data' => '\BhrSdk\Model\TimeTrackingBreakPolicyEmployeeCollectionV1Inner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\TimeTrackingBreakPolicyEmployeeCollectionV1Inner[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\TimeTrackingBreakPolicyEmployeeCollectionV1Inner[]|null $data Employee data relevant for break policies + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingPaginatedBreaksResponseV1.php b/lib/Model/TimeTrackingPaginatedBreaksResponseV1.php new file mode 100644 index 00000000..22f86e45 --- /dev/null +++ b/lib/Model/TimeTrackingPaginatedBreaksResponseV1.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingPaginatedBreaksResponseV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingPaginatedBreaksResponseV1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingPaginatedBreaksResponseV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking_PaginatedBreaksResponse_V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'meta' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta', + '_links' => '\BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links', + 'data' => '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'meta' => null, + '_links' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'meta' => false, + '_links' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + '_links' => '_links', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + '_links' => 'setLinks', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + '_links' => 'getLinks', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('data', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Meta|null $meta meta + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \BhrSdk\Model\TimeTrackingOffsetPaginatedResponseDataV1Links|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|null $data Collection of time tracking breaks + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingRecordSchema.php b/lib/Model/TimeTrackingRecordSchema.php index 10bbd75f..7a49287d 100644 --- a/lib/Model/TimeTrackingRecordSchema.php +++ b/lib/Model/TimeTrackingRecordSchema.php @@ -77,8 +77,8 @@ class TimeTrackingRecordSchema implements ModelInterface, ArrayAccess, \JsonSeri 'task_id' => 'string', 'shift_differential_id' => 'string', 'holiday_id' => 'string', - 'project' => '\BhrSdk\Model\TimeTrackingRecordSchemaProject', - 'shift_differential' => '\BhrSdk\Model\TimeTrackingRecordSchemaShiftDifferential' + 'project' => 'object', + 'shift_differential' => 'object' ]; /** @@ -138,8 +138,8 @@ class TimeTrackingRecordSchema implements ModelInterface, ArrayAccess, \JsonSeri 'task_id' => true, 'shift_differential_id' => true, 'holiday_id' => true, - 'project' => false, - 'shift_differential' => false + 'project' => true, + 'shift_differential' => true ]; /** @@ -479,7 +479,7 @@ public function getDivisionId() { /** * Sets division_id * - * @param string|null $division_id ID of the division associated with this time tracking record + * @param string|null $division_id division_id * * @return self */ @@ -510,7 +510,7 @@ public function getDepartmentId() { /** * Sets department_id * - * @param string|null $department_id ID of the department associated with this time tracking record + * @param string|null $department_id department_id * * @return self */ @@ -541,7 +541,7 @@ public function getJobTitleId() { /** * Sets job_title_id * - * @param string|null $job_title_id ID of the job title associated with this time tracking record + * @param string|null $job_title_id job_title_id * * @return self */ @@ -572,7 +572,7 @@ public function getPayCode() { /** * Sets pay_code * - * @param string|null $pay_code Pay code for this time tracking record + * @param string|null $pay_code pay_code * * @return self */ @@ -778,7 +778,7 @@ public function getJobCode() { /** * Sets job_code * - * @param string|null $job_code Job code associated with this time tracking record + * @param string|null $job_code job_code * * @return self */ @@ -809,7 +809,7 @@ public function getJobData() { /** * Sets job_data * - * @param string|null $job_data Additional job data for this time tracking record + * @param string|null $job_data job_data * * @return self */ @@ -840,7 +840,7 @@ public function getProjectId() { /** * Sets project_id * - * @param string|null $project_id ID of the project associated with this time tracking record + * @param string|null $project_id project_id * * @return self */ @@ -871,7 +871,7 @@ public function getTaskId() { /** * Sets task_id * - * @param string|null $task_id ID of the task associated with this time tracking record + * @param string|null $task_id task_id * * @return self */ @@ -902,7 +902,7 @@ public function getShiftDifferentialId() { /** * Sets shift_differential_id * - * @param string|null $shift_differential_id ID of the shift differential associated with this time tracking record + * @param string|null $shift_differential_id shift_differential_id * * @return self */ @@ -933,7 +933,7 @@ public function getHolidayId() { /** * Sets holiday_id * - * @param string|null $holiday_id ID of the holiday associated with this time tracking record + * @param string|null $holiday_id holiday_id * * @return self */ @@ -955,7 +955,7 @@ public function setHolidayId($holiday_id) { /** * Gets project * - * @return \BhrSdk\Model\TimeTrackingRecordSchemaProject|null + * @return object|null */ public function getProject() { return $this->container['project']; @@ -964,13 +964,19 @@ public function getProject() { /** * Sets project * - * @param \BhrSdk\Model\TimeTrackingRecordSchemaProject|null $project project + * @param object|null $project project * * @return self */ public function setProject($project) { if (is_null($project)) { - throw new \InvalidArgumentException('non-nullable project cannot be null'); + $this->openApiNullablesSetToNull['project'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['project'])) { + unset($nullablesSetToNull['project']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['project'] = $project; @@ -980,7 +986,7 @@ public function setProject($project) { /** * Gets shift_differential * - * @return \BhrSdk\Model\TimeTrackingRecordSchemaShiftDifferential|null + * @return object|null */ public function getShiftDifferential() { return $this->container['shift_differential']; @@ -989,13 +995,19 @@ public function getShiftDifferential() { /** * Sets shift_differential * - * @param \BhrSdk\Model\TimeTrackingRecordSchemaShiftDifferential|null $shift_differential shift_differential + * @param object|null $shift_differential shift_differential * * @return self */ public function setShiftDifferential($shift_differential) { if (is_null($shift_differential)) { - throw new \InvalidArgumentException('non-nullable shift_differential cannot be null'); + $this->openApiNullablesSetToNull['shift_differential'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['shift_differential'])) { + unset($nullablesSetToNull['shift_differential']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['shift_differential'] = $shift_differential; diff --git a/lib/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.php b/lib/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.php new file mode 100644 index 00000000..e8784a12 --- /dev/null +++ b/lib/Model/TimeTrackingSyncTimeTrackingBreakPolicyV1.php @@ -0,0 +1,523 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingSyncTimeTrackingBreakPolicyV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingSyncTimeTrackingBreakPolicyV1 Class Doc Comment + * + * @category Class + * @description Data contract for syncing a break policy + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingSyncTimeTrackingBreakPolicyV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-SyncTimeTrackingBreakPolicy-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'description' => 'string', + 'all_employees_assigned' => 'bool', + 'breaks' => '\BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'description' => null, + 'all_employees_assigned' => null, + 'breaks' => null, + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'description' => true, + 'all_employees_assigned' => false, + 'breaks' => false, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'breaks' => 'breaks', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'breaks' => 'setBreaks', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'breaks' => 'getBreaks', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('breaks', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the break policy + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all employees are assigned to this break policy + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets breaks + * + * @return \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]|null + */ + public function getBreaks() { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \BhrSdk\Model\TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1[]|null $breaks Collection of time tracking breaks to create or update without a policy + * + * @return self + */ + public function setBreaks($breaks) { + if (is_null($breaks)) { + throw new \InvalidArgumentException('non-nullable breaks cannot be null'); + } + $this->container['breaks'] = $breaks; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids The employees that should be assigned to this policy + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakAssessmentV1.php b/lib/Model/TimeTrackingTimeTrackingBreakAssessmentV1.php new file mode 100644 index 00000000..20ac2dc6 --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakAssessmentV1.php @@ -0,0 +1,941 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakAssessmentV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakAssessmentV1 Class Doc Comment + * + * @category Class + * @description A break assessment + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakAssessmentV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreakAssessment-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'break_id' => 'string', + 'employee_id' => 'int', + 'employee_timesheet_id' => 'int', + 'date' => '\DateTime', + 'timezone' => 'string', + 'result' => 'string', + 'available_ymdt' => '\DateTime', + 'unavailable_ymdt' => '\DateTime', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'violations' => '\BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentViolationV1[]', + 'clock_entry_ids' => 'int[]', + 'expected_duration' => 'int', + 'recorded_duration' => 'int', + 'duration_difference' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'break_id' => 'uuid', + 'employee_id' => null, + 'employee_timesheet_id' => null, + 'date' => 'date', + 'timezone' => null, + 'result' => null, + 'available_ymdt' => 'date-time', + 'unavailable_ymdt' => 'date-time', + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'violations' => null, + 'clock_entry_ids' => null, + 'expected_duration' => null, + 'recorded_duration' => null, + 'duration_difference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'break_id' => false, + 'employee_id' => false, + 'employee_timesheet_id' => false, + 'date' => false, + 'timezone' => false, + 'result' => false, + 'available_ymdt' => true, + 'unavailable_ymdt' => true, + 'created_at' => false, + 'updated_at' => true, + 'violations' => false, + 'clock_entry_ids' => false, + 'expected_duration' => true, + 'recorded_duration' => true, + 'duration_difference' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'break_id' => 'breakId', + 'employee_id' => 'employeeId', + 'employee_timesheet_id' => 'employeeTimesheetId', + 'date' => 'date', + 'timezone' => 'timezone', + 'result' => 'result', + 'available_ymdt' => 'availableYmdt', + 'unavailable_ymdt' => 'unavailableYmdt', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'violations' => 'violations', + 'clock_entry_ids' => 'clockEntryIds', + 'expected_duration' => 'expectedDuration', + 'recorded_duration' => 'recordedDuration', + 'duration_difference' => 'durationDifference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'break_id' => 'setBreakId', + 'employee_id' => 'setEmployeeId', + 'employee_timesheet_id' => 'setEmployeeTimesheetId', + 'date' => 'setDate', + 'timezone' => 'setTimezone', + 'result' => 'setResult', + 'available_ymdt' => 'setAvailableYmdt', + 'unavailable_ymdt' => 'setUnavailableYmdt', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'violations' => 'setViolations', + 'clock_entry_ids' => 'setClockEntryIds', + 'expected_duration' => 'setExpectedDuration', + 'recorded_duration' => 'setRecordedDuration', + 'duration_difference' => 'setDurationDifference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'break_id' => 'getBreakId', + 'employee_id' => 'getEmployeeId', + 'employee_timesheet_id' => 'getEmployeeTimesheetId', + 'date' => 'getDate', + 'timezone' => 'getTimezone', + 'result' => 'getResult', + 'available_ymdt' => 'getAvailableYmdt', + 'unavailable_ymdt' => 'getUnavailableYmdt', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'violations' => 'getViolations', + 'clock_entry_ids' => 'getClockEntryIds', + 'expected_duration' => 'getExpectedDuration', + 'recorded_duration' => 'getRecordedDuration', + 'duration_difference' => 'getDurationDifference' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const RESULT_COMPLIANT = 'compliant'; + public const RESULT_VIOLATION = 'violation'; + public const RESULT_WAIVED = 'waived'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResultAllowableValues() { + return [ + self::RESULT_COMPLIANT, + self::RESULT_VIOLATION, + self::RESULT_WAIVED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('break_id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('employee_timesheet_id', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('available_ymdt', $data ?? [], null); + $this->setIfExists('unavailable_ymdt', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('violations', $data ?? [], null); + $this->setIfExists('clock_entry_ids', $data ?? [], null); + $this->setIfExists('expected_duration', $data ?? [], null); + $this->setIfExists('recorded_duration', $data ?? [], null); + $this->setIfExists('duration_difference', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getResultAllowableValues(); + if (!is_null($this->container['result']) && !in_array($this->container['result'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'result', must be one of '%s'", + $this->container['result'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier for the time tracking break assessment + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets break_id + * + * @return string|null + */ + public function getBreakId() { + return $this->container['break_id']; + } + + /** + * Sets break_id + * + * @param string|null $break_id The unique identifier of the break + * + * @return self + */ + public function setBreakId($break_id) { + if (is_null($break_id)) { + throw new \InvalidArgumentException('non-nullable break_id cannot be null'); + } + $this->container['break_id'] = $break_id; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The id of the employee + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets employee_timesheet_id + * + * @return int|null + */ + public function getEmployeeTimesheetId() { + return $this->container['employee_timesheet_id']; + } + + /** + * Sets employee_timesheet_id + * + * @param int|null $employee_timesheet_id The id of the employee timesheet + * + * @return self + */ + public function setEmployeeTimesheetId($employee_timesheet_id) { + if (is_null($employee_timesheet_id)) { + throw new \InvalidArgumentException('non-nullable employee_timesheet_id cannot be null'); + } + $this->container['employee_timesheet_id'] = $employee_timesheet_id; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime|null + */ + public function getDate() { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime|null $date The date of the break assessment + * + * @return self + */ + public function setDate($date) { + if (is_null($date)) { + throw new \InvalidArgumentException('non-nullable date cannot be null'); + } + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone of the break assessment + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets result + * + * @return string|null + */ + public function getResult() { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result The result of the break assessment + * + * @return self + */ + public function setResult($result) { + if (is_null($result)) { + throw new \InvalidArgumentException('non-nullable result cannot be null'); + } + $allowedValues = $this->getResultAllowableValues(); + if (!in_array($result, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'result', must be one of '%s'", + $result, + implode("', '", $allowedValues) + ) + ); + } + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets available_ymdt + * + * @return \DateTime|null + */ + public function getAvailableYmdt() { + return $this->container['available_ymdt']; + } + + /** + * Sets available_ymdt + * + * @param \DateTime|null $available_ymdt available_ymdt + * + * @return self + */ + public function setAvailableYmdt($available_ymdt) { + if (is_null($available_ymdt)) { + $this->openApiNullablesSetToNull['available_ymdt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['available_ymdt'])) { + unset($nullablesSetToNull['available_ymdt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['available_ymdt'] = $available_ymdt; + + return $this; + } + + /** + * Gets unavailable_ymdt + * + * @return \DateTime|null + */ + public function getUnavailableYmdt() { + return $this->container['unavailable_ymdt']; + } + + /** + * Sets unavailable_ymdt + * + * @param \DateTime|null $unavailable_ymdt unavailable_ymdt + * + * @return self + */ + public function setUnavailableYmdt($unavailable_ymdt) { + if (is_null($unavailable_ymdt)) { + $this->openApiNullablesSetToNull['unavailable_ymdt'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unavailable_ymdt'])) { + unset($nullablesSetToNull['unavailable_ymdt']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unavailable_ymdt'] = $unavailable_ymdt; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at ISO 8601 timestamp when the break was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets violations + * + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentViolationV1[]|null + */ + public function getViolations() { + return $this->container['violations']; + } + + /** + * Sets violations + * + * @param \BhrSdk\Model\TimeTrackingTimeTrackingBreakAssessmentViolationV1[]|null $violations Violations associated with the assessment + * + * @return self + */ + public function setViolations($violations) { + if (is_null($violations)) { + throw new \InvalidArgumentException('non-nullable violations cannot be null'); + } + $this->container['violations'] = $violations; + + return $this; + } + + /** + * Gets clock_entry_ids + * + * @return int[]|null + */ + public function getClockEntryIds() { + return $this->container['clock_entry_ids']; + } + + /** + * Sets clock_entry_ids + * + * @param int[]|null $clock_entry_ids Clock entry ids associated with the time tracking break assessment + * + * @return self + */ + public function setClockEntryIds($clock_entry_ids) { + if (is_null($clock_entry_ids)) { + throw new \InvalidArgumentException('non-nullable clock_entry_ids cannot be null'); + } + $this->container['clock_entry_ids'] = $clock_entry_ids; + + return $this; + } + + /** + * Gets expected_duration + * + * @return int|null + */ + public function getExpectedDuration() { + return $this->container['expected_duration']; + } + + /** + * Sets expected_duration + * + * @param int|null $expected_duration expected_duration + * + * @return self + */ + public function setExpectedDuration($expected_duration) { + if (is_null($expected_duration)) { + $this->openApiNullablesSetToNull['expected_duration'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['expected_duration'])) { + unset($nullablesSetToNull['expected_duration']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expected_duration'] = $expected_duration; + + return $this; + } + + /** + * Gets recorded_duration + * + * @return int|null + */ + public function getRecordedDuration() { + return $this->container['recorded_duration']; + } + + /** + * Sets recorded_duration + * + * @param int|null $recorded_duration recorded_duration + * + * @return self + */ + public function setRecordedDuration($recorded_duration) { + if (is_null($recorded_duration)) { + $this->openApiNullablesSetToNull['recorded_duration'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['recorded_duration'])) { + unset($nullablesSetToNull['recorded_duration']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recorded_duration'] = $recorded_duration; + + return $this; + } + + /** + * Gets duration_difference + * + * @return int|null + */ + public function getDurationDifference() { + return $this->container['duration_difference']; + } + + /** + * Sets duration_difference + * + * @param int|null $duration_difference duration_difference + * + * @return self + */ + public function setDurationDifference($duration_difference) { + if (is_null($duration_difference)) { + $this->openApiNullablesSetToNull['duration_difference'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['duration_difference'])) { + unset($nullablesSetToNull['duration_difference']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['duration_difference'] = $duration_difference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.php b/lib/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.php new file mode 100644 index 00000000..43f23210 --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakAssessmentViolationV1.php @@ -0,0 +1,537 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakAssessmentViolationV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakAssessmentViolationV1 Class Doc Comment + * + * @category Class + * @description A break assessment violation + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakAssessmentViolationV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreakAssessmentViolation-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'assessment_id' => 'string', + 'type' => 'string', + 'employee_timesheet_clock_entry_id' => 'float', + 'amount' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'assessment_id' => 'uuid', + 'type' => null, + 'employee_timesheet_clock_entry_id' => 'integer', + 'amount' => 'integer' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'assessment_id' => false, + 'type' => false, + 'employee_timesheet_clock_entry_id' => true, + 'amount' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'assessment_id' => 'assessmentId', + 'type' => 'type', + 'employee_timesheet_clock_entry_id' => 'employeeTimesheetClockEntryId', + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'assessment_id' => 'setAssessmentId', + 'type' => 'setType', + 'employee_timesheet_clock_entry_id' => 'setEmployeeTimesheetClockEntryId', + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'assessment_id' => 'getAssessmentId', + 'type' => 'getType', + 'employee_timesheet_clock_entry_id' => 'getEmployeeTimesheetClockEntryId', + 'amount' => 'getAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_BREAK_STARTED_EARLY = 'break_started_early'; + public const TYPE_BREAK_STARTED_LATE = 'break_started_late'; + public const TYPE_BREAK_ENDED_EARLY = 'break_ended_early'; + public const TYPE_BREAK_ENDED_LATE = 'break_ended_late'; + public const TYPE_BREAK_MISSED = 'break_missed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_BREAK_STARTED_EARLY, + self::TYPE_BREAK_STARTED_LATE, + self::TYPE_BREAK_ENDED_EARLY, + self::TYPE_BREAK_ENDED_LATE, + self::TYPE_BREAK_MISSED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('assessment_id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('employee_timesheet_clock_entry_id', $data ?? [], null); + $this->setIfExists('amount', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets assessment_id + * + * @return string|null + */ + public function getAssessmentId() { + return $this->container['assessment_id']; + } + + /** + * Sets assessment_id + * + * @param string|null $assessment_id The unique identifier for the time tracking break assessment. + * + * @return self + */ + public function setAssessmentId($assessment_id) { + if (is_null($assessment_id)) { + throw new \InvalidArgumentException('non-nullable assessment_id cannot be null'); + } + $this->container['assessment_id'] = $assessment_id; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of the violation + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets employee_timesheet_clock_entry_id + * + * @return float|null + */ + public function getEmployeeTimesheetClockEntryId() { + return $this->container['employee_timesheet_clock_entry_id']; + } + + /** + * Sets employee_timesheet_clock_entry_id + * + * @param float|null $employee_timesheet_clock_entry_id employee_timesheet_clock_entry_id + * + * @return self + */ + public function setEmployeeTimesheetClockEntryId($employee_timesheet_clock_entry_id) { + if (is_null($employee_timesheet_clock_entry_id)) { + $this->openApiNullablesSetToNull['employee_timesheet_clock_entry_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_timesheet_clock_entry_id'])) { + unset($nullablesSetToNull['employee_timesheet_clock_entry_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_timesheet_clock_entry_id'] = $employee_timesheet_clock_entry_id; + + return $this; + } + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + $this->openApiNullablesSetToNull['amount'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['amount'])) { + unset($nullablesSetToNull['amount']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.php b/lib/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.php new file mode 100644 index 00000000..66a6d571 --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakAvailabilityV1.php @@ -0,0 +1,935 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakAvailabilityV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakAvailabilityV1 Class Doc Comment + * + * @category Class + * @description Break availability information for time tracking + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakAvailabilityV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreakAvailability-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'policy_id' => 'string', + 'paid' => 'bool', + 'duration' => 'int', + 'availability_type' => 'string', + 'calculated_at' => '\DateTime', + 'effective_at' => '\DateTime', + 'timezone' => 'string', + 'recorded_duration' => 'int', + 'available' => 'bool', + 'available_after_minutes_worked' => 'int', + 'available_in' => 'int', + 'unavailable_in' => 'int', + 'available_at' => '\DateTime', + 'unavailable_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'policy_id' => 'uuid', + 'paid' => null, + 'duration' => null, + 'availability_type' => null, + 'calculated_at' => 'date-time', + 'effective_at' => 'date-time', + 'timezone' => null, + 'recorded_duration' => null, + 'available' => null, + 'available_after_minutes_worked' => null, + 'available_in' => null, + 'unavailable_in' => null, + 'available_at' => 'date-time', + 'unavailable_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'policy_id' => false, + 'paid' => false, + 'duration' => false, + 'availability_type' => false, + 'calculated_at' => false, + 'effective_at' => false, + 'timezone' => false, + 'recorded_duration' => false, + 'available' => false, + 'available_after_minutes_worked' => true, + 'available_in' => true, + 'unavailable_in' => true, + 'available_at' => true, + 'unavailable_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'policy_id' => 'policyId', + 'paid' => 'paid', + 'duration' => 'duration', + 'availability_type' => 'availabilityType', + 'calculated_at' => 'calculatedAt', + 'effective_at' => 'effectiveAt', + 'timezone' => 'timezone', + 'recorded_duration' => 'recordedDuration', + 'available' => 'available', + 'available_after_minutes_worked' => 'availableAfterMinutesWorked', + 'available_in' => 'availableIn', + 'unavailable_in' => 'unavailableIn', + 'available_at' => 'availableAt', + 'unavailable_at' => 'unavailableAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'policy_id' => 'setPolicyId', + 'paid' => 'setPaid', + 'duration' => 'setDuration', + 'availability_type' => 'setAvailabilityType', + 'calculated_at' => 'setCalculatedAt', + 'effective_at' => 'setEffectiveAt', + 'timezone' => 'setTimezone', + 'recorded_duration' => 'setRecordedDuration', + 'available' => 'setAvailable', + 'available_after_minutes_worked' => 'setAvailableAfterMinutesWorked', + 'available_in' => 'setAvailableIn', + 'unavailable_in' => 'setUnavailableIn', + 'available_at' => 'setAvailableAt', + 'unavailable_at' => 'setUnavailableAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'policy_id' => 'getPolicyId', + 'paid' => 'getPaid', + 'duration' => 'getDuration', + 'availability_type' => 'getAvailabilityType', + 'calculated_at' => 'getCalculatedAt', + 'effective_at' => 'getEffectiveAt', + 'timezone' => 'getTimezone', + 'recorded_duration' => 'getRecordedDuration', + 'available' => 'getAvailable', + 'available_after_minutes_worked' => 'getAvailableAfterMinutesWorked', + 'available_in' => 'getAvailableIn', + 'unavailable_in' => 'getUnavailableIn', + 'available_at' => 'getAvailableAt', + 'unavailable_at' => 'getUnavailableAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('policy_id', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('calculated_at', $data ?? [], null); + $this->setIfExists('effective_at', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('recorded_duration', $data ?? [], null); + $this->setIfExists('available', $data ?? [], null); + $this->setIfExists('available_after_minutes_worked', $data ?? [], null); + $this->setIfExists('available_in', $data ?? [], null); + $this->setIfExists('unavailable_in', $data ?? [], null); + $this->setIfExists('available_at', $data ?? [], null); + $this->setIfExists('unavailable_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier for the time tracking break + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the break + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets policy_id + * + * @return string|null + */ + public function getPolicyId() { + return $this->container['policy_id']; + } + + /** + * Sets policy_id + * + * @param string|null $policy_id The unique identifier of the break policy this break belongs to + * + * @return self + */ + public function setPolicyId($policy_id) { + if (is_null($policy_id)) { + throw new \InvalidArgumentException('non-nullable policy_id cannot be null'); + } + $this->container['policy_id'] = $policy_id; + + return $this; + } + + /** + * Gets paid + * + * @return bool|null + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool|null $paid Whether the break is paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + throw new \InvalidArgumentException('non-nullable paid cannot be null'); + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets duration + * + * @return int|null + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int|null $duration Duration of the break in minutes + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + throw new \InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets availability_type + * + * @return string|null + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string|null $availability_type When the break is available to be taken + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets calculated_at + * + * @return \DateTime|null + */ + public function getCalculatedAt() { + return $this->container['calculated_at']; + } + + /** + * Sets calculated_at + * + * @param \DateTime|null $calculated_at When the break availability was calculated + * + * @return self + */ + public function setCalculatedAt($calculated_at) { + if (is_null($calculated_at)) { + throw new \InvalidArgumentException('non-nullable calculated_at cannot be null'); + } + $this->container['calculated_at'] = $calculated_at; + + return $this; + } + + /** + * Gets effective_at + * + * @return \DateTime|null + */ + public function getEffectiveAt() { + return $this->container['effective_at']; + } + + /** + * Sets effective_at + * + * @param \DateTime|null $effective_at Timestamp that all time-based calculations are evaluated relative to. + * + * @return self + */ + public function setEffectiveAt($effective_at) { + if (is_null($effective_at)) { + throw new \InvalidArgumentException('non-nullable effective_at cannot be null'); + } + $this->container['effective_at'] = $effective_at; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone The timezone the break availability is calculated in + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + throw new \InvalidArgumentException('non-nullable timezone cannot be null'); + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets recorded_duration + * + * @return int|null + */ + public function getRecordedDuration() { + return $this->container['recorded_duration']; + } + + /** + * Sets recorded_duration + * + * @param int|null $recorded_duration The duration of the break that has been recorded so far + * + * @return self + */ + public function setRecordedDuration($recorded_duration) { + if (is_null($recorded_duration)) { + throw new \InvalidArgumentException('non-nullable recorded_duration cannot be null'); + } + $this->container['recorded_duration'] = $recorded_duration; + + return $this; + } + + /** + * Gets available + * + * @return bool|null + */ + public function getAvailable() { + return $this->container['available']; + } + + /** + * Sets available + * + * @param bool|null $available Whether the break is currently available to be taken + * + * @return self + */ + public function setAvailable($available) { + if (is_null($available)) { + throw new \InvalidArgumentException('non-nullable available cannot be null'); + } + $this->container['available'] = $available; + + return $this; + } + + /** + * Gets available_after_minutes_worked + * + * @return int|null + */ + public function getAvailableAfterMinutesWorked() { + return $this->container['available_after_minutes_worked']; + } + + /** + * Sets available_after_minutes_worked + * + * @param int|null $available_after_minutes_worked available_after_minutes_worked + * + * @return self + */ + public function setAvailableAfterMinutesWorked($available_after_minutes_worked) { + if (is_null($available_after_minutes_worked)) { + $this->openApiNullablesSetToNull['available_after_minutes_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['available_after_minutes_worked'])) { + unset($nullablesSetToNull['available_after_minutes_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['available_after_minutes_worked'] = $available_after_minutes_worked; + + return $this; + } + + /** + * Gets available_in + * + * @return int|null + */ + public function getAvailableIn() { + return $this->container['available_in']; + } + + /** + * Sets available_in + * + * @param int|null $available_in available_in + * + * @return self + */ + public function setAvailableIn($available_in) { + if (is_null($available_in)) { + $this->openApiNullablesSetToNull['available_in'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['available_in'])) { + unset($nullablesSetToNull['available_in']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['available_in'] = $available_in; + + return $this; + } + + /** + * Gets unavailable_in + * + * @return int|null + */ + public function getUnavailableIn() { + return $this->container['unavailable_in']; + } + + /** + * Sets unavailable_in + * + * @param int|null $unavailable_in unavailable_in + * + * @return self + */ + public function setUnavailableIn($unavailable_in) { + if (is_null($unavailable_in)) { + $this->openApiNullablesSetToNull['unavailable_in'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unavailable_in'])) { + unset($nullablesSetToNull['unavailable_in']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unavailable_in'] = $unavailable_in; + + return $this; + } + + /** + * Gets available_at + * + * @return \DateTime|null + */ + public function getAvailableAt() { + return $this->container['available_at']; + } + + /** + * Sets available_at + * + * @param \DateTime|null $available_at available_at + * + * @return self + */ + public function setAvailableAt($available_at) { + if (is_null($available_at)) { + $this->openApiNullablesSetToNull['available_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['available_at'])) { + unset($nullablesSetToNull['available_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['available_at'] = $available_at; + + return $this; + } + + /** + * Gets unavailable_at + * + * @return \DateTime|null + */ + public function getUnavailableAt() { + return $this->container['unavailable_at']; + } + + /** + * Sets unavailable_at + * + * @param \DateTime|null $unavailable_at unavailable_at + * + * @return self + */ + public function setUnavailableAt($unavailable_at) { + if (is_null($unavailable_at)) { + $this->openApiNullablesSetToNull['unavailable_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unavailable_at'])) { + unset($nullablesSetToNull['unavailable_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unavailable_at'] = $unavailable_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakPolicyV1.php b/lib/Model/TimeTrackingTimeTrackingBreakPolicyV1.php new file mode 100644 index 00000000..96a89407 --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakPolicyV1.php @@ -0,0 +1,599 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakPolicyV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakPolicyV1 Class Doc Comment + * + * @category Class + * @description A policy governing breaks for time tracking + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakPolicyV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreakPolicy-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'description' => 'string', + 'all_employees_assigned' => 'bool', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'description' => null, + 'all_employees_assigned' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'description' => true, + 'all_employees_assigned' => false, + 'created_at' => false, + 'updated_at' => true, + 'deleted_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'description' => 'description', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'description' => 'setDescription', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'description' => 'getDescription', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for the break policy + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the break policy + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all employees are assigned to this break policy + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at ISO 8601 timestamp when the break policy was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.php b/lib/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.php new file mode 100644 index 00000000..a6c5891b --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.php @@ -0,0 +1,663 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 Class Doc Comment + * + * @category Class + * @description A break policy for time tracking + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreakPolicyWithRelations-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'description' => 'string', + 'all_employees_assigned' => 'bool', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime', + 'breaks' => '\BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]', + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'description' => null, + 'all_employees_assigned' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time', + 'breaks' => null, + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'description' => true, + 'all_employees_assigned' => false, + 'created_at' => false, + 'updated_at' => true, + 'deleted_at' => true, + 'breaks' => false, + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'description' => 'description', + 'all_employees_assigned' => 'allEmployeesAssigned', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt', + 'breaks' => 'breaks', + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'description' => 'setDescription', + 'all_employees_assigned' => 'setAllEmployeesAssigned', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt', + 'breaks' => 'setBreaks', + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'description' => 'getDescription', + 'all_employees_assigned' => 'getAllEmployeesAssigned', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt', + 'breaks' => 'getBreaks', + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $data ?? [], null); + $this->setIfExists('breaks', $data ?? [], null); + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier for the break policy + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the break policy + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all employees are assigned to this break policy + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at ISO 8601 timestamp when the break policy was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + + /** + * Gets breaks + * + * @return \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|null + */ + public function getBreaks() { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \BhrSdk\Model\TimeTrackingTimeTrackingBreakV1[]|null $breaks The breaks that are assigned to this policy + * + * @return self + */ + public function setBreaks($breaks) { + if (is_null($breaks)) { + throw new \InvalidArgumentException('non-nullable breaks cannot be null'); + } + $this->container['breaks'] = $breaks; + + return $this; + } + + /** + * Gets employee_ids + * + * @return int[]|null + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[]|null $employee_ids The employees that are assigned to this policy + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingTimeTrackingBreakV1.php b/lib/Model/TimeTrackingTimeTrackingBreakV1.php new file mode 100644 index 00000000..62907f92 --- /dev/null +++ b/lib/Model/TimeTrackingTimeTrackingBreakV1.php @@ -0,0 +1,845 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingTimeTrackingBreakV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingTimeTrackingBreakV1 Class Doc Comment + * + * @category Class + * @description A break for time tracking belonging to a break policy + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingTimeTrackingBreakV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-TimeTrackingBreak-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'policy_id' => 'string', + 'paid' => 'bool', + 'duration' => 'int', + 'availability_type' => 'string', + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'string', + 'availability_end_time' => 'string', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'deleted_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => 'uuid', + 'name' => null, + 'policy_id' => 'uuid', + 'paid' => null, + 'duration' => null, + 'availability_type' => null, + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'time', + 'availability_end_time' => 'time', + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'deleted_at' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'policy_id' => false, + 'paid' => false, + 'duration' => false, + 'availability_type' => false, + 'availability_min_hours_worked' => true, + 'availability_max_hours_worked' => true, + 'availability_start_time' => true, + 'availability_end_time' => true, + 'created_at' => false, + 'updated_at' => true, + 'deleted_at' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'policy_id' => 'policyId', + 'paid' => 'paid', + 'duration' => 'duration', + 'availability_type' => 'availabilityType', + 'availability_min_hours_worked' => 'availabilityMinHoursWorked', + 'availability_max_hours_worked' => 'availabilityMaxHoursWorked', + 'availability_start_time' => 'availabilityStartTime', + 'availability_end_time' => 'availabilityEndTime', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'deleted_at' => 'deletedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'policy_id' => 'setPolicyId', + 'paid' => 'setPaid', + 'duration' => 'setDuration', + 'availability_type' => 'setAvailabilityType', + 'availability_min_hours_worked' => 'setAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'setAvailabilityMaxHoursWorked', + 'availability_start_time' => 'setAvailabilityStartTime', + 'availability_end_time' => 'setAvailabilityEndTime', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'deleted_at' => 'setDeletedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'policy_id' => 'getPolicyId', + 'paid' => 'getPaid', + 'duration' => 'getDuration', + 'availability_type' => 'getAvailabilityType', + 'availability_min_hours_worked' => 'getAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'getAvailabilityMaxHoursWorked', + 'availability_start_time' => 'getAvailabilityStartTime', + 'availability_end_time' => 'getAvailabilityEndTime', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'deleted_at' => 'getDeletedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('policy_id', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('availability_min_hours_worked', $data ?? [], null); + $this->setIfExists('availability_max_hours_worked', $data ?? [], null); + $this->setIfExists('availability_start_time', $data ?? [], null); + $this->setIfExists('availability_end_time', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('deleted_at', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier for the time tracking break + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the break + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets policy_id + * + * @return string|null + */ + public function getPolicyId() { + return $this->container['policy_id']; + } + + /** + * Sets policy_id + * + * @param string|null $policy_id The unique identifier of the break policy this break belongs to + * + * @return self + */ + public function setPolicyId($policy_id) { + if (is_null($policy_id)) { + throw new \InvalidArgumentException('non-nullable policy_id cannot be null'); + } + $this->container['policy_id'] = $policy_id; + + return $this; + } + + /** + * Gets paid + * + * @return bool|null + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool|null $paid Whether the break is paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + throw new \InvalidArgumentException('non-nullable paid cannot be null'); + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets duration + * + * @return int|null + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int|null $duration Duration of the break in minutes + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + throw new \InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets availability_type + * + * @return string|null + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string|null $availability_type When the break is available to be taken + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets availability_min_hours_worked + * + * @return float|null + */ + public function getAvailabilityMinHoursWorked() { + return $this->container['availability_min_hours_worked']; + } + + /** + * Sets availability_min_hours_worked + * + * @param float|null $availability_min_hours_worked availability_min_hours_worked + * + * @return self + */ + public function setAvailabilityMinHoursWorked($availability_min_hours_worked) { + if (is_null($availability_min_hours_worked)) { + $this->openApiNullablesSetToNull['availability_min_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_min_hours_worked'])) { + unset($nullablesSetToNull['availability_min_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_min_hours_worked'] = $availability_min_hours_worked; + + return $this; + } + + /** + * Gets availability_max_hours_worked + * + * @return float|null + */ + public function getAvailabilityMaxHoursWorked() { + return $this->container['availability_max_hours_worked']; + } + + /** + * Sets availability_max_hours_worked + * + * @param float|null $availability_max_hours_worked availability_max_hours_worked + * + * @return self + */ + public function setAvailabilityMaxHoursWorked($availability_max_hours_worked) { + if (is_null($availability_max_hours_worked)) { + $this->openApiNullablesSetToNull['availability_max_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_max_hours_worked'])) { + unset($nullablesSetToNull['availability_max_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_max_hours_worked'] = $availability_max_hours_worked; + + return $this; + } + + /** + * Gets availability_start_time + * + * @return string|null + */ + public function getAvailabilityStartTime() { + return $this->container['availability_start_time']; + } + + /** + * Sets availability_start_time + * + * @param string|null $availability_start_time availability_start_time + * + * @return self + */ + public function setAvailabilityStartTime($availability_start_time) { + if (is_null($availability_start_time)) { + $this->openApiNullablesSetToNull['availability_start_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_start_time'])) { + unset($nullablesSetToNull['availability_start_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_start_time'] = $availability_start_time; + + return $this; + } + + /** + * Gets availability_end_time + * + * @return string|null + */ + public function getAvailabilityEndTime() { + return $this->container['availability_end_time']; + } + + /** + * Sets availability_end_time + * + * @param string|null $availability_end_time availability_end_time + * + * @return self + */ + public function setAvailabilityEndTime($availability_end_time) { + if (is_null($availability_end_time)) { + $this->openApiNullablesSetToNull['availability_end_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_end_time'])) { + unset($nullablesSetToNull['availability_end_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_end_time'] = $availability_end_time; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at ISO 8601 timestamp when the break was created + * + * @return self + */ + public function setCreatedAt($created_at) { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) { + if (is_null($updated_at)) { + $this->openApiNullablesSetToNull['updated_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['updated_at'])) { + unset($nullablesSetToNull['updated_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at deleted_at + * + * @return self + */ + public function setDeletedAt($deleted_at) { + if (is_null($deleted_at)) { + $this->openApiNullablesSetToNull['deleted_at'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['deleted_at'])) { + unset($nullablesSetToNull['deleted_at']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.php b/lib/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.php new file mode 100644 index 00000000..1a9ce35a --- /dev/null +++ b/lib/Model/TimeTrackingUpdateTimeTrackingBreakPolicyV1.php @@ -0,0 +1,459 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingUpdateTimeTrackingBreakPolicyV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingUpdateTimeTrackingBreakPolicyV1 Class Doc Comment + * + * @category Class + * @description Data contract for updating a break policy + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingUpdateTimeTrackingBreakPolicyV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-UpdateTimeTrackingBreakPolicy-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'description' => 'string', + 'all_employees_assigned' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'description' => null, + 'all_employees_assigned' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'description' => true, + 'all_employees_assigned' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'all_employees_assigned' => 'allEmployeesAssigned' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'all_employees_assigned' => 'setAllEmployeesAssigned' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'all_employees_assigned' => 'getAllEmployeesAssigned' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('all_employees_assigned', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the break policy + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets all_employees_assigned + * + * @return bool|null + */ + public function getAllEmployeesAssigned() { + return $this->container['all_employees_assigned']; + } + + /** + * Sets all_employees_assigned + * + * @param bool|null $all_employees_assigned Whether all employees are assigned to this break policy + * + * @return self + */ + public function setAllEmployeesAssigned($all_employees_assigned) { + if (is_null($all_employees_assigned)) { + throw new \InvalidArgumentException('non-nullable all_employees_assigned cannot be null'); + } + $this->container['all_employees_assigned'] = $all_employees_assigned; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimeTrackingUpdateTimeTrackingBreakV1.php b/lib/Model/TimeTrackingUpdateTimeTrackingBreakV1.php new file mode 100644 index 00000000..b3194a7c --- /dev/null +++ b/lib/Model/TimeTrackingUpdateTimeTrackingBreakV1.php @@ -0,0 +1,705 @@ +<?php +declare(strict_types=1); +/** + * TimeTrackingUpdateTimeTrackingBreakV1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimeTrackingUpdateTimeTrackingBreakV1 Class Doc Comment + * + * @category Class + * @description Data contract for partially updating a break. All fields are optional; only fields present in the request body will be updated. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimeTrackingUpdateTimeTrackingBreakV1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimeTracking-UpdateTimeTrackingBreak-V1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'policy_id' => 'string', + 'paid' => 'bool', + 'duration' => 'int', + 'availability_type' => 'string', + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'string', + 'availability_end_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'policy_id' => 'uuid', + 'paid' => null, + 'duration' => null, + 'availability_type' => null, + 'availability_min_hours_worked' => 'float', + 'availability_max_hours_worked' => 'float', + 'availability_start_time' => 'time', + 'availability_end_time' => 'time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'policy_id' => false, + 'paid' => false, + 'duration' => false, + 'availability_type' => false, + 'availability_min_hours_worked' => true, + 'availability_max_hours_worked' => true, + 'availability_start_time' => true, + 'availability_end_time' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'policy_id' => 'policyId', + 'paid' => 'paid', + 'duration' => 'duration', + 'availability_type' => 'availabilityType', + 'availability_min_hours_worked' => 'availabilityMinHoursWorked', + 'availability_max_hours_worked' => 'availabilityMaxHoursWorked', + 'availability_start_time' => 'availabilityStartTime', + 'availability_end_time' => 'availabilityEndTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'policy_id' => 'setPolicyId', + 'paid' => 'setPaid', + 'duration' => 'setDuration', + 'availability_type' => 'setAvailabilityType', + 'availability_min_hours_worked' => 'setAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'setAvailabilityMaxHoursWorked', + 'availability_start_time' => 'setAvailabilityStartTime', + 'availability_end_time' => 'setAvailabilityEndTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'policy_id' => 'getPolicyId', + 'paid' => 'getPaid', + 'duration' => 'getDuration', + 'availability_type' => 'getAvailabilityType', + 'availability_min_hours_worked' => 'getAvailabilityMinHoursWorked', + 'availability_max_hours_worked' => 'getAvailabilityMaxHoursWorked', + 'availability_start_time' => 'getAvailabilityStartTime', + 'availability_end_time' => 'getAvailabilityEndTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const AVAILABILITY_TYPE_ANYTIME = 'anytime'; + public const AVAILABILITY_TYPE_HOURS_WORKED = 'hours_worked'; + public const AVAILABILITY_TYPE_TIME_OF_DAY = 'time_of_day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAvailabilityTypeAllowableValues() { + return [ + self::AVAILABILITY_TYPE_ANYTIME, + self::AVAILABILITY_TYPE_HOURS_WORKED, + self::AVAILABILITY_TYPE_TIME_OF_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('policy_id', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('availability_type', $data ?? [], null); + $this->setIfExists('availability_min_hours_worked', $data ?? [], null); + $this->setIfExists('availability_max_hours_worked', $data ?? [], null); + $this->setIfExists('availability_start_time', $data ?? [], null); + $this->setIfExists('availability_end_time', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!is_null($this->container['availability_type']) && !in_array($this->container['availability_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'availability_type', must be one of '%s'", + $this->container['availability_type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the break + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets policy_id + * + * @return string|null + */ + public function getPolicyId() { + return $this->container['policy_id']; + } + + /** + * Sets policy_id + * + * @param string|null $policy_id The unique identifier of the break policy this break belongs to + * + * @return self + */ + public function setPolicyId($policy_id) { + if (is_null($policy_id)) { + throw new \InvalidArgumentException('non-nullable policy_id cannot be null'); + } + $this->container['policy_id'] = $policy_id; + + return $this; + } + + /** + * Gets paid + * + * @return bool|null + */ + public function getPaid() { + return $this->container['paid']; + } + + /** + * Sets paid + * + * @param bool|null $paid Whether the break is paid + * + * @return self + */ + public function setPaid($paid) { + if (is_null($paid)) { + throw new \InvalidArgumentException('non-nullable paid cannot be null'); + } + $this->container['paid'] = $paid; + + return $this; + } + + /** + * Gets duration + * + * @return int|null + */ + public function getDuration() { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int|null $duration Duration of the break in minutes + * + * @return self + */ + public function setDuration($duration) { + if (is_null($duration)) { + throw new \InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets availability_type + * + * @return string|null + */ + public function getAvailabilityType() { + return $this->container['availability_type']; + } + + /** + * Sets availability_type + * + * @param string|null $availability_type When the break is available to be taken + * + * @return self + */ + public function setAvailabilityType($availability_type) { + if (is_null($availability_type)) { + throw new \InvalidArgumentException('non-nullable availability_type cannot be null'); + } + $allowedValues = $this->getAvailabilityTypeAllowableValues(); + if (!in_array($availability_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'availability_type', must be one of '%s'", + $availability_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['availability_type'] = $availability_type; + + return $this; + } + + /** + * Gets availability_min_hours_worked + * + * @return float|null + */ + public function getAvailabilityMinHoursWorked() { + return $this->container['availability_min_hours_worked']; + } + + /** + * Sets availability_min_hours_worked + * + * @param float|null $availability_min_hours_worked availability_min_hours_worked + * + * @return self + */ + public function setAvailabilityMinHoursWorked($availability_min_hours_worked) { + if (is_null($availability_min_hours_worked)) { + $this->openApiNullablesSetToNull['availability_min_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_min_hours_worked'])) { + unset($nullablesSetToNull['availability_min_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_min_hours_worked'] = $availability_min_hours_worked; + + return $this; + } + + /** + * Gets availability_max_hours_worked + * + * @return float|null + */ + public function getAvailabilityMaxHoursWorked() { + return $this->container['availability_max_hours_worked']; + } + + /** + * Sets availability_max_hours_worked + * + * @param float|null $availability_max_hours_worked availability_max_hours_worked + * + * @return self + */ + public function setAvailabilityMaxHoursWorked($availability_max_hours_worked) { + if (is_null($availability_max_hours_worked)) { + $this->openApiNullablesSetToNull['availability_max_hours_worked'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_max_hours_worked'])) { + unset($nullablesSetToNull['availability_max_hours_worked']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_max_hours_worked'] = $availability_max_hours_worked; + + return $this; + } + + /** + * Gets availability_start_time + * + * @return string|null + */ + public function getAvailabilityStartTime() { + return $this->container['availability_start_time']; + } + + /** + * Sets availability_start_time + * + * @param string|null $availability_start_time availability_start_time + * + * @return self + */ + public function setAvailabilityStartTime($availability_start_time) { + if (is_null($availability_start_time)) { + $this->openApiNullablesSetToNull['availability_start_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_start_time'])) { + unset($nullablesSetToNull['availability_start_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_start_time'] = $availability_start_time; + + return $this; + } + + /** + * Gets availability_end_time + * + * @return string|null + */ + public function getAvailabilityEndTime() { + return $this->container['availability_end_time']; + } + + /** + * Sets availability_end_time + * + * @param string|null $availability_end_time availability_end_time + * + * @return self + */ + public function setAvailabilityEndTime($availability_end_time) { + if (is_null($availability_end_time)) { + $this->openApiNullablesSetToNull['availability_end_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['availability_end_time'])) { + unset($nullablesSetToNull['availability_end_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availability_end_time'] = $availability_end_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimesheetEntryInfoApiTransformer.php b/lib/Model/TimesheetEntryInfoApiTransformer.php index 24785c8a..2d3bf4f8 100644 --- a/lib/Model/TimesheetEntryInfoApiTransformer.php +++ b/lib/Model/TimesheetEntryInfoApiTransformer.php @@ -66,7 +66,8 @@ class TimesheetEntryInfoApiTransformer implements ModelInterface, ArrayAccess, \ 'timezone' => 'string', 'hours' => 'float', 'note' => 'string', - 'project_info' => '\BhrSdk\Model\ProjectInfoApiTransformer' + 'project_info' => '\BhrSdk\Model\ProjectInfoApiTransformer', + 'break_info' => 'object' ]; /** @@ -86,7 +87,8 @@ class TimesheetEntryInfoApiTransformer implements ModelInterface, ArrayAccess, \ 'timezone' => null, 'hours' => 'float', 'note' => null, - 'project_info' => null + 'project_info' => null, + 'break_info' => null ]; /** @@ -105,7 +107,8 @@ class TimesheetEntryInfoApiTransformer implements ModelInterface, ArrayAccess, \ 'timezone' => true, 'hours' => true, 'note' => true, - 'project_info' => true + 'project_info' => true, + 'break_info' => true ]; /** @@ -199,7 +202,8 @@ public function isNullableSetToNull(string $property): bool { 'timezone' => 'timezone', 'hours' => 'hours', 'note' => 'note', - 'project_info' => 'projectInfo' + 'project_info' => 'projectInfo', + 'break_info' => 'breakInfo' ]; /** @@ -217,7 +221,8 @@ public function isNullableSetToNull(string $property): bool { 'timezone' => 'setTimezone', 'hours' => 'setHours', 'note' => 'setNote', - 'project_info' => 'setProjectInfo' + 'project_info' => 'setProjectInfo', + 'break_info' => 'setBreakInfo' ]; /** @@ -235,7 +240,8 @@ public function isNullableSetToNull(string $property): bool { 'timezone' => 'getTimezone', 'hours' => 'getHours', 'note' => 'getNote', - 'project_info' => 'getProjectInfo' + 'project_info' => 'getProjectInfo', + 'break_info' => 'getBreakInfo' ]; /** @@ -299,6 +305,7 @@ public function __construct(?array $data = null) { $this->setIfExists('hours', $data ?? [], null); $this->setIfExists('note', $data ?? [], null); $this->setIfExists('project_info', $data ?? [], null); + $this->setIfExists('break_info', $data ?? [], null); } /** @@ -451,7 +458,7 @@ public function getStart() { /** * Sets start * - * @param \DateTime|null $start Start time + * @param \DateTime|null $start start * * @return self */ @@ -482,7 +489,7 @@ public function getEnd() { /** * Sets end * - * @param \DateTime|null $end End time + * @param \DateTime|null $end end * * @return self */ @@ -513,7 +520,7 @@ public function getTimezone() { /** * Sets timezone * - * @param string|null $timezone Timezone + * @param string|null $timezone timezone * * @return self */ @@ -544,7 +551,7 @@ public function getHours() { /** * Sets hours * - * @param float|null $hours Hours worked + * @param float|null $hours hours * * @return self */ @@ -575,7 +582,7 @@ public function getNote() { /** * Sets note * - * @param string|null $note Note + * @param string|null $note note * * @return self */ @@ -624,6 +631,37 @@ public function setProjectInfo($project_info) { return $this; } + + /** + * Gets break_info + * + * @return object|null + */ + public function getBreakInfo() { + return $this->container['break_info']; + } + + /** + * Sets break_info + * + * @param object|null $break_info break_info + * + * @return self + */ + public function setBreakInfo($break_info) { + if (is_null($break_info)) { + $this->openApiNullablesSetToNull['break_info'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['break_info'])) { + unset($nullablesSetToNull['break_info']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['break_info'] = $break_info; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TimezoneListResponse.php b/lib/Model/TimezoneListResponse.php new file mode 100644 index 00000000..a5333878 --- /dev/null +++ b/lib/Model/TimezoneListResponse.php @@ -0,0 +1,452 @@ +<?php +declare(strict_types=1); +/** + * TimezoneListResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimezoneListResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimezoneListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimezoneListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'data' => '\BhrSdk\Model\TimezoneResource[]', + 'meta' => '\BhrSdk\Model\PaginationMetaData', + '_links' => 'array<string,\BhrSdk\Model\AvailableAction>' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'data' => null, + 'meta' => null, + '_links' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'data' => false, + 'meta' => false, + '_links' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + $this->setIfExists('_links', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets data + * + * @return \BhrSdk\Model\TimezoneResource[]|null + */ + public function getData() { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \BhrSdk\Model\TimezoneResource[]|null $data Array of timezone resources for the current page + * + * @return self + */ + public function setData($data) { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \BhrSdk\Model\PaginationMetaData|null + */ + public function getMeta() { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \BhrSdk\Model\PaginationMetaData|null $meta The pagination metadata for the response. + * + * @return self + */ + public function setMeta($meta) { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets _links + * + * @return array<string,\BhrSdk\Model\AvailableAction>|null + */ + public function getLinks() { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array<string,\BhrSdk\Model\AvailableAction>|null $_links _links + * + * @return self + */ + public function setLinks($_links) { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TimezoneResource.php b/lib/Model/TimezoneResource.php new file mode 100644 index 00000000..df60650f --- /dev/null +++ b/lib/Model/TimezoneResource.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * TimezoneResource + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TimezoneResource Class Doc Comment + * + * @category Class + * @description A timezone resource. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TimezoneResource implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TimezoneResource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'gmt_offset' => 'string', + 'name' => 'string', + 'utc_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'gmt_offset' => null, + 'name' => null, + 'utc_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'gmt_offset' => false, + 'name' => false, + 'utc_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'gmt_offset' => 'gmtOffset', + 'name' => 'name', + 'utc_name' => 'utcName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'gmt_offset' => 'setGmtOffset', + 'name' => 'setName', + 'utc_name' => 'setUtcName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'gmt_offset' => 'getGmtOffset', + 'name' => 'getName', + 'utc_name' => 'getUtcName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('gmt_offset', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('utc_name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The timezone ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets gmt_offset + * + * @return string|null + */ + public function getGmtOffset() { + return $this->container['gmt_offset']; + } + + /** + * Sets gmt_offset + * + * @param string|null $gmt_offset The GMT offset label (e.g. \"(GMT-07:00)\"). + * + * @return self + */ + public function setGmtOffset($gmt_offset) { + if (is_null($gmt_offset)) { + throw new \InvalidArgumentException('non-nullable gmt_offset cannot be null'); + } + $this->container['gmt_offset'] = $gmt_offset; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The display name of the timezone. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets utc_name + * + * @return string|null + */ + public function getUtcName() { + return $this->container['utc_name']; + } + + /** + * Sets utc_name + * + * @param string|null $utc_name The IANA/UTC timezone identifier. + * + * @return self + */ + public function setUtcName($utc_name) { + if (is_null($utc_name)) { + throw new \InvalidArgumentException('non-nullable utc_name cannot be null'); + } + $this->container['utc_name'] = $utc_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsBenefitDetailsValues.php b/lib/Model/TotalRewardsBenefitDetailsValues.php new file mode 100644 index 00000000..2063bcae --- /dev/null +++ b/lib/Model/TotalRewardsBenefitDetailsValues.php @@ -0,0 +1,573 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsBenefitDetailsValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsBenefitDetailsValues Class Doc Comment + * + * @category Class + * @description Schema for a total rewards benefit details value + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsBenefitDetailsValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-BenefitDetailsValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'company_contribution_amount' => 'string', + 'company_contribution_subvalue' => 'string', + 'summary' => 'string', + 'url' => 'string', + 'benefit_modal_values_link' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'company_contribution_amount' => null, + 'company_contribution_subvalue' => null, + 'summary' => null, + 'url' => null, + 'benefit_modal_values_link' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'company_contribution_amount' => false, + 'company_contribution_subvalue' => true, + 'summary' => true, + 'url' => true, + 'benefit_modal_values_link' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'company_contribution_amount' => 'companyContributionAmount', + 'company_contribution_subvalue' => 'companyContributionSubvalue', + 'summary' => 'summary', + 'url' => 'url', + 'benefit_modal_values_link' => 'benefitModalValuesLink' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'company_contribution_amount' => 'setCompanyContributionAmount', + 'company_contribution_subvalue' => 'setCompanyContributionSubvalue', + 'summary' => 'setSummary', + 'url' => 'setUrl', + 'benefit_modal_values_link' => 'setBenefitModalValuesLink' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'company_contribution_amount' => 'getCompanyContributionAmount', + 'company_contribution_subvalue' => 'getCompanyContributionSubvalue', + 'summary' => 'getSummary', + 'url' => 'getUrl', + 'benefit_modal_values_link' => 'getBenefitModalValuesLink' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('company_contribution_amount', $data ?? [], null); + $this->setIfExists('company_contribution_subvalue', $data ?? [], null); + $this->setIfExists('summary', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('benefit_modal_values_link', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets company_contribution_amount + * + * @return string|null + */ + public function getCompanyContributionAmount() { + return $this->container['company_contribution_amount']; + } + + /** + * Sets company_contribution_amount + * + * @param string|null $company_contribution_amount Company contribution amount + * + * @return self + */ + public function setCompanyContributionAmount($company_contribution_amount) { + if (is_null($company_contribution_amount)) { + throw new \InvalidArgumentException('non-nullable company_contribution_amount cannot be null'); + } + $this->container['company_contribution_amount'] = $company_contribution_amount; + + return $this; + } + + /** + * Gets company_contribution_subvalue + * + * @return string|null + */ + public function getCompanyContributionSubvalue() { + return $this->container['company_contribution_subvalue']; + } + + /** + * Sets company_contribution_subvalue + * + * @param string|null $company_contribution_subvalue company_contribution_subvalue + * + * @return self + */ + public function setCompanyContributionSubvalue($company_contribution_subvalue) { + if (is_null($company_contribution_subvalue)) { + $this->openApiNullablesSetToNull['company_contribution_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_contribution_subvalue'])) { + unset($nullablesSetToNull['company_contribution_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_contribution_subvalue'] = $company_contribution_subvalue; + + return $this; + } + + /** + * Gets summary + * + * @return string|null + */ + public function getSummary() { + return $this->container['summary']; + } + + /** + * Sets summary + * + * @param string|null $summary summary + * + * @return self + */ + public function setSummary($summary) { + if (is_null($summary)) { + $this->openApiNullablesSetToNull['summary'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['summary'])) { + unset($nullablesSetToNull['summary']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['summary'] = $summary; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url url + * + * @return self + */ + public function setUrl($url) { + if (is_null($url)) { + $this->openApiNullablesSetToNull['url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['url'])) { + unset($nullablesSetToNull['url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets benefit_modal_values_link + * + * @return string|null + */ + public function getBenefitModalValuesLink() { + return $this->container['benefit_modal_values_link']; + } + + /** + * Sets benefit_modal_values_link + * + * @param string|null $benefit_modal_values_link benefit_modal_values_link + * + * @return self + */ + public function setBenefitModalValuesLink($benefit_modal_values_link) { + if (is_null($benefit_modal_values_link)) { + $this->openApiNullablesSetToNull['benefit_modal_values_link'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benefit_modal_values_link'])) { + unset($nullablesSetToNull['benefit_modal_values_link']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benefit_modal_values_link'] = $benefit_modal_values_link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsBenefitSectionValues.php b/lib/Model/TotalRewardsBenefitSectionValues.php new file mode 100644 index 00000000..78c850c4 --- /dev/null +++ b/lib/Model/TotalRewardsBenefitSectionValues.php @@ -0,0 +1,421 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsBenefitSectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsBenefitSectionValues Class Doc Comment + * + * @category Class + * @description Schema for a total rewards benefit section + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsBenefitSectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-BenefitSectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'comp_summary' => '\BhrSdk\Model\TotalRewardsCompSummaryValues', + 'benefit_details' => '\BhrSdk\Model\TotalRewardsBenefitDetailsValues[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'comp_summary' => null, + 'benefit_details' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'comp_summary' => false, + 'benefit_details' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'comp_summary' => 'compSummary', + 'benefit_details' => 'benefitDetails' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'comp_summary' => 'setCompSummary', + 'benefit_details' => 'setBenefitDetails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'comp_summary' => 'getCompSummary', + 'benefit_details' => 'getBenefitDetails' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('comp_summary', $data ?? [], null); + $this->setIfExists('benefit_details', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets comp_summary + * + * @return \BhrSdk\Model\TotalRewardsCompSummaryValues|null + */ + public function getCompSummary() { + return $this->container['comp_summary']; + } + + /** + * Sets comp_summary + * + * @param \BhrSdk\Model\TotalRewardsCompSummaryValues|null $comp_summary Compensation summary + * + * @return self + */ + public function setCompSummary($comp_summary) { + if (is_null($comp_summary)) { + throw new \InvalidArgumentException('non-nullable comp_summary cannot be null'); + } + $this->container['comp_summary'] = $comp_summary; + + return $this; + } + + /** + * Gets benefit_details + * + * @return \BhrSdk\Model\TotalRewardsBenefitDetailsValues[]|null + */ + public function getBenefitDetails() { + return $this->container['benefit_details']; + } + + /** + * Sets benefit_details + * + * @param \BhrSdk\Model\TotalRewardsBenefitDetailsValues[]|null $benefit_details Benefit details + * + * @return self + */ + public function setBenefitDetails($benefit_details) { + if (is_null($benefit_details)) { + throw new \InvalidArgumentException('non-nullable benefit_details cannot be null'); + } + $this->container['benefit_details'] = $benefit_details; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsCalendarSectionValues.php b/lib/Model/TotalRewardsCalendarSectionValues.php new file mode 100644 index 00000000..7cf02a76 --- /dev/null +++ b/lib/Model/TotalRewardsCalendarSectionValues.php @@ -0,0 +1,459 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsCalendarSectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsCalendarSectionValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards calendar section + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsCalendarSectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-CalendarSectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'holidays' => '\BhrSdk\Model\TotalRewardsHolidayValue[]', + 'time_off_policies' => '\BhrSdk\Model\TotalRewardsTimeOffPolicyValue[]', + 'hourly_accrual_disclaimer' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'holidays' => null, + 'time_off_policies' => null, + 'hourly_accrual_disclaimer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'holidays' => false, + 'time_off_policies' => false, + 'hourly_accrual_disclaimer' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'holidays' => 'holidays', + 'time_off_policies' => 'timeOffPolicies', + 'hourly_accrual_disclaimer' => 'hourlyAccrualDisclaimer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'holidays' => 'setHolidays', + 'time_off_policies' => 'setTimeOffPolicies', + 'hourly_accrual_disclaimer' => 'setHourlyAccrualDisclaimer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'holidays' => 'getHolidays', + 'time_off_policies' => 'getTimeOffPolicies', + 'hourly_accrual_disclaimer' => 'getHourlyAccrualDisclaimer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('holidays', $data ?? [], null); + $this->setIfExists('time_off_policies', $data ?? [], null); + $this->setIfExists('hourly_accrual_disclaimer', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets holidays + * + * @return \BhrSdk\Model\TotalRewardsHolidayValue[]|null + */ + public function getHolidays() { + return $this->container['holidays']; + } + + /** + * Sets holidays + * + * @param \BhrSdk\Model\TotalRewardsHolidayValue[]|null $holidays List of holidays + * + * @return self + */ + public function setHolidays($holidays) { + if (is_null($holidays)) { + throw new \InvalidArgumentException('non-nullable holidays cannot be null'); + } + $this->container['holidays'] = $holidays; + + return $this; + } + + /** + * Gets time_off_policies + * + * @return \BhrSdk\Model\TotalRewardsTimeOffPolicyValue[]|null + */ + public function getTimeOffPolicies() { + return $this->container['time_off_policies']; + } + + /** + * Sets time_off_policies + * + * @param \BhrSdk\Model\TotalRewardsTimeOffPolicyValue[]|null $time_off_policies List of time off policies + * + * @return self + */ + public function setTimeOffPolicies($time_off_policies) { + if (is_null($time_off_policies)) { + throw new \InvalidArgumentException('non-nullable time_off_policies cannot be null'); + } + $this->container['time_off_policies'] = $time_off_policies; + + return $this; + } + + /** + * Gets hourly_accrual_disclaimer + * + * @return string|null + */ + public function getHourlyAccrualDisclaimer() { + return $this->container['hourly_accrual_disclaimer']; + } + + /** + * Sets hourly_accrual_disclaimer + * + * @param string|null $hourly_accrual_disclaimer hourly_accrual_disclaimer + * + * @return self + */ + public function setHourlyAccrualDisclaimer($hourly_accrual_disclaimer) { + if (is_null($hourly_accrual_disclaimer)) { + $this->openApiNullablesSetToNull['hourly_accrual_disclaimer'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hourly_accrual_disclaimer'])) { + unset($nullablesSetToNull['hourly_accrual_disclaimer']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hourly_accrual_disclaimer'] = $hourly_accrual_disclaimer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsCompSummaryValues.php b/lib/Model/TotalRewardsCompSummaryValues.php new file mode 100644 index 00000000..ab844533 --- /dev/null +++ b/lib/Model/TotalRewardsCompSummaryValues.php @@ -0,0 +1,503 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsCompSummaryValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsCompSummaryValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards compensation summary values + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsCompSummaryValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-CompSummaryValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'subtitle' => 'string', + 'value' => 'string', + 'subvalue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'subtitle' => null, + 'value' => null, + 'subvalue' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'subtitle' => true, + 'value' => true, + 'subvalue' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'subtitle' => 'subtitle', + 'value' => 'value', + 'subvalue' => 'subvalue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'subtitle' => 'setSubtitle', + 'value' => 'setValue', + 'subvalue' => 'setSubvalue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'subtitle' => 'getSubtitle', + 'value' => 'getValue', + 'subvalue' => 'getSubvalue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('subtitle', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('subvalue', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets subtitle + * + * @return string|null + */ + public function getSubtitle() { + return $this->container['subtitle']; + } + + /** + * Sets subtitle + * + * @param string|null $subtitle subtitle + * + * @return self + */ + public function setSubtitle($subtitle) { + if (is_null($subtitle)) { + $this->openApiNullablesSetToNull['subtitle'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['subtitle'])) { + unset($nullablesSetToNull['subtitle']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['subtitle'] = $subtitle; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value value + * + * @return self + */ + public function setValue($value) { + if (is_null($value)) { + $this->openApiNullablesSetToNull['value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['value'])) { + unset($nullablesSetToNull['value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets subvalue + * + * @return string|null + */ + public function getSubvalue() { + return $this->container['subvalue']; + } + + /** + * Sets subvalue + * + * @param string|null $subvalue subvalue + * + * @return self + */ + public function setSubvalue($subvalue) { + if (is_null($subvalue)) { + $this->openApiNullablesSetToNull['subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['subvalue'])) { + unset($nullablesSetToNull['subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['subvalue'] = $subvalue; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsCustomDisclaimerInfo.php b/lib/Model/TotalRewardsCustomDisclaimerInfo.php new file mode 100644 index 00000000..8a6dda33 --- /dev/null +++ b/lib/Model/TotalRewardsCustomDisclaimerInfo.php @@ -0,0 +1,427 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsCustomDisclaimerInfo + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsCustomDisclaimerInfo Class Doc Comment + * + * @category Class + * @description Schema for a total rewards custom disclaimer info + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsCustomDisclaimerInfo implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-CustomDisclaimerInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'is_viewer_admin' => 'bool', + 'custom_disclaimer' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'is_viewer_admin' => null, + 'custom_disclaimer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'is_viewer_admin' => false, + 'custom_disclaimer' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'is_viewer_admin' => 'isViewerAdmin', + 'custom_disclaimer' => 'customDisclaimer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'is_viewer_admin' => 'setIsViewerAdmin', + 'custom_disclaimer' => 'setCustomDisclaimer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'is_viewer_admin' => 'getIsViewerAdmin', + 'custom_disclaimer' => 'getCustomDisclaimer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('is_viewer_admin', $data ?? [], null); + $this->setIfExists('custom_disclaimer', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets is_viewer_admin + * + * @return bool|null + */ + public function getIsViewerAdmin() { + return $this->container['is_viewer_admin']; + } + + /** + * Sets is_viewer_admin + * + * @param bool|null $is_viewer_admin Is admin currently viewing + * + * @return self + */ + public function setIsViewerAdmin($is_viewer_admin) { + if (is_null($is_viewer_admin)) { + throw new \InvalidArgumentException('non-nullable is_viewer_admin cannot be null'); + } + $this->container['is_viewer_admin'] = $is_viewer_admin; + + return $this; + } + + /** + * Gets custom_disclaimer + * + * @return string|null + */ + public function getCustomDisclaimer() { + return $this->container['custom_disclaimer']; + } + + /** + * Sets custom_disclaimer + * + * @param string|null $custom_disclaimer custom_disclaimer + * + * @return self + */ + public function setCustomDisclaimer($custom_disclaimer) { + if (is_null($custom_disclaimer)) { + $this->openApiNullablesSetToNull['custom_disclaimer'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['custom_disclaimer'])) { + unset($nullablesSetToNull['custom_disclaimer']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['custom_disclaimer'] = $custom_disclaimer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEmployeeStatement.php b/lib/Model/TotalRewardsEmployeeStatement.php new file mode 100644 index 00000000..c9e11699 --- /dev/null +++ b/lib/Model/TotalRewardsEmployeeStatement.php @@ -0,0 +1,943 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEmployeeStatement + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEmployeeStatement Class Doc Comment + * + * @category Class + * @description Schema for a total rewards statement + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEmployeeStatement implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EmployeeStatement'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_id' => 'string', + 'employee_name' => 'string', + 'job_title' => 'string', + 'has_mixed_currency_types' => 'bool', + 'overview_section' => '\BhrSdk\Model\TotalRewardsOverviewSectionValues', + 'pay_section' => '\BhrSdk\Model\TotalRewardsTimelineSectionValues', + 'bonus_section' => '\BhrSdk\Model\TotalRewardsTimelineSectionValues', + 'commission_section' => '\BhrSdk\Model\TotalRewardsTimelineSectionValues', + 'benefit_section' => '\BhrSdk\Model\TotalRewardsBenefitSectionValues', + 'equity_section' => '\BhrSdk\Model\TotalRewardsEquitySectionValues', + 'calendar_section' => '\BhrSdk\Model\TotalRewardsCalendarSectionValues', + 'extra_pay_section' => '\BhrSdk\Model\TotalRewardsExtraPaySectionValues', + 'custom_disclaimer_info' => '\BhrSdk\Model\TotalRewardsCustomDisclaimerInfo', + 'company_name' => 'string', + 'company_logo_url' => 'string', + 'statement_year' => 'int', + 'min_statement_year' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_id' => null, + 'employee_name' => null, + 'job_title' => null, + 'has_mixed_currency_types' => 'boolean', + 'overview_section' => null, + 'pay_section' => null, + 'bonus_section' => null, + 'commission_section' => null, + 'benefit_section' => null, + 'equity_section' => null, + 'calendar_section' => null, + 'extra_pay_section' => null, + 'custom_disclaimer_info' => null, + 'company_name' => null, + 'company_logo_url' => null, + 'statement_year' => null, + 'min_statement_year' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_id' => true, + 'employee_name' => false, + 'job_title' => true, + 'has_mixed_currency_types' => true, + 'overview_section' => false, + 'pay_section' => false, + 'bonus_section' => false, + 'commission_section' => false, + 'benefit_section' => false, + 'equity_section' => false, + 'calendar_section' => false, + 'extra_pay_section' => false, + 'custom_disclaimer_info' => false, + 'company_name' => true, + 'company_logo_url' => true, + 'statement_year' => true, + 'min_statement_year' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'employee_name' => 'employeeName', + 'job_title' => 'jobTitle', + 'has_mixed_currency_types' => 'hasMixedCurrencyTypes', + 'overview_section' => 'overviewSection', + 'pay_section' => 'paySection', + 'bonus_section' => 'bonusSection', + 'commission_section' => 'commissionSection', + 'benefit_section' => 'benefitSection', + 'equity_section' => 'equitySection', + 'calendar_section' => 'calendarSection', + 'extra_pay_section' => 'extraPaySection', + 'custom_disclaimer_info' => 'customDisclaimerInfo', + 'company_name' => 'companyName', + 'company_logo_url' => 'companyLogoUrl', + 'statement_year' => 'statementYear', + 'min_statement_year' => 'minStatementYear' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'employee_name' => 'setEmployeeName', + 'job_title' => 'setJobTitle', + 'has_mixed_currency_types' => 'setHasMixedCurrencyTypes', + 'overview_section' => 'setOverviewSection', + 'pay_section' => 'setPaySection', + 'bonus_section' => 'setBonusSection', + 'commission_section' => 'setCommissionSection', + 'benefit_section' => 'setBenefitSection', + 'equity_section' => 'setEquitySection', + 'calendar_section' => 'setCalendarSection', + 'extra_pay_section' => 'setExtraPaySection', + 'custom_disclaimer_info' => 'setCustomDisclaimerInfo', + 'company_name' => 'setCompanyName', + 'company_logo_url' => 'setCompanyLogoUrl', + 'statement_year' => 'setStatementYear', + 'min_statement_year' => 'setMinStatementYear' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'employee_name' => 'getEmployeeName', + 'job_title' => 'getJobTitle', + 'has_mixed_currency_types' => 'getHasMixedCurrencyTypes', + 'overview_section' => 'getOverviewSection', + 'pay_section' => 'getPaySection', + 'bonus_section' => 'getBonusSection', + 'commission_section' => 'getCommissionSection', + 'benefit_section' => 'getBenefitSection', + 'equity_section' => 'getEquitySection', + 'calendar_section' => 'getCalendarSection', + 'extra_pay_section' => 'getExtraPaySection', + 'custom_disclaimer_info' => 'getCustomDisclaimerInfo', + 'company_name' => 'getCompanyName', + 'company_logo_url' => 'getCompanyLogoUrl', + 'statement_year' => 'getStatementYear', + 'min_statement_year' => 'getMinStatementYear' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('employee_name', $data ?? [], null); + $this->setIfExists('job_title', $data ?? [], null); + $this->setIfExists('has_mixed_currency_types', $data ?? [], null); + $this->setIfExists('overview_section', $data ?? [], null); + $this->setIfExists('pay_section', $data ?? [], null); + $this->setIfExists('bonus_section', $data ?? [], null); + $this->setIfExists('commission_section', $data ?? [], null); + $this->setIfExists('benefit_section', $data ?? [], null); + $this->setIfExists('equity_section', $data ?? [], null); + $this->setIfExists('calendar_section', $data ?? [], null); + $this->setIfExists('extra_pay_section', $data ?? [], null); + $this->setIfExists('custom_disclaimer_info', $data ?? [], null); + $this->setIfExists('company_name', $data ?? [], null); + $this->setIfExists('company_logo_url', $data ?? [], null); + $this->setIfExists('statement_year', $data ?? [], null); + $this->setIfExists('min_statement_year', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets employee_name + * + * @return string|null + */ + public function getEmployeeName() { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string|null $employee_name Employee Name + * + * @return self + */ + public function setEmployeeName($employee_name) { + if (is_null($employee_name)) { + throw new \InvalidArgumentException('non-nullable employee_name cannot be null'); + } + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets job_title + * + * @return string|null + */ + public function getJobTitle() { + return $this->container['job_title']; + } + + /** + * Sets job_title + * + * @param string|null $job_title job_title + * + * @return self + */ + public function setJobTitle($job_title) { + if (is_null($job_title)) { + $this->openApiNullablesSetToNull['job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title'])) { + unset($nullablesSetToNull['job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title'] = $job_title; + + return $this; + } + + /** + * Gets has_mixed_currency_types + * + * @return bool|null + */ + public function getHasMixedCurrencyTypes() { + return $this->container['has_mixed_currency_types']; + } + + /** + * Sets has_mixed_currency_types + * + * @param bool|null $has_mixed_currency_types has_mixed_currency_types + * + * @return self + */ + public function setHasMixedCurrencyTypes($has_mixed_currency_types) { + if (is_null($has_mixed_currency_types)) { + $this->openApiNullablesSetToNull['has_mixed_currency_types'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['has_mixed_currency_types'])) { + unset($nullablesSetToNull['has_mixed_currency_types']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['has_mixed_currency_types'] = $has_mixed_currency_types; + + return $this; + } + + /** + * Gets overview_section + * + * @return \BhrSdk\Model\TotalRewardsOverviewSectionValues|null + */ + public function getOverviewSection() { + return $this->container['overview_section']; + } + + /** + * Sets overview_section + * + * @param \BhrSdk\Model\TotalRewardsOverviewSectionValues|null $overview_section Total Rewards overview section object + * + * @return self + */ + public function setOverviewSection($overview_section) { + if (is_null($overview_section)) { + throw new \InvalidArgumentException('non-nullable overview_section cannot be null'); + } + $this->container['overview_section'] = $overview_section; + + return $this; + } + + /** + * Gets pay_section + * + * @return \BhrSdk\Model\TotalRewardsTimelineSectionValues|null + */ + public function getPaySection() { + return $this->container['pay_section']; + } + + /** + * Sets pay_section + * + * @param \BhrSdk\Model\TotalRewardsTimelineSectionValues|null $pay_section Total Rewards pay timeline object + * + * @return self + */ + public function setPaySection($pay_section) { + if (is_null($pay_section)) { + throw new \InvalidArgumentException('non-nullable pay_section cannot be null'); + } + $this->container['pay_section'] = $pay_section; + + return $this; + } + + /** + * Gets bonus_section + * + * @return \BhrSdk\Model\TotalRewardsTimelineSectionValues|null + */ + public function getBonusSection() { + return $this->container['bonus_section']; + } + + /** + * Sets bonus_section + * + * @param \BhrSdk\Model\TotalRewardsTimelineSectionValues|null $bonus_section Total Rewards bonus section timeline object + * + * @return self + */ + public function setBonusSection($bonus_section) { + if (is_null($bonus_section)) { + throw new \InvalidArgumentException('non-nullable bonus_section cannot be null'); + } + $this->container['bonus_section'] = $bonus_section; + + return $this; + } + + /** + * Gets commission_section + * + * @return \BhrSdk\Model\TotalRewardsTimelineSectionValues|null + */ + public function getCommissionSection() { + return $this->container['commission_section']; + } + + /** + * Sets commission_section + * + * @param \BhrSdk\Model\TotalRewardsTimelineSectionValues|null $commission_section Total Rewards commission section timeline object + * + * @return self + */ + public function setCommissionSection($commission_section) { + if (is_null($commission_section)) { + throw new \InvalidArgumentException('non-nullable commission_section cannot be null'); + } + $this->container['commission_section'] = $commission_section; + + return $this; + } + + /** + * Gets benefit_section + * + * @return \BhrSdk\Model\TotalRewardsBenefitSectionValues|null + */ + public function getBenefitSection() { + return $this->container['benefit_section']; + } + + /** + * Sets benefit_section + * + * @param \BhrSdk\Model\TotalRewardsBenefitSectionValues|null $benefit_section Total Rewards benefit section object + * + * @return self + */ + public function setBenefitSection($benefit_section) { + if (is_null($benefit_section)) { + throw new \InvalidArgumentException('non-nullable benefit_section cannot be null'); + } + $this->container['benefit_section'] = $benefit_section; + + return $this; + } + + /** + * Gets equity_section + * + * @return \BhrSdk\Model\TotalRewardsEquitySectionValues|null + */ + public function getEquitySection() { + return $this->container['equity_section']; + } + + /** + * Sets equity_section + * + * @param \BhrSdk\Model\TotalRewardsEquitySectionValues|null $equity_section Total Rewards equity section object + * + * @return self + */ + public function setEquitySection($equity_section) { + if (is_null($equity_section)) { + throw new \InvalidArgumentException('non-nullable equity_section cannot be null'); + } + $this->container['equity_section'] = $equity_section; + + return $this; + } + + /** + * Gets calendar_section + * + * @return \BhrSdk\Model\TotalRewardsCalendarSectionValues|null + */ + public function getCalendarSection() { + return $this->container['calendar_section']; + } + + /** + * Sets calendar_section + * + * @param \BhrSdk\Model\TotalRewardsCalendarSectionValues|null $calendar_section Total Rewards equity section object + * + * @return self + */ + public function setCalendarSection($calendar_section) { + if (is_null($calendar_section)) { + throw new \InvalidArgumentException('non-nullable calendar_section cannot be null'); + } + $this->container['calendar_section'] = $calendar_section; + + return $this; + } + + /** + * Gets extra_pay_section + * + * @return \BhrSdk\Model\TotalRewardsExtraPaySectionValues|null + */ + public function getExtraPaySection() { + return $this->container['extra_pay_section']; + } + + /** + * Sets extra_pay_section + * + * @param \BhrSdk\Model\TotalRewardsExtraPaySectionValues|null $extra_pay_section Total Rewards extra pay section object + * + * @return self + */ + public function setExtraPaySection($extra_pay_section) { + if (is_null($extra_pay_section)) { + throw new \InvalidArgumentException('non-nullable extra_pay_section cannot be null'); + } + $this->container['extra_pay_section'] = $extra_pay_section; + + return $this; + } + + /** + * Gets custom_disclaimer_info + * + * @return \BhrSdk\Model\TotalRewardsCustomDisclaimerInfo|null + */ + public function getCustomDisclaimerInfo() { + return $this->container['custom_disclaimer_info']; + } + + /** + * Sets custom_disclaimer_info + * + * @param \BhrSdk\Model\TotalRewardsCustomDisclaimerInfo|null $custom_disclaimer_info Total Rewards custom disclaimer object + * + * @return self + */ + public function setCustomDisclaimerInfo($custom_disclaimer_info) { + if (is_null($custom_disclaimer_info)) { + throw new \InvalidArgumentException('non-nullable custom_disclaimer_info cannot be null'); + } + $this->container['custom_disclaimer_info'] = $custom_disclaimer_info; + + return $this; + } + + /** + * Gets company_name + * + * @return string|null + */ + public function getCompanyName() { + return $this->container['company_name']; + } + + /** + * Sets company_name + * + * @param string|null $company_name company_name + * + * @return self + */ + public function setCompanyName($company_name) { + if (is_null($company_name)) { + $this->openApiNullablesSetToNull['company_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_name'])) { + unset($nullablesSetToNull['company_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_name'] = $company_name; + + return $this; + } + + /** + * Gets company_logo_url + * + * @return string|null + */ + public function getCompanyLogoUrl() { + return $this->container['company_logo_url']; + } + + /** + * Sets company_logo_url + * + * @param string|null $company_logo_url company_logo_url + * + * @return self + */ + public function setCompanyLogoUrl($company_logo_url) { + if (is_null($company_logo_url)) { + $this->openApiNullablesSetToNull['company_logo_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_logo_url'])) { + unset($nullablesSetToNull['company_logo_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_logo_url'] = $company_logo_url; + + return $this; + } + + /** + * Gets statement_year + * + * @return int|null + */ + public function getStatementYear() { + return $this->container['statement_year']; + } + + /** + * Sets statement_year + * + * @param int|null $statement_year statement_year + * + * @return self + */ + public function setStatementYear($statement_year) { + if (is_null($statement_year)) { + $this->openApiNullablesSetToNull['statement_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['statement_year'])) { + unset($nullablesSetToNull['statement_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['statement_year'] = $statement_year; + + return $this; + } + + /** + * Gets min_statement_year + * + * @return int|null + */ + public function getMinStatementYear() { + return $this->container['min_statement_year']; + } + + /** + * Sets min_statement_year + * + * @param int|null $min_statement_year min_statement_year + * + * @return self + */ + public function setMinStatementYear($min_statement_year) { + if (is_null($min_statement_year)) { + $this->openApiNullablesSetToNull['min_statement_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['min_statement_year'])) { + unset($nullablesSetToNull['min_statement_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min_statement_year'] = $min_statement_year; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEquityDetailsValues.php b/lib/Model/TotalRewardsEquityDetailsValues.php new file mode 100644 index 00000000..c5c6d6aa --- /dev/null +++ b/lib/Model/TotalRewardsEquityDetailsValues.php @@ -0,0 +1,1095 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEquityDetailsValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEquityDetailsValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards equity details values + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEquityDetailsValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EquityDetailsValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'cliff_months' => 'int', + 'estimated_exercise_cost' => 'string', + 'estimated_exercise_cost_subvalue' => 'string', + 'estimated_share_price' => 'string', + 'estimated_share_price_subvalue' => 'string', + 'estimated_total_value' => 'string', + 'estimated_total_value_subvalue' => 'string', + 'grant_date' => '\DateTime', + 'grant_type' => 'string', + 'grant_name' => 'string', + 'equity_growth_chart_data' => '\BhrSdk\Model\TotalRewardsEquityGrowthChartItem[]', + 'num_shares' => 'int', + 'num_vested_shares' => 'int', + 'percent_vested' => 'float', + 'strike_price' => 'string', + 'strike_price_subvalue' => 'string', + 'vesting_months' => 'int', + 'vesting_schedule' => 'string', + 'vesting_start_date' => '\DateTime', + 'vested_value' => 'string', + 'vested_value_subvalue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'cliff_months' => null, + 'estimated_exercise_cost' => null, + 'estimated_exercise_cost_subvalue' => null, + 'estimated_share_price' => null, + 'estimated_share_price_subvalue' => null, + 'estimated_total_value' => null, + 'estimated_total_value_subvalue' => null, + 'grant_date' => 'date', + 'grant_type' => null, + 'grant_name' => null, + 'equity_growth_chart_data' => null, + 'num_shares' => null, + 'num_vested_shares' => null, + 'percent_vested' => 'float', + 'strike_price' => null, + 'strike_price_subvalue' => null, + 'vesting_months' => null, + 'vesting_schedule' => null, + 'vesting_start_date' => 'date', + 'vested_value' => null, + 'vested_value_subvalue' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'cliff_months' => true, + 'estimated_exercise_cost' => true, + 'estimated_exercise_cost_subvalue' => true, + 'estimated_share_price' => false, + 'estimated_share_price_subvalue' => true, + 'estimated_total_value' => false, + 'estimated_total_value_subvalue' => true, + 'grant_date' => false, + 'grant_type' => false, + 'grant_name' => true, + 'equity_growth_chart_data' => true, + 'num_shares' => false, + 'num_vested_shares' => false, + 'percent_vested' => false, + 'strike_price' => true, + 'strike_price_subvalue' => true, + 'vesting_months' => true, + 'vesting_schedule' => false, + 'vesting_start_date' => false, + 'vested_value' => false, + 'vested_value_subvalue' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cliff_months' => 'cliffMonths', + 'estimated_exercise_cost' => 'estimatedExerciseCost', + 'estimated_exercise_cost_subvalue' => 'estimatedExerciseCostSubvalue', + 'estimated_share_price' => 'estimatedSharePrice', + 'estimated_share_price_subvalue' => 'estimatedSharePriceSubvalue', + 'estimated_total_value' => 'estimatedTotalValue', + 'estimated_total_value_subvalue' => 'estimatedTotalValueSubvalue', + 'grant_date' => 'grantDate', + 'grant_type' => 'grantType', + 'grant_name' => 'grantName', + 'equity_growth_chart_data' => 'equityGrowthChartData', + 'num_shares' => 'numShares', + 'num_vested_shares' => 'numVestedShares', + 'percent_vested' => 'percentVested', + 'strike_price' => 'strikePrice', + 'strike_price_subvalue' => 'strikePriceSubvalue', + 'vesting_months' => 'vestingMonths', + 'vesting_schedule' => 'vestingSchedule', + 'vesting_start_date' => 'vestingStartDate', + 'vested_value' => 'vestedValue', + 'vested_value_subvalue' => 'vestedValueSubvalue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cliff_months' => 'setCliffMonths', + 'estimated_exercise_cost' => 'setEstimatedExerciseCost', + 'estimated_exercise_cost_subvalue' => 'setEstimatedExerciseCostSubvalue', + 'estimated_share_price' => 'setEstimatedSharePrice', + 'estimated_share_price_subvalue' => 'setEstimatedSharePriceSubvalue', + 'estimated_total_value' => 'setEstimatedTotalValue', + 'estimated_total_value_subvalue' => 'setEstimatedTotalValueSubvalue', + 'grant_date' => 'setGrantDate', + 'grant_type' => 'setGrantType', + 'grant_name' => 'setGrantName', + 'equity_growth_chart_data' => 'setEquityGrowthChartData', + 'num_shares' => 'setNumShares', + 'num_vested_shares' => 'setNumVestedShares', + 'percent_vested' => 'setPercentVested', + 'strike_price' => 'setStrikePrice', + 'strike_price_subvalue' => 'setStrikePriceSubvalue', + 'vesting_months' => 'setVestingMonths', + 'vesting_schedule' => 'setVestingSchedule', + 'vesting_start_date' => 'setVestingStartDate', + 'vested_value' => 'setVestedValue', + 'vested_value_subvalue' => 'setVestedValueSubvalue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cliff_months' => 'getCliffMonths', + 'estimated_exercise_cost' => 'getEstimatedExerciseCost', + 'estimated_exercise_cost_subvalue' => 'getEstimatedExerciseCostSubvalue', + 'estimated_share_price' => 'getEstimatedSharePrice', + 'estimated_share_price_subvalue' => 'getEstimatedSharePriceSubvalue', + 'estimated_total_value' => 'getEstimatedTotalValue', + 'estimated_total_value_subvalue' => 'getEstimatedTotalValueSubvalue', + 'grant_date' => 'getGrantDate', + 'grant_type' => 'getGrantType', + 'grant_name' => 'getGrantName', + 'equity_growth_chart_data' => 'getEquityGrowthChartData', + 'num_shares' => 'getNumShares', + 'num_vested_shares' => 'getNumVestedShares', + 'percent_vested' => 'getPercentVested', + 'strike_price' => 'getStrikePrice', + 'strike_price_subvalue' => 'getStrikePriceSubvalue', + 'vesting_months' => 'getVestingMonths', + 'vesting_schedule' => 'getVestingSchedule', + 'vesting_start_date' => 'getVestingStartDate', + 'vested_value' => 'getVestedValue', + 'vested_value_subvalue' => 'getVestedValueSubvalue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('cliff_months', $data ?? [], null); + $this->setIfExists('estimated_exercise_cost', $data ?? [], null); + $this->setIfExists('estimated_exercise_cost_subvalue', $data ?? [], null); + $this->setIfExists('estimated_share_price', $data ?? [], null); + $this->setIfExists('estimated_share_price_subvalue', $data ?? [], null); + $this->setIfExists('estimated_total_value', $data ?? [], null); + $this->setIfExists('estimated_total_value_subvalue', $data ?? [], null); + $this->setIfExists('grant_date', $data ?? [], null); + $this->setIfExists('grant_type', $data ?? [], null); + $this->setIfExists('grant_name', $data ?? [], null); + $this->setIfExists('equity_growth_chart_data', $data ?? [], null); + $this->setIfExists('num_shares', $data ?? [], null); + $this->setIfExists('num_vested_shares', $data ?? [], null); + $this->setIfExists('percent_vested', $data ?? [], null); + $this->setIfExists('strike_price', $data ?? [], null); + $this->setIfExists('strike_price_subvalue', $data ?? [], null); + $this->setIfExists('vesting_months', $data ?? [], null); + $this->setIfExists('vesting_schedule', $data ?? [], null); + $this->setIfExists('vesting_start_date', $data ?? [], null); + $this->setIfExists('vested_value', $data ?? [], null); + $this->setIfExists('vested_value_subvalue', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets cliff_months + * + * @return int|null + */ + public function getCliffMonths() { + return $this->container['cliff_months']; + } + + /** + * Sets cliff_months + * + * @param int|null $cliff_months cliff_months + * + * @return self + */ + public function setCliffMonths($cliff_months) { + if (is_null($cliff_months)) { + $this->openApiNullablesSetToNull['cliff_months'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['cliff_months'])) { + unset($nullablesSetToNull['cliff_months']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cliff_months'] = $cliff_months; + + return $this; + } + + /** + * Gets estimated_exercise_cost + * + * @return string|null + */ + public function getEstimatedExerciseCost() { + return $this->container['estimated_exercise_cost']; + } + + /** + * Sets estimated_exercise_cost + * + * @param string|null $estimated_exercise_cost estimated_exercise_cost + * + * @return self + */ + public function setEstimatedExerciseCost($estimated_exercise_cost) { + if (is_null($estimated_exercise_cost)) { + $this->openApiNullablesSetToNull['estimated_exercise_cost'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['estimated_exercise_cost'])) { + unset($nullablesSetToNull['estimated_exercise_cost']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['estimated_exercise_cost'] = $estimated_exercise_cost; + + return $this; + } + + /** + * Gets estimated_exercise_cost_subvalue + * + * @return string|null + */ + public function getEstimatedExerciseCostSubvalue() { + return $this->container['estimated_exercise_cost_subvalue']; + } + + /** + * Sets estimated_exercise_cost_subvalue + * + * @param string|null $estimated_exercise_cost_subvalue estimated_exercise_cost_subvalue + * + * @return self + */ + public function setEstimatedExerciseCostSubvalue($estimated_exercise_cost_subvalue) { + if (is_null($estimated_exercise_cost_subvalue)) { + $this->openApiNullablesSetToNull['estimated_exercise_cost_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['estimated_exercise_cost_subvalue'])) { + unset($nullablesSetToNull['estimated_exercise_cost_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['estimated_exercise_cost_subvalue'] = $estimated_exercise_cost_subvalue; + + return $this; + } + + /** + * Gets estimated_share_price + * + * @return string|null + */ + public function getEstimatedSharePrice() { + return $this->container['estimated_share_price']; + } + + /** + * Sets estimated_share_price + * + * @param string|null $estimated_share_price Estimated share price + * + * @return self + */ + public function setEstimatedSharePrice($estimated_share_price) { + if (is_null($estimated_share_price)) { + throw new \InvalidArgumentException('non-nullable estimated_share_price cannot be null'); + } + $this->container['estimated_share_price'] = $estimated_share_price; + + return $this; + } + + /** + * Gets estimated_share_price_subvalue + * + * @return string|null + */ + public function getEstimatedSharePriceSubvalue() { + return $this->container['estimated_share_price_subvalue']; + } + + /** + * Sets estimated_share_price_subvalue + * + * @param string|null $estimated_share_price_subvalue estimated_share_price_subvalue + * + * @return self + */ + public function setEstimatedSharePriceSubvalue($estimated_share_price_subvalue) { + if (is_null($estimated_share_price_subvalue)) { + $this->openApiNullablesSetToNull['estimated_share_price_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['estimated_share_price_subvalue'])) { + unset($nullablesSetToNull['estimated_share_price_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['estimated_share_price_subvalue'] = $estimated_share_price_subvalue; + + return $this; + } + + /** + * Gets estimated_total_value + * + * @return string|null + */ + public function getEstimatedTotalValue() { + return $this->container['estimated_total_value']; + } + + /** + * Sets estimated_total_value + * + * @param string|null $estimated_total_value Estimated total value + * + * @return self + */ + public function setEstimatedTotalValue($estimated_total_value) { + if (is_null($estimated_total_value)) { + throw new \InvalidArgumentException('non-nullable estimated_total_value cannot be null'); + } + $this->container['estimated_total_value'] = $estimated_total_value; + + return $this; + } + + /** + * Gets estimated_total_value_subvalue + * + * @return string|null + */ + public function getEstimatedTotalValueSubvalue() { + return $this->container['estimated_total_value_subvalue']; + } + + /** + * Sets estimated_total_value_subvalue + * + * @param string|null $estimated_total_value_subvalue estimated_total_value_subvalue + * + * @return self + */ + public function setEstimatedTotalValueSubvalue($estimated_total_value_subvalue) { + if (is_null($estimated_total_value_subvalue)) { + $this->openApiNullablesSetToNull['estimated_total_value_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['estimated_total_value_subvalue'])) { + unset($nullablesSetToNull['estimated_total_value_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['estimated_total_value_subvalue'] = $estimated_total_value_subvalue; + + return $this; + } + + /** + * Gets grant_date + * + * @return \DateTime|null + */ + public function getGrantDate() { + return $this->container['grant_date']; + } + + /** + * Sets grant_date + * + * @param \DateTime|null $grant_date Grant date + * + * @return self + */ + public function setGrantDate($grant_date) { + if (is_null($grant_date)) { + throw new \InvalidArgumentException('non-nullable grant_date cannot be null'); + } + $this->container['grant_date'] = $grant_date; + + return $this; + } + + /** + * Gets grant_type + * + * @return string|null + */ + public function getGrantType() { + return $this->container['grant_type']; + } + + /** + * Sets grant_type + * + * @param string|null $grant_type Grant type + * + * @return self + */ + public function setGrantType($grant_type) { + if (is_null($grant_type)) { + throw new \InvalidArgumentException('non-nullable grant_type cannot be null'); + } + $this->container['grant_type'] = $grant_type; + + return $this; + } + + /** + * Gets grant_name + * + * @return string|null + */ + public function getGrantName() { + return $this->container['grant_name']; + } + + /** + * Sets grant_name + * + * @param string|null $grant_name grant_name + * + * @return self + */ + public function setGrantName($grant_name) { + if (is_null($grant_name)) { + $this->openApiNullablesSetToNull['grant_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['grant_name'])) { + unset($nullablesSetToNull['grant_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['grant_name'] = $grant_name; + + return $this; + } + + /** + * Gets equity_growth_chart_data + * + * @return \BhrSdk\Model\TotalRewardsEquityGrowthChartItem[]|null + */ + public function getEquityGrowthChartData() { + return $this->container['equity_growth_chart_data']; + } + + /** + * Sets equity_growth_chart_data + * + * @param \BhrSdk\Model\TotalRewardsEquityGrowthChartItem[]|null $equity_growth_chart_data equity_growth_chart_data + * + * @return self + */ + public function setEquityGrowthChartData($equity_growth_chart_data) { + if (is_null($equity_growth_chart_data)) { + $this->openApiNullablesSetToNull['equity_growth_chart_data'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['equity_growth_chart_data'])) { + unset($nullablesSetToNull['equity_growth_chart_data']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['equity_growth_chart_data'] = $equity_growth_chart_data; + + return $this; + } + + /** + * Gets num_shares + * + * @return int|null + */ + public function getNumShares() { + return $this->container['num_shares']; + } + + /** + * Sets num_shares + * + * @param int|null $num_shares Number of shares + * + * @return self + */ + public function setNumShares($num_shares) { + if (is_null($num_shares)) { + throw new \InvalidArgumentException('non-nullable num_shares cannot be null'); + } + $this->container['num_shares'] = $num_shares; + + return $this; + } + + /** + * Gets num_vested_shares + * + * @return int|null + */ + public function getNumVestedShares() { + return $this->container['num_vested_shares']; + } + + /** + * Sets num_vested_shares + * + * @param int|null $num_vested_shares Number of vested shares + * + * @return self + */ + public function setNumVestedShares($num_vested_shares) { + if (is_null($num_vested_shares)) { + throw new \InvalidArgumentException('non-nullable num_vested_shares cannot be null'); + } + $this->container['num_vested_shares'] = $num_vested_shares; + + return $this; + } + + /** + * Gets percent_vested + * + * @return float|null + */ + public function getPercentVested() { + return $this->container['percent_vested']; + } + + /** + * Sets percent_vested + * + * @param float|null $percent_vested Percent vested + * + * @return self + */ + public function setPercentVested($percent_vested) { + if (is_null($percent_vested)) { + throw new \InvalidArgumentException('non-nullable percent_vested cannot be null'); + } + $this->container['percent_vested'] = $percent_vested; + + return $this; + } + + /** + * Gets strike_price + * + * @return string|null + */ + public function getStrikePrice() { + return $this->container['strike_price']; + } + + /** + * Sets strike_price + * + * @param string|null $strike_price strike_price + * + * @return self + */ + public function setStrikePrice($strike_price) { + if (is_null($strike_price)) { + $this->openApiNullablesSetToNull['strike_price'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['strike_price'])) { + unset($nullablesSetToNull['strike_price']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['strike_price'] = $strike_price; + + return $this; + } + + /** + * Gets strike_price_subvalue + * + * @return string|null + */ + public function getStrikePriceSubvalue() { + return $this->container['strike_price_subvalue']; + } + + /** + * Sets strike_price_subvalue + * + * @param string|null $strike_price_subvalue strike_price_subvalue + * + * @return self + */ + public function setStrikePriceSubvalue($strike_price_subvalue) { + if (is_null($strike_price_subvalue)) { + $this->openApiNullablesSetToNull['strike_price_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['strike_price_subvalue'])) { + unset($nullablesSetToNull['strike_price_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['strike_price_subvalue'] = $strike_price_subvalue; + + return $this; + } + + /** + * Gets vesting_months + * + * @return int|null + */ + public function getVestingMonths() { + return $this->container['vesting_months']; + } + + /** + * Sets vesting_months + * + * @param int|null $vesting_months vesting_months + * + * @return self + */ + public function setVestingMonths($vesting_months) { + if (is_null($vesting_months)) { + $this->openApiNullablesSetToNull['vesting_months'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vesting_months'])) { + unset($nullablesSetToNull['vesting_months']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vesting_months'] = $vesting_months; + + return $this; + } + + /** + * Gets vesting_schedule + * + * @return string|null + */ + public function getVestingSchedule() { + return $this->container['vesting_schedule']; + } + + /** + * Sets vesting_schedule + * + * @param string|null $vesting_schedule Vesting schedule + * + * @return self + */ + public function setVestingSchedule($vesting_schedule) { + if (is_null($vesting_schedule)) { + throw new \InvalidArgumentException('non-nullable vesting_schedule cannot be null'); + } + $this->container['vesting_schedule'] = $vesting_schedule; + + return $this; + } + + /** + * Gets vesting_start_date + * + * @return \DateTime|null + */ + public function getVestingStartDate() { + return $this->container['vesting_start_date']; + } + + /** + * Sets vesting_start_date + * + * @param \DateTime|null $vesting_start_date Vesting start date + * + * @return self + */ + public function setVestingStartDate($vesting_start_date) { + if (is_null($vesting_start_date)) { + throw new \InvalidArgumentException('non-nullable vesting_start_date cannot be null'); + } + $this->container['vesting_start_date'] = $vesting_start_date; + + return $this; + } + + /** + * Gets vested_value + * + * @return string|null + */ + public function getVestedValue() { + return $this->container['vested_value']; + } + + /** + * Sets vested_value + * + * @param string|null $vested_value Vested value + * + * @return self + */ + public function setVestedValue($vested_value) { + if (is_null($vested_value)) { + throw new \InvalidArgumentException('non-nullable vested_value cannot be null'); + } + $this->container['vested_value'] = $vested_value; + + return $this; + } + + /** + * Gets vested_value_subvalue + * + * @return string|null + */ + public function getVestedValueSubvalue() { + return $this->container['vested_value_subvalue']; + } + + /** + * Sets vested_value_subvalue + * + * @param string|null $vested_value_subvalue vested_value_subvalue + * + * @return self + */ + public function setVestedValueSubvalue($vested_value_subvalue) { + if (is_null($vested_value_subvalue)) { + $this->openApiNullablesSetToNull['vested_value_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vested_value_subvalue'])) { + unset($nullablesSetToNull['vested_value_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vested_value_subvalue'] = $vested_value_subvalue; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEquityEstimatedValuationValues.php b/lib/Model/TotalRewardsEquityEstimatedValuationValues.php new file mode 100644 index 00000000..02a74b71 --- /dev/null +++ b/lib/Model/TotalRewardsEquityEstimatedValuationValues.php @@ -0,0 +1,529 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEquityEstimatedValuationValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEquityEstimatedValuationValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards equity growth valuation + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEquityEstimatedValuationValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EquityEstimatedValuationValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'equity_growth_estimation_items' => '\BhrSdk\Model\TotalRewardsEquityGrowthEstimation[]', + 'number_of_vested_shares' => 'int', + 'number_of_total_shares' => 'int', + 'equity_growth_slider_max' => 'int', + 'equity_growth_slider_min' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'equity_growth_estimation_items' => null, + 'number_of_vested_shares' => null, + 'number_of_total_shares' => null, + 'equity_growth_slider_max' => null, + 'equity_growth_slider_min' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'equity_growth_estimation_items' => false, + 'number_of_vested_shares' => false, + 'number_of_total_shares' => false, + 'equity_growth_slider_max' => true, + 'equity_growth_slider_min' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'equity_growth_estimation_items' => 'equityGrowthEstimationItems', + 'number_of_vested_shares' => 'numberOfVestedShares', + 'number_of_total_shares' => 'numberOfTotalShares', + 'equity_growth_slider_max' => 'equityGrowthSliderMax', + 'equity_growth_slider_min' => 'equityGrowthSliderMin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'equity_growth_estimation_items' => 'setEquityGrowthEstimationItems', + 'number_of_vested_shares' => 'setNumberOfVestedShares', + 'number_of_total_shares' => 'setNumberOfTotalShares', + 'equity_growth_slider_max' => 'setEquityGrowthSliderMax', + 'equity_growth_slider_min' => 'setEquityGrowthSliderMin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'equity_growth_estimation_items' => 'getEquityGrowthEstimationItems', + 'number_of_vested_shares' => 'getNumberOfVestedShares', + 'number_of_total_shares' => 'getNumberOfTotalShares', + 'equity_growth_slider_max' => 'getEquityGrowthSliderMax', + 'equity_growth_slider_min' => 'getEquityGrowthSliderMin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('equity_growth_estimation_items', $data ?? [], null); + $this->setIfExists('number_of_vested_shares', $data ?? [], null); + $this->setIfExists('number_of_total_shares', $data ?? [], null); + $this->setIfExists('equity_growth_slider_max', $data ?? [], null); + $this->setIfExists('equity_growth_slider_min', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets equity_growth_estimation_items + * + * @return \BhrSdk\Model\TotalRewardsEquityGrowthEstimation[]|null + */ + public function getEquityGrowthEstimationItems() { + return $this->container['equity_growth_estimation_items']; + } + + /** + * Sets equity_growth_estimation_items + * + * @param \BhrSdk\Model\TotalRewardsEquityGrowthEstimation[]|null $equity_growth_estimation_items Equity estimated growth items + * + * @return self + */ + public function setEquityGrowthEstimationItems($equity_growth_estimation_items) { + if (is_null($equity_growth_estimation_items)) { + throw new \InvalidArgumentException('non-nullable equity_growth_estimation_items cannot be null'); + } + $this->container['equity_growth_estimation_items'] = $equity_growth_estimation_items; + + return $this; + } + + /** + * Gets number_of_vested_shares + * + * @return int|null + */ + public function getNumberOfVestedShares() { + return $this->container['number_of_vested_shares']; + } + + /** + * Sets number_of_vested_shares + * + * @param int|null $number_of_vested_shares Number of vested shares + * + * @return self + */ + public function setNumberOfVestedShares($number_of_vested_shares) { + if (is_null($number_of_vested_shares)) { + throw new \InvalidArgumentException('non-nullable number_of_vested_shares cannot be null'); + } + $this->container['number_of_vested_shares'] = $number_of_vested_shares; + + return $this; + } + + /** + * Gets number_of_total_shares + * + * @return int|null + */ + public function getNumberOfTotalShares() { + return $this->container['number_of_total_shares']; + } + + /** + * Sets number_of_total_shares + * + * @param int|null $number_of_total_shares Number of total shares + * + * @return self + */ + public function setNumberOfTotalShares($number_of_total_shares) { + if (is_null($number_of_total_shares)) { + throw new \InvalidArgumentException('non-nullable number_of_total_shares cannot be null'); + } + $this->container['number_of_total_shares'] = $number_of_total_shares; + + return $this; + } + + /** + * Gets equity_growth_slider_max + * + * @return int|null + */ + public function getEquityGrowthSliderMax() { + return $this->container['equity_growth_slider_max']; + } + + /** + * Sets equity_growth_slider_max + * + * @param int|null $equity_growth_slider_max equity_growth_slider_max + * + * @return self + */ + public function setEquityGrowthSliderMax($equity_growth_slider_max) { + if (is_null($equity_growth_slider_max)) { + $this->openApiNullablesSetToNull['equity_growth_slider_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['equity_growth_slider_max'])) { + unset($nullablesSetToNull['equity_growth_slider_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['equity_growth_slider_max'] = $equity_growth_slider_max; + + return $this; + } + + /** + * Gets equity_growth_slider_min + * + * @return int|null + */ + public function getEquityGrowthSliderMin() { + return $this->container['equity_growth_slider_min']; + } + + /** + * Sets equity_growth_slider_min + * + * @param int|null $equity_growth_slider_min equity_growth_slider_min + * + * @return self + */ + public function setEquityGrowthSliderMin($equity_growth_slider_min) { + if (is_null($equity_growth_slider_min)) { + $this->openApiNullablesSetToNull['equity_growth_slider_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['equity_growth_slider_min'])) { + unset($nullablesSetToNull['equity_growth_slider_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['equity_growth_slider_min'] = $equity_growth_slider_min; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEquityGrowthChartItem.php b/lib/Model/TotalRewardsEquityGrowthChartItem.php new file mode 100644 index 00000000..f4225b63 --- /dev/null +++ b/lib/Model/TotalRewardsEquityGrowthChartItem.php @@ -0,0 +1,573 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEquityGrowthChartItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEquityGrowthChartItem Class Doc Comment + * + * @category Class + * @description Schema for total rewards equity growth chart item + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEquityGrowthChartItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EquityGrowthChartItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'label' => 'string', + 'estimated_net_value' => 'string', + 'subvalue' => 'string', + 'vested' => 'float', + 'current' => 'float', + 'unvested' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'label' => null, + 'estimated_net_value' => null, + 'subvalue' => null, + 'vested' => 'float', + 'current' => 'float', + 'unvested' => 'float' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'label' => false, + 'estimated_net_value' => false, + 'subvalue' => true, + 'vested' => true, + 'current' => true, + 'unvested' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'label' => 'label', + 'estimated_net_value' => 'estimatedNetValue', + 'subvalue' => 'subvalue', + 'vested' => 'vested', + 'current' => 'current', + 'unvested' => 'unvested' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'label' => 'setLabel', + 'estimated_net_value' => 'setEstimatedNetValue', + 'subvalue' => 'setSubvalue', + 'vested' => 'setVested', + 'current' => 'setCurrent', + 'unvested' => 'setUnvested' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'label' => 'getLabel', + 'estimated_net_value' => 'getEstimatedNetValue', + 'subvalue' => 'getSubvalue', + 'vested' => 'getVested', + 'current' => 'getCurrent', + 'unvested' => 'getUnvested' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('estimated_net_value', $data ?? [], null); + $this->setIfExists('subvalue', $data ?? [], null); + $this->setIfExists('vested', $data ?? [], null); + $this->setIfExists('current', $data ?? [], null); + $this->setIfExists('unvested', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label Label + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets estimated_net_value + * + * @return string|null + */ + public function getEstimatedNetValue() { + return $this->container['estimated_net_value']; + } + + /** + * Sets estimated_net_value + * + * @param string|null $estimated_net_value Estimated value + * + * @return self + */ + public function setEstimatedNetValue($estimated_net_value) { + if (is_null($estimated_net_value)) { + throw new \InvalidArgumentException('non-nullable estimated_net_value cannot be null'); + } + $this->container['estimated_net_value'] = $estimated_net_value; + + return $this; + } + + /** + * Gets subvalue + * + * @return string|null + */ + public function getSubvalue() { + return $this->container['subvalue']; + } + + /** + * Sets subvalue + * + * @param string|null $subvalue subvalue + * + * @return self + */ + public function setSubvalue($subvalue) { + if (is_null($subvalue)) { + $this->openApiNullablesSetToNull['subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['subvalue'])) { + unset($nullablesSetToNull['subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['subvalue'] = $subvalue; + + return $this; + } + + /** + * Gets vested + * + * @return float|null + */ + public function getVested() { + return $this->container['vested']; + } + + /** + * Sets vested + * + * @param float|null $vested vested + * + * @return self + */ + public function setVested($vested) { + if (is_null($vested)) { + $this->openApiNullablesSetToNull['vested'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vested'])) { + unset($nullablesSetToNull['vested']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vested'] = $vested; + + return $this; + } + + /** + * Gets current + * + * @return float|null + */ + public function getCurrent() { + return $this->container['current']; + } + + /** + * Sets current + * + * @param float|null $current current + * + * @return self + */ + public function setCurrent($current) { + if (is_null($current)) { + $this->openApiNullablesSetToNull['current'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['current'])) { + unset($nullablesSetToNull['current']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['current'] = $current; + + return $this; + } + + /** + * Gets unvested + * + * @return float|null + */ + public function getUnvested() { + return $this->container['unvested']; + } + + /** + * Sets unvested + * + * @param float|null $unvested unvested + * + * @return self + */ + public function setUnvested($unvested) { + if (is_null($unvested)) { + $this->openApiNullablesSetToNull['unvested'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['unvested'])) { + unset($nullablesSetToNull['unvested']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['unvested'] = $unvested; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEquityGrowthEstimation.php b/lib/Model/TotalRewardsEquityGrowthEstimation.php new file mode 100644 index 00000000..0f6b7d24 --- /dev/null +++ b/lib/Model/TotalRewardsEquityGrowthEstimation.php @@ -0,0 +1,599 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEquityGrowthEstimation + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEquityGrowthEstimation Class Doc Comment + * + * @category Class + * @description Schema for total rewards equity growth estimation + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEquityGrowthEstimation implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EquityGrowthEstimation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'stop' => 'int', + 'company_valuation' => 'string', + 'company_valuation_subvalue' => 'string', + 'total_value' => 'string', + 'total_value_subvalue' => 'string', + 'vested_value' => 'string', + 'vested_value_subvalue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'stop' => null, + 'company_valuation' => null, + 'company_valuation_subvalue' => null, + 'total_value' => null, + 'total_value_subvalue' => null, + 'vested_value' => null, + 'vested_value_subvalue' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'stop' => false, + 'company_valuation' => false, + 'company_valuation_subvalue' => true, + 'total_value' => false, + 'total_value_subvalue' => true, + 'vested_value' => false, + 'vested_value_subvalue' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'stop' => 'stop', + 'company_valuation' => 'companyValuation', + 'company_valuation_subvalue' => 'companyValuationSubvalue', + 'total_value' => 'totalValue', + 'total_value_subvalue' => 'totalValueSubvalue', + 'vested_value' => 'vestedValue', + 'vested_value_subvalue' => 'vestedValueSubvalue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stop' => 'setStop', + 'company_valuation' => 'setCompanyValuation', + 'company_valuation_subvalue' => 'setCompanyValuationSubvalue', + 'total_value' => 'setTotalValue', + 'total_value_subvalue' => 'setTotalValueSubvalue', + 'vested_value' => 'setVestedValue', + 'vested_value_subvalue' => 'setVestedValueSubvalue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stop' => 'getStop', + 'company_valuation' => 'getCompanyValuation', + 'company_valuation_subvalue' => 'getCompanyValuationSubvalue', + 'total_value' => 'getTotalValue', + 'total_value_subvalue' => 'getTotalValueSubvalue', + 'vested_value' => 'getVestedValue', + 'vested_value_subvalue' => 'getVestedValueSubvalue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('stop', $data ?? [], null); + $this->setIfExists('company_valuation', $data ?? [], null); + $this->setIfExists('company_valuation_subvalue', $data ?? [], null); + $this->setIfExists('total_value', $data ?? [], null); + $this->setIfExists('total_value_subvalue', $data ?? [], null); + $this->setIfExists('vested_value', $data ?? [], null); + $this->setIfExists('vested_value_subvalue', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets stop + * + * @return int|null + */ + public function getStop() { + return $this->container['stop']; + } + + /** + * Sets stop + * + * @param int|null $stop Stop + * + * @return self + */ + public function setStop($stop) { + if (is_null($stop)) { + throw new \InvalidArgumentException('non-nullable stop cannot be null'); + } + $this->container['stop'] = $stop; + + return $this; + } + + /** + * Gets company_valuation + * + * @return string|null + */ + public function getCompanyValuation() { + return $this->container['company_valuation']; + } + + /** + * Sets company_valuation + * + * @param string|null $company_valuation Company valuation + * + * @return self + */ + public function setCompanyValuation($company_valuation) { + if (is_null($company_valuation)) { + throw new \InvalidArgumentException('non-nullable company_valuation cannot be null'); + } + $this->container['company_valuation'] = $company_valuation; + + return $this; + } + + /** + * Gets company_valuation_subvalue + * + * @return string|null + */ + public function getCompanyValuationSubvalue() { + return $this->container['company_valuation_subvalue']; + } + + /** + * Sets company_valuation_subvalue + * + * @param string|null $company_valuation_subvalue company_valuation_subvalue + * + * @return self + */ + public function setCompanyValuationSubvalue($company_valuation_subvalue) { + if (is_null($company_valuation_subvalue)) { + $this->openApiNullablesSetToNull['company_valuation_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['company_valuation_subvalue'])) { + unset($nullablesSetToNull['company_valuation_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['company_valuation_subvalue'] = $company_valuation_subvalue; + + return $this; + } + + /** + * Gets total_value + * + * @return string|null + */ + public function getTotalValue() { + return $this->container['total_value']; + } + + /** + * Sets total_value + * + * @param string|null $total_value Total value + * + * @return self + */ + public function setTotalValue($total_value) { + if (is_null($total_value)) { + throw new \InvalidArgumentException('non-nullable total_value cannot be null'); + } + $this->container['total_value'] = $total_value; + + return $this; + } + + /** + * Gets total_value_subvalue + * + * @return string|null + */ + public function getTotalValueSubvalue() { + return $this->container['total_value_subvalue']; + } + + /** + * Sets total_value_subvalue + * + * @param string|null $total_value_subvalue total_value_subvalue + * + * @return self + */ + public function setTotalValueSubvalue($total_value_subvalue) { + if (is_null($total_value_subvalue)) { + $this->openApiNullablesSetToNull['total_value_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['total_value_subvalue'])) { + unset($nullablesSetToNull['total_value_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['total_value_subvalue'] = $total_value_subvalue; + + return $this; + } + + /** + * Gets vested_value + * + * @return string|null + */ + public function getVestedValue() { + return $this->container['vested_value']; + } + + /** + * Sets vested_value + * + * @param string|null $vested_value Vested amount value + * + * @return self + */ + public function setVestedValue($vested_value) { + if (is_null($vested_value)) { + throw new \InvalidArgumentException('non-nullable vested_value cannot be null'); + } + $this->container['vested_value'] = $vested_value; + + return $this; + } + + /** + * Gets vested_value_subvalue + * + * @return string|null + */ + public function getVestedValueSubvalue() { + return $this->container['vested_value_subvalue']; + } + + /** + * Sets vested_value_subvalue + * + * @param string|null $vested_value_subvalue vested_value_subvalue + * + * @return self + */ + public function setVestedValueSubvalue($vested_value_subvalue) { + if (is_null($vested_value_subvalue)) { + $this->openApiNullablesSetToNull['vested_value_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['vested_value_subvalue'])) { + unset($nullablesSetToNull['vested_value_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['vested_value_subvalue'] = $vested_value_subvalue; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsEquitySectionValues.php b/lib/Model/TotalRewardsEquitySectionValues.php new file mode 100644 index 00000000..1b82841e --- /dev/null +++ b/lib/Model/TotalRewardsEquitySectionValues.php @@ -0,0 +1,529 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsEquitySectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsEquitySectionValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards equity section values + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsEquitySectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-EquitySectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'comp_summary' => '\BhrSdk\Model\TotalRewardsCompSummaryValues', + 'conditions' => 'string', + 'disclaimers' => 'string', + 'equity_details' => '\BhrSdk\Model\TotalRewardsEquityDetailsValues[]', + 'equity_estimated_valuation' => '\BhrSdk\Model\TotalRewardsEquityEstimatedValuationValues' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'comp_summary' => null, + 'conditions' => null, + 'disclaimers' => null, + 'equity_details' => null, + 'equity_estimated_valuation' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'comp_summary' => false, + 'conditions' => true, + 'disclaimers' => true, + 'equity_details' => false, + 'equity_estimated_valuation' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'comp_summary' => 'compSummary', + 'conditions' => 'conditions', + 'disclaimers' => 'disclaimers', + 'equity_details' => 'equityDetails', + 'equity_estimated_valuation' => 'equityEstimatedValuation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'comp_summary' => 'setCompSummary', + 'conditions' => 'setConditions', + 'disclaimers' => 'setDisclaimers', + 'equity_details' => 'setEquityDetails', + 'equity_estimated_valuation' => 'setEquityEstimatedValuation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'comp_summary' => 'getCompSummary', + 'conditions' => 'getConditions', + 'disclaimers' => 'getDisclaimers', + 'equity_details' => 'getEquityDetails', + 'equity_estimated_valuation' => 'getEquityEstimatedValuation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('comp_summary', $data ?? [], null); + $this->setIfExists('conditions', $data ?? [], null); + $this->setIfExists('disclaimers', $data ?? [], null); + $this->setIfExists('equity_details', $data ?? [], null); + $this->setIfExists('equity_estimated_valuation', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets comp_summary + * + * @return \BhrSdk\Model\TotalRewardsCompSummaryValues|null + */ + public function getCompSummary() { + return $this->container['comp_summary']; + } + + /** + * Sets comp_summary + * + * @param \BhrSdk\Model\TotalRewardsCompSummaryValues|null $comp_summary Compensation summary values for equity + * + * @return self + */ + public function setCompSummary($comp_summary) { + if (is_null($comp_summary)) { + throw new \InvalidArgumentException('non-nullable comp_summary cannot be null'); + } + $this->container['comp_summary'] = $comp_summary; + + return $this; + } + + /** + * Gets conditions + * + * @return string|null + */ + public function getConditions() { + return $this->container['conditions']; + } + + /** + * Sets conditions + * + * @param string|null $conditions conditions + * + * @return self + */ + public function setConditions($conditions) { + if (is_null($conditions)) { + $this->openApiNullablesSetToNull['conditions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['conditions'])) { + unset($nullablesSetToNull['conditions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['conditions'] = $conditions; + + return $this; + } + + /** + * Gets disclaimers + * + * @return string|null + */ + public function getDisclaimers() { + return $this->container['disclaimers']; + } + + /** + * Sets disclaimers + * + * @param string|null $disclaimers disclaimers + * + * @return self + */ + public function setDisclaimers($disclaimers) { + if (is_null($disclaimers)) { + $this->openApiNullablesSetToNull['disclaimers'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['disclaimers'])) { + unset($nullablesSetToNull['disclaimers']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disclaimers'] = $disclaimers; + + return $this; + } + + /** + * Gets equity_details + * + * @return \BhrSdk\Model\TotalRewardsEquityDetailsValues[]|null + */ + public function getEquityDetails() { + return $this->container['equity_details']; + } + + /** + * Sets equity_details + * + * @param \BhrSdk\Model\TotalRewardsEquityDetailsValues[]|null $equity_details Equity details + * + * @return self + */ + public function setEquityDetails($equity_details) { + if (is_null($equity_details)) { + throw new \InvalidArgumentException('non-nullable equity_details cannot be null'); + } + $this->container['equity_details'] = $equity_details; + + return $this; + } + + /** + * Gets equity_estimated_valuation + * + * @return \BhrSdk\Model\TotalRewardsEquityEstimatedValuationValues|null + */ + public function getEquityEstimatedValuation() { + return $this->container['equity_estimated_valuation']; + } + + /** + * Sets equity_estimated_valuation + * + * @param \BhrSdk\Model\TotalRewardsEquityEstimatedValuationValues|null $equity_estimated_valuation Total rewards equity estimated valuation object + * + * @return self + */ + public function setEquityEstimatedValuation($equity_estimated_valuation) { + if (is_null($equity_estimated_valuation)) { + throw new \InvalidArgumentException('non-nullable equity_estimated_valuation cannot be null'); + } + $this->container['equity_estimated_valuation'] = $equity_estimated_valuation; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsExtraPayDetailsValues.php b/lib/Model/TotalRewardsExtraPayDetailsValues.php new file mode 100644 index 00000000..19c5e039 --- /dev/null +++ b/lib/Model/TotalRewardsExtraPayDetailsValues.php @@ -0,0 +1,593 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsExtraPayDetailsValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsExtraPayDetailsValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards extra pay details + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsExtraPayDetailsValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-ExtraPayDetailsValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'amount' => 'string', + 'amount_subvalue' => 'string', + 'frequency' => 'string', + 'formatted_date_string' => '\DateTime', + 'annualized_amount' => 'string', + 'annualized_subvalue' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'amount' => null, + 'amount_subvalue' => null, + 'frequency' => null, + 'formatted_date_string' => 'date', + 'annualized_amount' => null, + 'annualized_subvalue' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'amount' => false, + 'amount_subvalue' => true, + 'frequency' => false, + 'formatted_date_string' => false, + 'annualized_amount' => false, + 'annualized_subvalue' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'amount' => 'amount', + 'amount_subvalue' => 'amountSubvalue', + 'frequency' => 'frequency', + 'formatted_date_string' => 'formattedDateString', + 'annualized_amount' => 'annualizedAmount', + 'annualized_subvalue' => 'annualizedSubvalue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'amount' => 'setAmount', + 'amount_subvalue' => 'setAmountSubvalue', + 'frequency' => 'setFrequency', + 'formatted_date_string' => 'setFormattedDateString', + 'annualized_amount' => 'setAnnualizedAmount', + 'annualized_subvalue' => 'setAnnualizedSubvalue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'amount' => 'getAmount', + 'amount_subvalue' => 'getAmountSubvalue', + 'frequency' => 'getFrequency', + 'formatted_date_string' => 'getFormattedDateString', + 'annualized_amount' => 'getAnnualizedAmount', + 'annualized_subvalue' => 'getAnnualizedSubvalue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('amount_subvalue', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('formatted_date_string', $data ?? [], null); + $this->setIfExists('annualized_amount', $data ?? [], null); + $this->setIfExists('annualized_subvalue', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets amount + * + * @return string|null + */ + public function getAmount() { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string|null $amount Amount + * + * @return self + */ + public function setAmount($amount) { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets amount_subvalue + * + * @return string|null + */ + public function getAmountSubvalue() { + return $this->container['amount_subvalue']; + } + + /** + * Sets amount_subvalue + * + * @param string|null $amount_subvalue amount_subvalue + * + * @return self + */ + public function setAmountSubvalue($amount_subvalue) { + if (is_null($amount_subvalue)) { + $this->openApiNullablesSetToNull['amount_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['amount_subvalue'])) { + unset($nullablesSetToNull['amount_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['amount_subvalue'] = $amount_subvalue; + + return $this; + } + + /** + * Gets frequency + * + * @return string|null + */ + public function getFrequency() { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string|null $frequency Frequency + * + * @return self + */ + public function setFrequency($frequency) { + if (is_null($frequency)) { + throw new \InvalidArgumentException('non-nullable frequency cannot be null'); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets formatted_date_string + * + * @return \DateTime|null + */ + public function getFormattedDateString() { + return $this->container['formatted_date_string']; + } + + /** + * Sets formatted_date_string + * + * @param \DateTime|null $formatted_date_string Extra pay formatted date + * + * @return self + */ + public function setFormattedDateString($formatted_date_string) { + if (is_null($formatted_date_string)) { + throw new \InvalidArgumentException('non-nullable formatted_date_string cannot be null'); + } + $this->container['formatted_date_string'] = $formatted_date_string; + + return $this; + } + + /** + * Gets annualized_amount + * + * @return string|null + */ + public function getAnnualizedAmount() { + return $this->container['annualized_amount']; + } + + /** + * Sets annualized_amount + * + * @param string|null $annualized_amount Annualized amount + * + * @return self + */ + public function setAnnualizedAmount($annualized_amount) { + if (is_null($annualized_amount)) { + throw new \InvalidArgumentException('non-nullable annualized_amount cannot be null'); + } + $this->container['annualized_amount'] = $annualized_amount; + + return $this; + } + + /** + * Gets annualized_subvalue + * + * @return string|null + */ + public function getAnnualizedSubvalue() { + return $this->container['annualized_subvalue']; + } + + /** + * Sets annualized_subvalue + * + * @param string|null $annualized_subvalue annualized_subvalue + * + * @return self + */ + public function setAnnualizedSubvalue($annualized_subvalue) { + if (is_null($annualized_subvalue)) { + $this->openApiNullablesSetToNull['annualized_subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['annualized_subvalue'])) { + unset($nullablesSetToNull['annualized_subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['annualized_subvalue'] = $annualized_subvalue; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsExtraPaySectionValues.php b/lib/Model/TotalRewardsExtraPaySectionValues.php new file mode 100644 index 00000000..9baf08b4 --- /dev/null +++ b/lib/Model/TotalRewardsExtraPaySectionValues.php @@ -0,0 +1,453 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsExtraPaySectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsExtraPaySectionValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards extra pay section values + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsExtraPaySectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-ExtraPaySectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'comp_summary' => '\BhrSdk\Model\TotalRewardsCompSummaryValues', + 'extra_pay_details' => '\BhrSdk\Model\TotalRewardsExtraPayDetailsValues[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'comp_summary' => null, + 'extra_pay_details' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'comp_summary' => false, + 'extra_pay_details' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'comp_summary' => 'compSummary', + 'extra_pay_details' => 'extraPayDetails' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'comp_summary' => 'setCompSummary', + 'extra_pay_details' => 'setExtraPayDetails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'comp_summary' => 'getCompSummary', + 'extra_pay_details' => 'getExtraPayDetails' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('comp_summary', $data ?? [], null); + $this->setIfExists('extra_pay_details', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets comp_summary + * + * @return \BhrSdk\Model\TotalRewardsCompSummaryValues|null + */ + public function getCompSummary() { + return $this->container['comp_summary']; + } + + /** + * Sets comp_summary + * + * @param \BhrSdk\Model\TotalRewardsCompSummaryValues|null $comp_summary Compensation summary values for extra pay + * + * @return self + */ + public function setCompSummary($comp_summary) { + if (is_null($comp_summary)) { + throw new \InvalidArgumentException('non-nullable comp_summary cannot be null'); + } + $this->container['comp_summary'] = $comp_summary; + + return $this; + } + + /** + * Gets extra_pay_details + * + * @return \BhrSdk\Model\TotalRewardsExtraPayDetailsValues[]|null + */ + public function getExtraPayDetails() { + return $this->container['extra_pay_details']; + } + + /** + * Sets extra_pay_details + * + * @param \BhrSdk\Model\TotalRewardsExtraPayDetailsValues[]|null $extra_pay_details Extra pay details + * + * @return self + */ + public function setExtraPayDetails($extra_pay_details) { + if (is_null($extra_pay_details)) { + throw new \InvalidArgumentException('non-nullable extra_pay_details cannot be null'); + } + $this->container['extra_pay_details'] = $extra_pay_details; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsHolidayValue.php b/lib/Model/TotalRewardsHolidayValue.php new file mode 100644 index 00000000..31928550 --- /dev/null +++ b/lib/Model/TotalRewardsHolidayValue.php @@ -0,0 +1,459 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsHolidayValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsHolidayValue Class Doc Comment + * + * @category Class + * @description Schema for total rewards holiday value + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsHolidayValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-HolidayValue'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'start_date' => 'string', + 'end_date' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'start_date' => null, + 'end_date' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'start_date' => false, + 'end_date' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'start_date' => 'startDate', + 'end_date' => 'endDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'start_date' => 'setStartDate', + 'end_date' => 'setEndDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'start_date' => 'getStartDate', + 'end_date' => 'getEndDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('start_date', $data ?? [], null); + $this->setIfExists('end_date', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets start_date + * + * @return string|null + */ + public function getStartDate() { + return $this->container['start_date']; + } + + /** + * Sets start_date + * + * @param string|null $start_date Start date + * + * @return self + */ + public function setStartDate($start_date) { + if (is_null($start_date)) { + throw new \InvalidArgumentException('non-nullable start_date cannot be null'); + } + $this->container['start_date'] = $start_date; + + return $this; + } + + /** + * Gets end_date + * + * @return string|null + */ + public function getEndDate() { + return $this->container['end_date']; + } + + /** + * Sets end_date + * + * @param string|null $end_date end_date + * + * @return self + */ + public function setEndDate($end_date) { + if (is_null($end_date)) { + $this->openApiNullablesSetToNull['end_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['end_date'])) { + unset($nullablesSetToNull['end_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['end_date'] = $end_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsOnboardingStep.php b/lib/Model/TotalRewardsOnboardingStep.php new file mode 100644 index 00000000..eea38ee5 --- /dev/null +++ b/lib/Model/TotalRewardsOnboardingStep.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsOnboardingStep + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsOnboardingStep Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsOnboardingStep implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewardsOnboardingStep'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'name' => 'string', + 'completed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'name' => null, + 'completed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'name' => false, + 'completed' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'completed' => 'completed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'completed' => 'setCompleted' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'completed' => 'getCompleted' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('completed', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the onboarding step + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets completed + * + * @return bool|null + */ + public function getCompleted() { + return $this->container['completed']; + } + + /** + * Sets completed + * + * @param bool|null $completed Whether or not the onboarding step is completed + * + * @return self + */ + public function setCompleted($completed) { + if (is_null($completed)) { + throw new \InvalidArgumentException('non-nullable completed cannot be null'); + } + $this->container['completed'] = $completed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsOverviewSectionValues.php b/lib/Model/TotalRewardsOverviewSectionValues.php new file mode 100644 index 00000000..5e4241c5 --- /dev/null +++ b/lib/Model/TotalRewardsOverviewSectionValues.php @@ -0,0 +1,471 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsOverviewSectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsOverviewSectionValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards overview section + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsOverviewSectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-OverviewSectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'estimated_total_comp_value' => 'string', + 'paid_per' => 'string', + 'multiplier_value' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'estimated_total_comp_value' => null, + 'paid_per' => null, + 'multiplier_value' => 'float' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'estimated_total_comp_value' => true, + 'paid_per' => true, + 'multiplier_value' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'estimated_total_comp_value' => 'estimatedTotalCompValue', + 'paid_per' => 'paidPer', + 'multiplier_value' => 'multiplierValue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'estimated_total_comp_value' => 'setEstimatedTotalCompValue', + 'paid_per' => 'setPaidPer', + 'multiplier_value' => 'setMultiplierValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'estimated_total_comp_value' => 'getEstimatedTotalCompValue', + 'paid_per' => 'getPaidPer', + 'multiplier_value' => 'getMultiplierValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('estimated_total_comp_value', $data ?? [], null); + $this->setIfExists('paid_per', $data ?? [], null); + $this->setIfExists('multiplier_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets estimated_total_comp_value + * + * @return string|null + */ + public function getEstimatedTotalCompValue() { + return $this->container['estimated_total_comp_value']; + } + + /** + * Sets estimated_total_comp_value + * + * @param string|null $estimated_total_comp_value estimated_total_comp_value + * + * @return self + */ + public function setEstimatedTotalCompValue($estimated_total_comp_value) { + if (is_null($estimated_total_comp_value)) { + $this->openApiNullablesSetToNull['estimated_total_comp_value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['estimated_total_comp_value'])) { + unset($nullablesSetToNull['estimated_total_comp_value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['estimated_total_comp_value'] = $estimated_total_comp_value; + + return $this; + } + + /** + * Gets paid_per + * + * @return string|null + */ + public function getPaidPer() { + return $this->container['paid_per']; + } + + /** + * Sets paid_per + * + * @param string|null $paid_per paid_per + * + * @return self + */ + public function setPaidPer($paid_per) { + if (is_null($paid_per)) { + $this->openApiNullablesSetToNull['paid_per'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['paid_per'])) { + unset($nullablesSetToNull['paid_per']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paid_per'] = $paid_per; + + return $this; + } + + /** + * Gets multiplier_value + * + * @return float|null + */ + public function getMultiplierValue() { + return $this->container['multiplier_value']; + } + + /** + * Sets multiplier_value + * + * @param float|null $multiplier_value multiplier_value + * + * @return self + */ + public function setMultiplierValue($multiplier_value) { + if (is_null($multiplier_value)) { + $this->openApiNullablesSetToNull['multiplier_value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['multiplier_value'])) { + unset($nullablesSetToNull['multiplier_value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['multiplier_value'] = $multiplier_value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsTimeOffPolicyValue.php b/lib/Model/TotalRewardsTimeOffPolicyValue.php new file mode 100644 index 00000000..877ce5d8 --- /dev/null +++ b/lib/Model/TotalRewardsTimeOffPolicyValue.php @@ -0,0 +1,497 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsTimeOffPolicyValue + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsTimeOffPolicyValue Class Doc Comment + * + * @category Class + * @description Schema for total rewards time off policy + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsTimeOffPolicyValue implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-TimeOffPolicyValue'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'title' => 'string', + 'value' => 'string', + 'show_disclaimer' => 'bool', + 'show_eligible' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'title' => null, + 'value' => null, + 'show_disclaimer' => null, + 'show_eligible' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'title' => false, + 'value' => false, + 'show_disclaimer' => true, + 'show_eligible' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'value' => 'value', + 'show_disclaimer' => 'showDisclaimer', + 'show_eligible' => 'showEligible' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'value' => 'setValue', + 'show_disclaimer' => 'setShowDisclaimer', + 'show_eligible' => 'setShowEligible' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'value' => 'getValue', + 'show_disclaimer' => 'getShowDisclaimer', + 'show_eligible' => 'getShowEligible' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('show_disclaimer', $data ?? [], null); + $this->setIfExists('show_eligible', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Title + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value Value + * + * @return self + */ + public function setValue($value) { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets show_disclaimer + * + * @return bool|null + */ + public function getShowDisclaimer() { + return $this->container['show_disclaimer']; + } + + /** + * Sets show_disclaimer + * + * @param bool|null $show_disclaimer show_disclaimer + * + * @return self + */ + public function setShowDisclaimer($show_disclaimer) { + if (is_null($show_disclaimer)) { + $this->openApiNullablesSetToNull['show_disclaimer'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['show_disclaimer'])) { + unset($nullablesSetToNull['show_disclaimer']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['show_disclaimer'] = $show_disclaimer; + + return $this; + } + + /** + * Gets show_eligible + * + * @return bool|null + */ + public function getShowEligible() { + return $this->container['show_eligible']; + } + + /** + * Sets show_eligible + * + * @param bool|null $show_eligible show_eligible + * + * @return self + */ + public function setShowEligible($show_eligible) { + if (is_null($show_eligible)) { + $this->openApiNullablesSetToNull['show_eligible'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['show_eligible'])) { + unset($nullablesSetToNull['show_eligible']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['show_eligible'] = $show_eligible; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsTimelineItem.php b/lib/Model/TotalRewardsTimelineItem.php new file mode 100644 index 00000000..f9498074 --- /dev/null +++ b/lib/Model/TotalRewardsTimelineItem.php @@ -0,0 +1,465 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsTimelineItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsTimelineItem Class Doc Comment + * + * @category Class + * @description Schema for total rewards timeline item + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsTimelineItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-TimelineItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'value' => 'string', + 'subvalue' => 'string', + 'label' => '\BhrSdk\Model\TotalRewardsTimelineItemLabel' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'value' => null, + 'subvalue' => null, + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'value' => true, + 'subvalue' => true, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'value' => 'value', + 'subvalue' => 'subvalue', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'subvalue' => 'setSubvalue', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'subvalue' => 'getSubvalue', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('subvalue', $data ?? [], null); + $this->setIfExists('label', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value value + * + * @return self + */ + public function setValue($value) { + if (is_null($value)) { + $this->openApiNullablesSetToNull['value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['value'])) { + unset($nullablesSetToNull['value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets subvalue + * + * @return string|null + */ + public function getSubvalue() { + return $this->container['subvalue']; + } + + /** + * Sets subvalue + * + * @param string|null $subvalue subvalue + * + * @return self + */ + public function setSubvalue($subvalue) { + if (is_null($subvalue)) { + $this->openApiNullablesSetToNull['subvalue'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['subvalue'])) { + unset($nullablesSetToNull['subvalue']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['subvalue'] = $subvalue; + + return $this; + } + + /** + * Gets label + * + * @return \BhrSdk\Model\TotalRewardsTimelineItemLabel|null + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param \BhrSdk\Model\TotalRewardsTimelineItemLabel|null $label label + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsTimelineItemLabel.php b/lib/Model/TotalRewardsTimelineItemLabel.php new file mode 100644 index 00000000..d03617e2 --- /dev/null +++ b/lib/Model/TotalRewardsTimelineItemLabel.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsTimelineItemLabel + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsTimelineItemLabel Class Doc Comment + * + * @category Class + * @description Label + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsTimelineItemLabel implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards_TimelineItem_label'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TotalRewardsTimelineSectionValues.php b/lib/Model/TotalRewardsTimelineSectionValues.php new file mode 100644 index 00000000..4459bba9 --- /dev/null +++ b/lib/Model/TotalRewardsTimelineSectionValues.php @@ -0,0 +1,459 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsTimelineSectionValues + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TotalRewardsTimelineSectionValues Class Doc Comment + * + * @category Class + * @description Schema for total rewards overview section + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TotalRewardsTimelineSectionValues implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TotalRewards-TimelineSectionValues'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'comp_summary' => '\BhrSdk\Model\TotalRewardsCompSummaryValues', + 'timeline_data' => '\BhrSdk\Model\TotalRewardsTimelineItem[]', + 'placeholder_text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'comp_summary' => null, + 'timeline_data' => null, + 'placeholder_text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'comp_summary' => false, + 'timeline_data' => false, + 'placeholder_text' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'comp_summary' => 'compSummary', + 'timeline_data' => 'timelineData', + 'placeholder_text' => 'placeholderText' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'comp_summary' => 'setCompSummary', + 'timeline_data' => 'setTimelineData', + 'placeholder_text' => 'setPlaceholderText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'comp_summary' => 'getCompSummary', + 'timeline_data' => 'getTimelineData', + 'placeholder_text' => 'getPlaceholderText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('comp_summary', $data ?? [], null); + $this->setIfExists('timeline_data', $data ?? [], null); + $this->setIfExists('placeholder_text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets comp_summary + * + * @return \BhrSdk\Model\TotalRewardsCompSummaryValues|null + */ + public function getCompSummary() { + return $this->container['comp_summary']; + } + + /** + * Sets comp_summary + * + * @param \BhrSdk\Model\TotalRewardsCompSummaryValues|null $comp_summary Compensation summary + * + * @return self + */ + public function setCompSummary($comp_summary) { + if (is_null($comp_summary)) { + throw new \InvalidArgumentException('non-nullable comp_summary cannot be null'); + } + $this->container['comp_summary'] = $comp_summary; + + return $this; + } + + /** + * Gets timeline_data + * + * @return \BhrSdk\Model\TotalRewardsTimelineItem[]|null + */ + public function getTimelineData() { + return $this->container['timeline_data']; + } + + /** + * Sets timeline_data + * + * @param \BhrSdk\Model\TotalRewardsTimelineItem[]|null $timeline_data Timeline data + * + * @return self + */ + public function setTimelineData($timeline_data) { + if (is_null($timeline_data)) { + throw new \InvalidArgumentException('non-nullable timeline_data cannot be null'); + } + $this->container['timeline_data'] = $timeline_data; + + return $this; + } + + /** + * Gets placeholder_text + * + * @return string|null + */ + public function getPlaceholderText() { + return $this->container['placeholder_text']; + } + + /** + * Sets placeholder_text + * + * @param string|null $placeholder_text placeholder_text + * + * @return self + */ + public function setPlaceholderText($placeholder_text) { + if (is_null($placeholder_text)) { + $this->openApiNullablesSetToNull['placeholder_text'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['placeholder_text'])) { + unset($nullablesSetToNull['placeholder_text']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['placeholder_text'] = $placeholder_text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingCategory.php b/lib/Model/TrainingCategory.php index 92163f2b..7c074e0a 100644 --- a/lib/Model/TrainingCategory.php +++ b/lib/Model/TrainingCategory.php @@ -296,7 +296,7 @@ public function getId() { /** * Sets id * - * @param int|null $id id + * @param int|null $id The ID of the training category. * * @return self */ @@ -321,7 +321,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name The name of the training category. * * @return self */ diff --git a/lib/Model/TrainingRecord.php b/lib/Model/TrainingRecord.php index 41d9fb65..fbb05773 100644 --- a/lib/Model/TrainingRecord.php +++ b/lib/Model/TrainingRecord.php @@ -58,14 +58,14 @@ class TrainingRecord implements ModelInterface, ArrayAccess, \JsonSerializable { */ protected static $openApiTypes = [ 'id' => 'int', - 'employee_id' => 'int', - 'completed' => 'string', + 'employee_id' => 'string', + 'completed' => '\DateTime', 'notes' => 'string', 'instructor' => 'string', - 'credits' => 'float', - 'hours' => 'float', + 'credits' => 'string', + 'hours' => 'string', 'cost' => 'string', - 'type' => 'int' + 'type' => '\BhrSdk\Model\TrainingRecordType' ]; /** @@ -78,7 +78,7 @@ class TrainingRecord implements ModelInterface, ArrayAccess, \JsonSerializable { protected static $openApiFormats = [ 'id' => null, 'employee_id' => null, - 'completed' => null, + 'completed' => 'date', 'notes' => null, 'instructor' => null, 'credits' => null, @@ -97,11 +97,11 @@ class TrainingRecord implements ModelInterface, ArrayAccess, \JsonSerializable { 'id' => false, 'employee_id' => false, 'completed' => false, - 'notes' => false, - 'instructor' => false, - 'credits' => false, - 'hours' => false, - 'cost' => false, + 'notes' => true, + 'instructor' => true, + 'credits' => true, + 'hours' => true, + 'cost' => true, 'type' => false ]; @@ -360,7 +360,7 @@ public function setId($id) { /** * Gets employee_id * - * @return int|null + * @return string|null */ public function getEmployeeId() { return $this->container['employee_id']; @@ -369,7 +369,7 @@ public function getEmployeeId() { /** * Sets employee_id * - * @param int|null $employee_id The ID of the employee associated with the training. + * @param string|null $employee_id The ID of the employee associated with the training, returned as a string. * * @return self */ @@ -385,7 +385,7 @@ public function setEmployeeId($employee_id) { /** * Gets completed * - * @return string|null + * @return \DateTime|null */ public function getCompleted() { return $this->container['completed']; @@ -394,7 +394,7 @@ public function getCompleted() { /** * Sets completed * - * @param string|null $completed Completed is a date in the format yyyy-mm-dd. + * @param \DateTime|null $completed Completed is a date in the format yyyy-mm-dd. * * @return self */ @@ -419,13 +419,19 @@ public function getNotes() { /** * Sets notes * - * @param string|null $notes Notes left on the training record. + * @param string|null $notes notes * * @return self */ public function setNotes($notes) { if (is_null($notes)) { - throw new \InvalidArgumentException('non-nullable notes cannot be null'); + $this->openApiNullablesSetToNull['notes'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['notes'])) { + unset($nullablesSetToNull['notes']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['notes'] = $notes; @@ -444,13 +450,19 @@ public function getInstructor() { /** * Sets instructor * - * @param string|null $instructor Name of the instructor. + * @param string|null $instructor instructor * * @return self */ public function setInstructor($instructor) { if (is_null($instructor)) { - throw new \InvalidArgumentException('non-nullable instructor cannot be null'); + $this->openApiNullablesSetToNull['instructor'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['instructor'])) { + unset($nullablesSetToNull['instructor']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['instructor'] = $instructor; @@ -460,7 +472,7 @@ public function setInstructor($instructor) { /** * Gets credits * - * @return float|null + * @return string|null */ public function getCredits() { return $this->container['credits']; @@ -469,13 +481,19 @@ public function getCredits() { /** * Sets credits * - * @param float|null $credits What was credited for the training record. + * @param string|null $credits credits * * @return self */ public function setCredits($credits) { if (is_null($credits)) { - throw new \InvalidArgumentException('non-nullable credits cannot be null'); + $this->openApiNullablesSetToNull['credits'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['credits'])) { + unset($nullablesSetToNull['credits']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['credits'] = $credits; @@ -485,7 +503,7 @@ public function setCredits($credits) { /** * Gets hours * - * @return float|null + * @return string|null */ public function getHours() { return $this->container['hours']; @@ -494,13 +512,19 @@ public function getHours() { /** * Sets hours * - * @param float|null $hours Hours associated with the training record. + * @param string|null $hours hours * * @return self */ public function setHours($hours) { if (is_null($hours)) { - throw new \InvalidArgumentException('non-nullable hours cannot be null'); + $this->openApiNullablesSetToNull['hours'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['hours'])) { + unset($nullablesSetToNull['hours']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['hours'] = $hours; @@ -519,13 +543,19 @@ public function getCost() { /** * Sets cost * - * @param string|null $cost The currency and cost for the training record. + * @param string|null $cost cost * * @return self */ public function setCost($cost) { if (is_null($cost)) { - throw new \InvalidArgumentException('non-nullable cost cannot be null'); + $this->openApiNullablesSetToNull['cost'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['cost'])) { + unset($nullablesSetToNull['cost']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['cost'] = $cost; @@ -535,7 +565,7 @@ public function setCost($cost) { /** * Gets type * - * @return int|null + * @return \BhrSdk\Model\TrainingRecordType|null */ public function getType() { return $this->container['type']; @@ -544,7 +574,7 @@ public function getType() { /** * Sets type * - * @param int|null $type The training type ID. + * @param \BhrSdk\Model\TrainingRecordType|null $type type * * @return self */ diff --git a/lib/Model/TrainingRecordMap.php b/lib/Model/TrainingRecordMap.php new file mode 100644 index 00000000..7aeff557 --- /dev/null +++ b/lib/Model/TrainingRecordMap.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * TrainingRecordMap + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TrainingRecordMap Class Doc Comment + * + * @category Class + * @description Returns an empty array when the employee has no records, or an object keyed by training record ID when records exist. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TrainingRecordMap implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TrainingRecordMap'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingRecordType.php b/lib/Model/TrainingRecordType.php new file mode 100644 index 00000000..7e32f745 --- /dev/null +++ b/lib/Model/TrainingRecordType.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * TrainingRecordType + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * TrainingRecordType Class Doc Comment + * + * @category Class + * @description The training type ID. Returned as a string on update/list responses, and as an integer on create responses. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class TrainingRecordType implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'TrainingRecord_type'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/TrainingType.php b/lib/Model/TrainingType.php index 357c037d..f95d3628 100644 --- a/lib/Model/TrainingType.php +++ b/lib/Model/TrainingType.php @@ -62,8 +62,8 @@ class TrainingType implements ModelInterface, ArrayAccess, \JsonSerializable { 'renewable' => 'bool', 'frequency' => 'int', 'due_from_hire_date' => 'int', - 'required' => 'int', - 'category' => '\BhrSdk\Model\TrainingCategory', + 'required' => 'bool', + 'category' => '\BhrSdk\Model\TrainingTypeCategory', 'link_url' => 'string', 'description' => 'string', 'allow_employees_to_mark_complete' => 'bool' @@ -101,10 +101,10 @@ class TrainingType implements ModelInterface, ArrayAccess, \JsonSerializable { 'renewable' => false, 'frequency' => false, 'due_from_hire_date' => false, - 'required' => false, + 'required' => true, 'category' => false, - 'link_url' => false, - 'description' => false, + 'link_url' => true, + 'description' => true, 'allow_employees_to_mark_complete' => false ]; @@ -467,7 +467,7 @@ public function setDueFromHireDate($due_from_hire_date) { /** * Gets required * - * @return int|null + * @return bool|null */ public function getRequired() { return $this->container['required']; @@ -476,13 +476,19 @@ public function getRequired() { /** * Sets required * - * @param int|null $required Is this a required training? + * @param bool|null $required required * * @return self */ public function setRequired($required) { if (is_null($required)) { - throw new \InvalidArgumentException('non-nullable required cannot be null'); + $this->openApiNullablesSetToNull['required'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['required'])) { + unset($nullablesSetToNull['required']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['required'] = $required; @@ -492,7 +498,7 @@ public function setRequired($required) { /** * Gets category * - * @return \BhrSdk\Model\TrainingCategory|null + * @return \BhrSdk\Model\TrainingTypeCategory|null */ public function getCategory() { return $this->container['category']; @@ -501,7 +507,7 @@ public function getCategory() { /** * Sets category * - * @param \BhrSdk\Model\TrainingCategory|null $category category + * @param \BhrSdk\Model\TrainingTypeCategory|null $category category * * @return self */ @@ -526,13 +532,19 @@ public function getLinkUrl() { /** * Sets link_url * - * @param string|null $link_url Optional URL that can be included with a training. + * @param string|null $link_url link_url * * @return self */ public function setLinkUrl($link_url) { if (is_null($link_url)) { - throw new \InvalidArgumentException('non-nullable link_url cannot be null'); + $this->openApiNullablesSetToNull['link_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['link_url'])) { + unset($nullablesSetToNull['link_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['link_url'] = $link_url; @@ -551,13 +563,19 @@ public function getDescription() { /** * Sets description * - * @param string|null $description Description for the training. + * @param string|null $description description * * @return self */ public function setDescription($description) { if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + $this->openApiNullablesSetToNull['description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['description'])) { + unset($nullablesSetToNull['description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['description'] = $description; diff --git a/lib/Model/WebhookSubErrorPropertyPostFieldsInner.php b/lib/Model/TrainingTypeCategory.php similarity index 94% rename from lib/Model/WebhookSubErrorPropertyPostFieldsInner.php rename to lib/Model/TrainingTypeCategory.php index ced39b25..d08391e8 100644 --- a/lib/Model/WebhookSubErrorPropertyPostFieldsInner.php +++ b/lib/Model/TrainingTypeCategory.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * WebhookSubErrorPropertyPostFieldsInner + * TrainingTypeCategory * * PHP version 8.1 * @@ -33,15 +33,16 @@ use \BhrSdk\ObjectSerializer; /** - * WebhookSubErrorPropertyPostFieldsInner Class Doc Comment + * TrainingTypeCategory Class Doc Comment * * @category Class + * @description The training category when set, or an empty array when no category is assigned. * @package BhrSdk * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class WebhookSubErrorPropertyPostFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class TrainingTypeCategory implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +50,7 @@ class WebhookSubErrorPropertyPostFieldsInner implements ModelInterface, ArrayAcc * * @var string */ - protected static $openApiModelName = 'WebhookSubErrorProperty_postFields_inner'; + protected static $openApiModelName = 'TrainingType_category'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +58,7 @@ class WebhookSubErrorPropertyPostFieldsInner implements ModelInterface, ArrayAcc * @var string[] */ protected static $openApiTypes = [ - 'id' => 'string', + 'id' => 'int', 'name' => 'string' ]; @@ -286,7 +287,7 @@ public function valid() { /** * Gets id * - * @return string|null + * @return int|null */ public function getId() { return $this->container['id']; @@ -295,7 +296,7 @@ public function getId() { /** * Sets id * - * @param string|null $id id + * @param int|null $id The ID of the training category. * * @return self */ @@ -320,7 +321,7 @@ public function getName() { /** * Sets name * - * @param string|null $name name + * @param string|null $name The name of the training category. * * @return self */ diff --git a/lib/Model/TransformedApiEmployeeGoalDetailsGoal.php b/lib/Model/TransformedApiEmployeeGoalDetailsGoal.php index c1d50052..a38e545b 100644 --- a/lib/Model/TransformedApiEmployeeGoalDetailsGoal.php +++ b/lib/Model/TransformedApiEmployeeGoalDetailsGoal.php @@ -66,9 +66,10 @@ class TransformedApiEmployeeGoalDetailsGoal implements ModelInterface, ArrayAcce 'shared_with_employee_ids' => 'int[]', 'due_date' => 'string', 'completion_date' => 'string', + 'last_changed_date_time' => 'string', 'status' => 'string', - 'milestones' => '\BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]', - 'actions' => '\BhrSdk\Model\TransformedApiGoalGoalActions' + 'milestones' => '\BhrSdk\Model\TransformedApiGoalMilestonesInner[]', + 'actions' => 'object' ]; /** @@ -87,6 +88,7 @@ class TransformedApiEmployeeGoalDetailsGoal implements ModelInterface, ArrayAcce 'shared_with_employee_ids' => null, 'due_date' => null, 'completion_date' => null, + 'last_changed_date_time' => null, 'status' => null, 'milestones' => null, 'actions' => null @@ -107,9 +109,10 @@ class TransformedApiEmployeeGoalDetailsGoal implements ModelInterface, ArrayAcce 'shared_with_employee_ids' => false, 'due_date' => false, 'completion_date' => true, + 'last_changed_date_time' => true, 'status' => false, 'milestones' => true, - 'actions' => false + 'actions' => true ]; /** @@ -202,6 +205,7 @@ public function isNullableSetToNull(string $property): bool { 'shared_with_employee_ids' => 'sharedWithEmployeeIds', 'due_date' => 'dueDate', 'completion_date' => 'completionDate', + 'last_changed_date_time' => 'lastChangedDateTime', 'status' => 'status', 'milestones' => 'milestones', 'actions' => 'actions' @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool { 'shared_with_employee_ids' => 'setSharedWithEmployeeIds', 'due_date' => 'setDueDate', 'completion_date' => 'setCompletionDate', + 'last_changed_date_time' => 'setLastChangedDateTime', 'status' => 'setStatus', 'milestones' => 'setMilestones', 'actions' => 'setActions' @@ -240,6 +245,7 @@ public function isNullableSetToNull(string $property): bool { 'shared_with_employee_ids' => 'getSharedWithEmployeeIds', 'due_date' => 'getDueDate', 'completion_date' => 'getCompletionDate', + 'last_changed_date_time' => 'getLastChangedDateTime', 'status' => 'getStatus', 'milestones' => 'getMilestones', 'actions' => 'getActions' @@ -321,6 +327,7 @@ public function __construct(?array $data = null) { $this->setIfExists('shared_with_employee_ids', $data ?? [], null); $this->setIfExists('due_date', $data ?? [], null); $this->setIfExists('completion_date', $data ?? [], null); + $this->setIfExists('last_changed_date_time', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('milestones', $data ?? [], null); $this->setIfExists('actions', $data ?? [], null); @@ -566,7 +573,7 @@ public function getCompletionDate() { /** * Sets completion_date * - * @param string|null $completion_date The date the goal was completed. + * @param string|null $completion_date completion_date * * @return self */ @@ -585,6 +592,37 @@ public function setCompletionDate($completion_date) { return $this; } + /** + * Gets last_changed_date_time + * + * @return string|null + */ + public function getLastChangedDateTime() { + return $this->container['last_changed_date_time']; + } + + /** + * Sets last_changed_date_time + * + * @param string|null $last_changed_date_time last_changed_date_time + * + * @return self + */ + public function setLastChangedDateTime($last_changed_date_time) { + if (is_null($last_changed_date_time)) { + $this->openApiNullablesSetToNull['last_changed_date_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_changed_date_time'])) { + unset($nullablesSetToNull['last_changed_date_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_changed_date_time'] = $last_changed_date_time; + + return $this; + } + /** * Gets status * @@ -623,7 +661,7 @@ public function setStatus($status) { /** * Gets milestones * - * @return \BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]|null + * @return \BhrSdk\Model\TransformedApiGoalMilestonesInner[]|null */ public function getMilestones() { return $this->container['milestones']; @@ -632,7 +670,7 @@ public function getMilestones() { /** * Sets milestones * - * @param \BhrSdk\Model\TransformedApiGoalGoalMilestonesInner[]|null $milestones All milestones for the individual goal. This array will not exist if milestones are not selected for this goal. + * @param \BhrSdk\Model\TransformedApiGoalMilestonesInner[]|null $milestones milestones * * @return self */ @@ -654,7 +692,7 @@ public function setMilestones($milestones) { /** * Gets actions * - * @return \BhrSdk\Model\TransformedApiGoalGoalActions|null + * @return object|null */ public function getActions() { return $this->container['actions']; @@ -663,13 +701,19 @@ public function getActions() { /** * Sets actions * - * @param \BhrSdk\Model\TransformedApiGoalGoalActions|null $actions actions + * @param object|null $actions actions * * @return self */ public function setActions($actions) { if (is_null($actions)) { - throw new \InvalidArgumentException('non-nullable actions cannot be null'); + $this->openApiNullablesSetToNull['actions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['actions'])) { + unset($nullablesSetToNull['actions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['actions'] = $actions; diff --git a/lib/Model/TransformedApiGoal.php b/lib/Model/TransformedApiGoal.php index 4b12e117..2fd9b4cd 100644 --- a/lib/Model/TransformedApiGoal.php +++ b/lib/Model/TransformedApiGoal.php @@ -57,7 +57,18 @@ class TransformedApiGoal implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openApiTypes = [ - 'goal' => '\BhrSdk\Model\TransformedApiGoalGoal' + 'id' => 'string', + 'title' => 'string', + 'description' => 'string', + 'percent_complete' => 'int', + 'aligns_with_option_id' => 'string', + 'shared_with_employee_ids' => 'int[]', + 'due_date' => 'string', + 'completion_date' => 'string', + 'last_changed_date_time' => 'string', + 'status' => 'string', + 'milestones' => '\BhrSdk\Model\TransformedApiGoalMilestonesInner[]', + 'actions' => 'object' ]; /** @@ -68,7 +79,18 @@ class TransformedApiGoal implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'goal' => null + 'id' => null, + 'title' => null, + 'description' => null, + 'percent_complete' => null, + 'aligns_with_option_id' => null, + 'shared_with_employee_ids' => null, + 'due_date' => null, + 'completion_date' => null, + 'last_changed_date_time' => null, + 'status' => null, + 'milestones' => null, + 'actions' => null ]; /** @@ -78,7 +100,18 @@ class TransformedApiGoal implements ModelInterface, ArrayAccess, \JsonSerializab * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'goal' => false + 'id' => false, + 'title' => false, + 'description' => false, + 'percent_complete' => false, + 'aligns_with_option_id' => true, + 'shared_with_employee_ids' => false, + 'due_date' => false, + 'completion_date' => true, + 'last_changed_date_time' => true, + 'status' => false, + 'milestones' => true, + 'actions' => true ]; /** @@ -163,7 +196,18 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'goal' => 'goal' + 'id' => 'id', + 'title' => 'title', + 'description' => 'description', + 'percent_complete' => 'percentComplete', + 'aligns_with_option_id' => 'alignsWithOptionId', + 'shared_with_employee_ids' => 'sharedWithEmployeeIds', + 'due_date' => 'dueDate', + 'completion_date' => 'completionDate', + 'last_changed_date_time' => 'lastChangedDateTime', + 'status' => 'status', + 'milestones' => 'milestones', + 'actions' => 'actions' ]; /** @@ -172,7 +216,18 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'goal' => 'setGoal' + 'id' => 'setId', + 'title' => 'setTitle', + 'description' => 'setDescription', + 'percent_complete' => 'setPercentComplete', + 'aligns_with_option_id' => 'setAlignsWithOptionId', + 'shared_with_employee_ids' => 'setSharedWithEmployeeIds', + 'due_date' => 'setDueDate', + 'completion_date' => 'setCompletionDate', + 'last_changed_date_time' => 'setLastChangedDateTime', + 'status' => 'setStatus', + 'milestones' => 'setMilestones', + 'actions' => 'setActions' ]; /** @@ -181,7 +236,18 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'goal' => 'getGoal' + 'id' => 'getId', + 'title' => 'getTitle', + 'description' => 'getDescription', + 'percent_complete' => 'getPercentComplete', + 'aligns_with_option_id' => 'getAlignsWithOptionId', + 'shared_with_employee_ids' => 'getSharedWithEmployeeIds', + 'due_date' => 'getDueDate', + 'completion_date' => 'getCompletionDate', + 'last_changed_date_time' => 'getLastChangedDateTime', + 'status' => 'getStatus', + 'milestones' => 'getMilestones', + 'actions' => 'getActions' ]; /** @@ -221,6 +287,23 @@ public function getModelName() { return self::$openApiModelName; } + public const STATUS_IN_PROGRESS = 'in_progress'; + public const STATUS_COMPLETED = 'completed'; + public const STATUS_CLOSED = 'closed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_COMPLETED, + self::STATUS_CLOSED, + ]; + } + /** * Associative array for storing property values * @@ -235,7 +318,18 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('goal', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('percent_complete', $data ?? [], null); + $this->setIfExists('aligns_with_option_id', $data ?? [], null); + $this->setIfExists('shared_with_employee_ids', $data ?? [], null); + $this->setIfExists('due_date', $data ?? [], null); + $this->setIfExists('completion_date', $data ?? [], null); + $this->setIfExists('last_changed_date_time', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('milestones', $data ?? [], null); + $this->setIfExists('actions', $data ?? [], null); } /** @@ -263,6 +357,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -277,26 +380,341 @@ public function valid() { } /** - * Gets goal + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The id of the goal. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Title of the goal. + * + * @return self + */ + public function setTitle($title) { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the goal. + * + * @return self + */ + public function setDescription($description) { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets percent_complete + * + * @return int|null + */ + public function getPercentComplete() { + return $this->container['percent_complete']; + } + + /** + * Sets percent_complete + * + * @param int|null $percent_complete A percentage (0-100) that denotes how complete the goal is. + * + * @return self + */ + public function setPercentComplete($percent_complete) { + if (is_null($percent_complete)) { + throw new \InvalidArgumentException('non-nullable percent_complete cannot be null'); + } + $this->container['percent_complete'] = $percent_complete; + + return $this; + } + + /** + * Gets aligns_with_option_id * - * @return \BhrSdk\Model\TransformedApiGoalGoal|null + * @return string|null */ - public function getGoal() { - return $this->container['goal']; + public function getAlignsWithOptionId() { + return $this->container['aligns_with_option_id']; } /** - * Sets goal + * Sets aligns_with_option_id * - * @param \BhrSdk\Model\TransformedApiGoalGoal|null $goal goal + * @param string|null $aligns_with_option_id aligns_with_option_id * * @return self */ - public function setGoal($goal) { - if (is_null($goal)) { - throw new \InvalidArgumentException('non-nullable goal cannot be null'); + public function setAlignsWithOptionId($aligns_with_option_id) { + if (is_null($aligns_with_option_id)) { + $this->openApiNullablesSetToNull['aligns_with_option_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['aligns_with_option_id'])) { + unset($nullablesSetToNull['aligns_with_option_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['aligns_with_option_id'] = $aligns_with_option_id; + + return $this; + } + + /** + * Gets shared_with_employee_ids + * + * @return int[]|null + */ + public function getSharedWithEmployeeIds() { + return $this->container['shared_with_employee_ids']; + } + + /** + * Sets shared_with_employee_ids + * + * @param int[]|null $shared_with_employee_ids Ids of the employees that have access to this goal. + * + * @return self + */ + public function setSharedWithEmployeeIds($shared_with_employee_ids) { + if (is_null($shared_with_employee_ids)) { + throw new \InvalidArgumentException('non-nullable shared_with_employee_ids cannot be null'); + } + $this->container['shared_with_employee_ids'] = $shared_with_employee_ids; + + return $this; + } + + /** + * Gets due_date + * + * @return string|null + */ + public function getDueDate() { + return $this->container['due_date']; + } + + /** + * Sets due_date + * + * @param string|null $due_date The due date of the goal. + * + * @return self + */ + public function setDueDate($due_date) { + if (is_null($due_date)) { + throw new \InvalidArgumentException('non-nullable due_date cannot be null'); + } + $this->container['due_date'] = $due_date; + + return $this; + } + + /** + * Gets completion_date + * + * @return string|null + */ + public function getCompletionDate() { + return $this->container['completion_date']; + } + + /** + * Sets completion_date + * + * @param string|null $completion_date completion_date + * + * @return self + */ + public function setCompletionDate($completion_date) { + if (is_null($completion_date)) { + $this->openApiNullablesSetToNull['completion_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['completion_date'])) { + unset($nullablesSetToNull['completion_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['completion_date'] = $completion_date; + + return $this; + } + + /** + * Gets last_changed_date_time + * + * @return string|null + */ + public function getLastChangedDateTime() { + return $this->container['last_changed_date_time']; + } + + /** + * Sets last_changed_date_time + * + * @param string|null $last_changed_date_time last_changed_date_time + * + * @return self + */ + public function setLastChangedDateTime($last_changed_date_time) { + if (is_null($last_changed_date_time)) { + $this->openApiNullablesSetToNull['last_changed_date_time'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_changed_date_time'])) { + unset($nullablesSetToNull['last_changed_date_time']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['last_changed_date_time'] = $last_changed_date_time; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the goal. + * + * @return self + */ + public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets milestones + * + * @return \BhrSdk\Model\TransformedApiGoalMilestonesInner[]|null + */ + public function getMilestones() { + return $this->container['milestones']; + } + + /** + * Sets milestones + * + * @param \BhrSdk\Model\TransformedApiGoalMilestonesInner[]|null $milestones milestones + * + * @return self + */ + public function setMilestones($milestones) { + if (is_null($milestones)) { + $this->openApiNullablesSetToNull['milestones'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['milestones'])) { + unset($nullablesSetToNull['milestones']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['milestones'] = $milestones; + + return $this; + } + + /** + * Gets actions + * + * @return object|null + */ + public function getActions() { + return $this->container['actions']; + } + + /** + * Sets actions + * + * @param object|null $actions actions + * + * @return self + */ + public function setActions($actions) { + if (is_null($actions)) { + $this->openApiNullablesSetToNull['actions'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['actions'])) { + unset($nullablesSetToNull['actions']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } - $this->container['goal'] = $goal; + $this->container['actions'] = $actions; return $this; } diff --git a/lib/Model/TransformedApiGoalGoalActions.php b/lib/Model/TransformedApiGoalGoalActions.php deleted file mode 100644 index 2b9cf0d6..00000000 --- a/lib/Model/TransformedApiGoalGoalActions.php +++ /dev/null @@ -1,421 +0,0 @@ -<?php -declare(strict_types=1); -/** - * TransformedApiGoalGoalActions - * - * PHP version 8.1 - * - * @category Class - * @package BhrSdk - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - */ - -/** - * BambooHR API - * - * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - * - * The version of the OpenAPI document: 1.0 - * Generated by: https://openapi-generator.tech - * Generator version: 7.16.0 - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace BhrSdk\Model; - -use \ArrayAccess; -use \BhrSdk\ObjectSerializer; - -/** - * TransformedApiGoalGoalActions Class Doc Comment - * - * @category Class - * @description Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones. - * @package BhrSdk - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess<string, mixed> - */ -class TransformedApiGoalGoalActions implements ModelInterface, ArrayAccess, \JsonSerializable { - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openApiModelName = 'TransformedApiGoal_goal_actions'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openApiTypes = [ - 'can_edit_goal_progress_bar' => 'bool', - 'can_edit_goal_milestone_progress_bar' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array<string, string|null> - * @psalm-var array<string, string|null> - */ - protected static $openApiFormats = [ - 'can_edit_goal_progress_bar' => null, - 'can_edit_goal_milestone_progress_bar' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var bool[] - * @phpstan-var array<string, bool> - */ - protected static array $openApiNullables = [ - 'can_edit_goal_progress_bar' => false, - 'can_edit_goal_milestone_progress_bar' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var bool[] - * @phpstan-var array<string, bool> - */ - protected array $openApiNullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openApiTypes() { - return self::$openApiTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openApiFormats() { - 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 bool[] - * @phpstan-return array<string, bool> - */ - private function getOpenApiNullablesSetToNull(): array { - return $this->openApiNullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param bool[] $openApiNullablesSetToNull - * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'can_edit_goal_progress_bar' => 'canEditGoalProgressBar', - 'can_edit_goal_milestone_progress_bar' => 'canEditGoalMilestoneProgressBar' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'can_edit_goal_progress_bar' => 'setCanEditGoalProgressBar', - 'can_edit_goal_milestone_progress_bar' => 'setCanEditGoalMilestoneProgressBar' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'can_edit_goal_progress_bar' => 'getCanEditGoalProgressBar', - 'can_edit_goal_milestone_progress_bar' => 'getCanEditGoalMilestoneProgressBar' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() { - return self::$openApiModelName; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[]|null $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) { - $this->setIfExists('can_edit_goal_progress_bar', $data ?? [], null); - $this->setIfExists('can_edit_goal_milestone_progress_bar', $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, $defaultValue): void { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openApiNullablesSetToNull[$variableName] = true; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() { - $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() { - return count($this->listInvalidProperties()) === 0; - } - - /** - * Gets can_edit_goal_progress_bar - * - * @return bool|null - */ - public function getCanEditGoalProgressBar() { - return $this->container['can_edit_goal_progress_bar']; - } - - /** - * Sets can_edit_goal_progress_bar - * - * @param bool|null $can_edit_goal_progress_bar Can the user edit the progress bar of this goal. - * - * @return self - */ - public function setCanEditGoalProgressBar($can_edit_goal_progress_bar) { - if (is_null($can_edit_goal_progress_bar)) { - throw new \InvalidArgumentException('non-nullable can_edit_goal_progress_bar cannot be null'); - } - $this->container['can_edit_goal_progress_bar'] = $can_edit_goal_progress_bar; - - return $this; - } - - /** - * Gets can_edit_goal_milestone_progress_bar - * - * @return bool|null - */ - public function getCanEditGoalMilestoneProgressBar() { - return $this->container['can_edit_goal_milestone_progress_bar']; - } - - /** - * Sets can_edit_goal_milestone_progress_bar - * - * @param bool|null $can_edit_goal_milestone_progress_bar can the user edit the progress of a milestone in this goal. - * - * @return self - */ - public function setCanEditGoalMilestoneProgressBar($can_edit_goal_milestone_progress_bar) { - if (is_null($can_edit_goal_milestone_progress_bar)) { - throw new \InvalidArgumentException('non-nullable can_edit_goal_milestone_progress_bar cannot be null'); - } - $this->container['can_edit_goal_milestone_progress_bar'] = $can_edit_goal_milestone_progress_bar; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param string $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param string $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param string $offset Offset - * - * @return void - */ - public function offsetUnset($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() { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string { - $jsonEncoded = json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - return $jsonEncoded === false ? '{}' : $jsonEncoded; - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string { - $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); - return $jsonEncoded === false ? '{}' : $jsonEncoded; - } -} - diff --git a/lib/Model/TransformedApiGoalGoalMilestonesInner.php b/lib/Model/TransformedApiGoalMilestonesInner.php similarity index 88% rename from lib/Model/TransformedApiGoalGoalMilestonesInner.php rename to lib/Model/TransformedApiGoalMilestonesInner.php index ae827003..e7279554 100644 --- a/lib/Model/TransformedApiGoalGoalMilestonesInner.php +++ b/lib/Model/TransformedApiGoalMilestonesInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * TransformedApiGoalGoalMilestonesInner + * TransformedApiGoalMilestonesInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * TransformedApiGoalGoalMilestonesInner Class Doc Comment + * TransformedApiGoalMilestonesInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class TransformedApiGoalGoalMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class TransformedApiGoalMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class TransformedApiGoalGoalMilestonesInner implements ModelInterface, ArrayAcce * * @var string */ - protected static $openApiModelName = 'TransformedApiGoal_goal_milestones_inner'; + protected static $openApiModelName = 'TransformedApiGoal_milestones_inner'; /** * Array of property to type mappings. Used for (de)serialization @@ -64,7 +64,7 @@ class TransformedApiGoalGoalMilestonesInner implements ModelInterface, ArrayAcce 'start_value' => 'float', 'end_value' => 'float', 'completed_date_time' => 'string', - 'last_update_date_date_time' => 'string', + 'last_update_date_time' => 'string', 'last_update_user_id' => 'int' ]; @@ -83,7 +83,7 @@ class TransformedApiGoalGoalMilestonesInner implements ModelInterface, ArrayAcce 'start_value' => null, 'end_value' => null, 'completed_date_time' => null, - 'last_update_date_date_time' => null, + 'last_update_date_time' => null, 'last_update_user_id' => null ]; @@ -101,7 +101,7 @@ class TransformedApiGoalGoalMilestonesInner implements ModelInterface, ArrayAcce 'start_value' => true, 'end_value' => true, 'completed_date_time' => false, - 'last_update_date_date_time' => false, + 'last_update_date_time' => false, 'last_update_user_id' => false ]; @@ -194,7 +194,7 @@ public function isNullableSetToNull(string $property): bool { 'start_value' => 'startValue', 'end_value' => 'endValue', 'completed_date_time' => 'completedDateTime', - 'last_update_date_date_time' => 'lastUpdateDateDateTime', + 'last_update_date_time' => 'lastUpdateDateTime', 'last_update_user_id' => 'lastUpdateUserId' ]; @@ -211,7 +211,7 @@ public function isNullableSetToNull(string $property): bool { 'start_value' => 'setStartValue', 'end_value' => 'setEndValue', 'completed_date_time' => 'setCompletedDateTime', - 'last_update_date_date_time' => 'setLastUpdateDateDateTime', + 'last_update_date_time' => 'setLastUpdateDateTime', 'last_update_user_id' => 'setLastUpdateUserId' ]; @@ -228,7 +228,7 @@ public function isNullableSetToNull(string $property): bool { 'start_value' => 'getStartValue', 'end_value' => 'getEndValue', 'completed_date_time' => 'getCompletedDateTime', - 'last_update_date_date_time' => 'getLastUpdateDateDateTime', + 'last_update_date_time' => 'getLastUpdateDateTime', 'last_update_user_id' => 'getLastUpdateUserId' ]; @@ -290,7 +290,7 @@ public function __construct(?array $data = null) { $this->setIfExists('start_value', $data ?? [], null); $this->setIfExists('end_value', $data ?? [], null); $this->setIfExists('completed_date_time', $data ?? [], null); - $this->setIfExists('last_update_date_date_time', $data ?? [], null); + $this->setIfExists('last_update_date_time', $data ?? [], null); $this->setIfExists('last_update_user_id', $data ?? [], null); } @@ -419,7 +419,7 @@ public function getCurrentValue() { /** * Sets current_value * - * @param float|null $current_value The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null. + * @param float|null $current_value current_value * * @return self */ @@ -450,7 +450,7 @@ public function getStartValue() { /** * Sets start_value * - * @param float|null $start_value The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null. + * @param float|null $start_value start_value * * @return self */ @@ -481,7 +481,7 @@ public function getEndValue() { /** * Sets end_value * - * @param float|null $end_value The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null. + * @param float|null $end_value end_value * * @return self */ @@ -526,26 +526,26 @@ public function setCompletedDateTime($completed_date_time) { } /** - * Gets last_update_date_date_time + * Gets last_update_date_time * * @return string|null */ - public function getLastUpdateDateDateTime() { - return $this->container['last_update_date_date_time']; + public function getLastUpdateDateTime() { + return $this->container['last_update_date_time']; } /** - * Sets last_update_date_date_time + * Sets last_update_date_time * - * @param string|null $last_update_date_date_time The date and time in which the goal was last updated. + * @param string|null $last_update_date_time The date and time in which the goal was last updated. * * @return self */ - public function setLastUpdateDateDateTime($last_update_date_date_time) { - if (is_null($last_update_date_date_time)) { - throw new \InvalidArgumentException('non-nullable last_update_date_date_time cannot be null'); + public function setLastUpdateDateTime($last_update_date_time) { + if (is_null($last_update_date_time)) { + throw new \InvalidArgumentException('non-nullable last_update_date_time cannot be null'); } - $this->container['last_update_date_date_time'] = $last_update_date_date_time; + $this->container['last_update_date_time'] = $last_update_date_time; return $this; } diff --git a/lib/Model/UnassignEmployeesFromBreakPolicyRequest.php b/lib/Model/UnassignEmployeesFromBreakPolicyRequest.php new file mode 100644 index 00000000..b18d34ac --- /dev/null +++ b/lib/Model/UnassignEmployeesFromBreakPolicyRequest.php @@ -0,0 +1,399 @@ +<?php +declare(strict_types=1); +/** + * UnassignEmployeesFromBreakPolicyRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UnassignEmployeesFromBreakPolicyRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UnassignEmployeesFromBreakPolicyRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'unassign_employees_from_break_policy_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' can't be null"; + } + if ((count($this->container['employee_ids']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_ids', number of items must be greater 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 + */ + public function valid() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return int[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param int[] $employee_ids Array of employee IDs to unassign from the break policy + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + + if ((count($employee_ids) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_ids when calling UnassignEmployeesFromBreakPolicyRequest., number of items must be greater than or equal to 1.'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PostApplicantStatusRequest.php b/lib/Model/UpdateApplicantStatusRequest.php similarity index 95% rename from lib/Model/PostApplicantStatusRequest.php rename to lib/Model/UpdateApplicantStatusRequest.php index 59a75994..4bec16f4 100644 --- a/lib/Model/PostApplicantStatusRequest.php +++ b/lib/Model/UpdateApplicantStatusRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PostApplicantStatusRequest + * UpdateApplicantStatusRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PostApplicantStatusRequest Class Doc Comment + * UpdateApplicantStatusRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PostApplicantStatusRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateApplicantStatusRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PostApplicantStatusRequest implements ModelInterface, ArrayAccess, \JsonSe * * @var string */ - protected static $openApiModelName = 'post_applicant_status_request'; + protected static $openApiModelName = 'update_applicant_status_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -291,7 +291,7 @@ public function getStatus() { /** * Sets status * - * @param int $status Associates a status id with an application. + * @param int $status The ID of the status to assign to the application. Use the Get Applicant Statuses endpoint to get available status IDs. * * @return self */ diff --git a/lib/Model/UpdateApplicantStatusResponse.php b/lib/Model/UpdateApplicantStatusResponse.php new file mode 100644 index 00000000..88dc35d0 --- /dev/null +++ b/lib/Model/UpdateApplicantStatusResponse.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * UpdateApplicantStatusResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateApplicantStatusResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateApplicantStatusResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateApplicantStatusResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'type' => 'string', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'type' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Always 'positionApplicantStatus' + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The ID of the created status change record + * + * @return self + */ + public function setId($id) { + 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. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyIndustryCodes400Response.php b/lib/Model/UpdateCompanyIndustryCodes400Response.php new file mode 100644 index 00000000..a5b03771 --- /dev/null +++ b/lib/Model/UpdateCompanyIndustryCodes400Response.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyIndustryCodes400Response + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyIndustryCodes400Response Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyIndustryCodes400Response implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyIndustryCodes400Response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyIndustryCodes403Response.php b/lib/Model/UpdateCompanyIndustryCodes403Response.php new file mode 100644 index 00000000..d18dba89 --- /dev/null +++ b/lib/Model/UpdateCompanyIndustryCodes403Response.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyIndustryCodes403Response + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyIndustryCodes403Response Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyIndustryCodes403Response implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyIndustryCodes403Response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyIndustryCodes404Response.php b/lib/Model/UpdateCompanyIndustryCodes404Response.php new file mode 100644 index 00000000..267e25ae --- /dev/null +++ b/lib/Model/UpdateCompanyIndustryCodes404Response.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyIndustryCodes404Response + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyIndustryCodes404Response Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyIndustryCodes404Response implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyIndustryCodes404Response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyIndustryCodes500Response.php b/lib/Model/UpdateCompanyIndustryCodes500Response.php new file mode 100644 index 00000000..5e021b21 --- /dev/null +++ b/lib/Model/UpdateCompanyIndustryCodes500Response.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyIndustryCodes500Response + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyIndustryCodes500Response Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyIndustryCodes500Response implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyIndustryCodes500Response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyIndustryCodesResponse.php b/lib/Model/UpdateCompanyIndustryCodesResponse.php new file mode 100644 index 00000000..e3508417 --- /dev/null +++ b/lib/Model/UpdateCompanyIndustryCodesResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyIndustryCodesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyIndustryCodesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyIndustryCodesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyIndustryCodesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'company_industries' => '\BhrSdk\Model\CompanyIndustryDataObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'company_industries' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'company_industries' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'company_industries' => 'company_industries' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company_industries' => 'setCompanyIndustries' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company_industries' => 'getCompanyIndustries' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('company_industries', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets company_industries + * + * @return \BhrSdk\Model\CompanyIndustryDataObject[]|null + */ + public function getCompanyIndustries() { + return $this->container['company_industries']; + } + + /** + * Sets company_industries + * + * @param \BhrSdk\Model\CompanyIndustryDataObject[]|null $company_industries company_industries + * + * @return self + */ + public function setCompanyIndustries($company_industries) { + if (is_null($company_industries)) { + throw new \InvalidArgumentException('non-nullable company_industries cannot be null'); + } + $this->container['company_industries'] = $company_industries; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyNameBadRequestResponse.php b/lib/Model/UpdateCompanyNameBadRequestResponse.php new file mode 100644 index 00000000..59727278 --- /dev/null +++ b/lib/Model/UpdateCompanyNameBadRequestResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyNameBadRequestResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyNameBadRequestResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyNameBadRequestResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyNameBadRequestResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => '\BhrSdk\Model\UpdateCompanyNameBadRequestResponseError' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return \BhrSdk\Model\UpdateCompanyNameBadRequestResponseError|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \BhrSdk\Model\UpdateCompanyNameBadRequestResponseError|null $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyNameBadRequestResponseError.php b/lib/Model/UpdateCompanyNameBadRequestResponseError.php new file mode 100644 index 00000000..cb60502d --- /dev/null +++ b/lib/Model/UpdateCompanyNameBadRequestResponseError.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyNameBadRequestResponseError + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyNameBadRequestResponseError Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyNameBadRequestResponseError implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyNameBadRequestResponse_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyNameForbiddenResponse.php b/lib/Model/UpdateCompanyNameForbiddenResponse.php new file mode 100644 index 00000000..3816dac3 --- /dev/null +++ b/lib/Model/UpdateCompanyNameForbiddenResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyNameForbiddenResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyNameForbiddenResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyNameForbiddenResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyNameForbiddenResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => '\BhrSdk\Model\UpdateCompanyNameForbiddenResponseError' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return \BhrSdk\Model\UpdateCompanyNameForbiddenResponseError|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \BhrSdk\Model\UpdateCompanyNameForbiddenResponseError|null $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyNameForbiddenResponseError.php b/lib/Model/UpdateCompanyNameForbiddenResponseError.php new file mode 100644 index 00000000..06fa35d7 --- /dev/null +++ b/lib/Model/UpdateCompanyNameForbiddenResponseError.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyNameForbiddenResponseError + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyNameForbiddenResponseError Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyNameForbiddenResponseError implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyNameForbiddenResponse_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompanyNameInternalErrorResponse.php b/lib/Model/UpdateCompanyNameInternalErrorResponse.php new file mode 100644 index 00000000..21c0d7e4 --- /dev/null +++ b/lib/Model/UpdateCompanyNameInternalErrorResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompanyNameInternalErrorResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompanyNameInternalErrorResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompanyNameInternalErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompanyNameInternalErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => '\BhrSdk\Model\UpdateCompanyNameForbiddenResponseError' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return \BhrSdk\Model\UpdateCompanyNameForbiddenResponseError|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \BhrSdk\Model\UpdateCompanyNameForbiddenResponseError|null $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/GetGoalsAlignmentOptionsRequest.php b/lib/Model/UpdateCompanyNameSuccessResponse.php similarity index 90% rename from lib/Model/GetGoalsAlignmentOptionsRequest.php rename to lib/Model/UpdateCompanyNameSuccessResponse.php index f7b7af4d..a57e8efa 100644 --- a/lib/Model/GetGoalsAlignmentOptionsRequest.php +++ b/lib/Model/UpdateCompanyNameSuccessResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * GetGoalsAlignmentOptionsRequest + * UpdateCompanyNameSuccessResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * GetGoalsAlignmentOptionsRequest Class Doc Comment + * UpdateCompanyNameSuccessResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class GetGoalsAlignmentOptionsRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateCompanyNameSuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class GetGoalsAlignmentOptionsRequest implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openApiModelName = 'get_goals_alignment_options_request'; + protected static $openApiModelName = 'UpdateCompanyNameSuccessResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class GetGoalsAlignmentOptionsRequest implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openApiTypes = [ - 'goal_id' => 'int' + 'success' => 'bool' ]; /** @@ -68,7 +68,7 @@ class GetGoalsAlignmentOptionsRequest implements ModelInterface, ArrayAccess, \J * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'goal_id' => null + 'success' => null ]; /** @@ -78,7 +78,7 @@ class GetGoalsAlignmentOptionsRequest implements ModelInterface, ArrayAccess, \J * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'goal_id' => false + 'success' => false ]; /** @@ -163,7 +163,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'goal_id' => 'goalId' + 'success' => 'success' ]; /** @@ -172,7 +172,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'goal_id' => 'setGoalId' + 'success' => 'setSuccess' ]; /** @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'goal_id' => 'getGoalId' + 'success' => 'getSuccess' ]; /** @@ -235,7 +235,7 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('goal_id', $data ?? [], null); + $this->setIfExists('success', $data ?? [], null); } /** @@ -277,26 +277,26 @@ public function valid() { } /** - * Gets goal_id + * Gets success * - * @return int|null + * @return bool|null */ - public function getGoalId() { - return $this->container['goal_id']; + public function getSuccess() { + return $this->container['success']; } /** - * Sets goal_id + * Sets success * - * @param int|null $goal_id The goal ID to get alignment options for + * @param bool|null $success Indicates whether the operation was successful * * @return self */ - public function setGoalId($goal_id) { - if (is_null($goal_id)) { - throw new \InvalidArgumentException('non-nullable goal_id cannot be null'); + public function setSuccess($success) { + if (is_null($success)) { + throw new \InvalidArgumentException('non-nullable success cannot be null'); } - $this->container['goal_id'] = $goal_id; + $this->container['success'] = $success; return $this; } diff --git a/lib/Model/UpdateCompensationBenchmarkRequest.php b/lib/Model/UpdateCompensationBenchmarkRequest.php new file mode 100644 index 00000000..cb623ffc --- /dev/null +++ b/lib/Model/UpdateCompensationBenchmarkRequest.php @@ -0,0 +1,1071 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompensationBenchmarkRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompensationBenchmarkRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompensationBenchmarkRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompensationBenchmarkRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'currency_code' => 'string', + 'mjl_job_code' => 'string', + 'benchmark_value' => 'float', + 'benchmark_min' => 'float', + 'benchmark_max' => 'float', + 'benchmark_source' => 'string', + 'external_job_title' => 'string', + 'external_location' => 'string', + 'external_level' => 'string', + 'external_job_description' => 'string', + 'companies_surveyed' => 'int', + 'employees_surveyed' => 'int', + 'source_id' => 'string', + 'source_date' => 'string', + 'data_year' => 'string', + 'external_country' => 'string', + 'external_secondary_location' => 'string', + 'external_company_size' => 'string', + 'external_industry' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'currency_code' => null, + 'mjl_job_code' => null, + 'benchmark_value' => null, + 'benchmark_min' => null, + 'benchmark_max' => null, + 'benchmark_source' => null, + 'external_job_title' => null, + 'external_location' => null, + 'external_level' => null, + 'external_job_description' => null, + 'companies_surveyed' => null, + 'employees_surveyed' => null, + 'source_id' => null, + 'source_date' => null, + 'data_year' => null, + 'external_country' => null, + 'external_secondary_location' => null, + 'external_company_size' => null, + 'external_industry' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'currency_code' => false, + 'mjl_job_code' => false, + 'benchmark_value' => false, + 'benchmark_min' => false, + 'benchmark_max' => false, + 'benchmark_source' => false, + 'external_job_title' => true, + 'external_location' => true, + 'external_level' => true, + 'external_job_description' => true, + 'companies_surveyed' => true, + 'employees_surveyed' => true, + 'source_id' => false, + 'source_date' => false, + 'data_year' => false, + 'external_country' => true, + 'external_secondary_location' => true, + 'external_company_size' => true, + 'external_industry' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'currency_code' => 'currencyCode', + 'mjl_job_code' => 'mjlJobCode', + 'benchmark_value' => 'benchmarkValue', + 'benchmark_min' => 'benchmarkMin', + 'benchmark_max' => 'benchmarkMax', + 'benchmark_source' => 'benchmarkSource', + 'external_job_title' => 'externalJobTitle', + 'external_location' => 'externalLocation', + 'external_level' => 'externalLevel', + 'external_job_description' => 'externalJobDescription', + 'companies_surveyed' => 'companiesSurveyed', + 'employees_surveyed' => 'employeesSurveyed', + 'source_id' => 'sourceId', + 'source_date' => 'sourceDate', + 'data_year' => 'dataYear', + 'external_country' => 'externalCountry', + 'external_secondary_location' => 'externalSecondaryLocation', + 'external_company_size' => 'externalCompanySize', + 'external_industry' => 'externalIndustry' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'currency_code' => 'setCurrencyCode', + 'mjl_job_code' => 'setMjlJobCode', + 'benchmark_value' => 'setBenchmarkValue', + 'benchmark_min' => 'setBenchmarkMin', + 'benchmark_max' => 'setBenchmarkMax', + 'benchmark_source' => 'setBenchmarkSource', + 'external_job_title' => 'setExternalJobTitle', + 'external_location' => 'setExternalLocation', + 'external_level' => 'setExternalLevel', + 'external_job_description' => 'setExternalJobDescription', + 'companies_surveyed' => 'setCompaniesSurveyed', + 'employees_surveyed' => 'setEmployeesSurveyed', + 'source_id' => 'setSourceId', + 'source_date' => 'setSourceDate', + 'data_year' => 'setDataYear', + 'external_country' => 'setExternalCountry', + 'external_secondary_location' => 'setExternalSecondaryLocation', + 'external_company_size' => 'setExternalCompanySize', + 'external_industry' => 'setExternalIndustry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'currency_code' => 'getCurrencyCode', + 'mjl_job_code' => 'getMjlJobCode', + 'benchmark_value' => 'getBenchmarkValue', + 'benchmark_min' => 'getBenchmarkMin', + 'benchmark_max' => 'getBenchmarkMax', + 'benchmark_source' => 'getBenchmarkSource', + 'external_job_title' => 'getExternalJobTitle', + 'external_location' => 'getExternalLocation', + 'external_level' => 'getExternalLevel', + 'external_job_description' => 'getExternalJobDescription', + 'companies_surveyed' => 'getCompaniesSurveyed', + 'employees_surveyed' => 'getEmployeesSurveyed', + 'source_id' => 'getSourceId', + 'source_date' => 'getSourceDate', + 'data_year' => 'getDataYear', + 'external_country' => 'getExternalCountry', + 'external_secondary_location' => 'getExternalSecondaryLocation', + 'external_company_size' => 'getExternalCompanySize', + 'external_industry' => 'getExternalIndustry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('mjl_job_code', $data ?? [], null); + $this->setIfExists('benchmark_value', $data ?? [], null); + $this->setIfExists('benchmark_min', $data ?? [], null); + $this->setIfExists('benchmark_max', $data ?? [], null); + $this->setIfExists('benchmark_source', $data ?? [], null); + $this->setIfExists('external_job_title', $data ?? [], null); + $this->setIfExists('external_location', $data ?? [], null); + $this->setIfExists('external_level', $data ?? [], null); + $this->setIfExists('external_job_description', $data ?? [], null); + $this->setIfExists('companies_surveyed', $data ?? [], null); + $this->setIfExists('employees_surveyed', $data ?? [], null); + $this->setIfExists('source_id', $data ?? [], null); + $this->setIfExists('source_date', $data ?? [], null); + $this->setIfExists('data_year', $data ?? [], null); + $this->setIfExists('external_country', $data ?? [], null); + $this->setIfExists('external_secondary_location', $data ?? [], null); + $this->setIfExists('external_company_size', $data ?? [], null); + $this->setIfExists('external_industry', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['currency_code'] === null) { + $invalidProperties[] = "'currency_code' can't be null"; + } + if ($this->container['benchmark_value'] === null) { + $invalidProperties[] = "'benchmark_value' can't be null"; + } + if ($this->container['benchmark_min'] === null) { + $invalidProperties[] = "'benchmark_min' can't be null"; + } + if ($this->container['benchmark_max'] === null) { + $invalidProperties[] = "'benchmark_max' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the benchmark to update. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets currency_code + * + * @return string + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string $currency_code ISO 4217 currency code for the benchmark values. + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + throw new \InvalidArgumentException('non-nullable currency_code cannot be null'); + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets mjl_job_code + * + * @return string|null + */ + public function getMjlJobCode() { + return $this->container['mjl_job_code']; + } + + /** + * Sets mjl_job_code + * + * @param string|null $mjl_job_code Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`. + * + * @return self + */ + public function setMjlJobCode($mjl_job_code) { + if (is_null($mjl_job_code)) { + throw new \InvalidArgumentException('non-nullable mjl_job_code cannot be null'); + } + $this->container['mjl_job_code'] = $mjl_job_code; + + return $this; + } + + /** + * Gets benchmark_value + * + * @return float + */ + public function getBenchmarkValue() { + return $this->container['benchmark_value']; + } + + /** + * Sets benchmark_value + * + * @param float $benchmark_value Benchmark median value. + * + * @return self + */ + public function setBenchmarkValue($benchmark_value) { + if (is_null($benchmark_value)) { + throw new \InvalidArgumentException('non-nullable benchmark_value cannot be null'); + } + $this->container['benchmark_value'] = $benchmark_value; + + return $this; + } + + /** + * Gets benchmark_min + * + * @return float + */ + public function getBenchmarkMin() { + return $this->container['benchmark_min']; + } + + /** + * Sets benchmark_min + * + * @param float $benchmark_min Benchmark minimum value. + * + * @return self + */ + public function setBenchmarkMin($benchmark_min) { + if (is_null($benchmark_min)) { + throw new \InvalidArgumentException('non-nullable benchmark_min cannot be null'); + } + $this->container['benchmark_min'] = $benchmark_min; + + return $this; + } + + /** + * Gets benchmark_max + * + * @return float + */ + public function getBenchmarkMax() { + return $this->container['benchmark_max']; + } + + /** + * Sets benchmark_max + * + * @param float $benchmark_max Benchmark maximum value. + * + * @return self + */ + public function setBenchmarkMax($benchmark_max) { + if (is_null($benchmark_max)) { + throw new \InvalidArgumentException('non-nullable benchmark_max cannot be null'); + } + $this->container['benchmark_max'] = $benchmark_max; + + return $this; + } + + /** + * Gets benchmark_source + * + * @return string|null + */ + public function getBenchmarkSource() { + return $this->container['benchmark_source']; + } + + /** + * Sets benchmark_source + * + * @param string|null $benchmark_source Free-text label describing where the benchmark came from. + * + * @return self + */ + public function setBenchmarkSource($benchmark_source) { + if (is_null($benchmark_source)) { + throw new \InvalidArgumentException('non-nullable benchmark_source cannot be null'); + } + $this->container['benchmark_source'] = $benchmark_source; + + return $this; + } + + /** + * Gets external_job_title + * + * @return string|null + */ + public function getExternalJobTitle() { + return $this->container['external_job_title']; + } + + /** + * Sets external_job_title + * + * @param string|null $external_job_title external_job_title + * + * @return self + */ + public function setExternalJobTitle($external_job_title) { + if (is_null($external_job_title)) { + $this->openApiNullablesSetToNull['external_job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_title'])) { + unset($nullablesSetToNull['external_job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_title'] = $external_job_title; + + return $this; + } + + /** + * Gets external_location + * + * @return string|null + */ + public function getExternalLocation() { + return $this->container['external_location']; + } + + /** + * Sets external_location + * + * @param string|null $external_location external_location + * + * @return self + */ + public function setExternalLocation($external_location) { + if (is_null($external_location)) { + $this->openApiNullablesSetToNull['external_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_location'])) { + unset($nullablesSetToNull['external_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_location'] = $external_location; + + return $this; + } + + /** + * Gets external_level + * + * @return string|null + */ + public function getExternalLevel() { + return $this->container['external_level']; + } + + /** + * Sets external_level + * + * @param string|null $external_level external_level + * + * @return self + */ + public function setExternalLevel($external_level) { + if (is_null($external_level)) { + $this->openApiNullablesSetToNull['external_level'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_level'])) { + unset($nullablesSetToNull['external_level']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_level'] = $external_level; + + return $this; + } + + /** + * Gets external_job_description + * + * @return string|null + */ + public function getExternalJobDescription() { + return $this->container['external_job_description']; + } + + /** + * Sets external_job_description + * + * @param string|null $external_job_description external_job_description + * + * @return self + */ + public function setExternalJobDescription($external_job_description) { + if (is_null($external_job_description)) { + $this->openApiNullablesSetToNull['external_job_description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_description'])) { + unset($nullablesSetToNull['external_job_description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_description'] = $external_job_description; + + return $this; + } + + /** + * Gets companies_surveyed + * + * @return int|null + */ + public function getCompaniesSurveyed() { + return $this->container['companies_surveyed']; + } + + /** + * Sets companies_surveyed + * + * @param int|null $companies_surveyed companies_surveyed + * + * @return self + */ + public function setCompaniesSurveyed($companies_surveyed) { + if (is_null($companies_surveyed)) { + $this->openApiNullablesSetToNull['companies_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['companies_surveyed'])) { + unset($nullablesSetToNull['companies_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['companies_surveyed'] = $companies_surveyed; + + return $this; + } + + /** + * Gets employees_surveyed + * + * @return int|null + */ + public function getEmployeesSurveyed() { + return $this->container['employees_surveyed']; + } + + /** + * Sets employees_surveyed + * + * @param int|null $employees_surveyed employees_surveyed + * + * @return self + */ + public function setEmployeesSurveyed($employees_surveyed) { + if (is_null($employees_surveyed)) { + $this->openApiNullablesSetToNull['employees_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employees_surveyed'])) { + unset($nullablesSetToNull['employees_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employees_surveyed'] = $employees_surveyed; + + return $this; + } + + /** + * Gets source_id + * + * @return string|null + */ + public function getSourceId() { + return $this->container['source_id']; + } + + /** + * Sets source_id + * + * @param string|null $source_id ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`. + * + * @return self + */ + public function setSourceId($source_id) { + if (is_null($source_id)) { + throw new \InvalidArgumentException('non-nullable source_id cannot be null'); + } + $this->container['source_id'] = $source_id; + + return $this; + } + + /** + * Gets source_date + * + * @return string|null + */ + public function getSourceDate() { + return $this->container['source_date']; + } + + /** + * Sets source_date + * + * @param string|null $source_date Date the benchmark source data applies to. + * + * @return self + */ + public function setSourceDate($source_date) { + if (is_null($source_date)) { + throw new \InvalidArgumentException('non-nullable source_date cannot be null'); + } + $this->container['source_date'] = $source_date; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year Year of the underlying survey data. Omitting this field clears `data_year` on the stored benchmark, so callers updating a Mercer benchmark should resend the existing value. + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + throw new \InvalidArgumentException('non-nullable data_year cannot be null'); + } + $this->container['data_year'] = $data_year; + + return $this; + } + + /** + * Gets external_country + * + * @return string|null + */ + public function getExternalCountry() { + return $this->container['external_country']; + } + + /** + * Sets external_country + * + * @param string|null $external_country external_country + * + * @return self + */ + public function setExternalCountry($external_country) { + if (is_null($external_country)) { + $this->openApiNullablesSetToNull['external_country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_country'])) { + unset($nullablesSetToNull['external_country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_country'] = $external_country; + + return $this; + } + + /** + * Gets external_secondary_location + * + * @return string|null + */ + public function getExternalSecondaryLocation() { + return $this->container['external_secondary_location']; + } + + /** + * Sets external_secondary_location + * + * @param string|null $external_secondary_location external_secondary_location + * + * @return self + */ + public function setExternalSecondaryLocation($external_secondary_location) { + if (is_null($external_secondary_location)) { + $this->openApiNullablesSetToNull['external_secondary_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_secondary_location'])) { + unset($nullablesSetToNull['external_secondary_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_secondary_location'] = $external_secondary_location; + + return $this; + } + + /** + * Gets external_company_size + * + * @return string|null + */ + public function getExternalCompanySize() { + return $this->container['external_company_size']; + } + + /** + * Sets external_company_size + * + * @param string|null $external_company_size external_company_size + * + * @return self + */ + public function setExternalCompanySize($external_company_size) { + if (is_null($external_company_size)) { + $this->openApiNullablesSetToNull['external_company_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_company_size'])) { + unset($nullablesSetToNull['external_company_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_company_size'] = $external_company_size; + + return $this; + } + + /** + * Gets external_industry + * + * @return string|null + */ + public function getExternalIndustry() { + return $this->container['external_industry']; + } + + /** + * Sets external_industry + * + * @param string|null $external_industry external_industry + * + * @return self + */ + public function setExternalIndustry($external_industry) { + if (is_null($external_industry)) { + $this->openApiNullablesSetToNull['external_industry'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_industry'])) { + unset($nullablesSetToNull['external_industry']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_industry'] = $external_industry; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompensationBenchmarkSourceItem.php b/lib/Model/UpdateCompensationBenchmarkSourceItem.php new file mode 100644 index 00000000..24545ad0 --- /dev/null +++ b/lib/Model/UpdateCompensationBenchmarkSourceItem.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompensationBenchmarkSourceItem + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompensationBenchmarkSourceItem Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompensationBenchmarkSourceItem implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompensationBenchmarkSourceItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'sort' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'sort' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false, + 'sort' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'sort' => 'sort' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'sort' => 'setSort' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'sort' => 'getSort' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('sort', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the existing benchmark source to update. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name New display name for the source. Cannot equal `mercer`. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets sort + * + * @return string|null + */ + public function getSort() { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param string|null $sort Optional new sort position, as a numeric string. + * + * @return self + */ + public function setSort($sort) { + if (is_null($sort)) { + throw new \InvalidArgumentException('non-nullable sort cannot be null'); + } + $this->container['sort'] = $sort; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompensationBenchmarkSourcesRequest.php b/lib/Model/UpdateCompensationBenchmarkSourcesRequest.php new file mode 100644 index 00000000..c8a8609a --- /dev/null +++ b/lib/Model/UpdateCompensationBenchmarkSourcesRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompensationBenchmarkSourcesRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompensationBenchmarkSourcesRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompensationBenchmarkSourcesRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompensationBenchmarkSourcesRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'benchmark_sources' => '\BhrSdk\Model\UpdateCompensationBenchmarkSourceItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'benchmark_sources' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'benchmark_sources' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'benchmark_sources' => 'benchmarkSources' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'benchmark_sources' => 'setBenchmarkSources' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'benchmark_sources' => 'getBenchmarkSources' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('benchmark_sources', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['benchmark_sources'] === null) { + $invalidProperties[] = "'benchmark_sources' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets benchmark_sources + * + * @return \BhrSdk\Model\UpdateCompensationBenchmarkSourceItem[] + */ + public function getBenchmarkSources() { + return $this->container['benchmark_sources']; + } + + /** + * Sets benchmark_sources + * + * @param \BhrSdk\Model\UpdateCompensationBenchmarkSourceItem[] $benchmark_sources benchmark_sources + * + * @return self + */ + public function setBenchmarkSources($benchmark_sources) { + if (is_null($benchmark_sources)) { + throw new \InvalidArgumentException('non-nullable benchmark_sources cannot be null'); + } + $this->container['benchmark_sources'] = $benchmark_sources; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateCompensationBenchmarkSourcesResponse.php b/lib/Model/UpdateCompensationBenchmarkSourcesResponse.php new file mode 100644 index 00000000..2b772797 --- /dev/null +++ b/lib/Model/UpdateCompensationBenchmarkSourcesResponse.php @@ -0,0 +1,394 @@ +<?php +declare(strict_types=1); +/** + * UpdateCompensationBenchmarkSourcesResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateCompensationBenchmarkSourcesResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateCompensationBenchmarkSourcesResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdateCompensationBenchmarkSourcesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'result' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'result' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('result', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets result + * + * @return string|null + */ + public function getResult() { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string|null $result result + * + * @return self + */ + public function setResult($result) { + if (is_null($result)) { + $this->openApiNullablesSetToNull['result'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['result'])) { + unset($nullablesSetToNull['result']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['result'] = $result; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateEmployeeTrainingRecordRequest.php b/lib/Model/UpdateEmployeeTrainingRecordRequest.php index 4618418a..188c4fb4 100644 --- a/lib/Model/UpdateEmployeeTrainingRecordRequest.php +++ b/lib/Model/UpdateEmployeeTrainingRecordRequest.php @@ -58,11 +58,11 @@ class UpdateEmployeeTrainingRecordRequest implements ModelInterface, ArrayAccess */ protected static $openApiTypes = [ 'completed' => 'string', - 'cost' => '\BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost', + 'cost' => '\BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost', 'instructor' => 'string', 'hours' => 'float', 'credits' => 'float', - 'notes' => 'float' + 'notes' => 'string' ]; /** @@ -342,7 +342,7 @@ public function setCompleted($completed) { /** * Gets cost * - * @return \BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost|null + * @return \BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost|null */ public function getCost() { return $this->container['cost']; @@ -351,7 +351,7 @@ public function getCost() { /** * Sets cost * - * @param \BhrSdk\Model\AddNewEmployeeTrainingRecordRequestCost|null $cost cost + * @param \BhrSdk\Model\CreateEmployeeTrainingRecordRequestCost|null $cost cost * * @return self */ @@ -376,7 +376,7 @@ public function getInstructor() { /** * Sets instructor * - * @param string|null $instructor instructor + * @param string|null $instructor Name of the training instructor. * * @return self */ @@ -401,7 +401,7 @@ public function getHours() { /** * Sets hours * - * @param float|null $hours hours + * @param float|null $hours Number of hours for the training. * * @return self */ @@ -426,7 +426,7 @@ public function getCredits() { /** * Sets credits * - * @param float|null $credits credits + * @param float|null $credits Credits earned for the training. * * @return self */ @@ -442,7 +442,7 @@ public function setCredits($credits) { /** * Gets notes * - * @return float|null + * @return string|null */ public function getNotes() { return $this->container['notes']; @@ -451,7 +451,7 @@ public function getNotes() { /** * Sets notes * - * @param float|null $notes notes + * @param string|null $notes Optional notes about the training record. * * @return self */ diff --git a/lib/Model/UpdateEmployeeVerificationIntegrationRequest.php b/lib/Model/UpdateEmployeeVerificationIntegrationRequest.php new file mode 100644 index 00000000..671921ae --- /dev/null +++ b/lib/Model/UpdateEmployeeVerificationIntegrationRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * UpdateEmployeeVerificationIntegrationRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateEmployeeVerificationIntegrationRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateEmployeeVerificationIntegrationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'update_employee_verification_integration_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'enabled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'enabled' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'enabled' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('enabled', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled Desired enabled state for the integration. + * + * @return self + */ + public function setEnabled($enabled) { + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateEmployeeVerificationRequest.php b/lib/Model/UpdateEmployeeVerificationRequest.php new file mode 100644 index 00000000..ee7a9dd5 --- /dev/null +++ b/lib/Model/UpdateEmployeeVerificationRequest.php @@ -0,0 +1,658 @@ +<?php +declare(strict_types=1); +/** + * UpdateEmployeeVerificationRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateEmployeeVerificationRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateEmployeeVerificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'update_employee_verification_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'verification_type' => 'string', + 'verification_status' => 'string', + 'verification_status_notes' => 'string', + 'remote_access_url' => 'string', + 'e_verify_status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'verification_type' => null, + 'verification_status' => null, + 'verification_status_notes' => null, + 'remote_access_url' => null, + 'e_verify_status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'verification_type' => true, + 'verification_status' => true, + 'verification_status_notes' => true, + 'remote_access_url' => true, + 'e_verify_status' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'verification_type' => 'verificationType', + 'verification_status' => 'verificationStatus', + 'verification_status_notes' => 'verificationStatusNotes', + 'remote_access_url' => 'remoteAccessUrl', + 'e_verify_status' => 'eVerifyStatus' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'verification_type' => 'setVerificationType', + 'verification_status' => 'setVerificationStatus', + 'verification_status_notes' => 'setVerificationStatusNotes', + 'remote_access_url' => 'setRemoteAccessUrl', + 'e_verify_status' => 'setEVerifyStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'verification_type' => 'getVerificationType', + 'verification_status' => 'getVerificationStatus', + 'verification_status_notes' => 'getVerificationStatusNotes', + 'remote_access_url' => 'getRemoteAccessUrl', + 'e_verify_status' => 'getEVerifyStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const VERIFICATION_TYPE_IN_PERSON = 'in-person'; + public const VERIFICATION_TYPE_HYBRID = 'hybrid'; + public const VERIFICATION_TYPE_REMOTE = 'remote'; + public const VERIFICATION_STATUS_PENDING = 'pending'; + public const VERIFICATION_STATUS_INPROGRESS_SECTION_1 = 'inprogress-section-1'; + public const VERIFICATION_STATUS_INPROGRESS_SECTION_2 = 'inprogress-section-2'; + public const VERIFICATION_STATUS_COMPLETED = 'completed'; + public const VERIFICATION_STATUS_FAILED = 'failed'; + public const E_VERIFY_STATUS_PENDING = 'pending'; + public const E_VERIFY_STATUS_INPROGRESS = 'inprogress'; + public const E_VERIFY_STATUS_COMPLETED = 'completed'; + public const E_VERIFY_STATUS_FAILED = 'failed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerificationTypeAllowableValues() { + return [ + self::VERIFICATION_TYPE_IN_PERSON, + self::VERIFICATION_TYPE_HYBRID, + self::VERIFICATION_TYPE_REMOTE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerificationStatusAllowableValues() { + return [ + self::VERIFICATION_STATUS_PENDING, + self::VERIFICATION_STATUS_INPROGRESS_SECTION_1, + self::VERIFICATION_STATUS_INPROGRESS_SECTION_2, + self::VERIFICATION_STATUS_COMPLETED, + self::VERIFICATION_STATUS_FAILED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEVerifyStatusAllowableValues() { + return [ + self::E_VERIFY_STATUS_PENDING, + self::E_VERIFY_STATUS_INPROGRESS, + self::E_VERIFY_STATUS_COMPLETED, + self::E_VERIFY_STATUS_FAILED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('verification_type', $data ?? [], null); + $this->setIfExists('verification_status', $data ?? [], null); + $this->setIfExists('verification_status_notes', $data ?? [], null); + $this->setIfExists('remote_access_url', $data ?? [], null); + $this->setIfExists('e_verify_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getVerificationTypeAllowableValues(); + if (!is_null($this->container['verification_type']) && !in_array($this->container['verification_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'verification_type', must be one of '%s'", + $this->container['verification_type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!is_null($this->container['verification_status']) && !in_array($this->container['verification_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'verification_status', must be one of '%s'", + $this->container['verification_status'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getEVerifyStatusAllowableValues(); + if (!is_null($this->container['e_verify_status']) && !in_array($this->container['e_verify_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'e_verify_status', must be one of '%s'", + $this->container['e_verify_status'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets verification_type + * + * @return string|null + */ + public function getVerificationType() { + return $this->container['verification_type']; + } + + /** + * Sets verification_type + * + * @param string|null $verification_type verification_type + * + * @return self + */ + public function setVerificationType($verification_type) { + if (is_null($verification_type)) { + $this->openApiNullablesSetToNull['verification_type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['verification_type'])) { + unset($nullablesSetToNull['verification_type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getVerificationTypeAllowableValues(); + if (!is_null($verification_type) && !in_array($verification_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'verification_type', must be one of '%s'", + $verification_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['verification_type'] = $verification_type; + + return $this; + } + + /** + * Gets verification_status + * + * @return string|null + */ + public function getVerificationStatus() { + return $this->container['verification_status']; + } + + /** + * Sets verification_status + * + * @param string|null $verification_status verification_status + * + * @return self + */ + public function setVerificationStatus($verification_status) { + if (is_null($verification_status)) { + $this->openApiNullablesSetToNull['verification_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['verification_status'])) { + unset($nullablesSetToNull['verification_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getVerificationStatusAllowableValues(); + if (!is_null($verification_status) && !in_array($verification_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'verification_status', must be one of '%s'", + $verification_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['verification_status'] = $verification_status; + + return $this; + } + + /** + * Gets verification_status_notes + * + * @return string|null + */ + public function getVerificationStatusNotes() { + return $this->container['verification_status_notes']; + } + + /** + * Sets verification_status_notes + * + * @param string|null $verification_status_notes verification_status_notes + * + * @return self + */ + public function setVerificationStatusNotes($verification_status_notes) { + if (is_null($verification_status_notes)) { + $this->openApiNullablesSetToNull['verification_status_notes'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['verification_status_notes'])) { + unset($nullablesSetToNull['verification_status_notes']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['verification_status_notes'] = $verification_status_notes; + + return $this; + } + + /** + * Gets remote_access_url + * + * @return string|null + */ + public function getRemoteAccessUrl() { + return $this->container['remote_access_url']; + } + + /** + * Sets remote_access_url + * + * @param string|null $remote_access_url remote_access_url + * + * @return self + */ + public function setRemoteAccessUrl($remote_access_url) { + if (is_null($remote_access_url)) { + $this->openApiNullablesSetToNull['remote_access_url'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['remote_access_url'])) { + unset($nullablesSetToNull['remote_access_url']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['remote_access_url'] = $remote_access_url; + + return $this; + } + + /** + * Gets e_verify_status + * + * @return string|null + */ + public function getEVerifyStatus() { + return $this->container['e_verify_status']; + } + + /** + * Sets e_verify_status + * + * @param string|null $e_verify_status e_verify_status + * + * @return self + */ + public function setEVerifyStatus($e_verify_status) { + if (is_null($e_verify_status)) { + $this->openApiNullablesSetToNull['e_verify_status'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['e_verify_status'])) { + unset($nullablesSetToNull['e_verify_status']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $allowedValues = $this->getEVerifyStatusAllowableValues(); + if (!is_null($e_verify_status) && !in_array($e_verify_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'e_verify_status', must be one of '%s'", + $e_verify_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['e_verify_status'] = $e_verify_status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateGoalCommentRequest.php b/lib/Model/UpdateGoalCommentRequest.php new file mode 100644 index 00000000..62dffb37 --- /dev/null +++ b/lib/Model/UpdateGoalCommentRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * UpdateGoalCommentRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateGoalCommentRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateGoalCommentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'update_goal_comment_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('text', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets text + * + * @return string + */ + public function getText() { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text The updated text content of the comment. + * + * @return self + */ + public function setText($text) { + if (is_null($text)) { + throw new \InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/PutGoalMilestoneProgressRequest.php b/lib/Model/UpdateGoalMilestoneProgressRequest.php similarity index 96% rename from lib/Model/PutGoalMilestoneProgressRequest.php rename to lib/Model/UpdateGoalMilestoneProgressRequest.php index 81b94c7c..a79eec20 100644 --- a/lib/Model/PutGoalMilestoneProgressRequest.php +++ b/lib/Model/UpdateGoalMilestoneProgressRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PutGoalMilestoneProgressRequest + * UpdateGoalMilestoneProgressRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PutGoalMilestoneProgressRequest Class Doc Comment + * UpdateGoalMilestoneProgressRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PutGoalMilestoneProgressRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalMilestoneProgressRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PutGoalMilestoneProgressRequest implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openApiModelName = 'put_goal_milestone_progress_request'; + protected static $openApiModelName = 'update_goal_milestone_progress_request'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/PutGoalProgressRequest.php b/lib/Model/UpdateGoalProgressRequest.php similarity index 94% rename from lib/Model/PutGoalProgressRequest.php rename to lib/Model/UpdateGoalProgressRequest.php index a8f725d5..a95e94c0 100644 --- a/lib/Model/PutGoalProgressRequest.php +++ b/lib/Model/UpdateGoalProgressRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PutGoalProgressRequest + * UpdateGoalProgressRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PutGoalProgressRequest Class Doc Comment + * UpdateGoalProgressRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PutGoalProgressRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalProgressRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PutGoalProgressRequest implements ModelInterface, ArrayAccess, \JsonSerial * * @var string */ - protected static $openApiModelName = 'put_goal_progress_request'; + protected static $openApiModelName = 'update_goal_progress_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -316,10 +316,10 @@ public function setPercentComplete($percent_complete) { } if (($percent_complete > 100)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PutGoalProgressRequest., must be smaller than or equal to 100.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling UpdateGoalProgressRequest., must be smaller than or equal to 100.'); } if (($percent_complete < 0)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PutGoalProgressRequest., must be bigger than or equal to 0.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling UpdateGoalProgressRequest., must be bigger than or equal to 0.'); } $this->container['percent_complete'] = $percent_complete; @@ -339,7 +339,7 @@ public function getCompletionDate() { /** * Sets completion_date * - * @param \DateTime|null $completion_date The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. + * @param \DateTime|null $completion_date completion_date * * @return self */ diff --git a/lib/Model/PutGoalSharedWithRequest.php b/lib/Model/UpdateGoalSharingRequest.php similarity index 96% rename from lib/Model/PutGoalSharedWithRequest.php rename to lib/Model/UpdateGoalSharingRequest.php index 6199a7ec..dfe49de8 100644 --- a/lib/Model/PutGoalSharedWithRequest.php +++ b/lib/Model/UpdateGoalSharingRequest.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PutGoalSharedWithRequest + * UpdateGoalSharingRequest * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PutGoalSharedWithRequest Class Doc Comment + * UpdateGoalSharingRequest Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PutGoalSharedWithRequest implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalSharingRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PutGoalSharedWithRequest implements ModelInterface, ArrayAccess, \JsonSeri * * @var string */ - protected static $openApiModelName = 'put_goal_shared_with_request'; + protected static $openApiModelName = 'update_goal_sharing_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -288,7 +288,7 @@ public function getSharedWithEmployeeIds() { /** * Sets shared_with_employee_ids * - * @param int[]|null $shared_with_employee_ids shared_with_employee_ids + * @param int[]|null $shared_with_employee_ids List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner. * * @return self */ diff --git a/lib/Model/Goal.php b/lib/Model/UpdateGoalV1.php similarity index 86% rename from lib/Model/Goal.php rename to lib/Model/UpdateGoalV1.php index e22a05f1..a1495ffd 100644 --- a/lib/Model/Goal.php +++ b/lib/Model/UpdateGoalV1.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * Goal + * UpdateGoalV1 * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * Goal Class Doc Comment + * UpdateGoalV1 Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalV1 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'Goal'; + protected static $openApiModelName = 'UpdateGoalV1'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,14 +57,13 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'id' => 'int', 'title' => 'string', 'description' => 'string', 'percent_complete' => 'int', 'aligns_with_option_id' => 'string', 'shared_with_employee_ids' => 'int[]', - 'due_date' => 'string', - 'completion_date' => 'float' + 'due_date' => '\DateTime', + 'completion_date' => '\DateTime' ]; /** @@ -75,14 +74,13 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { * @psalm-var array<string, string|null> */ protected static $openApiFormats = [ - 'id' => null, 'title' => null, 'description' => null, 'percent_complete' => null, 'aligns_with_option_id' => null, 'shared_with_employee_ids' => null, - 'due_date' => null, - 'completion_date' => null + 'due_date' => 'date', + 'completion_date' => 'date' ]; /** @@ -92,14 +90,13 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { * @phpstan-var array<string, bool> */ protected static array $openApiNullables = [ - 'id' => false, 'title' => false, 'description' => false, 'percent_complete' => false, - 'aligns_with_option_id' => false, + 'aligns_with_option_id' => true, 'shared_with_employee_ids' => false, 'due_date' => false, - 'completion_date' => false + 'completion_date' => true ]; /** @@ -184,7 +181,6 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'title' => 'title', 'description' => 'description', 'percent_complete' => 'percentComplete', @@ -200,7 +196,6 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'title' => 'setTitle', 'description' => 'setDescription', 'percent_complete' => 'setPercentComplete', @@ -216,7 +211,6 @@ public function isNullableSetToNull(string $property): bool { * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'title' => 'getTitle', 'description' => 'getDescription', 'percent_complete' => 'getPercentComplete', @@ -277,7 +271,6 @@ public function getModelName() { * initializing the model */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('percent_complete', $data ?? [], null); @@ -312,12 +305,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } + if ($this->container['shared_with_employee_ids'] === null) { + $invalidProperties[] = "'shared_with_employee_ids' can't be null"; + } + if ($this->container['due_date'] === null) { + $invalidProperties[] = "'due_date' can't be null"; + } return $invalidProperties; } @@ -331,31 +327,6 @@ public function valid() { return count($this->listInvalidProperties()) === 0; } - /** - * Gets id - * - * @return int - */ - public function getId() { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id A unique identifier for the record. Use this ID to reference this goal. - * - * @return self - */ - public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets title * @@ -368,7 +339,7 @@ public function getTitle() { /** * Sets title * - * @param string $title The goal title. + * @param string $title [Required] The goal title. * * @return self */ @@ -393,7 +364,7 @@ public function getDescription() { /** * Sets description * - * @param string|null $description The goal description. + * @param string|null $description [Optional] The goal description. If omitted, the existing value will be overwritten with an empty string. * * @return self */ @@ -418,7 +389,7 @@ public function getPercentComplete() { /** * Sets percent_complete * - * @param int|null $percent_complete The goal completion percentage (0 - 100). + * @param int|null $percent_complete [Optional] The goal completion percentage (0-100). If omitted, the existing value will be overwritten with 0. * * @return self */ @@ -443,13 +414,19 @@ public function getAlignsWithOptionId() { /** * Sets aligns_with_option_id * - * @param string|null $aligns_with_option_id The option ID that aligns with this goal. + * @param string|null $aligns_with_option_id aligns_with_option_id * * @return self */ public function setAlignsWithOptionId($aligns_with_option_id) { if (is_null($aligns_with_option_id)) { - throw new \InvalidArgumentException('non-nullable aligns_with_option_id cannot be null'); + $this->openApiNullablesSetToNull['aligns_with_option_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['aligns_with_option_id'])) { + unset($nullablesSetToNull['aligns_with_option_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['aligns_with_option_id'] = $aligns_with_option_id; @@ -459,7 +436,7 @@ public function setAlignsWithOptionId($aligns_with_option_id) { /** * Gets shared_with_employee_ids * - * @return int[]|null + * @return int[] */ public function getSharedWithEmployeeIds() { return $this->container['shared_with_employee_ids']; @@ -468,7 +445,7 @@ public function getSharedWithEmployeeIds() { /** * Sets shared_with_employee_ids * - * @param int[]|null $shared_with_employee_ids Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". + * @param int[] $shared_with_employee_ids [Required] Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". This must include the employee for whom the goal is created. * * @return self */ @@ -484,7 +461,7 @@ public function setSharedWithEmployeeIds($shared_with_employee_ids) { /** * Gets due_date * - * @return string|null + * @return \DateTime */ public function getDueDate() { return $this->container['due_date']; @@ -493,7 +470,7 @@ public function getDueDate() { /** * Sets due_date * - * @param string|null $due_date The goal due date in YYYY-mm-dd format. + * @param \DateTime $due_date [Required] The goal due date in YYYY-MM-DD format. * * @return self */ @@ -509,7 +486,7 @@ public function setDueDate($due_date) { /** * Gets completion_date * - * @return float|null + * @return \DateTime|null */ public function getCompletionDate() { return $this->container['completion_date']; @@ -518,13 +495,19 @@ public function getCompletionDate() { /** * Sets completion_date * - * @param float|null $completion_date The date the goal was completed. + * @param \DateTime|null $completion_date completion_date * * @return self */ public function setCompletionDate($completion_date) { if (is_null($completion_date)) { - throw new \InvalidArgumentException('non-nullable completion_date cannot be null'); + $this->openApiNullablesSetToNull['completion_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['completion_date'])) { + unset($nullablesSetToNull['completion_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['completion_date'] = $completion_date; diff --git a/lib/Model/PutGoalV11Request.php b/lib/Model/UpdateGoalV11Request.php similarity index 93% rename from lib/Model/PutGoalV11Request.php rename to lib/Model/UpdateGoalV11Request.php index 0e86865c..e24828fb 100644 --- a/lib/Model/PutGoalV11Request.php +++ b/lib/Model/UpdateGoalV11Request.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PutGoalV11Request + * UpdateGoalV11Request * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PutGoalV11Request Class Doc Comment + * UpdateGoalV11Request Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PutGoalV11Request implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalV11Request implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PutGoalV11Request implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openApiModelName = 'put_goal_v1_1_request'; + protected static $openApiModelName = 'update_goal_v1_1_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -66,7 +66,7 @@ class PutGoalV11Request implements ModelInterface, ArrayAccess, \JsonSerializabl 'aligns_with_option_id' => 'int', 'milestones_enabled' => 'bool', 'deleted_milestone_ids' => 'int[]', - 'milestones' => '\BhrSdk\Model\PutGoalV11RequestMilestonesInner[]' + 'milestones' => '\BhrSdk\Model\UpdateGoalV11RequestMilestonesInner[]' ]; /** @@ -443,7 +443,7 @@ public function getPercentComplete() { /** * Sets percent_complete * - * @param int|null $percent_complete The percentage of completion for the goal (0-100). Required when milestonesEnabled is not true. + * @param int|null $percent_complete The percentage of completion for the goal (0-100). Defaults to 0 if omitted. Ignored when milestonesEnabled is true. * * @return self */ @@ -453,10 +453,10 @@ public function setPercentComplete($percent_complete) { } if (($percent_complete > 100)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PutGoalV11Request., must be smaller than or equal to 100.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling UpdateGoalV11Request., must be smaller than or equal to 100.'); } if (($percent_complete < 0)) { - throw new \InvalidArgumentException('invalid value for $percent_complete when calling PutGoalV11Request., must be bigger than or equal to 0.'); + throw new \InvalidArgumentException('invalid value for $percent_complete when calling UpdateGoalV11Request., must be bigger than or equal to 0.'); } $this->container['percent_complete'] = $percent_complete; @@ -476,7 +476,7 @@ public function getCompletionDate() { /** * Sets completion_date * - * @param \DateTime|null $completion_date The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100. + * @param \DateTime|null $completion_date completion_date * * @return self */ @@ -532,7 +532,7 @@ public function getAlignsWithOptionId() { /** * Sets aligns_with_option_id * - * @param int|null $aligns_with_option_id ID of the option this goal aligns with + * @param int|null $aligns_with_option_id aligns_with_option_id * * @return self */ @@ -604,7 +604,7 @@ public function setDeletedMilestoneIds($deleted_milestone_ids) { /** * Gets milestones * - * @return \BhrSdk\Model\PutGoalV11RequestMilestonesInner[]|null + * @return \BhrSdk\Model\UpdateGoalV11RequestMilestonesInner[]|null */ public function getMilestones() { return $this->container['milestones']; @@ -613,7 +613,7 @@ public function getMilestones() { /** * Sets milestones * - * @param \BhrSdk\Model\PutGoalV11RequestMilestonesInner[]|null $milestones List of milestones to add to this goal + * @param \BhrSdk\Model\UpdateGoalV11RequestMilestonesInner[]|null $milestones Optional. New milestones to add to the goal. Each object in this array creates a new milestone — even if its title matches an existing milestone. Do not include existing milestones here unless you intentionally want duplicates. To remove milestones, use `deletedMilestoneIds`. * * @return self */ diff --git a/lib/Model/PostGoalRequestMilestonesInner.php b/lib/Model/UpdateGoalV11RequestMilestonesInner.php similarity index 96% rename from lib/Model/PostGoalRequestMilestonesInner.php rename to lib/Model/UpdateGoalV11RequestMilestonesInner.php index b15e8b49..4129089f 100644 --- a/lib/Model/PostGoalRequestMilestonesInner.php +++ b/lib/Model/UpdateGoalV11RequestMilestonesInner.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * PostGoalRequestMilestonesInner + * UpdateGoalV11RequestMilestonesInner * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * PostGoalRequestMilestonesInner Class Doc Comment + * UpdateGoalV11RequestMilestonesInner Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class PostGoalRequestMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateGoalV11RequestMilestonesInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class PostGoalRequestMilestonesInner implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openApiModelName = 'post_goal_request_milestones_inner'; + protected static $openApiModelName = 'update_goal_v1_1_request_milestones_inner'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/UpdateLocationRequest.php b/lib/Model/UpdateLocationRequest.php new file mode 100644 index 00000000..b839feea --- /dev/null +++ b/lib/Model/UpdateLocationRequest.php @@ -0,0 +1,458 @@ +<?php +declare(strict_types=1); +/** + * UpdateLocationRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateLocationRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateLocationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'update_location_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'label' => 'string', + 'archived' => 'bool', + 'address' => '\BhrSdk\Model\UpdateLocationRequestAddress' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'label' => null, + 'archived' => null, + 'address' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'label' => false, + 'archived' => false, + 'address' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'label' => 'label', + 'archived' => 'archived', + 'address' => 'address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'label' => 'setLabel', + 'archived' => 'setArchived', + 'address' => 'setAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'label' => 'getLabel', + 'archived' => 'getArchived', + 'address' => 'getAddress' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], false); + $this->setIfExists('address', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label Updated display name + * + * @return self + */ + public function setLabel($label) { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Whether the location is archived + * + * @return self + */ + public function setArchived($archived) { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + + /** + * Gets address + * + * @return \BhrSdk\Model\UpdateLocationRequestAddress + */ + public function getAddress() { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \BhrSdk\Model\UpdateLocationRequestAddress $address address + * + * @return self + */ + public function setAddress($address) { + if (is_null($address)) { + throw new \InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateLocationRequestAddress.php b/lib/Model/UpdateLocationRequestAddress.php new file mode 100644 index 00000000..7e05aca9 --- /dev/null +++ b/lib/Model/UpdateLocationRequestAddress.php @@ -0,0 +1,658 @@ +<?php +declare(strict_types=1); +/** + * UpdateLocationRequestAddress + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdateLocationRequestAddress Class Doc Comment + * + * @category Class + * @description Address details for the location. When remoteLocation is true, none are required and must be null or omitted + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdateLocationRequestAddress implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'update_location_request_address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'state_id' => 'string', + 'zipcode' => 'string', + 'country_id' => 'string', + 'timezone' => 'string', + 'remote_location' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'address1' => null, + 'address2' => null, + 'city' => null, + 'state_id' => null, + 'zipcode' => null, + 'country_id' => null, + 'timezone' => null, + 'remote_location' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'address1' => true, + 'address2' => true, + 'city' => true, + 'state_id' => true, + 'zipcode' => true, + 'country_id' => true, + 'timezone' => true, + 'remote_location' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address1' => 'address1', + 'address2' => 'address2', + 'city' => 'city', + 'state_id' => 'stateId', + 'zipcode' => 'zipcode', + 'country_id' => 'countryId', + 'timezone' => 'timezone', + 'remote_location' => 'remoteLocation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address1' => 'setAddress1', + 'address2' => 'setAddress2', + 'city' => 'setCity', + 'state_id' => 'setStateId', + 'zipcode' => 'setZipcode', + 'country_id' => 'setCountryId', + 'timezone' => 'setTimezone', + 'remote_location' => 'setRemoteLocation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address1' => 'getAddress1', + 'address2' => 'getAddress2', + 'city' => 'getCity', + 'state_id' => 'getStateId', + 'zipcode' => 'getZipcode', + 'country_id' => 'getCountryId', + 'timezone' => 'getTimezone', + 'remote_location' => 'getRemoteLocation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('address1', $data ?? [], null); + $this->setIfExists('address2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state_id', $data ?? [], null); + $this->setIfExists('zipcode', $data ?? [], null); + $this->setIfExists('country_id', $data ?? [], null); + $this->setIfExists('timezone', $data ?? [], null); + $this->setIfExists('remote_location', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['remote_location'] === null) { + $invalidProperties[] = "'remote_location' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets address1 + * + * @return string|null + */ + public function getAddress1() { + return $this->container['address1']; + } + + /** + * Sets address1 + * + * @param string|null $address1 address1 + * + * @return self + */ + public function setAddress1($address1) { + if (is_null($address1)) { + $this->openApiNullablesSetToNull['address1'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address1'])) { + unset($nullablesSetToNull['address1']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address1'] = $address1; + + return $this; + } + + /** + * Gets address2 + * + * @return string|null + */ + public function getAddress2() { + return $this->container['address2']; + } + + /** + * Sets address2 + * + * @param string|null $address2 address2 + * + * @return self + */ + public function setAddress2($address2) { + if (is_null($address2)) { + $this->openApiNullablesSetToNull['address2'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['address2'])) { + unset($nullablesSetToNull['address2']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address2'] = $address2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity($city) { + if (is_null($city)) { + $this->openApiNullablesSetToNull['city'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['city'])) { + unset($nullablesSetToNull['city']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state_id + * + * @return string|null + */ + public function getStateId() { + return $this->container['state_id']; + } + + /** + * Sets state_id + * + * @param string|null $state_id state_id + * + * @return self + */ + public function setStateId($state_id) { + if (is_null($state_id)) { + $this->openApiNullablesSetToNull['state_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['state_id'])) { + unset($nullablesSetToNull['state_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state_id'] = $state_id; + + return $this; + } + + /** + * Gets zipcode + * + * @return string|null + */ + public function getZipcode() { + return $this->container['zipcode']; + } + + /** + * Sets zipcode + * + * @param string|null $zipcode zipcode + * + * @return self + */ + public function setZipcode($zipcode) { + if (is_null($zipcode)) { + $this->openApiNullablesSetToNull['zipcode'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['zipcode'])) { + unset($nullablesSetToNull['zipcode']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zipcode'] = $zipcode; + + return $this; + } + + /** + * Gets country_id + * + * @return string|null + */ + public function getCountryId() { + return $this->container['country_id']; + } + + /** + * Sets country_id + * + * @param string|null $country_id country_id + * + * @return self + */ + public function setCountryId($country_id) { + if (is_null($country_id)) { + $this->openApiNullablesSetToNull['country_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['country_id'])) { + unset($nullablesSetToNull['country_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country_id'] = $country_id; + + return $this; + } + + /** + * Gets timezone + * + * @return string|null + */ + public function getTimezone() { + return $this->container['timezone']; + } + + /** + * Sets timezone + * + * @param string|null $timezone timezone + * + * @return self + */ + public function setTimezone($timezone) { + if (is_null($timezone)) { + $this->openApiNullablesSetToNull['timezone'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['timezone'])) { + unset($nullablesSetToNull['timezone']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['timezone'] = $timezone; + + return $this; + } + + /** + * Gets remote_location + * + * @return bool + */ + public function getRemoteLocation() { + return $this->container['remote_location']; + } + + /** + * Sets remote_location + * + * @param bool $remote_location remote_location + * + * @return self + */ + public function setRemoteLocation($remote_location) { + if (is_null($remote_location)) { + throw new \InvalidArgumentException('non-nullable remote_location cannot be null'); + } + $this->container['remote_location'] = $remote_location; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdateTrainingTypeRequest.php b/lib/Model/UpdateTrainingTypeRequest.php index 90e5a2e0..8b1b6104 100644 --- a/lib/Model/UpdateTrainingTypeRequest.php +++ b/lib/Model/UpdateTrainingTypeRequest.php @@ -319,12 +319,6 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['required'] === null) { - $invalidProperties[] = "'required' can't be null"; - } return $invalidProperties; } @@ -341,7 +335,7 @@ public function valid() { /** * Gets name * - * @return string + * @return string|null */ public function getName() { return $this->container['name']; @@ -350,7 +344,7 @@ public function getName() { /** * Sets name * - * @param string $name Name of the training type. + * @param string|null $name Name of the training type. * * @return self */ @@ -441,7 +435,7 @@ public function setCategory($category) { /** * Gets required * - * @return bool + * @return bool|null */ public function getRequired() { return $this->container['required']; @@ -450,7 +444,7 @@ public function getRequired() { /** * Sets required * - * @param bool $required Is this a required training? + * @param bool|null $required Is this a required training? * * @return self */ diff --git a/lib/Model/UpdateTrainingTypeRequestCategory.php b/lib/Model/UpdateTrainingTypeRequestCategory.php index 7480014e..8313e7bf 100644 --- a/lib/Model/UpdateTrainingTypeRequestCategory.php +++ b/lib/Model/UpdateTrainingTypeRequestCategory.php @@ -59,9 +59,7 @@ class UpdateTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, */ protected static $openApiTypes = [ 'id' => 'int', - 'name' => 'string', - 'accuracy' => 'int', - 'address' => 'string' + 'name' => 'string' ]; /** @@ -73,9 +71,7 @@ class UpdateTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, */ protected static $openApiFormats = [ 'id' => null, - 'name' => null, - 'accuracy' => null, - 'address' => null + 'name' => null ]; /** @@ -86,9 +82,7 @@ class UpdateTrainingTypeRequestCategory implements ModelInterface, ArrayAccess, */ protected static array $openApiNullables = [ 'id' => false, - 'name' => false, - 'accuracy' => false, - 'address' => false + 'name' => false ]; /** @@ -174,9 +168,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $attributeMap = [ 'id' => 'id', - 'name' => 'name', - 'accuracy' => 'accuracy', - 'address' => 'address' + 'name' => 'name' ]; /** @@ -186,9 +178,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $setters = [ 'id' => 'setId', - 'name' => 'setName', - 'accuracy' => 'setAccuracy', - 'address' => 'setAddress' + 'name' => 'setName' ]; /** @@ -198,9 +188,7 @@ public function isNullableSetToNull(string $property): bool { */ protected static $getters = [ 'id' => 'getId', - 'name' => 'getName', - 'accuracy' => 'getAccuracy', - 'address' => 'getAddress' + 'name' => 'getName' ]; /** @@ -256,8 +244,6 @@ public function getModelName() { public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('accuracy', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); } /** @@ -347,56 +333,6 @@ public function setName($name) { return $this; } - - /** - * Gets accuracy - * - * @return int|null - */ - public function getAccuracy() { - return $this->container['accuracy']; - } - - /** - * Sets accuracy - * - * @param int|null $accuracy Accuracy in meters of the clock in location - * - * @return self - */ - public function setAccuracy($accuracy) { - if (is_null($accuracy)) { - throw new \InvalidArgumentException('non-nullable accuracy cannot be null'); - } - $this->container['accuracy'] = $accuracy; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address... - * - * @return self - */ - public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } - $this->container['address'] = $address; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Unauthorized1.php b/lib/Model/UpdateWebhookBadRequestResponse.php similarity index 95% rename from lib/Model/Unauthorized1.php rename to lib/Model/UpdateWebhookBadRequestResponse.php index 59e53890..8fffe4ca 100644 --- a/lib/Model/Unauthorized1.php +++ b/lib/Model/UpdateWebhookBadRequestResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * Unauthorized1 + * UpdateWebhookBadRequestResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * Unauthorized1 Class Doc Comment + * UpdateWebhookBadRequestResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class Unauthorized1 implements ModelInterface, ArrayAccess, \JsonSerializable { +class UpdateWebhookBadRequestResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class Unauthorized1 implements ModelInterface, ArrayAccess, \JsonSerializable { * * @var string */ - protected static $openApiModelName = 'Unauthorized_1'; + protected static $openApiModelName = 'UpdateWebhookBadRequestResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class Unauthorized1 implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'errors' => '\BhrSdk\Model\UnauthorizedErrorsInner[]' + 'errors' => '\BhrSdk\Model\WebhookErrorErrors' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets errors * - * @return \BhrSdk\Model\UnauthorizedErrorsInner[]|null + * @return \BhrSdk\Model\WebhookErrorErrors|null */ public function getErrors() { return $this->container['errors']; @@ -288,7 +288,7 @@ public function getErrors() { /** * Sets errors * - * @param \BhrSdk\Model\UnauthorizedErrorsInner[]|null $errors errors + * @param \BhrSdk\Model\WebhookErrorErrors|null $errors errors * * @return self */ diff --git a/lib/Model/UpdatedCompensationBenchmark.php b/lib/Model/UpdatedCompensationBenchmark.php new file mode 100644 index 00000000..e5dedb9f --- /dev/null +++ b/lib/Model/UpdatedCompensationBenchmark.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * UpdatedCompensationBenchmark + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdatedCompensationBenchmark Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdatedCompensationBenchmark implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdatedCompensationBenchmark'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'saved_benchmark' => '\BhrSdk\Model\UpdatedCompensationBenchmarkSavedBenchmark', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'saved_benchmark' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'saved_benchmark' => false, + 'message' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'saved_benchmark' => 'savedBenchmark', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'saved_benchmark' => 'setSavedBenchmark', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'saved_benchmark' => 'getSavedBenchmark', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('saved_benchmark', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets saved_benchmark + * + * @return \BhrSdk\Model\UpdatedCompensationBenchmarkSavedBenchmark|null + */ + public function getSavedBenchmark() { + return $this->container['saved_benchmark']; + } + + /** + * Sets saved_benchmark + * + * @param \BhrSdk\Model\UpdatedCompensationBenchmarkSavedBenchmark|null $saved_benchmark saved_benchmark + * + * @return self + */ + public function setSavedBenchmark($saved_benchmark) { + if (is_null($saved_benchmark)) { + throw new \InvalidArgumentException('non-nullable saved_benchmark cannot be null'); + } + $this->container['saved_benchmark'] = $saved_benchmark; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + $this->openApiNullablesSetToNull['message'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['message'])) { + unset($nullablesSetToNull['message']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UpdatedCompensationBenchmarkSavedBenchmark.php b/lib/Model/UpdatedCompensationBenchmarkSavedBenchmark.php new file mode 100644 index 00000000..5888ca40 --- /dev/null +++ b/lib/Model/UpdatedCompensationBenchmarkSavedBenchmark.php @@ -0,0 +1,1192 @@ +<?php +declare(strict_types=1); +/** + * UpdatedCompensationBenchmarkSavedBenchmark + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UpdatedCompensationBenchmarkSavedBenchmark Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UpdatedCompensationBenchmarkSavedBenchmark implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UpdatedCompensationBenchmark_savedBenchmark'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'job_title_id' => 'string', + 'job_location_id' => 'string', + 'mercer_job_code' => 'string', + 'benchmark_source' => 'string', + 'currency_code' => 'string', + 'benchmark_value' => 'float', + 'benchmark_min' => 'float', + 'benchmark_max' => 'float', + 'external_job_title' => 'string', + 'external_location' => 'string', + 'external_level' => 'string', + 'external_job_description' => 'string', + 'companies_surveyed' => 'int', + 'employees_surveyed' => 'int', + 'source_id' => 'string', + 'source_date' => 'string', + 'data_year' => 'string', + 'external_country' => 'string', + 'external_secondary_location' => 'string', + 'external_company_size' => 'string', + 'external_industry' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'job_title_id' => null, + 'job_location_id' => null, + 'mercer_job_code' => null, + 'benchmark_source' => null, + 'currency_code' => null, + 'benchmark_value' => null, + 'benchmark_min' => null, + 'benchmark_max' => null, + 'external_job_title' => null, + 'external_location' => null, + 'external_level' => null, + 'external_job_description' => null, + 'companies_surveyed' => null, + 'employees_surveyed' => null, + 'source_id' => null, + 'source_date' => null, + 'data_year' => null, + 'external_country' => null, + 'external_secondary_location' => null, + 'external_company_size' => null, + 'external_industry' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'job_title_id' => true, + 'job_location_id' => true, + 'mercer_job_code' => true, + 'benchmark_source' => true, + 'currency_code' => true, + 'benchmark_value' => true, + 'benchmark_min' => true, + 'benchmark_max' => true, + 'external_job_title' => true, + 'external_location' => true, + 'external_level' => true, + 'external_job_description' => true, + 'companies_surveyed' => true, + 'employees_surveyed' => true, + 'source_id' => true, + 'source_date' => true, + 'data_year' => true, + 'external_country' => true, + 'external_secondary_location' => true, + 'external_company_size' => true, + 'external_industry' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'job_title_id' => 'jobTitleId', + 'job_location_id' => 'jobLocationId', + 'mercer_job_code' => 'mercerJobCode', + 'benchmark_source' => 'benchmarkSource', + 'currency_code' => 'currencyCode', + 'benchmark_value' => 'benchmarkValue', + 'benchmark_min' => 'benchmarkMin', + 'benchmark_max' => 'benchmarkMax', + 'external_job_title' => 'externalJobTitle', + 'external_location' => 'externalLocation', + 'external_level' => 'externalLevel', + 'external_job_description' => 'externalJobDescription', + 'companies_surveyed' => 'companiesSurveyed', + 'employees_surveyed' => 'employeesSurveyed', + 'source_id' => 'sourceId', + 'source_date' => 'sourceDate', + 'data_year' => 'dataYear', + 'external_country' => 'externalCountry', + 'external_secondary_location' => 'externalSecondaryLocation', + 'external_company_size' => 'externalCompanySize', + 'external_industry' => 'externalIndustry' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'job_title_id' => 'setJobTitleId', + 'job_location_id' => 'setJobLocationId', + 'mercer_job_code' => 'setMercerJobCode', + 'benchmark_source' => 'setBenchmarkSource', + 'currency_code' => 'setCurrencyCode', + 'benchmark_value' => 'setBenchmarkValue', + 'benchmark_min' => 'setBenchmarkMin', + 'benchmark_max' => 'setBenchmarkMax', + 'external_job_title' => 'setExternalJobTitle', + 'external_location' => 'setExternalLocation', + 'external_level' => 'setExternalLevel', + 'external_job_description' => 'setExternalJobDescription', + 'companies_surveyed' => 'setCompaniesSurveyed', + 'employees_surveyed' => 'setEmployeesSurveyed', + 'source_id' => 'setSourceId', + 'source_date' => 'setSourceDate', + 'data_year' => 'setDataYear', + 'external_country' => 'setExternalCountry', + 'external_secondary_location' => 'setExternalSecondaryLocation', + 'external_company_size' => 'setExternalCompanySize', + 'external_industry' => 'setExternalIndustry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'job_title_id' => 'getJobTitleId', + 'job_location_id' => 'getJobLocationId', + 'mercer_job_code' => 'getMercerJobCode', + 'benchmark_source' => 'getBenchmarkSource', + 'currency_code' => 'getCurrencyCode', + 'benchmark_value' => 'getBenchmarkValue', + 'benchmark_min' => 'getBenchmarkMin', + 'benchmark_max' => 'getBenchmarkMax', + 'external_job_title' => 'getExternalJobTitle', + 'external_location' => 'getExternalLocation', + 'external_level' => 'getExternalLevel', + 'external_job_description' => 'getExternalJobDescription', + 'companies_surveyed' => 'getCompaniesSurveyed', + 'employees_surveyed' => 'getEmployeesSurveyed', + 'source_id' => 'getSourceId', + 'source_date' => 'getSourceDate', + 'data_year' => 'getDataYear', + 'external_country' => 'getExternalCountry', + 'external_secondary_location' => 'getExternalSecondaryLocation', + 'external_company_size' => 'getExternalCompanySize', + 'external_industry' => 'getExternalIndustry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('job_title_id', $data ?? [], null); + $this->setIfExists('job_location_id', $data ?? [], null); + $this->setIfExists('mercer_job_code', $data ?? [], null); + $this->setIfExists('benchmark_source', $data ?? [], null); + $this->setIfExists('currency_code', $data ?? [], null); + $this->setIfExists('benchmark_value', $data ?? [], null); + $this->setIfExists('benchmark_min', $data ?? [], null); + $this->setIfExists('benchmark_max', $data ?? [], null); + $this->setIfExists('external_job_title', $data ?? [], null); + $this->setIfExists('external_location', $data ?? [], null); + $this->setIfExists('external_level', $data ?? [], null); + $this->setIfExists('external_job_description', $data ?? [], null); + $this->setIfExists('companies_surveyed', $data ?? [], null); + $this->setIfExists('employees_surveyed', $data ?? [], null); + $this->setIfExists('source_id', $data ?? [], null); + $this->setIfExists('source_date', $data ?? [], null); + $this->setIfExists('data_year', $data ?? [], null); + $this->setIfExists('external_country', $data ?? [], null); + $this->setIfExists('external_secondary_location', $data ?? [], null); + $this->setIfExists('external_company_size', $data ?? [], null); + $this->setIfExists('external_industry', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets job_title_id + * + * @return string|null + */ + public function getJobTitleId() { + return $this->container['job_title_id']; + } + + /** + * Sets job_title_id + * + * @param string|null $job_title_id job_title_id + * + * @return self + */ + public function setJobTitleId($job_title_id) { + if (is_null($job_title_id)) { + $this->openApiNullablesSetToNull['job_title_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_title_id'])) { + unset($nullablesSetToNull['job_title_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_title_id'] = $job_title_id; + + return $this; + } + + /** + * Gets job_location_id + * + * @return string|null + */ + public function getJobLocationId() { + return $this->container['job_location_id']; + } + + /** + * Sets job_location_id + * + * @param string|null $job_location_id job_location_id + * + * @return self + */ + public function setJobLocationId($job_location_id) { + if (is_null($job_location_id)) { + $this->openApiNullablesSetToNull['job_location_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['job_location_id'])) { + unset($nullablesSetToNull['job_location_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['job_location_id'] = $job_location_id; + + return $this; + } + + /** + * Gets mercer_job_code + * + * @return string|null + */ + public function getMercerJobCode() { + return $this->container['mercer_job_code']; + } + + /** + * Sets mercer_job_code + * + * @param string|null $mercer_job_code mercer_job_code + * + * @return self + */ + public function setMercerJobCode($mercer_job_code) { + if (is_null($mercer_job_code)) { + $this->openApiNullablesSetToNull['mercer_job_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['mercer_job_code'])) { + unset($nullablesSetToNull['mercer_job_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mercer_job_code'] = $mercer_job_code; + + return $this; + } + + /** + * Gets benchmark_source + * + * @return string|null + */ + public function getBenchmarkSource() { + return $this->container['benchmark_source']; + } + + /** + * Sets benchmark_source + * + * @param string|null $benchmark_source benchmark_source + * + * @return self + */ + public function setBenchmarkSource($benchmark_source) { + if (is_null($benchmark_source)) { + $this->openApiNullablesSetToNull['benchmark_source'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_source'])) { + unset($nullablesSetToNull['benchmark_source']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_source'] = $benchmark_source; + + return $this; + } + + /** + * Gets currency_code + * + * @return string|null + */ + public function getCurrencyCode() { + return $this->container['currency_code']; + } + + /** + * Sets currency_code + * + * @param string|null $currency_code currency_code + * + * @return self + */ + public function setCurrencyCode($currency_code) { + if (is_null($currency_code)) { + $this->openApiNullablesSetToNull['currency_code'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['currency_code'])) { + unset($nullablesSetToNull['currency_code']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['currency_code'] = $currency_code; + + return $this; + } + + /** + * Gets benchmark_value + * + * @return float|null + */ + public function getBenchmarkValue() { + return $this->container['benchmark_value']; + } + + /** + * Sets benchmark_value + * + * @param float|null $benchmark_value benchmark_value + * + * @return self + */ + public function setBenchmarkValue($benchmark_value) { + if (is_null($benchmark_value)) { + $this->openApiNullablesSetToNull['benchmark_value'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_value'])) { + unset($nullablesSetToNull['benchmark_value']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_value'] = $benchmark_value; + + return $this; + } + + /** + * Gets benchmark_min + * + * @return float|null + */ + public function getBenchmarkMin() { + return $this->container['benchmark_min']; + } + + /** + * Sets benchmark_min + * + * @param float|null $benchmark_min benchmark_min + * + * @return self + */ + public function setBenchmarkMin($benchmark_min) { + if (is_null($benchmark_min)) { + $this->openApiNullablesSetToNull['benchmark_min'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_min'])) { + unset($nullablesSetToNull['benchmark_min']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_min'] = $benchmark_min; + + return $this; + } + + /** + * Gets benchmark_max + * + * @return float|null + */ + public function getBenchmarkMax() { + return $this->container['benchmark_max']; + } + + /** + * Sets benchmark_max + * + * @param float|null $benchmark_max benchmark_max + * + * @return self + */ + public function setBenchmarkMax($benchmark_max) { + if (is_null($benchmark_max)) { + $this->openApiNullablesSetToNull['benchmark_max'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['benchmark_max'])) { + unset($nullablesSetToNull['benchmark_max']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['benchmark_max'] = $benchmark_max; + + return $this; + } + + /** + * Gets external_job_title + * + * @return string|null + */ + public function getExternalJobTitle() { + return $this->container['external_job_title']; + } + + /** + * Sets external_job_title + * + * @param string|null $external_job_title external_job_title + * + * @return self + */ + public function setExternalJobTitle($external_job_title) { + if (is_null($external_job_title)) { + $this->openApiNullablesSetToNull['external_job_title'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_title'])) { + unset($nullablesSetToNull['external_job_title']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_title'] = $external_job_title; + + return $this; + } + + /** + * Gets external_location + * + * @return string|null + */ + public function getExternalLocation() { + return $this->container['external_location']; + } + + /** + * Sets external_location + * + * @param string|null $external_location external_location + * + * @return self + */ + public function setExternalLocation($external_location) { + if (is_null($external_location)) { + $this->openApiNullablesSetToNull['external_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_location'])) { + unset($nullablesSetToNull['external_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_location'] = $external_location; + + return $this; + } + + /** + * Gets external_level + * + * @return string|null + */ + public function getExternalLevel() { + return $this->container['external_level']; + } + + /** + * Sets external_level + * + * @param string|null $external_level external_level + * + * @return self + */ + public function setExternalLevel($external_level) { + if (is_null($external_level)) { + $this->openApiNullablesSetToNull['external_level'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_level'])) { + unset($nullablesSetToNull['external_level']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_level'] = $external_level; + + return $this; + } + + /** + * Gets external_job_description + * + * @return string|null + */ + public function getExternalJobDescription() { + return $this->container['external_job_description']; + } + + /** + * Sets external_job_description + * + * @param string|null $external_job_description external_job_description + * + * @return self + */ + public function setExternalJobDescription($external_job_description) { + if (is_null($external_job_description)) { + $this->openApiNullablesSetToNull['external_job_description'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_job_description'])) { + unset($nullablesSetToNull['external_job_description']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_job_description'] = $external_job_description; + + return $this; + } + + /** + * Gets companies_surveyed + * + * @return int|null + */ + public function getCompaniesSurveyed() { + return $this->container['companies_surveyed']; + } + + /** + * Sets companies_surveyed + * + * @param int|null $companies_surveyed companies_surveyed + * + * @return self + */ + public function setCompaniesSurveyed($companies_surveyed) { + if (is_null($companies_surveyed)) { + $this->openApiNullablesSetToNull['companies_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['companies_surveyed'])) { + unset($nullablesSetToNull['companies_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['companies_surveyed'] = $companies_surveyed; + + return $this; + } + + /** + * Gets employees_surveyed + * + * @return int|null + */ + public function getEmployeesSurveyed() { + return $this->container['employees_surveyed']; + } + + /** + * Sets employees_surveyed + * + * @param int|null $employees_surveyed employees_surveyed + * + * @return self + */ + public function setEmployeesSurveyed($employees_surveyed) { + if (is_null($employees_surveyed)) { + $this->openApiNullablesSetToNull['employees_surveyed'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employees_surveyed'])) { + unset($nullablesSetToNull['employees_surveyed']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employees_surveyed'] = $employees_surveyed; + + return $this; + } + + /** + * Gets source_id + * + * @return string|null + */ + public function getSourceId() { + return $this->container['source_id']; + } + + /** + * Sets source_id + * + * @param string|null $source_id source_id + * + * @return self + */ + public function setSourceId($source_id) { + if (is_null($source_id)) { + $this->openApiNullablesSetToNull['source_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_id'])) { + unset($nullablesSetToNull['source_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_id'] = $source_id; + + return $this; + } + + /** + * Gets source_date + * + * @return string|null + */ + public function getSourceDate() { + return $this->container['source_date']; + } + + /** + * Sets source_date + * + * @param string|null $source_date source_date + * + * @return self + */ + public function setSourceDate($source_date) { + if (is_null($source_date)) { + $this->openApiNullablesSetToNull['source_date'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['source_date'])) { + unset($nullablesSetToNull['source_date']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['source_date'] = $source_date; + + return $this; + } + + /** + * Gets data_year + * + * @return string|null + */ + public function getDataYear() { + return $this->container['data_year']; + } + + /** + * Sets data_year + * + * @param string|null $data_year data_year + * + * @return self + */ + public function setDataYear($data_year) { + if (is_null($data_year)) { + $this->openApiNullablesSetToNull['data_year'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['data_year'])) { + unset($nullablesSetToNull['data_year']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data_year'] = $data_year; + + return $this; + } + + /** + * Gets external_country + * + * @return string|null + */ + public function getExternalCountry() { + return $this->container['external_country']; + } + + /** + * Sets external_country + * + * @param string|null $external_country external_country + * + * @return self + */ + public function setExternalCountry($external_country) { + if (is_null($external_country)) { + $this->openApiNullablesSetToNull['external_country'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_country'])) { + unset($nullablesSetToNull['external_country']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_country'] = $external_country; + + return $this; + } + + /** + * Gets external_secondary_location + * + * @return string|null + */ + public function getExternalSecondaryLocation() { + return $this->container['external_secondary_location']; + } + + /** + * Sets external_secondary_location + * + * @param string|null $external_secondary_location external_secondary_location + * + * @return self + */ + public function setExternalSecondaryLocation($external_secondary_location) { + if (is_null($external_secondary_location)) { + $this->openApiNullablesSetToNull['external_secondary_location'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_secondary_location'])) { + unset($nullablesSetToNull['external_secondary_location']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_secondary_location'] = $external_secondary_location; + + return $this; + } + + /** + * Gets external_company_size + * + * @return string|null + */ + public function getExternalCompanySize() { + return $this->container['external_company_size']; + } + + /** + * Sets external_company_size + * + * @param string|null $external_company_size external_company_size + * + * @return self + */ + public function setExternalCompanySize($external_company_size) { + if (is_null($external_company_size)) { + $this->openApiNullablesSetToNull['external_company_size'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_company_size'])) { + unset($nullablesSetToNull['external_company_size']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_company_size'] = $external_company_size; + + return $this; + } + + /** + * Gets external_industry + * + * @return string|null + */ + public function getExternalIndustry() { + return $this->container['external_industry']; + } + + /** + * Sets external_industry + * + * @param string|null $external_industry external_industry + * + * @return self + */ + public function setExternalIndustry($external_industry) { + if (is_null($external_industry)) { + $this->openApiNullablesSetToNull['external_industry'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['external_industry'])) { + unset($nullablesSetToNull['external_industry']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['external_industry'] = $external_industry; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UploadEmployeePhotoRequest1.php b/lib/Model/UploadEmployeePhotoRequest1.php new file mode 100644 index 00000000..2d01b057 --- /dev/null +++ b/lib/Model/UploadEmployeePhotoRequest1.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * UploadEmployeePhotoRequest1 + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UploadEmployeePhotoRequest1 Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UploadEmployeePhotoRequest1 implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'upload_employee_photo_request_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'file_base64' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'file_base64' => 'byte' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'file_base64' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'file_base64' => 'fileBase64' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'file_base64' => 'setFileBase64' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'file_base64' => 'getFileBase64' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('file_base64', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['file_base64'] === null) { + $invalidProperties[] = "'file_base64' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets file_base64 + * + * @return string + */ + public function getFileBase64() { + return $this->container['file_base64']; + } + + /** + * Sets file_base64 + * + * @param string $file_base64 Base64-encoded image bytes. Same format/size/dimension rules as the multipart `file` field: JPEG, PNG, BMP, or GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream); square within 1 pixel; at least 150×150 pixels; decoded payload no larger than 20MB. Whitespace inside the base64 string is tolerated and stripped before decoding. + * + * @return self + */ + public function setFileBase64($file_base64) { + if (is_null($file_base64)) { + throw new \InvalidArgumentException('non-nullable file_base64 cannot be null'); + } + $this->container['file_base64'] = $file_base64; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/UserPermissionData.php b/lib/Model/UserPermissionData.php new file mode 100644 index 00000000..a5c127c3 --- /dev/null +++ b/lib/Model/UserPermissionData.php @@ -0,0 +1,485 @@ +<?php +declare(strict_types=1); +/** + * UserPermissionData + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * UserPermissionData Class Doc Comment + * + * @category Class + * @description Schema for the compensation upsell data. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class UserPermissionData implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'UserPermissionData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'is_admin' => 'bool', + 'is_billing_contact' => 'bool', + 'is_owner' => 'bool', + 'is_support_admin' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'is_admin' => null, + 'is_billing_contact' => null, + 'is_owner' => null, + 'is_support_admin' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'is_admin' => false, + 'is_billing_contact' => false, + 'is_owner' => false, + 'is_support_admin' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'is_admin' => 'isAdmin', + 'is_billing_contact' => 'isBillingContact', + 'is_owner' => 'isOwner', + 'is_support_admin' => 'isSupportAdmin' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'is_admin' => 'setIsAdmin', + 'is_billing_contact' => 'setIsBillingContact', + 'is_owner' => 'setIsOwner', + 'is_support_admin' => 'setIsSupportAdmin' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'is_admin' => 'getIsAdmin', + 'is_billing_contact' => 'getIsBillingContact', + 'is_owner' => 'getIsOwner', + 'is_support_admin' => 'getIsSupportAdmin' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('is_admin', $data ?? [], null); + $this->setIfExists('is_billing_contact', $data ?? [], null); + $this->setIfExists('is_owner', $data ?? [], null); + $this->setIfExists('is_support_admin', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets is_admin + * + * @return bool|null + */ + public function getIsAdmin() { + return $this->container['is_admin']; + } + + /** + * Sets is_admin + * + * @param bool|null $is_admin Whether user is an admin + * + * @return self + */ + public function setIsAdmin($is_admin) { + if (is_null($is_admin)) { + throw new \InvalidArgumentException('non-nullable is_admin cannot be null'); + } + $this->container['is_admin'] = $is_admin; + + return $this; + } + + /** + * Gets is_billing_contact + * + * @return bool|null + */ + public function getIsBillingContact() { + return $this->container['is_billing_contact']; + } + + /** + * Sets is_billing_contact + * + * @param bool|null $is_billing_contact Whether user is a billing contact + * + * @return self + */ + public function setIsBillingContact($is_billing_contact) { + if (is_null($is_billing_contact)) { + throw new \InvalidArgumentException('non-nullable is_billing_contact cannot be null'); + } + $this->container['is_billing_contact'] = $is_billing_contact; + + return $this; + } + + /** + * Gets is_owner + * + * @return bool|null + */ + public function getIsOwner() { + return $this->container['is_owner']; + } + + /** + * Sets is_owner + * + * @param bool|null $is_owner Whether user is the owner + * + * @return self + */ + public function setIsOwner($is_owner) { + if (is_null($is_owner)) { + throw new \InvalidArgumentException('non-nullable is_owner cannot be null'); + } + $this->container['is_owner'] = $is_owner; + + return $this; + } + + /** + * Gets is_support_admin + * + * @return bool|null + */ + public function getIsSupportAdmin() { + return $this->container['is_support_admin']; + } + + /** + * Sets is_support_admin + * + * @param bool|null $is_support_admin Whether user is a support admin + * + * @return self + */ + public function setIsSupportAdmin($is_support_admin) { + if (is_null($is_support_admin)) { + throw new \InvalidArgumentException('non-nullable is_support_admin cannot be null'); + } + $this->container['is_support_admin'] = $is_support_admin; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebHookPostFieldDataObject.php b/lib/Model/WebHookPostFieldDataObject.php new file mode 100644 index 00000000..8ca72b2e --- /dev/null +++ b/lib/Model/WebHookPostFieldDataObject.php @@ -0,0 +1,584 @@ +<?php +declare(strict_types=1); +/** + * WebHookPostFieldDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebHookPostFieldDataObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebHookPostFieldDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebHookPostFieldDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'alias' => 'string', + 'name' => 'string', + 'type' => 'string', + 'id' => 'int', + 'page_id' => 'int', + 'table_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'alias' => null, + 'name' => null, + 'type' => null, + 'id' => null, + 'page_id' => null, + 'table_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'alias' => true, + 'name' => false, + 'type' => true, + 'id' => false, + 'page_id' => false, + 'table_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'alias' => 'alias', + 'name' => 'name', + 'type' => 'type', + 'id' => 'id', + 'page_id' => 'pageId', + 'table_id' => 'tableId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'alias' => 'setAlias', + 'name' => 'setName', + 'type' => 'setType', + 'id' => 'setId', + 'page_id' => 'setPageId', + 'table_id' => 'setTableId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'alias' => 'getAlias', + 'name' => 'getName', + 'type' => 'getType', + 'id' => 'getId', + 'page_id' => 'getPageId', + 'table_id' => 'getTableId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('alias', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('page_id', $data ?? [], null); + $this->setIfExists('table_id', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['alias'] === null) { + $invalidProperties[] = "'alias' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['page_id'] === null) { + $invalidProperties[] = "'page_id' can't be null"; + } + if ($this->container['table_id'] === null) { + $invalidProperties[] = "'table_id' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets alias + * + * @return string + */ + public function getAlias() { + return $this->container['alias']; + } + + /** + * Sets alias + * + * @param string $alias alias + * + * @return self + */ + public function setAlias($alias) { + if (is_null($alias)) { + $this->openApiNullablesSetToNull['alias'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['alias'])) { + unset($nullablesSetToNull['alias']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['alias'] = $alias; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Field name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + $this->openApiNullablesSetToNull['type'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['type'])) { + unset($nullablesSetToNull['type']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Field ID. This may be a standard/custom field ID or a synthetic negative ID for calculated fields. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets page_id + * + * @return int + */ + public function getPageId() { + return $this->container['page_id']; + } + + /** + * Sets page_id + * + * @param int $page_id ID of the page the field belongs to. Calculated fields may use `-1`. Fields without a usable page ID are not available in webhooks. + * + * @return self + */ + public function setPageId($page_id) { + if (is_null($page_id)) { + throw new \InvalidArgumentException('non-nullable page_id cannot be null'); + } + $this->container['page_id'] = $page_id; + + return $this; + } + + /** + * Gets table_id + * + * @return int + */ + public function getTableId() { + return $this->container['table_id']; + } + + /** + * Sets table_id + * + * @param int $table_id table_id + * + * @return self + */ + public function setTableId($table_id) { + if (is_null($table_id)) { + $this->openApiNullablesSetToNull['table_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['table_id'])) { + unset($nullablesSetToNull['table_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['table_id'] = $table_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebHookPostFieldPageDataObject.php b/lib/Model/WebHookPostFieldPageDataObject.php new file mode 100644 index 00000000..08528977 --- /dev/null +++ b/lib/Model/WebHookPostFieldPageDataObject.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * WebHookPostFieldPageDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebHookPostFieldPageDataObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebHookPostFieldPageDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebHookPostFieldPageDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Page ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Page Name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebHookPostFieldResponseObject.php b/lib/Model/WebHookPostFieldResponseObject.php new file mode 100644 index 00000000..6dd6b9c9 --- /dev/null +++ b/lib/Model/WebHookPostFieldResponseObject.php @@ -0,0 +1,461 @@ +<?php +declare(strict_types=1); +/** + * WebHookPostFieldResponseObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebHookPostFieldResponseObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebHookPostFieldResponseObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebHookPostFieldResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'fields' => '\BhrSdk\Model\WebHookPostFieldDataObject[]', + 'pages' => '\BhrSdk\Model\WebHookPostFieldPageDataObject[]', + 'tables' => '\BhrSdk\Model\WebHookPostFieldTableDataObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'fields' => null, + 'pages' => null, + 'tables' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'fields' => false, + 'pages' => false, + 'tables' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fields' => 'fields', + 'pages' => 'pages', + 'tables' => 'tables' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fields' => 'setFields', + 'pages' => 'setPages', + 'tables' => 'setTables' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fields' => 'getFields', + 'pages' => 'getPages', + 'tables' => 'getTables' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('fields', $data ?? [], null); + $this->setIfExists('pages', $data ?? [], null); + $this->setIfExists('tables', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['fields'] === null) { + $invalidProperties[] = "'fields' can't be null"; + } + if ($this->container['pages'] === null) { + $invalidProperties[] = "'pages' can't be null"; + } + if ($this->container['tables'] === null) { + $invalidProperties[] = "'tables' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets fields + * + * @return \BhrSdk\Model\WebHookPostFieldDataObject[] + */ + public function getFields() { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param \BhrSdk\Model\WebHookPostFieldDataObject[] $fields fields + * + * @return self + */ + public function setFields($fields) { + if (is_null($fields)) { + throw new \InvalidArgumentException('non-nullable fields cannot be null'); + } + $this->container['fields'] = $fields; + + return $this; + } + + /** + * Gets pages + * + * @return \BhrSdk\Model\WebHookPostFieldPageDataObject[] + */ + public function getPages() { + return $this->container['pages']; + } + + /** + * Sets pages + * + * @param \BhrSdk\Model\WebHookPostFieldPageDataObject[] $pages pages + * + * @return self + */ + public function setPages($pages) { + if (is_null($pages)) { + throw new \InvalidArgumentException('non-nullable pages cannot be null'); + } + $this->container['pages'] = $pages; + + return $this; + } + + /** + * Gets tables + * + * @return \BhrSdk\Model\WebHookPostFieldTableDataObject[] + */ + public function getTables() { + return $this->container['tables']; + } + + /** + * Sets tables + * + * @param \BhrSdk\Model\WebHookPostFieldTableDataObject[] $tables tables + * + * @return self + */ + public function setTables($tables) { + if (is_null($tables)) { + throw new \InvalidArgumentException('non-nullable tables cannot be null'); + } + $this->container['tables'] = $tables; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebHookPostFieldTableDataObject.php b/lib/Model/WebHookPostFieldTableDataObject.php new file mode 100644 index 00000000..44766ca7 --- /dev/null +++ b/lib/Model/WebHookPostFieldTableDataObject.php @@ -0,0 +1,426 @@ +<?php +declare(strict_types=1); +/** + * WebHookPostFieldTableDataObject + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebHookPostFieldTableDataObject Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebHookPostFieldTableDataObject implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebHookPostFieldTableDataObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Table ID + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Table Name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebHookResponse.php b/lib/Model/WebHookResponse.php index 9e4e89fc..e87a65e6 100644 --- a/lib/Model/WebHookResponse.php +++ b/lib/Model/WebHookResponse.php @@ -57,7 +57,7 @@ class WebHookResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openApiTypes = [ - 'id' => 'int', + 'id' => 'string', 'name' => 'string', 'created' => 'string', 'last_sent' => 'string', @@ -65,7 +65,9 @@ class WebHookResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'post_fields' => 'object', 'url' => 'string', 'format' => 'string', - 'include_company_domain' => 'bool' + 'include_company_domain' => 'bool', + 'events' => '\BhrSdk\Model\WebhookEventType[]', + 'errors' => '\BhrSdk\Model\WebhookSubErrorProperty[]' ]; /** @@ -84,7 +86,9 @@ class WebHookResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'post_fields' => null, 'url' => null, 'format' => null, - 'include_company_domain' => null + 'include_company_domain' => null, + 'events' => null, + 'errors' => null ]; /** @@ -97,12 +101,14 @@ class WebHookResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => false, 'name' => false, 'created' => false, - 'last_sent' => false, - 'monitor_fields' => false, + 'last_sent' => true, + 'monitor_fields' => true, 'post_fields' => false, 'url' => false, 'format' => false, - 'include_company_domain' => false + 'include_company_domain' => false, + 'events' => false, + 'errors' => false ]; /** @@ -195,7 +201,9 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'postFields', 'url' => 'url', 'format' => 'format', - 'include_company_domain' => 'includeCompanyDomain' + 'include_company_domain' => 'includeCompanyDomain', + 'events' => 'events', + 'errors' => 'errors' ]; /** @@ -212,7 +220,9 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'setPostFields', 'url' => 'setUrl', 'format' => 'setFormat', - 'include_company_domain' => 'setIncludeCompanyDomain' + 'include_company_domain' => 'setIncludeCompanyDomain', + 'events' => 'setEvents', + 'errors' => 'setErrors' ]; /** @@ -229,7 +239,9 @@ public function isNullableSetToNull(string $property): bool { 'post_fields' => 'getPostFields', 'url' => 'getUrl', 'format' => 'getFormat', - 'include_company_domain' => 'getIncludeCompanyDomain' + 'include_company_domain' => 'getIncludeCompanyDomain', + 'events' => 'getEvents', + 'errors' => 'getErrors' ]; /** @@ -269,6 +281,21 @@ public function getModelName() { return self::$openApiModelName; } + public const FORMAT_JSON = 'json'; + public const FORMAT_FORM_ENCODED = 'form-encoded'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFormatAllowableValues() { + return [ + self::FORMAT_JSON, + self::FORMAT_FORM_ENCODED, + ]; + } + /** * Associative array for storing property values * @@ -292,6 +319,8 @@ public function __construct(?array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('format', $data ?? [], null); $this->setIfExists('include_company_domain', $data ?? [], null); + $this->setIfExists('events', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); } /** @@ -319,6 +348,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getFormatAllowableValues(); + if (!is_null($this->container['format']) && !in_array($this->container['format'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'format', must be one of '%s'", + $this->container['format'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -335,7 +373,7 @@ public function valid() { /** * Gets id * - * @return int|null + * @return string|null */ public function getId() { return $this->container['id']; @@ -344,7 +382,7 @@ public function getId() { /** * Sets id * - * @param int|null $id The id of the webhook. + * @param string|null $id The ID of the webhook. * * @return self */ @@ -394,7 +432,7 @@ public function getCreated() { /** * Sets created * - * @param string|null $created timestamp of creation + * @param string|null $created Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). * * @return self */ @@ -419,13 +457,19 @@ public function getLastSent() { /** * Sets last_sent * - * @param string|null $last_sent timestamp of last webhook sent + * @param string|null $last_sent last_sent * * @return self */ public function setLastSent($last_sent) { if (is_null($last_sent)) { - throw new \InvalidArgumentException('non-nullable last_sent cannot be null'); + $this->openApiNullablesSetToNull['last_sent'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_sent'])) { + unset($nullablesSetToNull['last_sent']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['last_sent'] = $last_sent; @@ -444,13 +488,19 @@ public function getMonitorFields() { /** * Sets monitor_fields * - * @param string[]|null $monitor_fields A list of fields to monitor. + * @param string[]|null $monitor_fields monitor_fields * * @return self */ public function setMonitorFields($monitor_fields) { if (is_null($monitor_fields)) { - throw new \InvalidArgumentException('non-nullable monitor_fields cannot be null'); + $this->openApiNullablesSetToNull['monitor_fields'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['monitor_fields'])) { + unset($nullablesSetToNull['monitor_fields']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['monitor_fields'] = $monitor_fields; @@ -469,7 +519,7 @@ public function getPostFields() { /** * Sets post_fields * - * @param object|null $post_fields A list of fields to post to the webhook url. Field ID or alias: external name + * @param object|null $post_fields A map of field ID or alias to the external name used in the webhook payload. * * @return self */ @@ -494,7 +544,7 @@ public function getUrl() { /** * Sets url * - * @param string|null $url The url the webhook should send data to. + * @param string|null $url The URL the webhook sends data to. * * @return self */ @@ -519,7 +569,7 @@ public function getFormat() { /** * Sets format * - * @param string|null $format The format the webhook should use (json, form-encoded). + * @param string|null $format The payload format used by the webhook. * * @return self */ @@ -527,6 +577,16 @@ public function setFormat($format) { if (is_null($format)) { throw new \InvalidArgumentException('non-nullable format cannot be null'); } + $allowedValues = $this->getFormatAllowableValues(); + if (!in_array($format, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'format', must be one of '%s'", + $format, + implode("', '", $allowedValues) + ) + ); + } $this->container['format'] = $format; return $this; @@ -544,7 +604,7 @@ public function getIncludeCompanyDomain() { /** * Sets include_company_domain * - * @param bool|null $include_company_domain If set to true, the company domain will be added to the header. + * @param bool|null $include_company_domain Whether the company domain is added to the webhook request header. * * @return self */ @@ -556,6 +616,56 @@ public function setIncludeCompanyDomain($include_company_domain) { return $this; } + + /** + * Gets events + * + * @return \BhrSdk\Model\WebhookEventType[]|null + */ + public function getEvents() { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \BhrSdk\Model\WebhookEventType[]|null $events Events that trigger this webhook. + * + * @return self + */ + public function setEvents($events) { + if (is_null($events)) { + throw new \InvalidArgumentException('non-nullable events cannot be null'); + } + $this->container['events'] = $events; + + return $this; + } + + /** + * Gets errors + * + * @return \BhrSdk\Model\WebhookSubErrorProperty[]|null + */ + public function getErrors() { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \BhrSdk\Model\WebhookSubErrorProperty[]|null $errors Field-level permission errors associated with the webhook configuration, when present. + * + * @return self + */ + public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Webhook.php b/lib/Model/Webhook.php index e6246dc7..8e7894fd 100644 --- a/lib/Model/Webhook.php +++ b/lib/Model/Webhook.php @@ -57,7 +57,7 @@ class Webhook implements ModelInterface, ArrayAccess, \JsonSerializable { * @var string[] */ protected static $openApiTypes = [ - 'id' => 'int', + 'id' => 'string', 'name' => 'string', 'created' => 'string', 'last_sent' => 'string', @@ -66,7 +66,8 @@ class Webhook implements ModelInterface, ArrayAccess, \JsonSerializable { 'url' => 'string', 'format' => 'string', 'private_key' => 'string', - 'include_company_domain' => 'bool' + 'include_company_domain' => 'bool', + 'events' => '\BhrSdk\Model\WebhookEventType[]' ]; /** @@ -86,7 +87,8 @@ class Webhook implements ModelInterface, ArrayAccess, \JsonSerializable { 'url' => null, 'format' => null, 'private_key' => null, - 'include_company_domain' => null + 'include_company_domain' => null, + 'events' => null ]; /** @@ -99,13 +101,14 @@ class Webhook implements ModelInterface, ArrayAccess, \JsonSerializable { 'id' => false, 'name' => false, 'created' => false, - 'last_sent' => false, - 'monitor_fields' => false, + 'last_sent' => true, + 'monitor_fields' => true, 'post_fields' => false, 'url' => false, 'format' => false, 'private_key' => false, - 'include_company_domain' => false + 'include_company_domain' => false, + 'events' => false ]; /** @@ -199,7 +202,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'url', 'format' => 'format', 'private_key' => 'privateKey', - 'include_company_domain' => 'includeCompanyDomain' + 'include_company_domain' => 'includeCompanyDomain', + 'events' => 'events' ]; /** @@ -217,7 +221,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'setUrl', 'format' => 'setFormat', 'private_key' => 'setPrivateKey', - 'include_company_domain' => 'setIncludeCompanyDomain' + 'include_company_domain' => 'setIncludeCompanyDomain', + 'events' => 'setEvents' ]; /** @@ -235,7 +240,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'getUrl', 'format' => 'getFormat', 'private_key' => 'getPrivateKey', - 'include_company_domain' => 'getIncludeCompanyDomain' + 'include_company_domain' => 'getIncludeCompanyDomain', + 'events' => 'getEvents' ]; /** @@ -275,6 +281,21 @@ public function getModelName() { return self::$openApiModelName; } + public const FORMAT_JSON = 'json'; + public const FORMAT_FORM_ENCODED = 'form-encoded'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFormatAllowableValues() { + return [ + self::FORMAT_JSON, + self::FORMAT_FORM_ENCODED, + ]; + } + /** * Associative array for storing property values * @@ -299,6 +320,7 @@ public function __construct(?array $data = null) { $this->setIfExists('format', $data ?? [], null); $this->setIfExists('private_key', $data ?? [], null); $this->setIfExists('include_company_domain', $data ?? [], null); + $this->setIfExists('events', $data ?? [], null); } /** @@ -326,6 +348,15 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getFormatAllowableValues(); + if (!is_null($this->container['format']) && !in_array($this->container['format'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'format', must be one of '%s'", + $this->container['format'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -342,7 +373,7 @@ public function valid() { /** * Gets id * - * @return int|null + * @return string|null */ public function getId() { return $this->container['id']; @@ -351,7 +382,7 @@ public function getId() { /** * Sets id * - * @param int|null $id The id of the webhook. + * @param string|null $id The ID of the webhook. * * @return self */ @@ -401,7 +432,7 @@ public function getCreated() { /** * Sets created * - * @param string|null $created timestamp of creation + * @param string|null $created Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). * * @return self */ @@ -426,13 +457,19 @@ public function getLastSent() { /** * Sets last_sent * - * @param string|null $last_sent timestamp of last webhook sent + * @param string|null $last_sent last_sent * * @return self */ public function setLastSent($last_sent) { if (is_null($last_sent)) { - throw new \InvalidArgumentException('non-nullable last_sent cannot be null'); + $this->openApiNullablesSetToNull['last_sent'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_sent'])) { + unset($nullablesSetToNull['last_sent']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['last_sent'] = $last_sent; @@ -451,13 +488,19 @@ public function getMonitorFields() { /** * Sets monitor_fields * - * @param string[]|null $monitor_fields A list of fields to monitor. + * @param string[]|null $monitor_fields monitor_fields * * @return self */ public function setMonitorFields($monitor_fields) { if (is_null($monitor_fields)) { - throw new \InvalidArgumentException('non-nullable monitor_fields cannot be null'); + $this->openApiNullablesSetToNull['monitor_fields'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['monitor_fields'])) { + unset($nullablesSetToNull['monitor_fields']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['monitor_fields'] = $monitor_fields; @@ -476,7 +519,7 @@ public function getPostFields() { /** * Sets post_fields * - * @param object|null $post_fields A list of fields to post to the webhook url. Field ID or alias: external name + * @param object|null $post_fields An object map of field ID or alias to the external name used in the webhook payload. * * @return self */ @@ -501,7 +544,7 @@ public function getUrl() { /** * Sets url * - * @param string|null $url The url the webhook should send data to. + * @param string|null $url The URL the webhook sends data to. * * @return self */ @@ -526,7 +569,7 @@ public function getFormat() { /** * Sets format * - * @param string|null $format The format the webhook should use (json, form-encoded). + * @param string|null $format The payload format used by the webhook. * * @return self */ @@ -534,6 +577,16 @@ public function setFormat($format) { if (is_null($format)) { throw new \InvalidArgumentException('non-nullable format cannot be null'); } + $allowedValues = $this->getFormatAllowableValues(); + if (!in_array($format, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'format', must be one of '%s'", + $format, + implode("', '", $allowedValues) + ) + ); + } $this->container['format'] = $format; return $this; @@ -551,7 +604,7 @@ public function getPrivateKey() { /** * Sets private_key * - * @param string|null $private_key The private key which can be used to verify that the webhook is secure (uses HMAC-SHA256) + * @param string|null $private_key The private key used to verify webhook authenticity via HMAC-SHA256. Only returned at creation time. * * @return self */ @@ -576,7 +629,7 @@ public function getIncludeCompanyDomain() { /** * Sets include_company_domain * - * @param bool|null $include_company_domain If set to true, the company domain will be added to the header. + * @param bool|null $include_company_domain Whether the company domain is added to the webhook request header. * * @return self */ @@ -588,6 +641,31 @@ public function setIncludeCompanyDomain($include_company_domain) { return $this; } + + /** + * Gets events + * + * @return \BhrSdk\Model\WebhookEventType[]|null + */ + public function getEvents() { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \BhrSdk\Model\WebhookEventType[]|null $events Events that trigger this webhook. + * + * @return self + */ + public function setEvents($events) { + if (is_null($events)) { + throw new \InvalidArgumentException('non-nullable events cannot be null'); + } + $this->container['events'] = $events; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/WebhookBadRequest.php b/lib/Model/WebhookBadRequest.php index 0c2f3f68..3ed214c5 100644 --- a/lib/Model/WebhookBadRequest.php +++ b/lib/Model/WebhookBadRequest.php @@ -57,7 +57,7 @@ class WebhookBadRequest implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openApiTypes = [ - 'errors' => '\BhrSdk\Model\UnauthorizedErrorsInner[]' + 'errors' => '\BhrSdk\Model\WebhookBadRequestErrorsInner[]' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets errors * - * @return \BhrSdk\Model\UnauthorizedErrorsInner[]|null + * @return \BhrSdk\Model\WebhookBadRequestErrorsInner[]|null */ public function getErrors() { return $this->container['errors']; @@ -288,7 +288,7 @@ public function getErrors() { /** * Sets errors * - * @param \BhrSdk\Model\UnauthorizedErrorsInner[]|null $errors errors + * @param \BhrSdk\Model\WebhookBadRequestErrorsInner[]|null $errors errors * * @return self */ diff --git a/lib/Model/WebhookBadRequestErrorsInner.php b/lib/Model/WebhookBadRequestErrorsInner.php new file mode 100644 index 00000000..31b40a72 --- /dev/null +++ b/lib/Model/WebhookBadRequestErrorsInner.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * WebhookBadRequestErrorsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookBadRequestErrorsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookBadRequestErrorsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookBadRequest_errors_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => 'string', + 'issues' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null, + 'issues' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false, + 'issues' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error', + 'issues' => 'issues' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError', + 'issues' => 'setIssues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError', + 'issues' => 'getIssues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('issues', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return string|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string|null $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets issues + * + * @return string[]|null + */ + public function getIssues() { + return $this->container['issues']; + } + + /** + * Sets issues + * + * @param string[]|null $issues issues + * + * @return self + */ + public function setIssues($issues) { + if (is_null($issues)) { + throw new \InvalidArgumentException('non-nullable issues cannot be null'); + } + $this->container['issues'] = $issues; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhookErrorErrors.php b/lib/Model/WebhookErrorErrors.php index 4f3d9b08..bc5d2f35 100644 --- a/lib/Model/WebhookErrorErrors.php +++ b/lib/Model/WebhookErrorErrors.php @@ -59,9 +59,9 @@ class WebhookErrorErrors implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openApiTypes = [ 'error' => 'string', 'unknown_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInner[]', - 'monitor_fields' => '\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]', + 'monitor_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]', 'duplicate_post_string' => 'string[]', - 'post_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]' + 'post_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]' ]; /** @@ -357,7 +357,7 @@ public function setUnknownFields($unknown_fields) { /** * Gets monitor_fields * - * @return \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]|null + * @return \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null */ public function getMonitorFields() { return $this->container['monitor_fields']; @@ -366,7 +366,7 @@ public function getMonitorFields() { /** * Sets monitor_fields * - * @param \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]|null $monitor_fields monitor_fields + * @param \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null $monitor_fields monitor_fields * * @return self */ @@ -407,7 +407,7 @@ public function setDuplicatePostString($duplicate_post_string) { /** * Gets post_fields * - * @return \BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]|null + * @return \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null */ public function getPostFields() { return $this->container['post_fields']; @@ -416,7 +416,7 @@ public function getPostFields() { /** * Sets post_fields * - * @param \BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]|null $post_fields post_fields + * @param \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null $post_fields post_fields * * @return self */ diff --git a/lib/Model/WebhookEventType.php b/lib/Model/WebhookEventType.php new file mode 100644 index 00000000..4bf640a1 --- /dev/null +++ b/lib/Model/WebhookEventType.php @@ -0,0 +1,84 @@ +<?php +declare(strict_types=1); +/** + * WebhookEventType + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookEventType Class Doc Comment + * + * @category Class + * @description The type of event that triggers a webhook. Cannot mix employee_with_fields events with employee events. This list will be expanded in the future. + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class WebhookEventType +{ + /** + * Possible values of this enum + */ + public const EMPLOYEE_WITH_FIELDS_UPDATED = 'employee_with_fields.updated'; + + public const EMPLOYEE_WITH_FIELDS_CREATED = 'employee_with_fields.created'; + + public const EMPLOYEE_WITH_FIELDS_DELETED = 'employee_with_fields.deleted'; + + public const COMPANY_INTEGRATIONS_UPDATED = 'company-integrations.updated'; + + public const EMPLOYEE_CREATED = 'employee.created'; + + public const EMPLOYEE_UPDATED = 'employee.updated'; + + public const EMPLOYEE_DELETED = 'employee.deleted'; + + public const COMPANY_UPDATED = 'company.updated'; + + public const COMPANY_DELETED = 'company.deleted'; + + /** + * Gets allowable values of the enum + * @return string[] + */ + public static function getAllowableEnumValues() + { + return [ + self::EMPLOYEE_WITH_FIELDS_UPDATED, + self::EMPLOYEE_WITH_FIELDS_CREATED, + self::EMPLOYEE_WITH_FIELDS_DELETED, + self::COMPANY_INTEGRATIONS_UPDATED, + self::EMPLOYEE_CREATED, + self::EMPLOYEE_UPDATED, + self::EMPLOYEE_DELETED, + self::COMPANY_UPDATED, + self::COMPANY_DELETED + ]; + } +} + diff --git a/lib/Model/WebHookLogResponse.php b/lib/Model/WebhookLogEntry.php similarity index 83% rename from lib/Model/WebHookLogResponse.php rename to lib/Model/WebhookLogEntry.php index 9cba4e40..dd829575 100644 --- a/lib/Model/WebHookLogResponse.php +++ b/lib/Model/WebhookLogEntry.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * WebHookLogResponse + * WebhookLogEntry * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * WebHookLogResponse Class Doc Comment + * WebhookLogEntry Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class WebHookLogResponse implements ModelInterface, ArrayAccess, \JsonSerializable { +class WebhookLogEntry implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class WebHookLogResponse implements ModelInterface, ArrayAccess, \JsonSerializab * * @var string */ - protected static $openApiModelName = 'WebHookLogResponse'; + protected static $openApiModelName = 'WebhookLogEntry'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,13 +57,13 @@ class WebHookLogResponse implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openApiTypes = [ - 'webhook_id' => 'int', + 'webhook_id' => 'string', 'url' => 'string', 'last_attempted' => 'string', 'last_success' => 'string', - 'failure_count' => 'int', - 'status' => 'int', - 'employee_ids' => 'int[]' + 'status_code' => 'string', + 'format' => 'string', + 'employee_ids' => 'string[]' ]; /** @@ -78,8 +78,8 @@ class WebHookLogResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'url' => null, 'last_attempted' => null, 'last_success' => null, - 'failure_count' => null, - 'status' => null, + 'status_code' => null, + 'format' => null, 'employee_ids' => null ]; @@ -94,8 +94,8 @@ class WebHookLogResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'url' => false, 'last_attempted' => false, 'last_success' => false, - 'failure_count' => false, - 'status' => false, + 'status_code' => false, + 'format' => false, 'employee_ids' => false ]; @@ -185,8 +185,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'url', 'last_attempted' => 'lastAttempted', 'last_success' => 'lastSuccess', - 'failure_count' => 'failureCount', - 'status' => 'status', + 'status_code' => 'statusCode', + 'format' => 'format', 'employee_ids' => 'employeeIds' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'setUrl', 'last_attempted' => 'setLastAttempted', 'last_success' => 'setLastSuccess', - 'failure_count' => 'setFailureCount', - 'status' => 'setStatus', + 'status_code' => 'setStatusCode', + 'format' => 'setFormat', 'employee_ids' => 'setEmployeeIds' ]; @@ -215,8 +215,8 @@ public function isNullableSetToNull(string $property): bool { 'url' => 'getUrl', 'last_attempted' => 'getLastAttempted', 'last_success' => 'getLastSuccess', - 'failure_count' => 'getFailureCount', - 'status' => 'getStatus', + 'status_code' => 'getStatusCode', + 'format' => 'getFormat', 'employee_ids' => 'getEmployeeIds' ]; @@ -275,8 +275,8 @@ public function __construct(?array $data = null) { $this->setIfExists('url', $data ?? [], null); $this->setIfExists('last_attempted', $data ?? [], null); $this->setIfExists('last_success', $data ?? [], null); - $this->setIfExists('failure_count', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('status_code', $data ?? [], null); + $this->setIfExists('format', $data ?? [], null); $this->setIfExists('employee_ids', $data ?? [], null); } @@ -321,7 +321,7 @@ public function valid() { /** * Gets webhook_id * - * @return int|null + * @return string|null */ public function getWebhookId() { return $this->container['webhook_id']; @@ -330,7 +330,7 @@ public function getWebhookId() { /** * Sets webhook_id * - * @param int|null $webhook_id The id of the webhook. + * @param string|null $webhook_id The ID of the webhook. * * @return self */ @@ -355,7 +355,7 @@ public function getUrl() { /** * Sets url * - * @param string|null $url The URL of the webhook. + * @param string|null $url The URL the webhook was delivered to. * * @return self */ @@ -380,7 +380,7 @@ public function getLastAttempted() { /** * Sets last_attempted * - * @param string|null $last_attempted timestamp of last time the webhook was sent + * @param string|null $last_attempted Datetime of the last delivery attempt (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as \"Webhook Not Found\" when the delivery target could not be reached. * * @return self */ @@ -405,7 +405,7 @@ public function getLastSuccess() { /** * Sets last_success * - * @param string|null $last_success timestamp of last time the webhook was sent successfully + * @param string|null $last_success Datetime of the last successful delivery (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as \"Webhook Not Found\" when no successful delivery has been recorded. * * @return self */ @@ -419,51 +419,51 @@ public function setLastSuccess($last_success) { } /** - * Gets failure_count + * Gets status_code * - * @return int|null + * @return string|null */ - public function getFailureCount() { - return $this->container['failure_count']; + public function getStatusCode() { + return $this->container['status_code']; } /** - * Sets failure_count + * Sets status_code * - * @param int|null $failure_count Count of how many times this call failed since last success + * @param string|null $status_code HTTP status code returned by the webhook endpoint on the last delivery attempt. * * @return self */ - public function setFailureCount($failure_count) { - if (is_null($failure_count)) { - throw new \InvalidArgumentException('non-nullable failure_count cannot be null'); + public function setStatusCode($status_code) { + if (is_null($status_code)) { + throw new \InvalidArgumentException('non-nullable status_code cannot be null'); } - $this->container['failure_count'] = $failure_count; + $this->container['status_code'] = $status_code; return $this; } /** - * Gets status + * Gets format * - * @return int|null + * @return string|null */ - public function getStatus() { - return $this->container['status']; + public function getFormat() { + return $this->container['format']; } /** - * Sets status + * Sets format * - * @param int|null $status Status code of last request + * @param string|null $format The payload format used for this delivery. * * @return self */ - public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + public function setFormat($format) { + if (is_null($format)) { + throw new \InvalidArgumentException('non-nullable format cannot be null'); } - $this->container['status'] = $status; + $this->container['format'] = $format; return $this; } @@ -471,7 +471,7 @@ public function setStatus($status) { /** * Gets employee_ids * - * @return int[]|null + * @return string[]|null */ public function getEmployeeIds() { return $this->container['employee_ids']; @@ -480,7 +480,7 @@ public function getEmployeeIds() { /** * Sets employee_ids * - * @param int[]|null $employee_ids A list of employee ids that were changed. + * @param string[]|null $employee_ids Array of employee IDs included in the webhook payload, returned as strings. * * @return self */ diff --git a/lib/Model/UnauthorizedErrorsInner.php b/lib/Model/WebhookLogListResponse.php similarity index 95% rename from lib/Model/UnauthorizedErrorsInner.php rename to lib/Model/WebhookLogListResponse.php index a2beebd9..67e13be7 100644 --- a/lib/Model/UnauthorizedErrorsInner.php +++ b/lib/Model/WebhookLogListResponse.php @@ -1,7 +1,7 @@ <?php declare(strict_types=1); /** - * UnauthorizedErrorsInner + * WebhookLogListResponse * * PHP version 8.1 * @@ -33,7 +33,7 @@ use \BhrSdk\ObjectSerializer; /** - * UnauthorizedErrorsInner Class Doc Comment + * WebhookLogListResponse Class Doc Comment * * @category Class * @package BhrSdk @@ -41,7 +41,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess<string, mixed> */ -class UnauthorizedErrorsInner implements ModelInterface, ArrayAccess, \JsonSerializable { +class WebhookLogListResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; /** @@ -49,7 +49,7 @@ class UnauthorizedErrorsInner implements ModelInterface, ArrayAccess, \JsonSeria * * @var string */ - protected static $openApiModelName = 'Unauthorized_errors_inner'; + protected static $openApiModelName = 'WebhookLogListResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,7 @@ class UnauthorizedErrorsInner implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openApiTypes = [ - 'error' => 'string' + 'error' => '\BhrSdk\Model\WebhookLogRateLimitResponseError' ]; /** @@ -279,7 +279,7 @@ public function valid() { /** * Gets error * - * @return string|null + * @return \BhrSdk\Model\WebhookLogRateLimitResponseError|null */ public function getError() { return $this->container['error']; @@ -288,7 +288,7 @@ public function getError() { /** * Sets error * - * @param string|null $error error + * @param \BhrSdk\Model\WebhookLogRateLimitResponseError|null $error error * * @return self */ diff --git a/lib/Model/WebhookLogRateLimitResponse.php b/lib/Model/WebhookLogRateLimitResponse.php new file mode 100644 index 00000000..195a6782 --- /dev/null +++ b/lib/Model/WebhookLogRateLimitResponse.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * WebhookLogRateLimitResponse + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookLogRateLimitResponse Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookLogRateLimitResponse implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookLogRateLimitResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'error' => '\BhrSdk\Model\WebhookLogRateLimitResponseError' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'error' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'error' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('error', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return \BhrSdk\Model\WebhookLogRateLimitResponseError|null + */ + public function getError() { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \BhrSdk\Model\WebhookLogRateLimitResponseError|null $error error + * + * @return self + */ + public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhookLogRateLimitResponseError.php b/lib/Model/WebhookLogRateLimitResponseError.php new file mode 100644 index 00000000..bdb70f46 --- /dev/null +++ b/lib/Model/WebhookLogRateLimitResponseError.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * WebhookLogRateLimitResponseError + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookLogRateLimitResponseError Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookLogRateLimitResponseError implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookLogRateLimitResponse_error'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'code' => 'int', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'code' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'code' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('message', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets code + * + * @return int|null + */ + public function getCode() { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code code + * + * @return self + */ + public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhookSubErrorProperty.php b/lib/Model/WebhookSubErrorProperty.php index 0561a0e3..b003728a 100644 --- a/lib/Model/WebhookSubErrorProperty.php +++ b/lib/Model/WebhookSubErrorProperty.php @@ -59,9 +59,9 @@ class WebhookSubErrorProperty implements ModelInterface, ArrayAccess, \JsonSeria protected static $openApiTypes = [ 'error' => 'string', 'unknown_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInner[]', - 'monitor_fields' => '\BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]', + 'monitor_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]', 'duplicate_post_string' => 'string[]', - 'post_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]' + 'post_fields' => '\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]' ]; /** @@ -357,7 +357,7 @@ public function setUnknownFields($unknown_fields) { /** * Gets monitor_fields * - * @return \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]|null + * @return \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null */ public function getMonitorFields() { return $this->container['monitor_fields']; @@ -366,7 +366,7 @@ public function getMonitorFields() { /** * Sets monitor_fields * - * @param \BhrSdk\Model\TimeTrackingRecordSchemaProjectTask[]|null $monitor_fields monitor_fields + * @param \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null $monitor_fields monitor_fields * * @return self */ @@ -407,7 +407,7 @@ public function setDuplicatePostString($duplicate_post_string) { /** * Gets post_fields * - * @return \BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]|null + * @return \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null */ public function getPostFields() { return $this->container['post_fields']; @@ -416,7 +416,7 @@ public function getPostFields() { /** * Sets post_fields * - * @param \BhrSdk\Model\WebhookSubErrorPropertyPostFieldsInner[]|null $post_fields post_fields + * @param \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInner[]|null $post_fields post_fields * * @return self */ diff --git a/lib/Model/WebhookSubErrorPropertyMonitorFieldsInner.php b/lib/Model/WebhookSubErrorPropertyMonitorFieldsInner.php new file mode 100644 index 00000000..d07bd0d3 --- /dev/null +++ b/lib/Model/WebhookSubErrorPropertyMonitorFieldsInner.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * WebhookSubErrorPropertyMonitorFieldsInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookSubErrorPropertyMonitorFieldsInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookSubErrorPropertyMonitorFieldsInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookSubErrorProperty_monitorFields_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => '\BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInnerId', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInnerId|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param \BhrSdk\Model\WebhookSubErrorPropertyMonitorFieldsInnerId|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.php b/lib/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.php new file mode 100644 index 00000000..4a00acdb --- /dev/null +++ b/lib/Model/WebhookSubErrorPropertyMonitorFieldsInnerId.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * WebhookSubErrorPropertyMonitorFieldsInnerId + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookSubErrorPropertyMonitorFieldsInnerId Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookSubErrorPropertyMonitorFieldsInnerId implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookSubErrorProperty_monitorFields_inner_id'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhookSubErrorPropertyUnknownFieldsInner.php b/lib/Model/WebhookSubErrorPropertyUnknownFieldsInner.php index 534379b7..f6c85165 100644 --- a/lib/Model/WebhookSubErrorPropertyUnknownFieldsInner.php +++ b/lib/Model/WebhookSubErrorPropertyUnknownFieldsInner.php @@ -57,7 +57,7 @@ class WebhookSubErrorPropertyUnknownFieldsInner implements ModelInterface, Array * @var string[] */ protected static $openApiTypes = [ - 'id' => 'int', + 'id' => '\BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInnerId', 'name' => 'string' ]; @@ -286,7 +286,7 @@ public function valid() { /** * Gets id * - * @return int|null + * @return \BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInnerId|null */ public function getId() { return $this->container['id']; @@ -295,7 +295,7 @@ public function getId() { /** * Sets id * - * @param int|null $id id + * @param \BhrSdk\Model\WebhookSubErrorPropertyUnknownFieldsInnerId|null $id id * * @return self */ diff --git a/lib/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.php b/lib/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.php new file mode 100644 index 00000000..d2959839 --- /dev/null +++ b/lib/Model/WebhookSubErrorPropertyUnknownFieldsInnerId.php @@ -0,0 +1,363 @@ +<?php +declare(strict_types=1); +/** + * WebhookSubErrorPropertyUnknownFieldsInnerId + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WebhookSubErrorPropertyUnknownFieldsInnerId Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WebhookSubErrorPropertyUnknownFieldsInnerId implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WebhookSubErrorProperty_unknownFields_inner_id'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/WebhooksListWebhooksInner.php b/lib/Model/WebhooksListWebhooksInner.php index 03757619..54890781 100644 --- a/lib/Model/WebhooksListWebhooksInner.php +++ b/lib/Model/WebhooksListWebhooksInner.php @@ -89,7 +89,7 @@ class WebhooksListWebhooksInner implements ModelInterface, ArrayAccess, \JsonSer 'id' => false, 'name' => false, 'created' => false, - 'last_sent' => false, + 'last_sent' => true, 'url' => false ]; @@ -366,7 +366,7 @@ public function getCreated() { /** * Sets created * - * @param string|null $created The creation date of the webhook. + * @param string|null $created Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS). * * @return self */ @@ -391,13 +391,19 @@ public function getLastSent() { /** * Sets last_sent * - * @param string|null $last_sent The date the webhook was last sent. + * @param string|null $last_sent last_sent * * @return self */ public function setLastSent($last_sent) { if (is_null($last_sent)) { - throw new \InvalidArgumentException('non-nullable last_sent cannot be null'); + $this->openApiNullablesSetToNull['last_sent'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['last_sent'])) { + unset($nullablesSetToNull['last_sent']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } } $this->container['last_sent'] = $last_sent; @@ -416,7 +422,7 @@ public function getUrl() { /** * Sets url * - * @param string|null $url The url of the webhook. + * @param string|null $url The URL the webhook sends data to. * * @return self */ diff --git a/lib/Model/WhosOutEntry.php b/lib/Model/WhosOutEntry.php new file mode 100644 index 00000000..228e02cd --- /dev/null +++ b/lib/Model/WhosOutEntry.php @@ -0,0 +1,582 @@ +<?php +declare(strict_types=1); +/** + * WhosOutEntry + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * WhosOutEntry Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class WhosOutEntry implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'WhosOutEntry'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'int', + 'type' => 'string', + 'employee_id' => 'int', + 'name' => 'string', + 'start' => '\DateTime', + 'end' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'type' => null, + 'employee_id' => null, + 'name' => null, + 'start' => 'date', + 'end' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'type' => false, + 'employee_id' => false, + 'name' => false, + 'start' => false, + 'end' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'employee_id' => 'employeeId', + 'name' => 'name', + 'start' => 'start', + 'end' => 'end' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'employee_id' => 'setEmployeeId', + 'name' => 'setName', + 'start' => 'setStart', + 'end' => 'setEnd' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'employee_id' => 'getEmployeeId', + 'name' => 'getName', + 'start' => 'getStart', + 'end' => 'getEnd' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const TYPE_TIME_OFF = 'timeOff'; + public const TYPE_HOLIDAY = 'holiday'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() { + return [ + self::TYPE_TIME_OFF, + self::TYPE_HOLIDAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('end', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id The time off request ID or holiday ID. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Whether this entry is a time off request or a company holiday. Entries have two shapes depending on `type`: `timeOff` entries include `employeeId` and `name` (the employee's name); `holiday` entries include only `name` (the holiday name) and omit `employeeId`. Always check `type` before accessing `employeeId`. + * + * @return self + */ + public function setType($type) { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets employee_id + * + * @return int|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int|null $employee_id The employee ID. Only present for `timeOff` entries; omitted for `holiday` entries. + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + throw new \InvalidArgumentException('non-nullable employee_id cannot be null'); + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name For `timeOff` entries, the employee's name. For `holiday` entries, the holiday's name. + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets start + * + * @return \DateTime|null + */ + public function getStart() { + return $this->container['start']; + } + + /** + * Sets start + * + * @param \DateTime|null $start Start date in YYYY-MM-DD format. + * + * @return self + */ + public function setStart($start) { + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); + } + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return \DateTime|null + */ + public function getEnd() { + return $this->container['end']; + } + + /** + * Sets end + * + * @param \DateTime|null $end End date in YYYY-MM-DD format. + * + * @return self + */ + public function setEnd($end) { + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); + } + $this->container['end'] = $end; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/XmlEmployeeFiles.php b/lib/Model/XmlEmployeeFiles.php new file mode 100644 index 00000000..0a577546 --- /dev/null +++ b/lib/Model/XmlEmployeeFiles.php @@ -0,0 +1,420 @@ +<?php +declare(strict_types=1); +/** + * XmlEmployeeFiles + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * XmlEmployeeFiles Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class XmlEmployeeFiles implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'XmlEmployeeFiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'category' => '\BhrSdk\Model\XmlEmployeeFilesCategoryInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'category' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'category' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'category' => 'category' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'category' => 'setCategory' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'category' => 'getCategory' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('category', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Employee ID on the root `<employee>` element. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets category + * + * @return \BhrSdk\Model\XmlEmployeeFilesCategoryInner[]|null + */ + public function getCategory() { + return $this->container['category']; + } + + /** + * Sets category + * + * @param \BhrSdk\Model\XmlEmployeeFilesCategoryInner[]|null $category category + * + * @return self + */ + public function setCategory($category) { + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); + } + $this->container['category'] = $category; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/XmlEmployeeFilesCategoryInner.php b/lib/Model/XmlEmployeeFilesCategoryInner.php new file mode 100644 index 00000000..17256727 --- /dev/null +++ b/lib/Model/XmlEmployeeFilesCategoryInner.php @@ -0,0 +1,719 @@ +<?php +declare(strict_types=1); +/** + * XmlEmployeeFilesCategoryInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * XmlEmployeeFilesCategoryInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class XmlEmployeeFilesCategoryInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'XmlEmployeeFiles_category_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'can_rename_category' => 'string', + 'can_delete_category' => 'string', + 'can_upload_files' => 'string', + 'display_if_empty' => 'string', + 'file' => '\BhrSdk\Model\XmlEmployeeFilesCategoryInnerFileInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'can_rename_category' => null, + 'can_delete_category' => null, + 'can_upload_files' => null, + 'display_if_empty' => null, + 'file' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => true, + 'can_rename_category' => false, + 'can_delete_category' => false, + 'can_upload_files' => false, + 'display_if_empty' => false, + 'file' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'can_rename_category' => 'canRenameCategory', + 'can_delete_category' => 'canDeleteCategory', + 'can_upload_files' => 'canUploadFiles', + 'display_if_empty' => 'displayIfEmpty', + 'file' => 'file' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'can_rename_category' => 'setCanRenameCategory', + 'can_delete_category' => 'setCanDeleteCategory', + 'can_upload_files' => 'setCanUploadFiles', + 'display_if_empty' => 'setDisplayIfEmpty', + 'file' => 'setFile' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'can_rename_category' => 'getCanRenameCategory', + 'can_delete_category' => 'getCanDeleteCategory', + 'can_upload_files' => 'getCanUploadFiles', + 'display_if_empty' => 'getDisplayIfEmpty', + 'file' => 'getFile' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const CAN_RENAME_CATEGORY_YES = 'yes'; + public const CAN_RENAME_CATEGORY_NO = 'no'; + public const CAN_DELETE_CATEGORY_YES = 'yes'; + public const CAN_DELETE_CATEGORY_NO = 'no'; + public const CAN_UPLOAD_FILES_YES = 'yes'; + public const CAN_UPLOAD_FILES_NO = 'no'; + public const DISPLAY_IF_EMPTY_YES = 'yes'; + public const DISPLAY_IF_EMPTY_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanRenameCategoryAllowableValues() { + return [ + self::CAN_RENAME_CATEGORY_YES, + self::CAN_RENAME_CATEGORY_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanDeleteCategoryAllowableValues() { + return [ + self::CAN_DELETE_CATEGORY_YES, + self::CAN_DELETE_CATEGORY_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanUploadFilesAllowableValues() { + return [ + self::CAN_UPLOAD_FILES_YES, + self::CAN_UPLOAD_FILES_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDisplayIfEmptyAllowableValues() { + return [ + self::DISPLAY_IF_EMPTY_YES, + self::DISPLAY_IF_EMPTY_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('can_rename_category', $data ?? [], null); + $this->setIfExists('can_delete_category', $data ?? [], null); + $this->setIfExists('can_upload_files', $data ?? [], null); + $this->setIfExists('display_if_empty', $data ?? [], null); + $this->setIfExists('file', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getCanRenameCategoryAllowableValues(); + if (!is_null($this->container['can_rename_category']) && !in_array($this->container['can_rename_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_rename_category', must be one of '%s'", + $this->container['can_rename_category'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanDeleteCategoryAllowableValues(); + if (!is_null($this->container['can_delete_category']) && !in_array($this->container['can_delete_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_delete_category', must be one of '%s'", + $this->container['can_delete_category'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!is_null($this->container['can_upload_files']) && !in_array($this->container['can_upload_files'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_upload_files', must be one of '%s'", + $this->container['can_upload_files'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDisplayIfEmptyAllowableValues(); + if (!is_null($this->container['display_if_empty']) && !in_array($this->container['display_if_empty'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'display_if_empty', must be one of '%s'", + $this->container['display_if_empty'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Category ID on the `<category>` element. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets can_rename_category + * + * @return string|null + */ + public function getCanRenameCategory() { + return $this->container['can_rename_category']; + } + + /** + * Sets can_rename_category + * + * @param string|null $can_rename_category can_rename_category + * + * @return self + */ + public function setCanRenameCategory($can_rename_category) { + if (is_null($can_rename_category)) { + throw new \InvalidArgumentException('non-nullable can_rename_category cannot be null'); + } + $allowedValues = $this->getCanRenameCategoryAllowableValues(); + if (!in_array($can_rename_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_rename_category', must be one of '%s'", + $can_rename_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_rename_category'] = $can_rename_category; + + return $this; + } + + /** + * Gets can_delete_category + * + * @return string|null + */ + public function getCanDeleteCategory() { + return $this->container['can_delete_category']; + } + + /** + * Sets can_delete_category + * + * @param string|null $can_delete_category can_delete_category + * + * @return self + */ + public function setCanDeleteCategory($can_delete_category) { + if (is_null($can_delete_category)) { + throw new \InvalidArgumentException('non-nullable can_delete_category cannot be null'); + } + $allowedValues = $this->getCanDeleteCategoryAllowableValues(); + if (!in_array($can_delete_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_delete_category', must be one of '%s'", + $can_delete_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_delete_category'] = $can_delete_category; + + return $this; + } + + /** + * Gets can_upload_files + * + * @return string|null + */ + public function getCanUploadFiles() { + return $this->container['can_upload_files']; + } + + /** + * Sets can_upload_files + * + * @param string|null $can_upload_files can_upload_files + * + * @return self + */ + public function setCanUploadFiles($can_upload_files) { + if (is_null($can_upload_files)) { + throw new \InvalidArgumentException('non-nullable can_upload_files cannot be null'); + } + $allowedValues = $this->getCanUploadFilesAllowableValues(); + if (!in_array($can_upload_files, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_upload_files', must be one of '%s'", + $can_upload_files, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_upload_files'] = $can_upload_files; + + return $this; + } + + /** + * Gets display_if_empty + * + * @return string|null + */ + public function getDisplayIfEmpty() { + return $this->container['display_if_empty']; + } + + /** + * Sets display_if_empty + * + * @param string|null $display_if_empty display_if_empty + * + * @return self + */ + public function setDisplayIfEmpty($display_if_empty) { + if (is_null($display_if_empty)) { + throw new \InvalidArgumentException('non-nullable display_if_empty cannot be null'); + } + $allowedValues = $this->getDisplayIfEmptyAllowableValues(); + if (!in_array($display_if_empty, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'display_if_empty', must be one of '%s'", + $display_if_empty, + implode("', '", $allowedValues) + ) + ); + } + $this->container['display_if_empty'] = $display_if_empty; + + return $this; + } + + /** + * Gets file + * + * @return \BhrSdk\Model\XmlEmployeeFilesCategoryInnerFileInner[]|null + */ + public function getFile() { + return $this->container['file']; + } + + /** + * Sets file + * + * @param \BhrSdk\Model\XmlEmployeeFilesCategoryInnerFileInner[]|null $file file + * + * @return self + */ + public function setFile($file) { + if (is_null($file)) { + throw new \InvalidArgumentException('non-nullable file cannot be null'); + } + $this->container['file'] = $file; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/XmlEmployeeFilesCategoryInnerFileInner.php b/lib/Model/XmlEmployeeFilesCategoryInnerFileInner.php new file mode 100644 index 00000000..23647d84 --- /dev/null +++ b/lib/Model/XmlEmployeeFilesCategoryInnerFileInner.php @@ -0,0 +1,827 @@ +<?php +declare(strict_types=1); +/** + * XmlEmployeeFilesCategoryInnerFileInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * XmlEmployeeFilesCategoryInnerFileInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class XmlEmployeeFilesCategoryInnerFileInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = 'XmlEmployeeFiles_category_inner_file_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'name' => 'string', + 'original_file_name' => 'string', + 'size' => 'string', + 'date_created' => 'string', + 'created_by' => 'string', + 'share_with_employee' => 'string', + 'can_rename_file' => 'string', + 'can_delete_file' => 'string', + 'can_change_share_with_employee_field_value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'name' => null, + 'original_file_name' => null, + 'size' => null, + 'date_created' => null, + 'created_by' => null, + 'share_with_employee' => null, + 'can_rename_file' => null, + 'can_delete_file' => null, + 'can_change_share_with_employee_field_value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => false, + 'name' => true, + 'original_file_name' => true, + 'size' => false, + 'date_created' => false, + 'created_by' => true, + 'share_with_employee' => false, + 'can_rename_file' => false, + 'can_delete_file' => false, + 'can_change_share_with_employee_field_value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'original_file_name' => 'originalFileName', + 'size' => 'size', + 'date_created' => 'dateCreated', + 'created_by' => 'createdBy', + 'share_with_employee' => 'shareWithEmployee', + 'can_rename_file' => 'canRenameFile', + 'can_delete_file' => 'canDeleteFile', + 'can_change_share_with_employee_field_value' => 'canChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'original_file_name' => 'setOriginalFileName', + 'size' => 'setSize', + 'date_created' => 'setDateCreated', + 'created_by' => 'setCreatedBy', + 'share_with_employee' => 'setShareWithEmployee', + 'can_rename_file' => 'setCanRenameFile', + 'can_delete_file' => 'setCanDeleteFile', + 'can_change_share_with_employee_field_value' => 'setCanChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'original_file_name' => 'getOriginalFileName', + 'size' => 'getSize', + 'date_created' => 'getDateCreated', + 'created_by' => 'getCreatedBy', + 'share_with_employee' => 'getShareWithEmployee', + 'can_rename_file' => 'getCanRenameFile', + 'can_delete_file' => 'getCanDeleteFile', + 'can_change_share_with_employee_field_value' => 'getCanChangeShareWithEmployeeFieldValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + public const SHARE_WITH_EMPLOYEE_YES = 'yes'; + public const SHARE_WITH_EMPLOYEE_NO = 'no'; + public const CAN_RENAME_FILE_YES = 'yes'; + public const CAN_RENAME_FILE_NO = 'no'; + public const CAN_DELETE_FILE_YES = 'yes'; + public const CAN_DELETE_FILE_NO = 'no'; + public const CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_YES = 'yes'; + public const CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_NO = 'no'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShareWithEmployeeAllowableValues() { + return [ + self::SHARE_WITH_EMPLOYEE_YES, + self::SHARE_WITH_EMPLOYEE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanRenameFileAllowableValues() { + return [ + self::CAN_RENAME_FILE_YES, + self::CAN_RENAME_FILE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanDeleteFileAllowableValues() { + return [ + self::CAN_DELETE_FILE_YES, + self::CAN_DELETE_FILE_NO, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCanChangeShareWithEmployeeFieldValueAllowableValues() { + return [ + self::CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_YES, + self::CAN_CHANGE_SHARE_WITH_EMPLOYEE_FIELD_VALUE_NO, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('original_file_name', $data ?? [], null); + $this->setIfExists('size', $data ?? [], null); + $this->setIfExists('date_created', $data ?? [], null); + $this->setIfExists('created_by', $data ?? [], null); + $this->setIfExists('share_with_employee', $data ?? [], null); + $this->setIfExists('can_rename_file', $data ?? [], null); + $this->setIfExists('can_delete_file', $data ?? [], null); + $this->setIfExists('can_change_share_with_employee_field_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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!is_null($this->container['share_with_employee']) && !in_array($this->container['share_with_employee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'share_with_employee', must be one of '%s'", + $this->container['share_with_employee'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!is_null($this->container['can_rename_file']) && !in_array($this->container['can_rename_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_rename_file', must be one of '%s'", + $this->container['can_rename_file'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!is_null($this->container['can_delete_file']) && !in_array($this->container['can_delete_file'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_delete_file', must be one of '%s'", + $this->container['can_delete_file'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCanChangeShareWithEmployeeFieldValueAllowableValues(); + if (!is_null($this->container['can_change_share_with_employee_field_value']) && !in_array($this->container['can_change_share_with_employee_field_value'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'can_change_share_with_employee_field_value', must be one of '%s'", + $this->container['can_change_share_with_employee_field_value'], + implode("', '", $allowedValues) + ); + } + + 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id File ID on the `<file>` element. + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) { + if (is_null($name)) { + $this->openApiNullablesSetToNull['name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['name'])) { + unset($nullablesSetToNull['name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets original_file_name + * + * @return string|null + */ + public function getOriginalFileName() { + return $this->container['original_file_name']; + } + + /** + * Sets original_file_name + * + * @param string|null $original_file_name original_file_name + * + * @return self + */ + public function setOriginalFileName($original_file_name) { + if (is_null($original_file_name)) { + $this->openApiNullablesSetToNull['original_file_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['original_file_name'])) { + unset($nullablesSetToNull['original_file_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['original_file_name'] = $original_file_name; + + return $this; + } + + /** + * Gets size + * + * @return string|null + */ + public function getSize() { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string|null $size File size in bytes (serialized as string in XML). + * + * @return self + */ + public function setSize($size) { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets date_created + * + * @return string|null + */ + public function getDateCreated() { + return $this->container['date_created']; + } + + /** + * Sets date_created + * + * @param string|null $date_created UTC creation timestamp in `YYYY-MM-DD HH:MM:SS` format. + * + * @return self + */ + public function setDateCreated($date_created) { + if (is_null($date_created)) { + throw new \InvalidArgumentException('non-nullable date_created cannot be null'); + } + $this->container['date_created'] = $date_created; + + return $this; + } + + /** + * Gets created_by + * + * @return string|null + */ + public function getCreatedBy() { + return $this->container['created_by']; + } + + /** + * Sets created_by + * + * @param string|null $created_by created_by + * + * @return self + */ + public function setCreatedBy($created_by) { + if (is_null($created_by)) { + $this->openApiNullablesSetToNull['created_by'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['created_by'])) { + unset($nullablesSetToNull['created_by']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['created_by'] = $created_by; + + return $this; + } + + /** + * Gets share_with_employee + * + * @return string|null + */ + public function getShareWithEmployee() { + return $this->container['share_with_employee']; + } + + /** + * Sets share_with_employee + * + * @param string|null $share_with_employee share_with_employee + * + * @return self + */ + public function setShareWithEmployee($share_with_employee) { + if (is_null($share_with_employee)) { + throw new \InvalidArgumentException('non-nullable share_with_employee cannot be null'); + } + $allowedValues = $this->getShareWithEmployeeAllowableValues(); + if (!in_array($share_with_employee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'share_with_employee', must be one of '%s'", + $share_with_employee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['share_with_employee'] = $share_with_employee; + + return $this; + } + + /** + * Gets can_rename_file + * + * @return string|null + */ + public function getCanRenameFile() { + return $this->container['can_rename_file']; + } + + /** + * Sets can_rename_file + * + * @param string|null $can_rename_file can_rename_file + * + * @return self + */ + public function setCanRenameFile($can_rename_file) { + if (is_null($can_rename_file)) { + throw new \InvalidArgumentException('non-nullable can_rename_file cannot be null'); + } + $allowedValues = $this->getCanRenameFileAllowableValues(); + if (!in_array($can_rename_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_rename_file', must be one of '%s'", + $can_rename_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_rename_file'] = $can_rename_file; + + return $this; + } + + /** + * Gets can_delete_file + * + * @return string|null + */ + public function getCanDeleteFile() { + return $this->container['can_delete_file']; + } + + /** + * Sets can_delete_file + * + * @param string|null $can_delete_file can_delete_file + * + * @return self + */ + public function setCanDeleteFile($can_delete_file) { + if (is_null($can_delete_file)) { + throw new \InvalidArgumentException('non-nullable can_delete_file cannot be null'); + } + $allowedValues = $this->getCanDeleteFileAllowableValues(); + if (!in_array($can_delete_file, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_delete_file', must be one of '%s'", + $can_delete_file, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_delete_file'] = $can_delete_file; + + return $this; + } + + /** + * Gets can_change_share_with_employee_field_value + * + * @return string|null + */ + public function getCanChangeShareWithEmployeeFieldValue() { + return $this->container['can_change_share_with_employee_field_value']; + } + + /** + * Sets can_change_share_with_employee_field_value + * + * @param string|null $can_change_share_with_employee_field_value can_change_share_with_employee_field_value + * + * @return self + */ + public function setCanChangeShareWithEmployeeFieldValue($can_change_share_with_employee_field_value) { + if (is_null($can_change_share_with_employee_field_value)) { + throw new \InvalidArgumentException('non-nullable can_change_share_with_employee_field_value cannot be null'); + } + $allowedValues = $this->getCanChangeShareWithEmployeeFieldValueAllowableValues(); + if (!in_array($can_change_share_with_employee_field_value, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'can_change_share_with_employee_field_value', must be one of '%s'", + $can_change_share_with_employee_field_value, + implode("', '", $allowedValues) + ) + ); + } + $this->container['can_change_share_with_employee_field_value'] = $can_change_share_with_employee_field_value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php b/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php new file mode 100644 index 00000000..2cd40262 --- /dev/null +++ b/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequest.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * _1d1fc0f164cb51973a0206b8e2fb2d2dRequest + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _1d1fc0f164cb51973a0206b8e2fb2d2dRequest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _1d1fc0f164cb51973a0206b8e2fb2d2dRequest implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_1d1fc0f164cb51973a0206b8e2fb2d2d_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'budget_breakdown' => '\BhrSdk\Model\Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'budget_breakdown' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'budget_breakdown' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'budget_breakdown' => 'budgetBreakdown' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'budget_breakdown' => 'setBudgetBreakdown' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'budget_breakdown' => 'getBudgetBreakdown' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('budget_breakdown', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['budget_breakdown'] === null) { + $invalidProperties[] = "'budget_breakdown' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets budget_breakdown + * + * @return \BhrSdk\Model\Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner[] + */ + public function getBudgetBreakdown() { + return $this->container['budget_breakdown']; + } + + /** + * Sets budget_breakdown + * + * @param \BhrSdk\Model\Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner[] $budget_breakdown budget_breakdown + * + * @return self + */ + public function setBudgetBreakdown($budget_breakdown) { + if (is_null($budget_breakdown)) { + throw new \InvalidArgumentException('non-nullable budget_breakdown cannot be null'); + } + $this->container['budget_breakdown'] = $budget_breakdown; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.php b/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.php new file mode 100644 index 00000000..24a0c46f --- /dev/null +++ b/lib/Model/_1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.php @@ -0,0 +1,546 @@ +<?php +declare(strict_types=1); +/** + * _1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_1d1fc0f164cb51973a0206b8e2fb2d2d_request_budgetBreakdown_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_name' => 'string', + 'email_address' => 'string', + 'salary_budget' => 'float', + 'bonus_budget' => 'float', + 'equity_budget' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_name' => null, + 'email_address' => null, + 'salary_budget' => null, + 'bonus_budget' => null, + 'equity_budget' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_name' => true, + 'email_address' => true, + 'salary_budget' => true, + 'bonus_budget' => true, + 'equity_budget' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_name' => 'employeeName', + 'email_address' => 'emailAddress', + 'salary_budget' => 'salaryBudget', + 'bonus_budget' => 'bonusBudget', + 'equity_budget' => 'equityBudget' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_name' => 'setEmployeeName', + 'email_address' => 'setEmailAddress', + 'salary_budget' => 'setSalaryBudget', + 'bonus_budget' => 'setBonusBudget', + 'equity_budget' => 'setEquityBudget' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_name' => 'getEmployeeName', + 'email_address' => 'getEmailAddress', + 'salary_budget' => 'getSalaryBudget', + 'bonus_budget' => 'getBonusBudget', + 'equity_budget' => 'getEquityBudget' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_name', $data ?? [], null); + $this->setIfExists('email_address', $data ?? [], null); + $this->setIfExists('salary_budget', $data ?? [], null); + $this->setIfExists('bonus_budget', $data ?? [], null); + $this->setIfExists('equity_budget', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_name + * + * @return string|null + */ + public function getEmployeeName() { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string|null $employee_name employee_name + * + * @return self + */ + public function setEmployeeName($employee_name) { + if (is_null($employee_name)) { + $this->openApiNullablesSetToNull['employee_name'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_name'])) { + unset($nullablesSetToNull['employee_name']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets email_address + * + * @return string|null + */ + public function getEmailAddress() { + return $this->container['email_address']; + } + + /** + * Sets email_address + * + * @param string|null $email_address email_address + * + * @return self + */ + public function setEmailAddress($email_address) { + if (is_null($email_address)) { + $this->openApiNullablesSetToNull['email_address'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['email_address'])) { + unset($nullablesSetToNull['email_address']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['email_address'] = $email_address; + + return $this; + } + + /** + * Gets salary_budget + * + * @return float|null + */ + public function getSalaryBudget() { + return $this->container['salary_budget']; + } + + /** + * Sets salary_budget + * + * @param float|null $salary_budget salary_budget + * + * @return self + */ + public function setSalaryBudget($salary_budget) { + if (is_null($salary_budget)) { + $this->openApiNullablesSetToNull['salary_budget'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['salary_budget'])) { + unset($nullablesSetToNull['salary_budget']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['salary_budget'] = $salary_budget; + + return $this; + } + + /** + * Gets bonus_budget + * + * @return float|null + */ + public function getBonusBudget() { + return $this->container['bonus_budget']; + } + + /** + * Sets bonus_budget + * + * @param float|null $bonus_budget bonus_budget + * + * @return self + */ + public function setBonusBudget($bonus_budget) { + if (is_null($bonus_budget)) { + $this->openApiNullablesSetToNull['bonus_budget'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['bonus_budget'])) { + unset($nullablesSetToNull['bonus_budget']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bonus_budget'] = $bonus_budget; + + return $this; + } + + /** + * Gets equity_budget + * + * @return float|null + */ + public function getEquityBudget() { + return $this->container['equity_budget']; + } + + /** + * Sets equity_budget + * + * @param float|null $equity_budget equity_budget + * + * @return self + */ + public function setEquityBudget($equity_budget) { + if (is_null($equity_budget)) { + $this->openApiNullablesSetToNull['equity_budget'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['equity_budget'])) { + unset($nullablesSetToNull['equity_budget']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['equity_budget'] = $equity_budget; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.php b/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.php new file mode 100644 index 00000000..fb795e8d --- /dev/null +++ b/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInner.php @@ -0,0 +1,464 @@ +<?php +declare(strict_types=1); +/** + * _1d64402ee192568adbd5e3179a91e6e2RequestInner + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _1d64402ee192568adbd5e3179a91e6e2RequestInner Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _1d64402ee192568adbd5e3179a91e6e2RequestInner implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_1d64402ee192568adbd5e3179a91e6e2_request_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'id' => 'string', + 'employee_id' => 'string', + 'budget_allocations' => '\BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'id' => null, + 'employee_id' => null, + 'budget_allocations' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'id' => true, + 'employee_id' => true, + 'budget_allocations' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'employee_id' => 'employeeId', + 'budget_allocations' => 'budgetAllocations' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'employee_id' => 'setEmployeeId', + 'budget_allocations' => 'setBudgetAllocations' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'employee_id' => 'getEmployeeId', + 'budget_allocations' => 'getBudgetAllocations' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('employee_id', $data ?? [], null); + $this->setIfExists('budget_allocations', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) { + if (is_null($id)) { + $this->openApiNullablesSetToNull['id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['id'])) { + unset($nullablesSetToNull['id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets employee_id + * + * @return string|null + */ + public function getEmployeeId() { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param string|null $employee_id employee_id + * + * @return self + */ + public function setEmployeeId($employee_id) { + if (is_null($employee_id)) { + $this->openApiNullablesSetToNull['employee_id'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['employee_id'])) { + unset($nullablesSetToNull['employee_id']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets budget_allocations + * + * @return \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations|null + */ + public function getBudgetAllocations() { + return $this->container['budget_allocations']; + } + + /** + * Sets budget_allocations + * + * @param \BhrSdk\Model\Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations|null $budget_allocations budget_allocations + * + * @return self + */ + public function setBudgetAllocations($budget_allocations) { + if (is_null($budget_allocations)) { + throw new \InvalidArgumentException('non-nullable budget_allocations cannot be null'); + } + $this->container['budget_allocations'] = $budget_allocations; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.php b/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.php new file mode 100644 index 00000000..dbfe7f36 --- /dev/null +++ b/lib/Model/_1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.php @@ -0,0 +1,470 @@ +<?php +declare(strict_types=1); +/** + * _1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_1d64402ee192568adbd5e3179a91e6e2_request_inner_budgetAllocations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'salary_increase' => 'float', + 'bonuses' => 'float', + 'equity' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'salary_increase' => null, + 'bonuses' => null, + 'equity' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'salary_increase' => true, + 'bonuses' => true, + 'equity' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'salary_increase' => 'salaryIncrease', + 'bonuses' => 'bonuses', + 'equity' => 'equity' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'salary_increase' => 'setSalaryIncrease', + 'bonuses' => 'setBonuses', + 'equity' => 'setEquity' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'salary_increase' => 'getSalaryIncrease', + 'bonuses' => 'getBonuses', + 'equity' => 'getEquity' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('salary_increase', $data ?? [], null); + $this->setIfExists('bonuses', $data ?? [], null); + $this->setIfExists('equity', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets salary_increase + * + * @return float|null + */ + public function getSalaryIncrease() { + return $this->container['salary_increase']; + } + + /** + * Sets salary_increase + * + * @param float|null $salary_increase salary_increase + * + * @return self + */ + public function setSalaryIncrease($salary_increase) { + if (is_null($salary_increase)) { + $this->openApiNullablesSetToNull['salary_increase'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['salary_increase'])) { + unset($nullablesSetToNull['salary_increase']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['salary_increase'] = $salary_increase; + + return $this; + } + + /** + * Gets bonuses + * + * @return float|null + */ + public function getBonuses() { + return $this->container['bonuses']; + } + + /** + * Sets bonuses + * + * @param float|null $bonuses bonuses + * + * @return self + */ + public function setBonuses($bonuses) { + if (is_null($bonuses)) { + $this->openApiNullablesSetToNull['bonuses'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['bonuses'])) { + unset($nullablesSetToNull['bonuses']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bonuses'] = $bonuses; + + return $this; + } + + /** + * Gets equity + * + * @return float|null + */ + public function getEquity() { + return $this->container['equity']; + } + + /** + * Sets equity + * + * @param float|null $equity equity + * + * @return self + */ + public function setEquity($equity) { + if (is_null($equity)) { + $this->openApiNullablesSetToNull['equity'] = true; + } else { + $nullablesSetToNull = $this->getOpenApiNullablesSetToNull(); + if (isset($nullablesSetToNull['equity'])) { + unset($nullablesSetToNull['equity']); + $this->setOpenApiNullablesSetToNull($nullablesSetToNull); + } + } + $this->container['equity'] = $equity; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_288aa996aba16d7a495c62321ea999a9Request.php b/lib/Model/_288aa996aba16d7a495c62321ea999a9Request.php new file mode 100644 index 00000000..dc017b86 --- /dev/null +++ b/lib/Model/_288aa996aba16d7a495c62321ea999a9Request.php @@ -0,0 +1,388 @@ +<?php +declare(strict_types=1); +/** + * _288aa996aba16d7a495c62321ea999a9Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _288aa996aba16d7a495c62321ea999a9Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _288aa996aba16d7a495c62321ea999a9Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_288aa996aba16d7a495c62321ea999a9_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'sent_date_time' => '\BhrSdk\Model\Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'sent_date_time' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'sent_date_time' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sent_date_time' => 'sentDateTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sent_date_time' => 'setSentDateTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sent_date_time' => 'getSentDateTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('sent_date_time', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets sent_date_time + * + * @return \BhrSdk\Model\Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime|null + */ + public function getSentDateTime() { + return $this->container['sent_date_time']; + } + + /** + * Sets sent_date_time + * + * @param \BhrSdk\Model\Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime|null $sent_date_time sent_date_time + * + * @return self + */ + public function setSentDateTime($sent_date_time) { + if (is_null($sent_date_time)) { + throw new \InvalidArgumentException('non-nullable sent_date_time cannot be null'); + } + $this->container['sent_date_time'] = $sent_date_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.php b/lib/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.php new file mode 100644 index 00000000..d6ed8760 --- /dev/null +++ b/lib/Model/_288aa996aba16d7a495c62321ea999a9RequestSentDateTime.php @@ -0,0 +1,364 @@ +<?php +declare(strict_types=1); +/** + * _288aa996aba16d7a495c62321ea999a9RequestSentDateTime + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _288aa996aba16d7a495c62321ea999a9RequestSentDateTime Class Doc Comment + * + * @category Class + * @description Optional sent datetime for the packet when starting the experience (string). + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _288aa996aba16d7a495c62321ea999a9RequestSentDateTime implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_288aa996aba16d7a495c62321ea999a9_request_sentDateTime'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_3958585c861325ea7a2cd30a8c74f042Request.php b/lib/Model/_3958585c861325ea7a2cd30a8c74f042Request.php new file mode 100644 index 00000000..ebfbe0ae --- /dev/null +++ b/lib/Model/_3958585c861325ea7a2cd30a8c74f042Request.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * _3958585c861325ea7a2cd30a8c74f042Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _3958585c861325ea7a2cd30a8c74f042Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _3958585c861325ea7a2cd30a8c74f042Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_3958585c861325ea7a2cd30a8c74f042_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return string[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param string[] $employee_ids Array of employee IDs to add to the cycle + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/lib/Model/_89a5068111ec499135c7d6e9a53d5a30Request.php b/lib/Model/_89a5068111ec499135c7d6e9a53d5a30Request.php new file mode 100644 index 00000000..7eda471d --- /dev/null +++ b/lib/Model/_89a5068111ec499135c7d6e9a53d5a30Request.php @@ -0,0 +1,391 @@ +<?php +declare(strict_types=1); +/** + * _89a5068111ec499135c7d6e9a53d5a30Request + * + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace BhrSdk\Model; + +use \ArrayAccess; +use \BhrSdk\ObjectSerializer; + +/** + * _89a5068111ec499135c7d6e9a53d5a30Request Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess<string, mixed> + */ +class _89a5068111ec499135c7d6e9a53d5a30Request implements ModelInterface, ArrayAccess, \JsonSerializable { + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openApiModelName = '_89a5068111ec499135c7d6e9a53d5a30_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openApiTypes = [ + 'employee_ids' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array<string, string|null> + * @psalm-var array<string, string|null> + */ + protected static $openApiFormats = [ + 'employee_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected static array $openApiNullables = [ + 'employee_ids' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + * @phpstan-var array<string, bool> + */ + protected array $openApiNullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiTypes() { + return self::$openApiTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openApiFormats() { + 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 bool[] + * @phpstan-return array<string, bool> + */ + private function getOpenApiNullablesSetToNull(): array { + return $this->openApiNullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openApiNullablesSetToNull + * @phpstan-param array<string, bool> $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 isset($this->getOpenApiNullablesSetToNull()[$property]); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_ids' => 'employeeIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_ids' => 'setEmployeeIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_ids' => 'getEmployeeIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() { + return self::$openApiModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { + $this->setIfExists('employee_ids', $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, $defaultValue): void { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openApiNullablesSetToNull[$variableName] = true; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() { + $invalidProperties = []; + + if ($this->container['employee_ids'] === null) { + $invalidProperties[] = "'employee_ids' 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() { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets employee_ids + * + * @return string[] + */ + public function getEmployeeIds() { + return $this->container['employee_ids']; + } + + /** + * Sets employee_ids + * + * @param string[] $employee_ids Array of employee IDs to remove from the cycle + * + * @return self + */ + public function setEmployeeIds($employee_ids) { + if (is_null($employee_ids)) { + throw new \InvalidArgumentException('non-nullable employee_ids cannot be null'); + } + $this->container['employee_ids'] = $employee_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param string $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param string $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param string $offset Offset + * + * @return void + */ + public function offsetUnset($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() { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string { + $jsonEncoded = json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string { + $jsonEncoded = json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return $jsonEncoded === false ? '{}' : $jsonEncoded; + } +} + diff --git a/specs/public.yaml b/specs/public.yaml index da03cc63..8cc8f45a 100644 --- a/specs/public.yaml +++ b/specs/public.yaml @@ -11,74 +11,90 @@ servers: default: companySubDomain description: 'Company domain' paths: - /api/v1/compensation/equity/settings: + /api/v1/alert-configurations: get: tags: - - Compensation + - 'Alert Configurations' - 'Public API' - summary: 'Get company equity settings' - description: 'Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration.' - operationId: db49fb29f9f04d59afad7c01ce860418 + summary: 'List alert configurations' + description: 'Returns all company alert configurations for the authenticated company.' + operationId: 6d0a073cbf3e97fe0409de42c68fe779 responses: '200': - description: Success + description: 'List of alert configurations' content: application/json: schema: - title: CompensationEquitySettingsResponse - properties: - calculationType: { type: string } - companyValuation: { type: [number, 'null'] } - outstandingShares: { type: [integer, 'null'] } - pricePerShare: { type: [number, 'null'] } - currencyCode: { type: string } - sliderMin: { type: [integer, 'null'] } - sliderMax: { type: [integer, 'null'] } - vestingConditions: { type: [string, 'null'] } - disclaimers: { type: [string, 'null'] } - type: object - additionalProperties: true + title: AlertConfigurationListResponse + type: array + items: + $ref: '#/components/schemas/CompanyAlertDataObject' '403': description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - oauth: - - equity - /api/v1/compensation/planning_cycles: - get: + - alerts + post: tags: - - 'Compensation Planning' + - 'Alert Configurations' - 'Public API' - summary: 'List compensation planning cycles' - description: 'List all compensation planning cycles for the company, including status and employee counts.' - operationId: b65f246186b41a9783a9397c11c703b4 + summary: 'Create an alert configuration' + description: 'Creates a new company alert configuration.' + operationId: a05e93bc2eb9c39a40fbd71e6e07f3c6 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' responses: - '200': - description: Success + '201': + description: Created content: application/json: schema: - title: CompensationPlanningCyclesListResponse - type: object - additionalProperties: true + $ref: '#/components/schemas/CompanyAlertDataObject' + '400': + description: 'Bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}': + - alerts.write + '/api/v1/alert-configurations/{id}': get: tags: - - 'Compensation Planning' + - 'Alert Configurations' - 'Public API' - summary: 'Get compensation planning cycle details' - description: 'Get compensation planning cycle details and currency settings for a cycle.' - operationId: 5c2b55158b0950b1e9211655666645b6 + summary: 'Get an alert configuration' + description: 'Returns a single company alert configuration by ID.' + operationId: 14e66bfb5f075043221ce1e843c97493 parameters: - name: id @@ -88,29 +104,40 @@ paths: type: integer responses: '200': - description: Success + description: 'Alert configuration' content: application/json: schema: - title: CompensationPlanningCycleDetailsResponse - type: object - additionalProperties: true + $ref: '#/components/schemas/CompanyAlertDataObject' '403': description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/summary': - get: + - alerts + put: tags: - - 'Compensation Planning' + - 'Alert Configurations' - 'Public API' - summary: 'Get compensation planning cycle summary' - description: 'Get compensation planning cycle summary (progress, stats).' - operationId: 9bc279d788f6e86b4cd8b2e0d3de91b1 + summary: 'Update an alert configuration' + description: 'Updates an existing company alert configuration.' + operationId: eb42aa2fa339ba5c08b147fc13c6a79e parameters: - name: id @@ -118,47 +145,59 @@ paths: required: true schema: type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyAlertDataObject' responses: '200': - description: Success + description: Updated content: application/json: schema: - title: CompensationPlanningCycleSummaryResponse - type: object - additionalProperties: true + $ref: '#/components/schemas/CompanyAlertDataObject' '400': description: 'Bad request' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/employees': + - alerts.write + /api/v1/alerts: get: tags: - - 'Compensation Planning' + - Alert - 'Public API' - summary: 'List employees in compensation planning cycle' - description: 'List employees in the compensation planning cycle (picker data: company roster and membership).' - operationId: a6b8da1348a3151fe95adc03aaf64447 - parameters: - - - name: id - in: path - required: true - schema: - type: integer + summary: 'List alert templates' + description: 'Returns all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations.' + operationId: 0f0dcb585e5883175b6557c16cf6755a responses: '200': - description: Success + description: 'List of alert templates' content: application/json: schema: - title: CompensationPlanningCycleEmployeesResponse + title: AlertTemplateListResponse + properties: + alerts: { type: array, items: { properties: { id: { description: 'Alert template ID (bambooAlertId)', type: integer }, name: { description: 'Display name of the alert', type: string }, groupName: { description: 'Category group the alert belongs to', type: string } }, type: object } } type: object - additionalProperties: true '403': description: Forbidden '500': @@ -166,29 +205,32 @@ paths: security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/budgets': + - alerts + /api/v1/compensation/equity/settings: get: tags: - - 'Compensation Planning' + - Compensation - 'Public API' - summary: 'Get compensation planning cycle budgets' - description: 'Get budget guidelines and breakdown for the compensation planning cycle.' - operationId: 7efceaee2c010f88244dd01ee81e6e7b - parameters: - - - name: id - in: path - required: true - schema: - type: integer + summary: 'Get company equity settings' + description: 'Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration.' + operationId: db49fb29f9f04d59afad7c01ce860418 responses: '200': description: Success content: application/json: schema: - title: CompensationPlanningCycleBudgetsResponse + title: CompensationEquitySettingsResponse + properties: + calculationType: { type: string } + companyValuation: { oneOf: [{ type: number }, { type: 'null' }] } + outstandingShares: { oneOf: [{ type: integer }, { type: 'null' }] } + pricePerShare: { oneOf: [{ type: number }, { type: 'null' }] } + currencyCode: { type: string } + sliderMin: { oneOf: [{ type: integer }, { type: 'null' }] } + sliderMax: { oneOf: [{ type: integer }, { type: 'null' }] } + vestingConditions: { oneOf: [{ type: string }, { type: 'null' }] } + disclaimers: { oneOf: [{ type: string }, { type: 'null' }] } type: object additionalProperties: true '403': @@ -198,151 +240,157 @@ paths: security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/approvals': - get: + - equity + put: tags: - - 'Compensation Planning' + - Compensation - 'Public API' - summary: 'Get compensation planning approval flows' - description: 'Get approval flows for the compensation planning cycle (grouped by department by default).' - operationId: 4e886b18264480611f380805301c49c4 - parameters: - - - name: id - in: path - required: true - schema: - type: integer - - - name: groupBy - in: query - description: 'Optional grouping for flows (e.g. department)' - required: false - schema: - type: string + summary: 'Update company equity settings' + description: 'Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration.' + operationId: c5880b509783cd9d7fce9ddf5d6af1be + requestBody: + required: true + content: + application/json: + schema: + title: CompensationEquitySettingsUpdateRequest + properties: + calculationType: + type: string + companyValuation: + oneOf: [{ type: number }, { type: 'null' }] + outstandingShares: + oneOf: [{ type: integer }, { type: 'null' }] + pricePerShare: + oneOf: [{ type: number }, { type: 'null' }] + currencyCode: + type: string + sliderMin: + oneOf: [{ type: integer }, { type: 'null' }] + sliderMax: + oneOf: [{ type: integer }, { type: 'null' }] + vestingConditions: + oneOf: [{ type: string }, { type: 'null' }] + disclaimers: + oneOf: [{ type: string }, { type: 'null' }] + type: object + additionalProperties: true responses: '200': - description: Success + description: 'Settings updated successfully' content: application/json: schema: - title: CompensationPlanningCycleApprovalsResponse + title: CompensationEquitySettingsResponse + properties: + calculationType: { type: string } + companyValuation: { oneOf: [{ type: number }, { type: 'null' }] } + outstandingShares: { oneOf: [{ type: integer }, { type: 'null' }] } + pricePerShare: { oneOf: [{ type: number }, { type: 'null' }] } + currencyCode: { type: string } + sliderMin: { oneOf: [{ type: integer }, { type: 'null' }] } + sliderMax: { oneOf: [{ type: integer }, { type: 'null' }] } + vestingConditions: { oneOf: [{ type: string }, { type: 'null' }] } + disclaimers: { oneOf: [{ type: string }, { type: 'null' }] } type: object additionalProperties: true + '400': + description: 'Bad request' '403': description: Forbidden - '404': - description: 'Cycle not found' '500': description: 'Internal server error' security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/admins': + - equity.write + /api/v1/compensation/planning_cycles: get: tags: - 'Compensation Planning' - 'Public API' - summary: 'List compensation planning cycle admins' - description: 'List compensation planning cycle admins.' - operationId: b3c51254de6918637a971fe4af382a53 - parameters: - - - name: id - in: path - required: true - schema: - type: integer + summary: 'List compensation planning cycles' + description: 'List all compensation planning cycles for the company, including status and employee counts.' + operationId: b65f246186b41a9783a9397c11c703b4 responses: '200': description: Success content: application/json: schema: - title: CompensationPlanningCycleAdminsResponse + title: CompensationPlanningCyclesListResponse type: object additionalProperties: true '403': description: Forbidden - '404': - description: 'Not found' '500': description: 'Internal server error' security: - oauth: - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/change_comm': - get: + post: tags: - 'Compensation Planning' - 'Public API' - summary: 'Get change communication letter details' - description: 'Get change communication letter details for the compensation planning cycle.' - operationId: d6987e300672a00c7cfe59afebb64156 - parameters: - - - name: id - in: path - required: true - schema: - type: integer + summary: 'Create compensation planning cycle' + description: 'Create a new compensation planning cycle with default settings.' + operationId: e2ac4e1535f296cb8901f209e04caa83 responses: - '200': - description: Success + '201': + description: 'Cycle created successfully' content: application/json: schema: - title: CompensationPlanningCycleChangeCommResponse + title: CompensationPlanningCycleCreateResponse type: object additionalProperties: true + '400': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - oauth: - - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/worksheet': + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}': get: tags: - 'Compensation Planning' - 'Public API' - summary: 'Get compensation planning cycle worksheet' - description: 'Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user.' - operationId: 329acecaa6df729733d0752aa9f6b204 - parameters: + summary: 'Get compensation planning cycle details' + description: 'Get compensation planning cycle details and currency settings for a cycle.' + operationId: 5c2b55158b0950b1e9211655666645b6 + parameters: - name: id in: path required: true schema: type: integer - - - name: type - in: query - description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' - required: false - schema: - type: string - enum: - - recommendations - - approvals - - overview responses: '200': description: Success content: application/json: schema: - title: CompensationPlanningCycleWorksheetResponse + title: CompensationPlanningCycleDetailsResponse type: object additionalProperties: true - '400': - description: 'Bad request' '403': description: Forbidden '500': @@ -351,14 +399,13 @@ paths: - oauth: - planning_cycles - '/api/v1/compensation/planning_cycles/{id}/worksheet/export': - get: + put: tags: - 'Compensation Planning' - 'Public API' - summary: 'Export compensation planning cycle worksheet to CSV' - description: 'Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view.' - operationId: 593d5bff120edf2a218a92022a682728 + summary: 'Update compensation planning cycle' + description: 'Update compensation planning cycle details and currency settings.' + operationId: 100b0cf8c5207b35697ff10370fd5fe1 parameters: - name: id @@ -366,247 +413,198 @@ paths: required: true schema: type: integer - - - name: type - in: query - description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' - required: false - schema: - type: string - enum: - - recommendations - - approvals - - overview - responses: - '200': - description: 'CSV file download' - content: - text/csv: - schema: - title: CompensationPlanningCycleWorksheetCsvExport - type: string - format: binary - '400': - description: 'Bad request' - '403': - description: Forbidden - '404': - description: 'Worksheet not found' - '500': - description: 'Internal server error' - security: - - - oauth: - - planning_cycles - /api/v1/time_tracking/projects: - post: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'Create Time Tracking Project' - description: "Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access.\n\nBy default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees." - operationId: create-time-tracking-project requestBody: + description: 'Cycle details and currency settings to update' required: true content: application/json: schema: - $ref: '#/components/schemas/ProjectCreateRequestSchema' + $ref: '#/components/schemas/DetailsAndCurrencyRequestDataObject' responses: - '201': - description: 'Project created successfully. Returns the new project with tasks. The `employeeIds` field is included only when `allowAllEmployees` is false.' + '200': + description: 'Cycle updated successfully' content: application/json: schema: - $ref: '#/components/schemas/TimeTrackingProjectWithTasksAndEmployeeIds' + title: CompensationPlanningCycleUpdateResponse + type: object + additionalProperties: true '400': - description: 'Bad request parameters - invalid or missing required fields.' + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '403': - description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + '404': + description: 'Resource not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '406': - description: 'Request not acceptable.' + '500': + description: 'Internal server error' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'There was a conflict with the request.' + security: + - + oauth: + - planning_cycles.write + delete: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Delete compensation planning cycle' + description: 'Delete a compensation planning cycle.' + operationId: 22ad75be25455279e2987c80851af5fc + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '204': + description: 'Cycle deleted successfully' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Resource not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' + description: 'Internal server error' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_tracking.write - /api/v1/time-tracking/break-assessments: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/summary': get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Break Assessments' - description: 'Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500.' - operationId: list-break-assessments + summary: 'Get compensation planning cycle summary' + description: 'Get compensation planning cycle summary (progress, stats).' + operationId: 9bc279d788f6e86b4cd8b2e0d3de91b1 parameters: - - name: offset - in: query - description: 'Number of items to skip before returning results. Defaults to 0.' - required: false - schema: - type: integer - default: 0 - minimum: 0 - - - name: limit - in: query - description: 'Maximum number of items to return. Defaults to 100. Maximum is 500.' - required: false + name: id + in: path + required: true schema: type: integer - default: 100 - maximum: 500 - minimum: 0 - - - name: filter - in: query - description: 'OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`.' - required: false - schema: - type: string - default: '' responses: '200': - description: 'A list of paginated break assessments' + description: Success content: application/json: schema: - title: TimeTracking-PaginatedBreakAssessmentsResponse-V1 + title: CompensationPlanningCycleSummaryResponse type: object - allOf: - - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } - - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentCollection-V1', description: 'The break assessments' } }, type: object } - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + additionalProperties: true + '400': + description: 'Bad request' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - '/api/v1/time-tracking/breaks/{id}': + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/employees': get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Get Break' - description: 'Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration.' - operationId: get-break + summary: 'List employees in compensation planning cycle' + description: 'List employees in the compensation planning cycle (picker data: company roster and membership).' + operationId: a6b8da1348a3151fe95adc03aaf64447 parameters: - name: id in: path - description: 'The break ID.' required: true schema: - type: string - format: uuid + type: integer responses: '200': - description: 'Successfully retrieved the break.' + description: Success content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + title: CompensationPlanningCycleEmployeesResponse + type: object + additionalProperties: true '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Break not found.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'The provided `id` is not a valid UUID.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - delete: + - planning_cycles + post: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Delete Break' - description: 'Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with.' - operationId: delete-break + summary: 'Add employees to cycle' + description: 'Add employees to a compensation planning cycle.' + operationId: 3958585c861325ea7a2cd30a8c74f042 parameters: - name: id in: path - description: 'The break ID.' required: true schema: - type: string - format: uuid + type: integer + requestBody: + description: 'Employee IDs to add' + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to add to the cycle' + type: array + items: { type: string } + type: object responses: '204': - description: 'Break deleted successfully' + description: 'Employees added successfully' '400': - description: 'Invalid ID format' + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break not found' + description: 'Resource not found' content: application/json: schema: @@ -618,249 +616,191 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - patch: + - planning_cycles.write + delete: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Update Break' - description: 'Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success.' - operationId: update-break + summary: 'Remove employees from cycle' + description: 'Remove employees from a compensation planning cycle.' + operationId: 89a5068111ec499135c7d6e9a53d5a30 parameters: - name: id in: path - description: 'The break ID.' required: true schema: - type: string - format: uuid + type: integer requestBody: + description: 'Employee IDs to remove' required: true content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreak-V1' + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to remove from the cycle' + type: array + items: { type: string } + type: object responses: - '200': - description: 'Successfully updated break' + '204': + description: 'Employees removed successfully' + '400': + description: 'Invalid request data' content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid request data' + '404': + description: 'Resource not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - '/api/v1/time-tracking/break-policies/{id}/breaks': + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets': get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Breaks for Break Policy' - description: 'Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering.' - operationId: list-break-policy-breaks + summary: 'Get compensation planning cycle budgets' + description: 'Get budget guidelines and breakdown for the compensation planning cycle.' + operationId: 7efceaee2c010f88244dd01ee81e6e7b parameters: - name: id in: path - description: 'The break policy ID.' required: true - schema: - type: string - format: uuid - - - name: offset - in: query - description: 'The offset of items to retrieve' - schema: - type: integer - default: 0 - - - name: limit - in: query - description: 'The maximum items to retrieve' schema: type: integer - default: 100 - maximum: 500 - - - name: filter - in: query - description: 'Filter by an OData (Open Data Protocol) v4 specification' - schema: - type: string - default: '' responses: '200': - description: 'Successfully retrieved breaks for the specified break policy' + description: Success content: application/json: schema: - title: TimeTracking-PaginatedBreaksResponse-V1 + title: CompensationPlanningCycleBudgetsResponse type: object - allOf: - - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } - - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1', description: 'The breaks' } }, type: object } + additionalProperties: true '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - put: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/approvals': + get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Replace Breaks for Break Policy' - description: 'Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted.' - operationId: replace-breaks-for-break-policy + summary: 'Get compensation planning approval flows' + description: 'Get approval flows for the compensation planning cycle (grouped by department by default).' + operationId: 4e886b18264480611f380805301c49c4 parameters: - name: id in: path - description: 'The break policy ID.' required: true + schema: + type: integer + - + name: groupBy + in: query + description: 'Optional grouping for flows (e.g. department)' + required: false schema: type: string - format: uuid - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' responses: '200': - description: 'Successfully replaced breaks for the policy' - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1' - '400': - description: 'Bad request - validation errors' + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: CompensationPlanningCycleApprovalsResponse + type: object + additionalProperties: true '403': - description: 'Insufficient permissions' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: Forbidden '404': - description: 'Break policy not found' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'Cycle not found' '500': description: 'Internal server error' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - post: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/admins': + get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Create Break' - description: 'Creates a new break and associates it with the specified break policy.' - operationId: create-break + summary: 'List compensation planning cycle admins' + description: 'List compensation planning cycle admins.' + operationId: b3c51254de6918637a971fe4af382a53 parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreak-V1' + type: integer responses: - '201': - description: 'Successfully created a break' - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' - '422': - description: 'Invalid request data' + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: CompensationPlanningCycleAdminsResponse + properties: + admins: { description: 'List of admins for the cycle', type: array, items: { properties: { employeeId: { description: 'ID of the employee associated with this admin. Null if user has no associated employee.', oneOf: [{ type: string }, { type: 'null' }] }, displayName: { description: 'Display name of the admin', type: string }, firstName: { description: 'First name of the admin', type: string }, lastName: { description: 'Last name of the admin', type: string }, jobTitle: { description: 'Job title of the admin', type: string }, photoUrl: { description: 'URL to the admin profile photo', type: string }, adminType: { description: 'Type of admin', type: string, enum: [FULL_ACCOUNT_ADMIN, CYCLE_ADMIN] }, isRemovable: { description: 'Whether this admin can be removed from the cycle', type: boolean }, addedAt: { description: 'ISO 8601 timestamp when the admin was added. Null for full account admins.', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, addedByEmployeeId: { description: 'ID of the employee who added this admin. Null for full account admins or if user has no associated employee.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } + isFullAdmin: { description: 'Whether the requesting user is a full compensation plan admin', type: boolean } + type: object '403': - description: 'Forbidden - user does not have permission' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - '/api/v1/time-tracking/break-policies/{id}/assign': - put: + - planning_cycles + post: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Set Employees for Break Policy' - description: 'Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list.' - operationId: set-break-policy-employees + summary: 'Add cycle admins' + description: 'Add one or more cycle admins by employee IDs.' + operationId: c7c32ed5278ac67e2e518bf7484a75dc parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid + type: integer requestBody: required: true content: @@ -870,160 +810,196 @@ paths: - employeeIds properties: employeeIds: - description: 'Array of employee IDs to assign to the break policy. Replaces all existing assignments.' + description: 'Array of employee IDs to add as cycle admins' type: array - items: { type: integer } + items: { type: string } + notifyAdmins: + description: 'Whether to send email notifications to new admins' + type: boolean type: object responses: - '204': - description: 'Employees assigned successfully' - '400': - description: 'Invalid data provided.' + '200': + description: 'Result of adding cycle admins' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: AddCycleAdminsResponse + properties: + added: { type: array, items: { properties: { employeeId: { type: string }, displayName: { type: string } }, type: object } } + skipped: { type: array, items: { properties: { employeeId: { type: string }, reason: { type: string, enum: [ALREADY_ADMIN, EMPLOYEE_NOT_FOUND, FULL_ACCOUNT_ADMIN] } }, type: object } } + type: object '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Unprocessable entity. The provided `id` is not a valid UUID, or `employeeIds` is not an array of positive integers.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - post: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/change_comm': + get: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Assign Employees to Break Policy' - description: 'Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments.' - operationId: assign-employees-to-break-policy - parameters: + summary: 'Get change communication letter details' + description: 'Get change communication letter details for the compensation planning cycle.' + operationId: d6987e300672a00c7cfe59afebb64156 + parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid - requestBody: - required: true - content: - application/json: - schema: - required: - - employeeIds - properties: - employeeIds: - description: 'Array of employee IDs to assign to the break policy' - type: array - items: { type: integer } - minItems: 1 - type: object + type: integer responses: - '204': - description: 'Employees successfully assigned to the break policy' - '400': - description: 'Bad request - invalid data provided (for example: missing `employeeIds`, invalid IDs, or policy assignment constraints).' + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: CompensationPlanningCycleChangeCommResponse + type: object + additionalProperties: true '403': - description: 'Forbidden - insufficient permissions' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Break policy not found' + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/worksheet': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Get compensation planning cycle worksheet' + description: 'Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user.' + operationId: 329acecaa6df729733d0752aa9f6b204 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: type + in: query + description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' + required: false + schema: + type: string + enum: + - recommendations + - approvals + - overview + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Unprocessable entity - validation failed' + title: CompensationPlanningCycleWorksheetResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/worksheet/export': + get: + tags: + - 'Compensation Planning' + - 'Public API' + summary: 'Export compensation planning cycle worksheet to CSV' + description: 'Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view.' + operationId: 593d5bff120edf2a218a92022a682728 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + - + name: type + in: query + description: 'Worksheet context: recommendations, approvals, or overview (overview requires cycle admin).' + required: false + schema: + type: string + enum: + - recommendations + - approvals + - overview + responses: + '200': + description: 'CSV file download' content: - application/json: + text/csv: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: CompensationPlanningCycleWorksheetCsvExport + type: string + format: binary + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Worksheet not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - '/api/v1/time-tracking/break-policies/{id}/unassign': - post: + - planning_cycles + '/api/v1/compensation/planning_cycles/{id}/launch': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Unassign Employees from Break Policy' - description: 'Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees.' - operationId: unassign-employees-from-break-policy + summary: 'Launch compensation planning cycle' + description: 'Launch a compensation planning cycle. Validates all cycle data and sets status to Live.' + operationId: 3a19f07aa737dc826ba43b9a1c1cd257 parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid - requestBody: - required: true - content: - application/json: - schema: - required: - - employeeIds - properties: - employeeIds: - description: 'Array of employee IDs to unassign from the break policy' - type: array - items: { type: integer } - minItems: 1 - type: object + type: integer responses: '204': - description: 'Employees successfully unassigned from break policy' + description: 'Cycle launched successfully' '400': - description: 'Bad request - Invalid data or policy is assigned to all employees' + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' + description: 'Resource not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Unprocessable entity - validation failed' + '409': + description: 'Cycle is not ready to launch' content: application/json: schema: @@ -1035,61 +1011,57 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - '/api/v1/time-tracking/break-policies/{id}': - get: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/complete': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Get Break Policy' - description: 'Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks.' - operationId: get-break-policy + summary: 'Complete compensation planning cycle' + description: 'Complete a compensation planning cycle and finalize employee compensation records.' + operationId: f4b431363af6573af46750f32632e88b parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid - - - name: includeCounts - in: query - description: 'Include employee and break counts' - required: false - schema: - type: boolean - default: false + type: integer responses: '200': - description: 'Break policy retrieved successfully' + description: 'Cycle completed successfully' content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + title: CompensationPlanningCycleCompleteResponse + properties: + cycleId: { type: integer } + updatedEmployeesCount: { type: integer } + cycleClosedEmailError: { description: 'Present when cycle completed successfully but sending closed-cycle emails failed', oneOf: [{ type: string }, { type: 'null' }] } + errors: { type: array, items: { properties: { employeeId: { type: string }, message: { type: string } }, type: object } } + type: object '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' + description: 'Resource not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' + '409': + description: 'Cycle cannot be completed' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Employees with pay rate errors' '500': description: 'Internal server error' content: @@ -1097,44 +1069,59 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - delete: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/guidelines': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Delete Break Policy' - description: 'Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed.' - operationId: delete-break-policy + summary: 'Save budget guidelines' + description: 'Save budget guidelines for a compensation planning cycle.' + operationId: dacd313af2106213fc4696175941ce65 parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid + type: integer + requestBody: + description: 'Budget guideline settings' + required: true + content: + application/json: + schema: + properties: + useGuidelines: + type: boolean + softMin: + type: number + softMax: + type: number + type: object responses: - '204': - description: 'Break policy deleted successfully' + '200': + description: 'Guidelines saved successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/BudgetGuidelinesView' '400': - description: 'Invalid uuid format' + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' + description: 'Resource not found' content: application/json: schema: @@ -1146,54 +1133,54 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - patch: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/breakdown': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Update Break Policy' - description: 'Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success.' - operationId: update-break-policy + summary: 'Save budget breakdown' + description: 'Save budget breakdown for a compensation planning cycle.' + operationId: 1d64402ee192568adbd5e3179a91e6e2 parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid + type: integer requestBody: + description: 'Budget breakdown data' required: true content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreakPolicy-V1' + type: array + items: + properties: + id: { type: string } + employeeId: { type: string } + budgetAllocations: { properties: { salaryIncrease: { type: number }, bonuses: { type: number }, equity: { type: number } }, type: object } + type: object responses: - '200': - description: 'Break policy updated successfully' + '204': + description: 'Budget breakdown saved successfully' + '400': + description: 'Invalid request data' content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: Forbidden + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid uuid format' + description: 'Resource not found' content: application/json: schema: @@ -1205,1029 +1192,1264 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - /api/v1/time-tracking/break-policies: - get: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/budgets/import': + post: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Break Policies' - description: 'Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy.' - operationId: list-break-policies + summary: 'Import budget breakdown' + description: 'Import budget breakdown from structured data and apply to allocations.' + operationId: 1d1fc0f164cb51973a0206b8e2fb2d2d parameters: - - name: offset - in: query - description: 'The offset of items to retrieve' - schema: - type: integer - default: 0 - - - name: limit - in: query - description: 'The maximum items to retrieve' + name: id + in: path + required: true schema: type: integer - default: 100 - maximum: 500 - - - name: filter - in: query - description: 'Filter by an OData (Open Data Protocol) v4 specification' - schema: - type: string - default: '' - - - name: includeCounts - in: query - description: 'Include employee and break counts' - required: false - schema: - type: boolean - default: false + requestBody: + description: 'Budget breakdown import data' + required: true + content: + application/json: + schema: + required: + - budgetBreakdown + properties: + budgetBreakdown: + type: array + items: { properties: { employeeName: { type: string }, emailAddress: { type: string }, salaryBudget: { oneOf: [{ type: number }, { type: 'null' }] }, bonusBudget: { oneOf: [{ type: number }, { type: 'null' }] }, equityBudget: { oneOf: [{ type: number }, { type: 'null' }] } }, type: object } + type: object responses: '200': - description: 'Successfully retrieved break policies' + description: 'Budget breakdown imported successfully' content: application/json: schema: - title: TimeTracking-PaginatedBreakPoliciesResponse-V1 + title: BudgetBreakdownImportResponse + properties: + message: { type: string } type: object - allOf: - - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } - - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } - '403': - description: Forbidden + '400': + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' + '403': + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - basic: [] - - - oauth: - - 'time_tracking:breaks' - post: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'Create Break Policy' - description: 'Create a break policy. Breaks and assignments can be optionally included and created at the same time.' - operationId: create-break-policy - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreakPolicy-V1' - responses: - '201': - description: 'Successfully created a break policy' - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' - '403': - description: Forbidden + '404': + description: 'Resource not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid request data' + '500': + description: 'Internal server error' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'time_tracking:breaks.write' - '/api/v1/time-tracking/employees/{id}/break-availabilities': - get: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/{templateId}': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Employee Break Availabilities' - description: 'Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access.' - operationId: list-employee-break-availabilities + summary: 'Update approval flow' + description: 'Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template.' + operationId: cf87b8e09a001b6fb81dfce6c20ab9e3 parameters: - name: id in: path - description: 'The employee ID.' required: true schema: type: integer - - name: effective + name: templateId + in: path + required: true + schema: + type: string + - + name: groupBy in: query - description: 'The employee''s local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\TH:i:s format (no timezone offset).' + description: 'Optional grouping for returned flows (e.g. department)' required: false schema: type: string - pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$' - example: '2025-12-15T14:30:00' + requestBody: + required: true + content: + application/json: + schema: + required: + - assignees + - flowData + properties: + assignees: + description: 'Array of assignee employee IDs' + type: array + items: { type: string } + flowData: + description: 'Flow data for the approval' + type: object + additionalProperties: true + type: object responses: '200': - description: 'Successfully retrieved break availabilities for the specified employee' + description: 'Updated approval flows for the cycle' content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailabilityCollection-V1' + title: UpdateApprovalFlowResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' '403': - description: 'Forbidden - insufficient permissions to view this employee or break settings.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - '/api/v1/time-tracking/employees/{id}/break-policies': - get: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId}': + post: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Employee Break Policies' - description: 'Retrieves break policies assigned to a specific employee. Requires permission to view the target employee.' - operationId: list-employee-break-policies + summary: 'Set final approver' + description: 'Set or update the final approver for all approval flows in a cycle.' + operationId: 5c4aab35a34f5760ec044104b5232bf5 parameters: - name: id in: path - description: 'The employee ID.' required: true schema: type: integer - - name: offset - in: query - description: 'The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.' - required: false + name: employeeId + in: path + required: true schema: - type: integer - default: 0 - minimum: 0 + type: string - - name: limit + name: groupBy in: query - description: 'The maximum number of items to return. Must be between 0 and 500. Defaults to 100.' + description: 'Optional grouping for returned flows (e.g. department)' required: false schema: - type: integer - default: 100 - maximum: 500 - minimum: 0 + type: string responses: '200': - description: 'A list of break policies' + description: 'Updated approval flows for the cycle' content: application/json: schema: - title: TimeTracking-PaginatedBreakPoliciesResponse-V1 + title: SetFinalApproverResponse type: object - allOf: - - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } - - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } + additionalProperties: true + '400': + description: 'Bad request' '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - '/api/v1/time-tracking/break-policies/{id}/employees': - get: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId}': + delete: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'List Break Policy Employees' - description: 'Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array.' - operationId: list-break-policy-employees + summary: 'Remove from approval flow' + description: 'Remove an employee from all approval chains for a specific cycle.' + operationId: b1e467e0eef72350eec61fcfeaf4e19d parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid + type: integer - - name: offset - in: query - description: 'The offset of items to retrieve' + name: employeeId + in: path + required: true schema: - type: integer - default: 0 + type: string - - name: limit + name: groupBy in: query - description: 'The maximum items to retrieve' + description: 'Optional grouping for returned flows (e.g. department)' + required: false schema: - type: integer - default: 100 - maximum: 500 + type: string responses: '200': - description: 'A list of employees assigned to a break policy' + description: 'Updated approval flows after removal' content: application/json: schema: - title: TimeTracking-PaginatedBreakPolicyEmployeesResponse-V1 + title: RemoveFromApprovalFlowResponse type: object - allOf: - - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } - - { properties: { data: { $ref: '#/components/schemas/TimeTracking-BreakPolicyEmployeeCollection-V1', description: 'The employees' } }, type: object } + additionalProperties: true '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - 'time_tracking:breaks' - '/api/v1/time-tracking/break-policies/{id}/sync': - put: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/recommendations': + post: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Sync Break Policy' - description: 'Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request.' - operationId: sync-break-policy + summary: 'Save recommendations' + description: 'Save compensation recommendations for an employee in a cycle.' + operationId: f3883a522dadbe9e11b34f8b656e3adb parameters: - name: id in: path - description: 'The break policy ID.' required: true schema: - type: string - format: uuid + type: integer requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-SyncTimeTrackingBreakPolicy-V1' + required: + - employeeId + - assigneeEmployeeId + - approvalStage + properties: + employeeId: + description: 'The ID of the employee receiving the recommendation' + type: string + assigneeEmployeeId: + description: 'The ID of the employee making the recommendation' + type: string + approvalFlowId: + description: 'The ID of the approval flow' + type: integer + approvalStage: + description: 'The approval stage' + type: integer + enum: [0, 1, 2, 3, 4, 5, 999] + recSalaryIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + recBonusIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + recEquityIncrease: + properties: { amount: { type: number }, type: { type: string, enum: [currency, percentage] } } + oneOf: [{ type: object }, { type: 'null' }] + type: object responses: '200': - description: 'Break policy synced successfully' + description: 'Saved recommendation' content: application/json: schema: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' + title: SaveRecommendationResponse + type: object + additionalProperties: true + '400': + description: 'Bad request' '403': description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Break policy not found' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid data provided' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - basic: [] - - - oauth: - - 'time_tracking:breaks.write' - /api/v1/time-tracking/projects: - get: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'List Time Tracking Projects' - description: 'Returns a list of time tracking projects.' - operationId: list-projects - responses: - '501': - description: 'Not Implemented' + description: 'Not found' + '409': + description: Conflict + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - time_tracking + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/recommendations/send': post: tags: - - 'Time Tracking' - - 'Public API' - summary: 'Create Time Tracking Project' - description: 'Creates a new time tracking project.' - operationId: create-project - responses: - '501': - description: 'Not Implemented' - security: - - - basic: [] - - - oauth: - - time_tracking.write - '/api/v1/time-tracking/projects/{id}': - get: - tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Get Time Tracking Project' - description: 'Retrieves a single time tracking project by its ID.' - operationId: get-project + summary: 'Send recommendations to next stage' + description: 'Send recommendations to the next approval stage for a specific approval flow template.' + operationId: a05b6d5f564f805d688ff2c1e37c3990 parameters: - name: id in: path - description: 'The project ID.' required: true schema: - type: string + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - templateId + - assigneeEmployeeId + - approvalStage + properties: + templateId: + description: 'The ID of the template' + type: string + assigneeEmployeeId: + description: 'The ID of the assignee employee' + type: string + approvalStage: + description: 'The current approval stage' + type: integer + type: object responses: - '501': - description: 'Not Implemented' + '200': + description: 'Recommendations sent successfully' + content: + application/json: + schema: + title: SendRecommendationsResponse + properties: + message: { type: string } + type: object + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '409': + description: Conflict + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - time_tracking + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/admins/{employeeId}': delete: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Delete Time Tracking Project' - description: 'Deletes a time tracking project by its ID.' - operationId: delete-project + summary: 'Remove cycle admin' + description: 'Remove a cycle admin by employee ID. Full account admins cannot be removed.' + operationId: ef7619b0ee4c8dc079aaea870cfbe81b parameters: - name: id in: path - description: 'The project ID.' + required: true + schema: + type: integer + - + name: employeeId + in: path required: true schema: type: string responses: - '501': - description: 'Not Implemented' + '200': + description: 'Admin removed - current user removed themselves' + content: + application/json: + schema: + title: RemoveCycleAdminSelfResponse + properties: + selfRemoved: { type: boolean } + type: object + '204': + description: 'Cycle admin successfully removed' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - time_tracking.write - patch: + - planning_cycles.write + '/api/v1/compensation/planning_cycles/{id}/change_comm/template': + put: tags: - - 'Time Tracking' + - 'Compensation Planning' - 'Public API' - summary: 'Update Time Tracking Project' - description: 'Partially updates a time tracking project identified by its ID.' - operationId: update-project + summary: 'Save change comm template' + description: 'Save the change communication email template for a compensation planning cycle.' + operationId: c79f9c5950f983e59d2626faa30c00a1 parameters: - name: id in: path - description: 'The project ID.' required: true schema: - type: string + type: integer + requestBody: + required: true + content: + application/json: + schema: + required: + - messageText + - subjectText + properties: + messageText: + description: 'The email body template text' + type: string + subjectText: + description: 'The email subject template text' + type: string + type: object responses: - '501': - description: 'Not Implemented' + '200': + description: 'Template saved successfully' + content: + application/json: + schema: + title: SaveChangeCommTemplateResponse + properties: + message: { type: string } + type: object + '400': + description: 'Bad request' + '403': + description: Forbidden + '500': + description: 'Internal server error' security: - - basic: [] + oauth: + - planning_cycles.write + /api/v1/compensation/tools: + get: + tags: + - Compensation + - 'Public API' + summary: 'List available compensation tools' + description: 'Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable.' + operationId: 9f398e2652ea47a6dc5121ce5184222a + responses: + '200': + description: Success + content: + application/json: + schema: + title: CompensationToolsResponse + properties: + success: { type: boolean } + tools: { $ref: '#/components/schemas/CompensationToolsDataObject' } + upsell: { $ref: '#/components/schemas/CompensationUpsellData' } + type: object + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: - oauth: - - time_tracking.write - '/api/v1/time-tracking/projects/{projectId}/tasks': + - compensation_tools + '/api/v1/employee-verifications/employees/{employeeId}': get: tags: - - 'Time Tracking' + - EmployeeVerification - 'Public API' - summary: 'List Time Tracking Project Tasks' - description: 'Returns a list of tasks for the specified time tracking project.' - operationId: list-project-tasks + summary: 'List employee verification records for an employee' + description: 'Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves.' + operationId: list-employee-verifications-by-employee parameters: - - name: projectId + name: employeeId in: path - description: 'The project ID.' + description: 'Company employee id whose verification history is returned.' required: true schema: - type: string + type: integer + format: int64 responses: - '501': - description: 'Not Implemented' + '200': + description: Success + content: + application/json: + schema: + title: EmployeeVerificationsListResponse + required: + - employeeVerifications + properties: + employeeVerifications: { description: 'Verification records for the employee, newest first.', type: array, items: { $ref: '#/components/schemas/EmployeeVerificationPublicApiRecord' } } + type: object + additionalProperties: true + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking + - employee_verifications + '/api/v1/employee-verifications/users/{userId}/send-email': post: tags: - - 'Time Tracking' + - EmployeeVerification - 'Public API' - summary: 'Create Time Tracking Project Task' - description: 'Creates a new task on the specified time tracking project.' - operationId: create-project-task - parameters: - - - name: projectId - in: path - description: 'The project ID.' - required: true - schema: - type: string - responses: - '501': - description: 'Not Implemented' - security: - - - basic: [] - - - oauth: - - time_tracking.write - '/api/v1/time-tracking/tasks/{id}': - get: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'Get Time Tracking Task' - description: 'Retrieves a single time tracking task by its ID.' - operationId: get-task + summary: 'Send employee verification lifecycle email by user and email type' + description: 'Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`.' + operationId: send-employee-verification-lifecycle-email-by-user parameters: - - name: id + name: userId in: path - description: 'The task ID.' + description: 'Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send.' required: true schema: - type: string + type: integer + format: int64 + requestBody: + required: true + content: + application/json: + schema: + required: + - emailType + properties: + emailType: + description: 'Which employee verification lifecycle email to send; must be {@see EverifyEmailType::SIGNUP_SURVEY} or {@see EverifyEmailType::APP_INSTALLED} (string values `signup_survey`, `app_installed`).' + type: string + enum: [signup_survey, app_installed] + type: object responses: - '501': - description: 'Not Implemented' + '202': + description: 'Request accepted; email has been queued for delivery.' + content: + application/json: + schema: + title: EmployeeVerificationLifecycleEmailAcceptedResponse + required: + - status + properties: + status: { type: string, example: accepted } + message: { type: string, example: 'Employee verification email has been queued for delivery.' } + type: object + additionalProperties: true + '400': + description: 'Bad request (invalid body, unknown user id, or integration disabled)' + '403': + description: Forbidden + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - time_tracking - delete: + - employee_verifications.write + '/api/v1/employee-verifications/employees/{employeeId}/{verificationId}': + put: tags: - - 'Time Tracking' + - EmployeeVerification - 'Public API' - summary: 'Delete Time Tracking Task' - description: 'Deletes a time tracking task by its ID.' - operationId: delete-task + summary: 'Update an employee verification record' + description: 'Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee.' + operationId: update-employee-verification parameters: - - name: id + name: employeeId in: path - description: 'The task ID.' + description: 'Company employee id that owns the verification row.' required: true schema: - type: string - responses: - '501': - description: 'Not Implemented' - security: - - - basic: [] - - - oauth: - - time_tracking.write - patch: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'Update Time Tracking Task' - description: 'Partially updates a time tracking task identified by its ID.' - operationId: update-task - parameters: + type: integer + format: int64 - - name: id + name: verificationId in: path - description: 'The task ID.' + description: 'Identifier of the verification record to update.' required: true schema: - type: string - responses: - '501': - description: 'Not Implemented' - security: - - - basic: [] - - - oauth: - - time_tracking.write - /api/v1/time_tracking/clock_entries/delete: - post: - tags: - - 'Time Tracking' - - 'Public API' - summary: 'Delete Timesheet Clock Entries' - description: 'Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' - operationId: delete-timesheet-clock-entries-via-post + type: integer + format: int64 requestBody: + description: 'Fields to update on the verification record. At least one field must be supplied.' required: true content: application/json: schema: - $ref: '#/components/schemas/ClockEntryIdsSchema' + properties: + verificationType: + oneOf: [{ type: string, enum: [in-person, hybrid, remote] }, { type: 'null' }] + verificationStatus: + oneOf: [{ type: string, enum: [pending, inprogress-section-1, inprogress-section-2, completed, failed] }, { type: 'null' }] + verificationStatusNotes: + oneOf: [{ type: string }, { type: 'null' }] + remoteAccessUrl: + oneOf: [{ type: string }, { type: 'null' }] + eVerifyStatus: + oneOf: [{ type: string, enum: [pending, inprogress, completed, failed] }, { type: 'null' }] + type: object responses: - '204': - description: 'Entries deleted successfully. No content returned.' - '400': - description: 'Bad request parameters - missing or invalid clockEntryIds.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + '200': + description: 'Success — returns the updated verification record.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: EmployeeVerificationUpdateResponse + required: + - employeeVerification + properties: + employeeVerification: { $ref: '#/components/schemas/EmployeeVerificationPublicApiRecord' } + type: object + '400': + description: 'Invalid request body (unknown enum value or no updatable fields supplied).' '403': - description: 'Forbidden. Insufficient permissions or timesheet already approved.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'One or more entries are still clocked in; clock out before deleting.' + description: Forbidden + '404': + description: 'Verification id not found for the supplied employee.' + '500': + description: 'Internal server error' + security: + - + oauth: + - employee_verifications.write + /api/v1/employee-verifications/integration: + get: + tags: + - EmployeeVerification + - 'Public API' + summary: 'Get employee verification integration status' + description: "Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner." + operationId: get-employee-verification-integration + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid company configuration or timezone.' + title: EmployeeVerificationIntegrationResponse + required: + - integration + properties: + integration: { $ref: '#/components/schemas/EmployeeVerificationIntegration' } + type: object + '403': + description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '500': - description: 'Server error.' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking.write - /api/v1/time_tracking/hour_entries/delete: - post: + - employee_verifications + put: tags: - - 'Time Tracking' + - EmployeeVerification - 'Public API' - summary: 'Delete Timesheet Hour Entries' - description: 'Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' - operationId: delete-timesheet-hour-entries-via-post + summary: 'Enable or disable the employee verification integration' + description: "Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers." + operationId: update-employee-verification-integration requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/HourEntryIdsSchema' + required: + - enabled + properties: + enabled: + description: 'Desired enabled state for the integration.' + type: boolean + type: object responses: - '204': - description: 'Entries deleted successfully. No content returned.' - '400': - description: 'Bad request parameters - missing or invalid hourEntryIds.' + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + title: EmployeeVerificationIntegrationResponse + required: + - integration + properties: + integration: { $ref: '#/components/schemas/EmployeeVerificationIntegration' } + type: object + '400': + description: 'Invalid request body or partner configuration prevented the change.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '403': - description: 'Forbidden. Insufficient user permissions or API access is not turned on.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Hour entry not found.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'Timesheet type conflict.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid time tracking configuration or timezone.' + description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '500': - description: 'Internal server error.' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking.write - /api/v1/time_tracking/timesheet_entries: + - employee_verifications.write + /api/v1/new-hire-packets: get: tags: - - 'Time Tracking' + - Onboarding - 'Public API' - summary: 'List Timesheet Entries' - description: 'Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone.' - operationId: list-timesheet-entries + summary: 'List new hire packets' + description: 'Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients).' + operationId: f44b802c30cdea2b9076b3f82f99c74d parameters: - - name: start - in: query - description: 'YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.' - required: true - schema: - type: string - format: date - example: '2025-01-01' - - - name: end + name: page in: query - description: 'YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.' - required: true + required: false schema: - type: string - format: date - example: '2025-03-01' + type: integer + minimum: 1 - - name: employeeIds + name: pageSize in: query - description: 'A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.' required: false schema: - type: string - pattern: '^\d+(,\d+)*$' - example: '1,2,3' + type: integer + maximum: 100 + minimum: 1 responses: '200': - description: 'Returns the matching timesheet entries grouped by employee.' + description: Success content: application/json: schema: - $ref: '#/components/schemas/EmployeeTimesheetEntryCollectionTransformer' + title: NewHirePacketsListResponse + properties: + newHirePackets: { description: 'Packet summaries for the current page.', type: array, items: { $ref: '#/components/schemas/NewHirePacketPublicApi' } } + page: { description: 'Current page number (1-based).', type: integer } + pageSize: { description: 'Page size used for this response.', type: integer } + totalCount: { description: 'Total packet rows matching visibility (across all pages).', type: integer } + type: object + additionalProperties: true '400': - description: 'Bad request parameters - invalid dates, date range exceeds 365 days, or malformed employeeIds.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'Bad request' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding + post: + tags: + - Onboarding + - 'Public API' + summary: 'Create new hire packet' + description: 'Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags.' + operationId: ec1ba8e76f33960b018d0d7518fe97b5 + requestBody: + required: true + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/NewHirePacketPublicApiWritableBody' + - + required: [employeeId] + properties: { employeeId: { description: 'Employee to attach the new packet to.', type: integer } } + type: object + responses: + '201': + description: Created content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden '500': - description: 'Server error.' + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}': + get: + tags: + - Onboarding + - 'Public API' + summary: 'Get new hire packet by id' + description: 'Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included.' + operationId: 696f0a229cdde60b733568e3c4d043d9 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/NewHirePacketPublicApi' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' security: - - - basic: [] - oauth: - - time_tracking - '/api/v1/time_tracking/employees/{employeeId}/clock_in': - post: + - onboarding + put: tags: - - 'Time Tracking' + - Onboarding - 'Public API' - summary: 'Create Timesheet Clock-In Entry' - description: 'Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`.' - operationId: create-timesheet-clock-in-entry + summary: 'Update new hire packet' + description: 'Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint.' + operationId: 1ab0279d46023eb951a434f24df885f1 parameters: - - name: employeeId + name: id in: path - description: 'ID of the employee to clock in.' required: true schema: type: integer requestBody: - required: false + required: true content: application/json: schema: - $ref: '#/components/schemas/ClockInRequestSchema' + $ref: '#/components/schemas/NewHirePacketPublicApiWritableBody' responses: '200': - description: 'The employee was successfully clocked in. Returns the new clock entry details.' + description: Success content: application/json: schema: - $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + $ref: '#/components/schemas/NewHirePacketPublicApi' '400': - description: 'Bad request parameters - invalid date, time, timezone, project, task, or note.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + delete: + tags: + - Onboarding + - 'Public API' + summary: 'Delete new hire packet' + description: 'Deletes a new hire packet instance by primary key.' + operationId: caa7fc488bcfaef14125398f2ebb987d + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '204': + description: 'No content' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/question-visibility': + put: + tags: + - Onboarding + - 'Public API' + summary: 'Update GTKY answer visibility for a new hire packet' + description: 'Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked.' + operationId: update-new-hire-packet-gtky-answer-visibility + parameters: + - + name: id + in: path + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + title: NewHirePacketGtkyAnswerVisibilityRequest + required: + - hidden + properties: + hidden: + description: 'When true, answers are hidden from typical manager views; when false, answers are shown.' + type: boolean + questionIds: + description: 'Optional. When omitted or null, hidden applies to every GTKY answer row for the packet. When a non-empty array of employee personal question ids, only those questions (must belong to this packet) are updated.' + oneOf: [{ type: array, items: { type: integer, format: int64 } }, { type: 'null' }] + type: object + responses: + '200': + description: 'Success — returns the current visibility for each GTKY answer row on the packet.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: NewHirePacketGtkyAnswerVisibilityResponse + required: + - gtkys + properties: + gtkys: { description: 'GTKY personal-question answer rows with visibility flags.', type: array, items: { title: NewHirePacketGtkyAnswerVisibilityItem, required: [responseId, questionId, hidden], properties: { responseId: { type: integer, format: int64 }, questionId: { type: integer, format: int64 }, hidden: { type: boolean } }, type: object } } + type: object + '400': + description: 'Bad request — invalid body (e.g. hidden type, questionIds shape, ids not linked to this packet), or visibility change not allowed on or after the employee hire date when a hire date is set' '403': - description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/send': + post: + tags: + - Onboarding + - 'Public API' + summary: 'Send new hire packet' + description: "Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state." + operationId: f49b0f1f2fb1ef2c408ba12916ee9baa + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden '404': - description: 'Employee not found.' + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + '/api/v1/new-hire-packets/{id}/cancel': + post: + tags: + - Onboarding + - 'Public API' + summary: 'Cancel new hire packet' + description: 'Cancels the new hire packet. Completed packets cannot be cancelled.' + operationId: 19c7e26a1347ae7eb22919e9b0595c19 + parameters: + - + name: id + in: path + required: true + schema: + type: integer + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '406': - description: 'A future clock entry exists; cannot clock in until it is resolved.' + $ref: '#/components/schemas/NewHirePacketPublicApi' + '400': + description: 'Bad request' + '403': + description: Forbidden + '404': + description: 'Not found' + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding.write + /api/v1/onboarding/new-hire-widget: + get: + tags: + - Onboarding + - 'Public API' + summary: 'Get welcome new hires widget' + description: 'Returns the upcoming-new-hires data that powers the BambooHR home "Welcome New Hires" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user''s new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned.' + operationId: 044949386f2d655c6a627ef53f9434b7 + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'The employee is already clocked in, or timesheet type conflict.' + title: NewHireWidgetResponse + required: + - newHires + properties: + newHires: { description: 'Upcoming new hires visible to the authenticated user, sorted by hire date descending. Empty when the user lacks new-hire-packet or company-directory access.', type: array, items: { $ref: '#/components/schemas/NewHireWidgetItem' } } + type: object + '403': + description: Forbidden + '500': + description: 'Internal server error' + security: + - + oauth: + - onboarding + '/api/v1/employees/{employeeId}/onboarding-experiences': + get: + tags: + - Onboarding + - 'Public API' + summary: 'List employee onboarding experiences' + description: 'Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload).' + operationId: 0158de7cde2a4c4cf577f0b25070d809 + parameters: + - + name: employeeId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid company configuration, invalid timezone, or employee is not configured for time tracking.' + title: OnboardingExperiencesListResponse + properties: + onboardingExperiences: { description: 'Onboarding experience summaries (empty when no running workflow for this employee).', type: array, items: { $ref: '#/components/schemas/OnboardingExperiencePublicApi' } } + type: object + additionalProperties: true + '403': + description: 'Forbidden — missing OAuth permission, onboarding experience phase-1 / workflow framework feature not enabled for the company, or caller cannot access the employee.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '500': - description: 'Server error.' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking.write - '/api/v1/time_tracking/employees/{employeeId}/clock_out': + - onboarding post: tags: - - 'Time Tracking' + - Onboarding - 'Public API' - summary: 'Create Timesheet Clock-Out Entry' - description: 'Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`.' - operationId: create-timesheet-clock-out-entry + summary: 'Create employee onboarding experience' + description: 'Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty).' + operationId: 288aa996aba16d7a495c62321ea999a9 parameters: - name: employeeId in: path - description: 'ID of the employee to clock out.' required: true schema: type: integer + format: int64 requestBody: required: false content: application/json: schema: - $ref: '#/components/schemas/ClockOutRequestSchema' + properties: + sentDateTime: + description: 'Optional sent datetime for the packet when starting the experience (string).' + oneOf: [{ type: string }, { type: 'null' }] + type: object + additionalProperties: true responses: - '200': - description: 'The employee was successfully clocked out. Returns the completed clock entry details.' + '201': + description: Created content: application/json: schema: - $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + $ref: '#/components/schemas/OnboardingExperiencePublicApi' '400': - description: 'Bad request parameters - invalid date, time, or timezone.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Bad request' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '403': - description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + description: 'Forbidden — missing OAuth permission, or onboarding experience phase-1 / workflow framework feature not enabled for the company.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Employee not found, or the clock entry has already been removed.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '409': - description: 'The employee is not currently clocked in (already clocked out), or a timesheet type conflict.' + description: 'Conflict — an onboarding experience workflow already exists for this employee.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid company configuration, invalid timezone, no open clock entries, or employee is not configured for time tracking.' + $ref: '#/components/schemas/ErrorResponse' + '422': + description: 'Workflow instance could not be started or is not running.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '500': - description: 'Server error.' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking.write - /api/v1/time_tracking/clock_entries/store: - post: + - onboarding.write + '/api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId}': + get: tags: - - 'Time Tracking' + - Onboarding - 'Public API' - summary: 'Create or Update Timesheet Clock Entries' - description: 'Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' - operationId: create-or-update-timesheet-clock-entries - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ClockEntriesSchema' + summary: 'Get employee onboarding experience by id' + description: 'Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only.' + operationId: 847dd061d1d1859e7ce8cb3adfc9faf2 + parameters: + - + name: employeeId + in: path + required: true + schema: + type: integer + format: int64 + - + name: onboardingExperienceId + in: path + required: true + schema: + type: integer + format: int64 responses: - '201': - description: 'Entries created or updated successfully. Returns the resulting clock entry details.' - content: - application/json: - schema: - $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' - '400': - description: 'Bad request parameters - invalid data, clock times, project, task, or note.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: 'Unauthorized. Invalid API credentials.' + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/OnboardingExperiencePublicApi' '403': - description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + description: 'Forbidden — missing OAuth permission, onboarding experience phase-1 / workflow framework feature not enabled for the company, or caller cannot access the employee.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '404': - description: 'Employee or timesheet entry not found.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '406': - description: 'Entry is beyond the end of the current period.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'Conflicting entries exist, or timesheet type conflict.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid company configuration or timezone.' + description: 'Not found — no matching running workflow, id does not match the employee’s current packet instance, or no such row.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' '500': - description: 'Internal server error.' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/ErrorResponse' security: - - - basic: [] - oauth: - - time_tracking.write - /api/v1/time_tracking/hour_entries/store: + - onboarding + /api/v1/time_tracking/projects: post: tags: - 'Time Tracking' - 'Public API' - summary: 'Create or Update Timesheet Hour Entries' - description: 'Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' - operationId: create-or-update-timesheet-hour-entries + summary: 'Create Time Tracking Project' + description: "Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access.\n\nBy default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees." + operationId: create-time-tracking-project requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/HourEntriesRequestSchema' + $ref: '#/components/schemas/ProjectCreateRequestSchema' responses: '201': - description: 'Entries created or updated successfully. Returns the resulting hour entry details.' + description: 'Project created successfully. Returns the new project with tasks. The `employeeIds` field is included only when `allowAllEmployees` is false.' content: application/json: schema: - $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' + $ref: '#/components/schemas/TimeTrackingProjectWithTasksAndEmployeeIds' '400': - description: 'Bad request parameters - invalid hours, project, task, or note.' + description: 'Bad request parameters - invalid or missing required fields.' content: application/json: schema: @@ -2244,12 +2466,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Employee or timesheet entry not found.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' '406': description: 'Request not acceptable.' content: @@ -2257,13 +2473,7 @@ paths: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '409': - description: 'Timesheet type conflict.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '412': - description: 'Precondition failed - invalid company configuration or timezone.' + description: 'There was a conflict with the request.' content: application/json: schema: @@ -2280,749 +2490,998 @@ paths: - oauth: - time_tracking.write - /api/v1/webhooks: + /api/v1/scheduling/schedules: get: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'List Webhooks' - description: 'Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook''s ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use "Get Webhook" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events.' - operationId: list-webhooks + summary: 'List Schedules' + description: 'Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting.' + operationId: scheduling-list-schedules + parameters: + - + name: filter + in: query + description: "OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`." + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, createdAt, updatedAt, deletedAt' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination' + required: false + schema: + type: integer + default: 1 + - + name: pageSize + in: query + description: 'The number of items to be returned' + required: false + schema: + type: integer + default: 100 responses: '200': - description: 'An object with a `webhooks` array containing one summary entry per webhook owned by the authenticated user.' + description: 'A list of schedules' content: application/json: schema: - title: WebhooksList + title: Scheduling-ScheduleListResponse-V1 properties: - webhooks: { type: array, items: { properties: { id: { description: 'The ID of the webhook.', type: string, example: '1' }, name: { description: 'The name of the webhook.', type: string }, created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string }, lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', type: [string, 'null'] }, url: { description: 'The URL the webhook sends data to.', type: string } }, type: object } } + data: { description: 'Array of schedule resource objects', type: array, items: { $ref: '#/components/schemas/Scheduling-Schedule-V1' } } + meta: { properties: { totalItems: { description: 'Total number of schedules matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page, or null if on the first page.', properties: { href: { description: 'URL for the previous page.', type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { description: 'Link to the next page, or null if on the last page.', properties: { href: { description: 'URL for the next page.', type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } type: object - '401': - description: 'Unauthorized. No response body is returned.' - '500': - description: 'Internal server error.' + '400': + description: 'Bad request - invalid filter, sort, or pagination parameters.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden - insufficient permissions.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid filter or sort syntax.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks + - 'scheduling:schedules' + - + oauth: + - time_tracking post: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'Create Webhook' - description: "Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change.\n\nThe `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required.\n\nThe response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again.\n\nFor more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks.\n\nFor details on the payloads sent by each event, see the event reference:\n- [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook)\n- [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook)\n- [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook)" - operationId: create-webhook + summary: 'Create Schedule' + description: 'Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration.' + operationId: scheduling-create-schedule requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/NewWebHook' + $ref: '#/components/schemas/Scheduling-CreateScheduleRequest-V1' responses: '201': - description: 'Webhook created successfully. The `privateKey` field is only returned in this response and cannot be retrieved again.' - content: - application/json: - schema: - title: Webhook - properties: - id: { description: 'The ID of the webhook.', type: string, example: '4' } - name: { description: 'The name of the webhook.', type: string, example: 'Example Webhook' } - created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string, example: '2021-09-20 22:38:01' } - lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', type: [string, 'null'], example: '2021-09-20 22:38:01' } - monitorFields: { description: 'A list of fields to monitor. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).', example: [firstName, lastName], oneOf: [{ type: array, items: { type: string } }, { type: 'null' }] } - postFields: { description: 'An object map of field ID or alias to the external name used in the webhook payload.', type: object, default: { }, example: { firstName: Name, lastName: Surname, dateOfBirth: DOB } } - url: { description: 'The URL the webhook sends data to.', type: string, example: 'https://www.example.com' } - format: { description: 'The payload format used by the webhook.', type: string, enum: [json, form-encoded], example: json } - privateKey: { description: 'The private key used to verify webhook authenticity via HMAC-SHA256. Only returned at creation time.', type: string } - includeCompanyDomain: { description: 'Whether the company domain is added to the webhook request header.', type: boolean, example: false } - events: { description: 'Events that trigger this webhook.', type: array, items: { $ref: '#/components/schemas/WebhookEventType' }, example: [employee.created, employee.updated, employee.deleted] } - type: object - '400': - description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + description: 'Schedule created successfully' content: application/json: schema: - title: CreateWebhookBadRequestResponse - oneOf: - - { $ref: '#/components/schemas/WebhookBadRequest' } - - { $ref: '#/components/schemas/WebhookError' } - '401': - description: Unauthorized. - content: - application/json: { } + $ref: '#/components/schemas/Scheduling-Schedule-V1' '403': - description: 'The authenticated user does not have permission to access one or more of the specified fields. The response lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation.' + description: 'Forbidden - insufficient permissions' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '500': - description: 'Internal error' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - '/api/v1/webhooks/{id}': + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + '/api/v1/scheduling/schedules/{id}': get: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'Get Webhook' - description: 'Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist.' - operationId: get-webhook + summary: 'Get Schedule' + description: 'Retrieves a specific schedule by its UUID. Schedules organize shifts for employees.' + operationId: scheduling-get-schedule parameters: - name: id in: path - description: 'The webhook ID to retrieve.' + description: 'The ID of the schedule' required: true schema: - type: integer + type: string + format: uuid responses: '200': - description: 'The full configuration of the requested webhook.' + description: 'Schedule retrieved successfully' content: application/json: schema: - $ref: '#/components/schemas/WebHookResponse' - '401': - description: Unauthorized. + $ref: '#/components/schemas/Scheduling-Schedule-V1' + '403': + description: 'Forbidden - insufficient permissions' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Schedule not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid UUID format.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'scheduling:schedules' + - + oauth: + - time_tracking + delete: + tags: + - Scheduling + - 'Public API' + summary: 'Delete Schedule' + description: 'Deletes a schedule by its UUID. Unworked shifts will be deleted as a result.' + operationId: scheduling-delete-schedule + parameters: + - + name: id + in: path + description: 'The schedule UUID' + required: true + schema: + type: string + format: uuid + responses: + '204': + description: 'Schedule deleted successfully' '403': - description: 'The webhook exists but belongs to a different user.' + description: 'Forbidden - insufficient permissions' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'No webhook exists with the given ID.' + description: 'Schedule not found' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '500': - description: 'Internal server error.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - put: + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + patch: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'Update Webhook' - description: "Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs." - operationId: update-webhook + summary: 'Update Schedule' + description: 'Partially updates an existing schedule by its UUID. Fields not provided retain their existing values.' + operationId: scheduling-update-schedule parameters: - name: id in: path - description: 'The webhook ID to update.' + description: 'The schedule UUID' required: true schema: - type: integer + type: string + format: uuid requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/NewWebHook' + $ref: '#/components/schemas/Scheduling-UpdateScheduleRequest-V1' responses: '200': - description: 'The updated webhook.' - content: - application/json: - schema: - $ref: '#/components/schemas/WebHookResponse' - '400': - description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + description: 'Schedule updated successfully' content: application/json: schema: - title: UpdateWebhookBadRequestResponse - oneOf: - - { $ref: '#/components/schemas/WebhookBadRequest' } - - { $ref: '#/components/schemas/WebhookError' } - '401': - description: Unauthorized. + $ref: '#/components/schemas/Scheduling-Schedule-V1' '403': - description: 'The authenticated user does not have permission to access one or more of the specified fields, or does not have access to the webhook. When caused by field permission violations, `errors` is an array and lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation. When caused by webhook ownership denial, `errors` is an object with a single `error` string (e.g. `{"errors":{"error":"You do not have access to webhook ID: 6"}}`).' + description: 'Forbidden - insufficient permissions' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The webhook to be updated does not exist.' + description: 'Schedule not found.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '500': - description: 'Internal server error.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - delete: + - 'scheduling:schedules.write' + - + oauth: + - time_tracking.write + '/api/v1/scheduling/schedules/{id}/pdf': + get: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'Delete Webhook' - description: "Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs." - operationId: delete-webhook + summary: 'Get Schedule PDF' + description: 'Generates and streams a PDF of the schedule view for the given schedule and date range.' + operationId: scheduling-get-schedule-pdf parameters: - name: id in: path - description: 'The webhook ID to delete.' + description: 'The schedule ID' required: true schema: - type: integer + type: string + - + name: startYmd + in: query + description: 'Start date in YYYY-MM-DD format' + required: true + schema: + type: string + format: date + - + name: endYmd + in: query + description: 'End date in YYYY-MM-DD format' + required: true + schema: + type: string + format: date + - + name: groupBy + in: query + description: 'Group employees by this field' + required: false + schema: + type: string + enum: + - location + - department + - division + - jobTitle + - team + - + name: 'employeeIds[]' + in: query + description: 'Filter by employee IDs. Pass the string "null" as an element to include open shifts.' + required: false + schema: + type: array + items: + type: string + - + name: includeEmployeesWithoutShifts + in: query + description: 'Whether to include employees who have no shifts in the date range' + required: false + schema: + type: boolean + default: false + - + name: includeHolidays + in: query + description: 'Whether to include holidays in the PDF' + required: false + schema: + type: boolean + default: false + - + name: includeTimeOff + in: query + description: 'Whether to include time-off entries in the PDF' + required: false + schema: + type: boolean + default: false responses: '200': - description: 'Webhook deleted successfully. Returns a plain text confirmation message.' + description: 'PDF binary stream' content: - text/plain: - schema: - title: WebhookDeletedResponse - type: string - example: 'Web hook has been deleted.' - '401': - description: Unauthorized. + application/pdf: { } '403': - description: 'The authenticated user does not have permission to delete the requested webhook.' + description: Forbidden + '404': + description: 'Schedule not found' + '422': + description: 'Invalid parameters' + '500': + description: 'Failed to render PDF' + security: + - + oauth: + - 'scheduling:schedules' + /api/v1/scheduling/timezones: + get: + tags: + - Scheduling + - 'Public API' + summary: 'List Timezones' + description: 'Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field.' + operationId: scheduling-list-timezones + parameters: + - + name: filter + in: query + description: "OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`." + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc`' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + - + name: pageSize + in: query + description: 'The number of items to be returned. Defaults to 100.' + required: false + schema: + type: integer + default: 100 + responses: + '200': + description: 'A paginated list of timezones.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '404': - description: 'No webhook exists with the given ID.' + title: Scheduling-TimezoneListResponse-V1 + properties: + data: { type: array, items: { $ref: '#/components/schemas/Scheduling-Timezone-V1' } } + meta: { properties: { totalItems: { description: 'Total number of timezones matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page, or null if on the first page.', properties: { href: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { description: 'Link to the next page, or null if on the last page.', properties: { href: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '403': + description: 'Forbidden - insufficient permissions.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '500': - description: 'Internal error' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - invalid filter or pagination parameters.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - '/api/v1/webhooks/{id}/log': + - 'scheduling:schedules' + - + oauth: + - time_tracking + '/api/v1/scheduling/shifts/{id}': get: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'List Webhook Logs' - description: "Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window.\n\n**Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list." - operationId: list-webhook-logs + summary: 'Get Shift' + description: 'Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted.' + operationId: scheduling-get-shift parameters: - name: id in: path - description: 'The webhook ID to get logs about.' + description: 'The shift uuid' required: true schema: - type: integer + type: string + format: uuid responses: '200': - description: 'An array of webhook delivery log entries for the last 14 days (up to 200 entries). Returns an empty array if no deliveries have occurred.' + description: 'Successfully fetched a shift' content: application/json: schema: - title: WebhookLogListResponse - oneOf: - - { title: WebhookLogList, type: array, items: { title: WebhookLogEntry, properties: { webhookId: { description: 'The ID of the webhook.', type: string }, url: { description: 'The URL the webhook was delivered to.', type: string }, lastAttempted: { description: 'Datetime of the last delivery attempt (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when the delivery target could not be reached.', type: string }, lastSuccess: { description: 'Datetime of the last successful delivery (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when no successful delivery has been recorded.', type: string }, statusCode: { description: 'HTTP status code returned by the webhook endpoint on the last delivery attempt.', type: string }, format: { description: 'The payload format used for this delivery.', type: string }, employeeIds: { description: 'Array of employee IDs included in the webhook payload, returned as strings.', type: array, items: { type: string }, example: ['135'] } }, type: object } } - - { title: WebhookLogRateLimitResponse, properties: { error: { properties: { code: { type: integer, example: 429 }, message: { type: string, example: 'Over rate limit, please try again in 60 seconds' } }, type: object } }, type: object } + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' '403': - description: 'The authenticated user does not have permission to see the requested webhook.' + description: 'Forbidden - user does not have permission' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The webhook does not exist.' + description: 'Not Found - shift not found' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '500': - description: 'Internal error' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - '503': - description: 'Log search timed out. Returns a plain text error message. Try again later.' - content: - text/plain: - schema: - title: WebhookLogTimeoutResponse - type: string - example: 'Log search timed out. Try again later.' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - /api/v1/webhooks/monitor_fields: - get: + - 'scheduling:shifts' + - + oauth: + - time_tracking + delete: tags: - - Webhooks + - Scheduling - 'Public API' - summary: 'List Monitor Fields' - description: 'Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook.' - operationId: list-monitor-fields + summary: 'Delete Shift' + description: 'Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts' + operationId: scheduling-delete-shift + parameters: + - + name: id + in: path + description: 'The shift UUID, or the projected shift composite ID.' + required: true + schema: + type: string + format: uuid + - + name: recurrenceEditOption + in: query + description: "How should the shift be deleted? Choose 'instance' for deleting a single target shift, \n\t\t'future' for deleting the target shift and all following shifts that are in the same recurrence, \n\t\t'all' for deleting all shifts starting from now that are in the same recurrence as the target shift." + required: false + schema: + type: string + default: instance + enum: + - instance + - future + - all + example: future responses: - '200': - description: 'An object with a `fields` array containing one entry per monitorable employee field, including the field ID (as a string), human-readable name, and alias (null if no alias is defined).' - content: - application/json: - schema: - title: MonitorFieldList - required: - - fields - properties: - fields: { description: 'The list of employee fields available for webhook monitoring.', type: array, items: { required: [id, name, alias], properties: { id: { description: 'The field ID, returned as a string.', type: string, example: '4175' }, name: { description: 'The human-readable field name.', type: string, example: 'Accrual Level Start Date' }, alias: { description: 'The field alias used in the BambooHR API (e.g. `firstName`). Null if no alias is defined for this field.', type: [string, 'null'], example: dateOfBirth } }, type: object } } - type: object - '401': - description: Unauthorized. - '500': - description: 'Internal server error.' + '204': + description: 'Shift deleted successfully. No content returned.' + '403': + description: 'Forbidden - user does not have permission.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' - security: - - - basic: [] - - - oauth: - - webhooks - /api/v1/webhooks/post-fields: - get: - tags: - - Webhooks - - 'Public API' - summary: 'Get Webhook Post Fields' - description: 'Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook.' - operationId: get-post-fields - responses: - '200': - description: 'An object with `fields`, `tables`, and `pages` arrays. `fields` contains the postable employee fields with their IDs, aliases, types, and associated page/table IDs. `tables` and `pages` contain the referenced metadata for those associations.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - shift not found.' content: application/json: schema: - $ref: '#/components/schemas/WebHookPostFieldResponseObject' - '403': - description: 'Permission denied.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data.' content: application/json: schema: - $ref: '#/components/schemas/WebhookError' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - webhooks - '/api/v1/datasets/{datasetName}': - post: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + patch: tags: - - Datasets + - Scheduling - 'Public API' - summary: 'Get Data from Dataset (v1)' - description: "Deprecated. Use \"Get Data from Dataset (v2)\" instead.\n\nRetrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000).\n\nUse \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`.\n\nWhen any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`.\n\n**Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count.\n\n**Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last, next, range; int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty." - operationId: get-data-from-dataset-v1 + summary: 'Update Shift' + description: 'Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields.' + operationId: scheduling-update-shift parameters: - - name: datasetName + name: id in: path - description: 'The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + description: 'The shift uuid' required: true schema: type: string - - - name: page - in: query - description: 'The page number to retrieve. Defaults to 1.' - required: false - schema: - type: integer - default: 1 - minimum: 1 - - - name: page_size - in: query - description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' - required: false - schema: - type: integer - default: 500 - maximum: 1000 - minimum: 1 + format: uuid requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DataRequest' + $ref: '#/components/schemas/Scheduling-UpdateSchedulingShiftRequest-V1' responses: '200': - description: 'Returns an object with `data` (array of record objects, or an object keyed by group value when `groupBy` is used), `aggregations` (array, empty when none requested), and `pagination`.' + description: 'Successfully updated a shift' content: application/json: schema: - $ref: '#/components/schemas/EmployeeResponse' - '400': - description: 'Invalid or missing argument(s), such as an unrecognised operator, malformed filter, invalid dataset name, or empty request body.' + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' '403': - description: 'Insufficient permissions to access this dataset.' - '500': - description: 'An unexpected internal error occurred while retrieving data.' - deprecated: true + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - shift not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - report - '/api/v1/custom-reports/{reportId}': + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/scheduling/shifts: get: tags: - - 'Custom Reports' + - Scheduling - 'Public API' - summary: 'Get Report by ID' - description: "Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults." - operationId: get-report-by-id + summary: 'List Shifts' + description: 'Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts.' + operationId: scheduling-list-shifts parameters: - - name: reportId - in: path - description: 'The numeric ID of the saved custom report to execute.' - required: true + name: ids + in: query + description: 'Filter by shift IDs. If provided, other filters are ignored.' + required: false schema: - type: integer + type: array + items: + type: string + format: uuid + - + name: start + in: query + description: 'Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.' + required: false + schema: + type: string + format: date-time + - + name: end + in: query + description: 'End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.' + required: false + schema: + type: string + format: date-time + - + name: employeeIds + in: query + description: 'Filter by employee IDs. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).' + required: false + schema: + type: array + items: + type: string + - + name: scheduleIds + in: query + description: 'Filter by schedule IDs.' + required: false + schema: + type: array + items: + type: string + format: uuid + - + name: statuses + in: query + description: 'Filter by shift statuses.' + required: false + schema: + type: array + items: + type: string + enum: + - planned + - published + - cancelled + - deleted + default: + - planned + - published - name: page in: query - description: 'The page number to retrieve. Defaults to 1.' + description: 'The starting page for pagination.' required: false schema: type: integer default: 1 minimum: 1 - - name: page_size + name: pageSize in: query - description: 'The number of records per page. Defaults to 500. Maximum is 1000.' + description: 'The number of items to be returned.' required: false schema: type: integer - default: 500 + default: 1000 maximum: 1000 minimum: 1 responses: '200': - description: "Paginated report data with dynamic employee fields based on the report's configuration." - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeeResponse' - '400': - description: 'Invalid or missing argument(s). Returned when the request fails validation or contains a type error.' + description: 'Shifts retrieved successfully' content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + title: Scheduling-ShiftListResponse-V1 + properties: + data: { description: 'Array of shifts', type: array, items: { $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' } } + meta: { properties: { totalItems: { description: 'Total number of shifts matching the filter.', type: integer }, page: { description: 'Current page number.', type: integer }, pageSize: { description: 'Number of items per page.', type: integer } }, type: object } + _links: { properties: { prev: { description: 'Link to the previous page.', properties: { href: { description: 'URL for the previous page, or null if on the first page.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, next: { description: 'Link to the next page.', properties: { href: { description: 'URL for the next page, or null if on the last page.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } }, type: object } + type: object '403': - description: 'Access denied. The caller does not have permission to view this report.' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: 'Report not found. No saved custom report exists with the given ID.' + description: 'Forbidden - insufficient permissions' content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: 'An unexpected error occurred while retrieving the report.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - report - /api/v1/datasets: - get: + - 'scheduling:shifts' + - + oauth: + - time_tracking + post: tags: - - Datasets + - Scheduling - 'Public API' - summary: 'List Datasets (v1)' - description: "Deprecated. Use \"List Datasets (v1.2)\" instead.\n\nReturns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nThe response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint." - operationId: list-datasets-v1 + summary: 'Create Shift' + description: 'Creates a new shift in the specified schedule.' + operationId: scheduling-create-shift + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-CreateSchedulingShiftRequest-V1' responses: - '200': - description: 'Returns an object containing a `datasets` array of available datasets.' + '201': + description: 'Successfully created a shift.' content: application/json: schema: - $ref: '#/components/schemas/DatasetResponseV1' + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' '403': - description: 'Forbidden - insufficient permissions to access datasets.' - '500': - description: 'Internal server error while retrieving datasets.' - deprecated: true + description: 'Forbidden - user does not have permission.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Not Found - the referenced schedule does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - report - '/api/v1/datasets/{datasetName}/fields': - get: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/scheduling/shifts/publish: + post: tags: - - Datasets + - Scheduling - 'Public API' - summary: 'Get Fields from Dataset (v1)' - description: "Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead.\n\nReturns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names.\n\nPagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs.\n\nError responses (400, 403, 500) return plain-text bodies, not JSON." - operationId: get-fields-from-dataset-v1 - parameters: - - - name: datasetName - in: path - description: 'The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' - required: true - schema: - type: string - - - name: page - in: query - description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' - required: false - schema: - type: integer - default: 1 - minimum: 1 - - - name: page_size - in: query - description: 'The number of field records to retrieve per page. Defaults to 500. Maximum is 1000.' - required: false - schema: - type: integer - default: 500 - maximum: 1000 - minimum: 1 + summary: 'Publish Shifts' + description: 'Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts.' + operationId: scheduling-publish-shifts + requestBody: + required: true + content: + application/json: + schema: + required: + - shiftIds + properties: + shiftIds: + description: 'Shift IDs to publish.' + type: array + items: { type: string } + maxItems: 100 + minItems: 1 + type: object responses: '200': - description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' + description: 'All shifts published successfully' content: application/json: schema: - $ref: '#/components/schemas/DatasetFieldsResponse' - '400': - description: 'The specified dataset name was not found. The body is a plain-text message.' + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' + '207': + description: 'Some shifts published successfully, but one or more failed due to conflicts' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' + '409': + description: 'All shifts failed to publish due to conflicts' + content: + application/json: + schema: + $ref: '#/components/schemas/Scheduling-PublishShiftsResult-V1' '403': - description: 'Insufficient permissions to access dataset fields. The body is a plain-text message.' - '500': - description: 'Internal server error while fetching the dataset configuration. The body is a plain-text message.' - deprecated: true + description: 'Forbidden - user does not have permission' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - report - /api/v1/custom-reports: + - 'scheduling:shifts.write' + - + oauth: + - time_tracking.write + /api/v1/time-tracking/break-assessments: get: tags: - - 'Custom Reports' + - 'Time Tracking' - 'Public API' - summary: 'List Reports' - description: "Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults.\n\nThe `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`." - operationId: list-reports + summary: 'List Break Assessments' + description: 'Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500.' + operationId: list-break-assessments parameters: - - name: page + name: offset in: query - description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' + description: 'Number of items to skip before returning results. Defaults to 0.' required: false schema: type: integer - default: 1 - minimum: 1 + default: 0 + minimum: 0 - - name: page_size + name: limit in: query - description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + description: 'Maximum number of items to return. Defaults to 100. Maximum is 500.' required: false schema: type: integer - default: 500 - maximum: 1000 - minimum: 1 + default: 100 + maximum: 500 + minimum: 0 + - + name: filter + in: query + description: "OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`." + required: false + schema: + type: string + default: '' responses: '200': - description: 'Returns an object containing a `reports` array of report objects and a `pagination` object with page navigation metadata.' + description: 'A list of paginated break assessments' content: application/json: schema: - $ref: '#/components/schemas/ReportsResponse' + title: TimeTracking-PaginatedBreakAssessmentsResponse-V1 + type: object + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentCollection-V1', description: 'The break assessments' } }, type: object } '403': - description: 'The required feature toggle is not enabled for this account.' + description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: 'An unexpected error occurred while retrieving the list of reports.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - report - '/api/v1/datasets/{datasetName}/field-options': - post: + - 'time_tracking:breaks' + '/api/v1/time-tracking/breaks/{id}': + get: tags: - - Datasets + - 'Time Tracking' - 'Public API' - summary: 'Get Field Options (v1)' - description: "Deprecated. Use \"Get Field Options (v1.2)\" instead.\n\nReturns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value.\n\nUnrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." - operationId: get-field-options-v1 + summary: 'Get Break' + description: 'Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration.' + operationId: get-break parameters: - - name: datasetName + name: id in: path - description: 'The name of the dataset to retrieve field options for.' + description: 'The break ID.' required: true schema: type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/FieldOptionsRequestSchema' + format: uuid responses: '200': - description: 'An object keyed by field name, where each value is an array of available option objects for that field.' + description: 'Successfully retrieved the break.' content: application/json: schema: - title: FieldOptionsResponseV1 - type: object - additionalProperties: - type: array - items: { $ref: '#/components/schemas/FieldOptionsTransformer' } - example: - status: - - { id: Active, value: Active } - - { id: Inactive, value: Inactive } - '400': - description: 'Bad request - missing or invalid fields, filters, or request format.' + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + '403': + description: Forbidden content: application/json: schema: - title: BadRequestV1 - properties: - error: { properties: { code: { type: integer, example: 0 }, message: { type: string, example: 'fields or groupBy missing' } }, type: object } - type: object - '403': - description: 'Forbidden - insufficient permissions to access this dataset.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break not found.' content: application/json: schema: - title: ForbiddenV1 - properties: - error: { properties: { code: { type: integer, example: 403 }, message: { type: string, example: 'You do not have permission to access this resource' } }, type: object } - type: object - '500': - description: 'Internal server error. The response body may be plain text rather than a structured JSON payload.' - deprecated: true + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `id` is not a valid UUID.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - field - /api/v1_2/datasets: - get: + - 'time_tracking:breaks' + delete: tags: - - Datasets + - 'Time Tracking' - 'Public API' - summary: 'List Datasets (v1.2)' - description: "Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nNote: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." - operationId: list-datasets-v1-2 + summary: 'Delete Break' + description: 'Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with.' + operationId: delete-break + parameters: + - + name: id + in: path + description: 'The break ID.' + required: true + schema: + type: string + format: uuid responses: - '200': - description: 'Returns an object containing a `datasets` array of available datasets.' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing' - schema: - type: string + '204': + description: 'Break deleted successfully' + '400': + description: 'Invalid ID format' content: application/json: schema: - title: 'Datasets Response (v1.2)' - properties: - datasets: { description: 'Array of available datasets', type: array, items: { properties: { name: { description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.', type: string, example: employee }, label: { description: 'Human-readable display name for the dataset.', type: string, example: Employee } }, type: object } } - type: object + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Forbidden - insufficient permissions to access datasets.' + description: Forbidden content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break not found' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error while retrieving datasets.' + description: 'Internal server error' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: @@ -3030,85 +3489,46 @@ paths: basic: [] - oauth: - - report - '/api/v1_2/datasets/{datasetName}/fields': - get: + - 'time_tracking:breaks.write' + patch: tags: - - Datasets + - 'Time Tracking' - 'Public API' - summary: 'Get Fields from Dataset (v1.2)' - description: "Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page.\n\nNote: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." - operationId: get-fields-from-dataset-v1-2 + summary: 'Update Break' + description: 'Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success.' + operationId: update-break parameters: - - name: datasetName + name: id in: path - description: 'The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + description: 'The break ID.' required: true schema: type: string - - - name: page - in: query - description: 'The page number to retrieve. Defaults to 1.' - required: false - schema: - type: integer - default: 1 - minimum: 1 - - - name: page_size - in: query - description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' - required: false - schema: - type: integer - default: 500 - maximum: 1000 - minimum: 1 + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreak-V1' responses: '200': - description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing. Echoes the request header value if provided, otherwise generated server-side.' - schema: - type: string + description: 'Successfully updated break' content: application/json: schema: - $ref: '#/components/schemas/DatasetFieldsResponse' + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' '403': - description: 'Insufficient permissions to access dataset fields. Uses RFC 7807 problem+json.' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing.' - schema: - type: string + description: Forbidden content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '422': - description: 'The specified dataset name was not found. The `code` field is `DATASET_NOT_FOUND`.' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing.' - schema: - type: string - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error while fetching the dataset configuration.' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing.' - schema: - type: string + description: 'Invalid request data' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: @@ -3116,172 +3536,171 @@ paths: basic: [] - oauth: - - report - '/api/v1_2/datasets/{datasetName}/field-options': - post: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/breaks': + get: tags: - - Datasets + - 'Time Tracking' - 'Public API' - summary: 'Get Field Options (v1.2)' - description: "Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset.\n\nNote: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." - operationId: get-field-options-v1-2 + summary: 'List Breaks for Break Policy' + description: 'Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering.' + operationId: list-break-policy-breaks parameters: - - name: datasetName + name: id in: path - description: 'The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' + description: 'The break policy ID.' required: true schema: type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/FieldOptionsRequestSchema' + format: uuid + - + name: offset + in: query + description: 'The offset of items to retrieve' + schema: + type: integer + default: 0 + - + name: limit + in: query + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 + - + name: filter + in: query + description: "OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`." + schema: + type: string + default: '' responses: '200': - description: 'An object keyed by field name, where each value is an array of available option objects for that field.' + description: 'Successfully retrieved breaks for the specified break policy' content: application/json: schema: - title: FieldOptionsResponseV1_2 + title: TimeTracking-PaginatedBreaksResponse-V1 type: object - additionalProperties: - type: array - items: { $ref: '#/components/schemas/FieldOptionsTransformer' } - example: - status: - - { id: Active, value: Active } - - { id: Inactive, value: Inactive } - '400': - description: 'Bad request - invalid fields, filters, or request format. Uses RFC 7807 problem+json.' + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1', description: 'The breaks' } }, type: object } + '403': + description: Forbidden content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '403': - description: 'Forbidden - insufficient permissions to access this dataset. Uses RFC 7807 problem+json.' + '422': + description: 'Invalid input' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error. The response body may be plain text rather than a structured payload.' security: - basic: [] - oauth: - - field - x-mcp-annotations: - readOnlyHint: true - destructiveHint: false - openWorldHint: false - '/api/v2/datasets/{datasetName}/data': - post: + - 'time_tracking:breaks' + put: tags: - - Datasets + - 'Time Tracking' - 'Public API' - summary: 'Get Data from Dataset (v2)' - description: "Queries the specified dataset and returns matching records. Each row in the `data` array wraps its values under a `fields` object. The response also includes `links` for pagination navigation and `meta` with page number, page size, and total counts.\n\nUse the `filter` field to supply OData-style expressions (comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, logical operators `and`, `or`, and `in`). Filter fields do not need to appear in the `fields` list. Use `orderBy` to control sort order; sorted fields must also appear in `fields`. Use \"List Datasets (v1.2)\" to discover available dataset names and \"Get Fields from Dataset (v1.2)\" to discover field names.\n\nNote: Compared to \"Get Data from Dataset (v1)\", this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses." - operationId: get-data-from-dataset-v2 + summary: 'Replace Breaks for Break Policy' + description: 'Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted.' + operationId: replace-breaks-for-break-policy parameters: - - name: datasetName + name: id in: path - description: 'The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + description: 'The break policy ID.' required: true schema: type: string - example: employee + format: uuid requestBody: - description: 'Request parameters for dataset data retrieval' required: true content: application/json: schema: - required: - - fields - properties: - fields: - description: 'List of field names to return. Use "Get Fields from Dataset (v1.2)" to discover available names.' - type: array - items: { type: string } - example: [firstName, lastName, status] - filter: - description: 'OData-style filter expression. Supported operators: eq, ne, lt, le, gt, ge, and, or, in.' - type: [string, 'null'] - example: "status eq 'Active' and department in ('Engineering','Sales')" - orderBy: - description: 'Comma-separated sort rules. Each rule is a field name followed by a direction (asc or desc). Sorted fields must also appear in the `fields` array.' - type: [string, 'null'] - example: 'lastName asc, firstName desc' - page: - description: 'Page number to retrieve (1-indexed). Defaults to 1.' - type: integer - default: 1 - minimum: 1 - example: 1 - pageSize: - description: 'Number of records per page. Defaults to 100. Maximum is 1000.' - type: integer - default: 100 - maximum: 1000 - minimum: 1 - example: 25 - type: object + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' responses: '200': - description: 'Returns an object with `data` (array of record objects each containing a `fields` object), `links` (pagination URLs), and `meta` (page, pageSize, totalPages, totalItems).' - headers: - X-Request-ID: - description: 'Correlation ID for request tracing. Echoes the client-provided value or a generated identifier.' - schema: - type: string + description: 'Successfully replaced breaks for the policy' content: application/json: schema: - title: DatasetDataResponseV2 - properties: - data: { description: 'Array of record objects. Each object contains a `fields` object whose keys are the requested field names.', type: array, items: { properties: { fields: { type: object, additionalProperties: { type: string } } }, type: object } } - links: { description: 'Pagination navigation links. Contains `next` and/or `prev` URLs when applicable.', properties: { next: { type: [string, 'null'] }, prev: { type: [string, 'null'] } }, type: object } - meta: { description: 'Pagination metadata.', properties: { page: { type: integer }, pageSize: { type: integer }, totalPages: { type: integer }, totalItems: { type: integer } }, type: object } - type: object + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakCollection-V1' '400': - description: 'Missing or invalid parameters.' + description: 'Bad request - validation errors' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: Unauthorized. '403': - description: 'Insufficient permissions to access the requested dataset.' + description: 'Insufficient permissions' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The specified dataset does not exist or is not accessible.' + description: 'Break policy not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '413': - description: 'The request produced too much data.' + '500': + description: 'Internal server error' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + post: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Create Break' + description: 'Creates a new break and associates it with the specified break policy.' + operationId: create-break + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreak-V1' + responses: + '201': + description: 'Successfully created a break' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' '422': - description: 'Validation failed, such as an invalid filter expression or pagination value.' + description: 'Invalid request data' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error.' + '403': + description: 'Forbidden - user does not have permission' content: application/json: schema: @@ -3291,3057 +3710,2741 @@ paths: basic: [] - oauth: - - report - x-mcp-annotations: - readOnlyHint: true - destructiveHint: false - openWorldHint: false - /api/v1/applicant_tracking/applications: - get: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/assign': + put: tags: + - 'Time Tracking' - 'Public API' - - 'Applicant Tracking' - summary: 'Get Job Applications' - description: 'Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like.' - operationId: get-applications + summary: 'Set Employees for Break Policy' + description: 'Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list.' + operationId: set-break-policy-employees parameters: - - name: page - in: query - description: 'The page number' - schema: - type: integer - - - name: jobId - in: query - description: 'A Job Id to limit results to' - schema: - type: integer - - - name: applicationStatusId - in: query - description: 'One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).' - schema: - type: string - - - name: applicationStatus - in: query - description: 'One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.' - schema: - type: string - - - name: jobStatusGroups - in: query - description: 'One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.' - schema: - type: string - - - name: searchString - in: query - description: 'A general search criteria by which to find applications.' - schema: - type: string - - - name: sortBy - in: query - description: 'A specific field to sort the results by.' - schema: - type: string - enum: - - first_name - - job_title - - rating - - phone - - status - - last_updated - - created_date - - - name: sortOrder - in: query - description: 'Order by which to sort results.' - schema: - type: string - enum: - - ASC - - DESC - - - name: newSince - in: query - description: 'Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).' + name: id + in: path + description: 'The break policy ID.' + required: true schema: type: string - example: '2024-01-01 13:00:00' + format: uuid + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to assign to the break policy. Replaces all existing assignments.' + type: array + items: { type: integer } + type: object responses: - '200': - description: 'Success. Returns a paginated list of applications.' + '204': + description: 'Employees assigned successfully' + '400': + description: 'Invalid data provided.' content: application/json: schema: - title: ApplicationsList - properties: - paginationComplete: { description: 'Indicates whether there are more pages of results available', type: boolean } - nextPageUrl: { description: 'URL to fetch the next page of results, or null if there are no more results', type: [string, 'null'] } - applications: { description: 'List of application objects', type: array, items: { properties: { id: { description: 'Application ID', type: integer }, appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time }, status: { description: 'Current status of the application', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, rating: { description: 'Candidate rating (1-5) or null if not rated', type: [integer, 'null'] }, applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: "Applicant's first name", type: string }, lastName: { description: "Applicant's last name", type: string }, avatar: { description: "URL to applicant's avatar image, or null", type: [string, 'null'] }, email: { description: "Applicant's email address", type: string }, source: { description: 'Source of the application', type: string } }, type: object }, job: { description: 'Information about the job position', properties: { id: { description: 'Job position ID', type: integer }, title: { description: 'Job position title', properties: { id: { description: 'Title ID, or null if not set', type: [integer, 'null'] }, label: { description: 'Title text', type: string } }, type: object } }, type: object } }, type: object } } - type: object - '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - security: - - - basic: [] - /api/v1/applicant_tracking/statuses: - get: - tags: - - 'Public API' - - 'Applicant Tracking' - summary: 'Get Applicant Statuses' - description: 'Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses.' - operationId: get-statuses - responses: - '200': - description: 'Success. Returns an array of applicant status objects.' + description: Forbidden content: application/json: schema: - title: ApplicantStatusList - type: array - items: - title: ApplicantStatus - properties: { id: { description: 'Status ID', type: string }, code: { description: 'Internal status code, or null for custom statuses', type: [string, 'null'] }, name: { description: 'Status display name', type: string }, translatedName: { description: 'Translated display name', type: string }, description: { description: 'Optional description of the status', type: [string, 'null'] }, enabled: { description: 'Whether the status is currently active and selectable', type: boolean }, manageable: { description: 'Whether the status can be managed (edited/deleted) by the company', type: boolean } } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' content: - application/json: { } - '403': - description: 'Insufficient user permissions or API access is not turned on.' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity. The provided `id` is not a valid UUID, or `employeeIds` is not an array of positive integers.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - /api/v1/applicant_tracking/locations: - get: + - + oauth: + - 'time_tracking:breaks.write' + post: tags: + - 'Time Tracking' - 'Public API' - - 'Applicant Tracking' - summary: 'Get Company Locations' - description: 'Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint.' - operationId: get-company-locations + summary: 'Assign Employees to Break Policy' + description: 'Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments.' + operationId: assign-employees-to-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'Array of employee IDs to assign to the break policy' + type: array + items: { type: integer } + minItems: 1 + type: object responses: - '200': - description: 'Success. Returns an array of location objects.' + '204': + description: 'Employees successfully assigned to the break policy' + '400': + description: 'Bad request - invalid data provided (for example: missing `employeeIds`, invalid IDs, or policy assignment constraints).' content: application/json: schema: - title: LocationsList - type: array - items: - $ref: '#/components/schemas/Location' - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Forbidden - insufficient permissions' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Bad request url.' - content: - application/json: { } - security: - - - basic: [] - /api/v1/applicant_tracking/hiring_leads: - get: - tags: - - 'Public API' - - 'Applicant Tracking' - summary: 'Get Hiring Leads' - description: 'Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint.' - operationId: get-hiring-leads - responses: - '200': - description: 'Success. Returns an array of employees who can be assigned as hiring leads.' + description: 'Break policy not found' content: application/json: schema: - title: HiringLeadsList - type: array - items: - title: HiringLead - properties: { employeeId: { description: 'The employee ID to use as the `hiringLead` value in the Create Job Opening request', type: integer }, preferredFullName: { description: "The employee's preferred full name", type: string } } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } - '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - /api/v1/applicant_tracking/application: + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}/unassign': post: tags: + - 'Time Tracking' - 'Public API' - - 'Applicant Tracking' - summary: 'Create Candidate' - description: "Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId." - operationId: create-candidate - requestBody: - required: true + summary: 'Unassign Employees from Break Policy' + description: 'Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees.' + operationId: unassign-employees-from-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true content: - multipart/form-data: + application/json: schema: required: - - firstName - - jobId - - lastName + - employeeIds properties: - firstName: - description: 'The first name of the candidate.' - type: string - lastName: - description: 'The last name of the candidate.' - type: string - email: - description: 'The email address of the candidate. Must be a valid email address.' - type: string - format: email - phoneNumber: - description: 'The phone number of the candidate.' - type: string - source: - description: 'The source of the candidate application, e.g. LinkedIn, Indeed, etc.' - type: string - jobId: - description: 'The id of the job opening for the candidate application.' - type: integer - address: - description: 'The street address of the candidate.' - type: string - city: - description: 'The city of the candidate.' - type: string - state: - description: 'The state or province of the candidate. Accepts state name, abbreviation, or ISO code.' - type: string - zip: - description: 'The zip code or postal code of the candidate.' - type: string - country: - description: 'The country of the candidate. Accepts country name or ISO code.' - type: string - linkedinUrl: - description: 'The LinkedIn profile URL of the candidate. Must match `https?://(.*\.)?linkedin.com/...`.' - type: string - format: uri - dateAvailable: - description: 'The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).' - type: string - format: date - desiredSalary: - description: 'The desired salary of the candidate.' - type: string - referredBy: - description: 'The person or entity that referred the candidate.' - type: string - websiteUrl: - description: 'The personal website, blog, or online portfolio of the candidate. Must be a valid URL.' - type: string - format: uri - highestEducation: - description: 'The highest completed education level of the candidate.' - type: string - enum: ['GED or Equivalent', 'High School', 'Some College', 'College - Associates', 'College - Bachelor of Arts', 'College - Bachelor of Fine Arts', 'College - Bachelor of Science', 'College - Master of Arts', 'College - Master of Fine Arts', 'College - Master of Science', 'College - Master of Business Administration', 'College - Doctorate', 'Medical Doctor', Other] - collegeName: - description: 'The college or university of the candidate.' - type: string - references: - description: 'A list of references supplied by the candidate.' - type: string - resume: - description: 'Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' - type: string - format: binary - coverLetter: - description: 'Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' - type: string - format: binary + employeeIds: + description: 'Array of employee IDs to unassign from the break policy' + type: array + items: { type: integer } + minItems: 1 type: object responses: - '200': - description: 'Success. Returns the result status and the new candidate ID.' + '204': + description: 'Employees successfully unassigned from break policy' + '400': + description: 'Bad request - Invalid data or policy is assigned to all employees' content: application/json: schema: - title: CreateCandidateResponse - properties: - result: { description: "Always 'success' on a successful request", type: string } - candidateId: { description: 'The ID of the newly created candidate', type: integer } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Unprocessable entity - validation failed' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/break-policies/{id}': + get: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Get Break Policy' + description: 'Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks.' + operationId: get-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + - + name: includeCounts + in: query + description: 'Include employee and break counts' + required: false + schema: + type: boolean + default: false + responses: + '200': + description: 'Break policy retrieved successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: Forbidden content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Bad request url.' + description: 'Break policy not found' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '422': - description: 'Unprocessable entity. One or more parameters failed validation.' + description: 'Invalid input' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - /api/v1/applicant_tracking/job_opening: - post: + - + oauth: + - 'time_tracking:breaks' + delete: tags: + - 'Time Tracking' - 'Public API' - - 'Applicant Tracking' - summary: 'Create Job Opening' - description: 'Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID.' - operationId: create-job-opening - requestBody: - required: true - content: - multipart/form-data: - schema: - required: - - employmentType - - hiringLead - - jobDescription - - jobStatus - - postingTitle - properties: - postingTitle: - description: 'The posting title of the job opening.' - type: string - jobStatus: - description: 'The status of the job opening.' - type: string - enum: [Draft, Open, 'On Hold', Filled, Canceled] - hiringLead: - description: 'The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.' - type: integer - department: - description: 'The department of the job opening.' - type: string - employmentType: - description: 'The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.' - type: string - minimumExperience: - description: 'The minimum experience level that qualifies a candidate for the job opening.' - type: string - enum: [Entry-level, Mid-level, Experienced, Manager/Supervisor, "Senior Manager/Supervisor'", Executive, 'Senior Executive'] - compensation: - description: 'The pay rate or compensation for the job opening.' - type: string - jobLocation: - description: 'The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.' - type: integer - jobDescription: - description: 'The long-form text description of the job opening.' - type: string - applicationQuestionResume: - description: 'Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionAddress: - description: 'Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionLinkedinUrl: - description: 'Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionDateAvailable: - description: 'Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionDesiredSalary: - description: 'Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionCoverLetter: - description: 'Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionReferredBy: - description: 'Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionWebsiteUrl: - description: 'Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionHighestEducation: - description: 'Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionCollege: - description: 'Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).' - type: string - enum: ['true', 'false', Required] - applicationQuestionReferences: - description: 'Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).' - type: string - enum: ['true', 'false', Required] - internalJobCode: - description: 'The internal job code for the job opening.' - type: string - locationType: - description: 'The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.' - type: integer - enum: [0, 1, 2] - type: object + summary: 'Delete Break Policy' + description: 'Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed.' + operationId: delete-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid responses: - '200': - description: 'Success. Returns the result status and the new job opening ID.' + '204': + description: 'Break policy deleted successfully' + '400': + description: 'Invalid uuid format' content: application/json: schema: - title: CreateJobOpeningResponse - properties: - result: { description: "Always 'success' on a successful request", type: string } - jobOpeningId: { description: 'The ID of the newly created job opening', type: string } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: Forbidden content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'Bad request url.' - content: - application/json: { } - '422': - description: 'Unprocessable entity. One or more parameters failed validation.' - content: - application/json: { } - security: - - - basic: [] - /api/v1/benefit/company_benefit: - get: - tags: - - Benefits - - 'Public API' - summary: 'List Company Benefits' - description: 'Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use "Get a company benefit".' - operationId: list-company-benefits - responses: - '200': - description: 'An object containing a companyBenefits array of benefit plan summaries.' + description: 'Break policy not found' content: application/json: schema: - title: CompanyBenefitsListResponse - properties: - companyBenefits: { description: 'List of company benefit plan summaries.', type: array, items: { $ref: '#/components/schemas/CompanyBenefitSummary' } } - type: object - '401': - description: 'Unauthorized. Invalid or missing authentication credentials.' + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - benefit - /api/v1/benefit/employee_benefit: - get: + - 'time_tracking:breaks.write' + patch: tags: - - Benefits + - 'Time Tracking' - 'Public API' - summary: 'List Employee Benefits' - description: "Returns current and future benefit enrollment records for one or more employees, grouped by employee. A JSON request body with a filters object is required; at least one filter field must be provided. Results are grouped per employee with pay frequency and an array of per-plan records including enrollment status, deduction amounts, and employer/employee cost-sharing details. Use List Company Benefits to get valid companyBenefitId values.\n\n**Deprecation notice:** This endpoint accepts filters inside a JSON request body on a GET request, which is non-standard — some HTTP clients and proxies may strip request bodies from GET requests. This behavior is deprecated and a future release will migrate to standard query parameters." - operationId: list-employee-benefits + summary: 'Update Break Policy' + description: 'Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success.' + operationId: update-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid requestBody: - description: 'Filters to scope the results. The filters object is required and must include at least one filter field.' required: true content: application/json: schema: - $ref: '#/components/schemas/EmployeeBenefitFilters' + $ref: '#/components/schemas/TimeTracking-UpdateTimeTrackingBreakPolicy-V1' responses: '200': - description: "An object containing an employeeBenefits array, each item representing one employee's benefit enrollments." + description: 'Break policy updated successfully' content: application/json: schema: - title: EmployeeBenefitsListResponse - properties: - employeeBenefits: { description: 'List of per-employee benefit enrollment records.', type: array, items: { properties: { employeeId: { description: 'The ID of the employee.', type: integer }, payFrequency: { description: "The employee's current pay frequency (e.g., 'semi-monthly', 'biweekly'), or null if no pay schedule is set.", type: [string, 'null'] }, employeeBenefit: { description: "The employee's benefit plan enrollments, including both current and future scheduled changes.", type: array, items: { properties: { companyBenefitId: { description: 'The ID of the company benefit plan.', type: string }, companyBenefitName: { description: 'The name of the company benefit plan.', type: string }, coverageLevel: { description: 'The coverage level for this enrollment, or null if not applicable.', type: [string, 'null'] }, deductionEndDate: { description: 'The date deductions end for this enrollment (YYYY-MM-DD), or null.', type: [string, 'null'], format: date }, deductionStartDate: { description: 'The date deductions begin for this enrollment (YYYY-MM-DD), or null.', type: [string, 'null'], format: date }, enrollmentStatus: { description: 'The current or scheduled enrollment status.', type: string, enum: [Eligible, Enrolled, Waived, Withdrew, Terminated, Ineligible] }, enrollmentStatusEffectiveDate: { description: 'The date the enrollment status takes effect (YYYY-MM-DD).', type: string, format: date }, currencyCode: { description: 'ISO 4217 currency code for deduction amounts, or null if not applicable.', type: [string, 'null'] }, employeeAmount: { description: 'The employee-paid deduction amount.', type: [number, 'null'] }, employeeAmountType: { description: "The unit for employeeAmount (e.g., '%', '$').", type: [string, 'null'] }, employeePercentBasedOn: { description: "The basis for percent-based employee deductions (e.g., 'Gross'), or null.", type: [string, 'null'] }, employeeCapAmount: { description: 'The cap on employee deductions, or null if none.', type: [number, 'null'] }, employeeCapAmountType: { description: 'The unit for employeeCapAmount, or null.', type: [string, 'null'] }, employeeAnnualMax: { description: 'The annual maximum employee contribution, or null if none.', type: [number, 'null'] }, companyAmount: { description: 'The employer-paid contribution amount.', type: [number, 'null'] }, companyAmountType: { description: "The unit for companyAmount (e.g., '%', '$').", type: [string, 'null'] }, companyPercentBasedOn: { description: "The basis for percent-based employer contributions (e.g., 'Gross'), or null.", type: [string, 'null'] }, companyCapAmount: { description: 'The cap on employer contributions, or null if none.', type: [number, 'null'] }, companyCapAmountType: { description: 'The unit for companyCapAmount, or null.', type: [string, 'null'] }, companyAnnualMax: { description: 'The annual maximum employer contribution, or null if none.', type: [number, 'null'] }, occurrencesPerYear: { description: "The number of deduction occurrences per year based on the employee's pay schedule.", type: integer } }, type: object } } }, type: object } } - type: object - '400': - description: 'Bad request. The request body is missing, is not valid JSON, or the filters object is missing or invalid.' - '401': - description: 'Unauthorized. Invalid or missing authentication credentials.' + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' '403': - description: 'Forbidden. The authenticated user does not have access to benefit data.' + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Break policy not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid uuid format' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' - security: - - - basic: [] - - - oauth: - - benefit - /api/v1/benefit/member_benefit: - get: - tags: - - Benefits - - 'Public API' - summary: 'List Member Benefit Events' - description: 'Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access.' - operationId: list-member-benefit-events - responses: - '200': - description: 'An object containing a members array of member benefit event records.' + description: 'Internal server error' content: application/json: schema: - title: MemberBenefitEventsResponse - properties: - members: { description: 'List of member benefit event records, one entry per employee or dependent.', type: array, items: { $ref: '#/components/schemas/MemberBenefitEvent' } } - type: object - '401': - description: 'Unauthorized. Invalid or missing authentication credentials.' - '403': - description: 'Forbidden. The authenticated user does not have benefit settings access.' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - benefit - /api/v1/benefits/member-benefits: + - 'time_tracking:breaks.write' + /api/v1/time-tracking/break-policies: get: tags: - - Benefits + - 'Time Tracking' - 'Public API' - summary: 'List Member Benefits' - description: 'Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use "List Company Benefits" to get valid planId values.' - operationId: list-member-benefits + summary: 'List Break Policies' + description: 'Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy.' + operationId: list-break-policies parameters: - - name: calendarYear + name: offset in: query - description: 'The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.' - required: true + description: 'The offset of items to retrieve' schema: - type: string - pattern: '^\d{4}$' - example: '2024' + type: integer + default: 0 - - name: page + name: limit in: query - description: 'The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.' - required: false + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 + - + name: filter + in: query + description: "OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`." schema: type: string - default: '1' - example: '1' + default: '' - - name: pageSize + name: includeCounts in: query - description: 'The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.' + description: 'Include employee and break counts' required: false schema: - type: string - default: '25' - example: '25' + type: boolean + default: false responses: '200': - description: 'A paginated list of member benefit enrollment records for the requested calendar year.' + description: 'Successfully retrieved break policies' content: application/json: schema: - title: MemberBenefitsGetSuccessResponse - properties: - data: { type: array, items: { properties: { memberId: { description: 'The member identifier. Formatted as "employee.{id}" for employees and "dependent.{id}" for dependents.', type: string }, subscriberId: { description: 'The employee ID of the plan subscriber as a string. For dependent members, this is the ID of the employee they are enrolled under.', type: string }, plans: { type: array, items: { properties: { planId: { description: 'The benefit plan ID.', type: string }, dateRanges: { type: array, items: { properties: { startDate: { description: 'Start date of the enrollment period (YYYY-MM-DD).', type: string, format: date }, endDate: { description: 'End date of the enrollment period (YYYY-MM-DD), or null if the enrollment has no calculated end date.', type: [string, 'null'], format: date }, status: { description: 'The enrollment status for this date range.', type: string, enum: [ENROLLED, WAIVED, TERMINATED, WITHDREW, ELIGIBLE, INELIGIBLE] } }, type: object } } }, type: object } } }, type: object } } - meta: { properties: { page: { description: 'The current page number.', type: integer }, pageSize: { description: 'The number of items per page.', type: integer }, totalPages: { description: 'Total number of pages available.', type: integer }, totalItems: { description: 'Total number of member records across all pages.', type: integer } }, type: object } - _links: { properties: { next: { properties: { href: { description: 'URL for the next page of results. Points to the current page when already on the last page.', type: string } }, type: object }, prev: { properties: { href: { description: 'URL for the previous page of results. Points to page 1 when already on the first page.', type: string } }, type: object } }, type: object } + title: TimeTracking-PaginatedBreakPoliciesResponse-V1 type: object - '400': - description: 'Validation error. Returned when calendarYear is missing or not a 4-digit year, or when page or pageSize are out of range.' + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } + '403': + description: Forbidden content: application/json: schema: - title: MemberBenefitsGetValidationErrorResponse - properties: - code: { type: string, example: VALIDATION_ERROR } - message: { type: string, example: 'required property calendarYear is missing' } - type: object - '403': - description: 'Permission denied. The authenticated user is not a benefit admin.' - content: - application/json: - schema: - title: MemberBenefitsGetPermissionDeniedResponse - properties: - code: { type: string, example: PERMISSION_DENIED } - message: { type: string, example: 'Must be benefit admin user' } - type: object - security: - - - basic: [] - - - oauth: - - benefit - /api/v1/benefits/settings/deduction_types/all: - get: - tags: - - Benefits - - 'Public API' - summary: 'List Benefit Deduction Types' - description: 'Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions.' - operationId: list-benefit-deduction-types - responses: - '200': - description: 'An array of benefit deduction type objects.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' content: application/json: schema: - title: BenefitDeductionTypesResponse - type: array - items: - title: BenefitDeductionType - properties: { id: { description: 'The deduction type ID. Integer for leaf types (e.g. 1 for 401(k)); string slug for grouped parent types (e.g. "pretax_subtype").', oneOf: [{ type: integer }, { type: string }] }, deductionTypeName: { description: 'The display name of the deduction type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this type.', type: string }, allowableBenefitTypes: { description: 'The benefit plan types this deduction type can be applied to (e.g. "health", "dental", "retirement").', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type (e.g. garnishments).', type: boolean }, canBeCollectedByTrax: { description: 'Whether this deduction type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'An optional additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden for this deduction type.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', type: [string, 'null'] }, subTypes: { description: 'Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types.', type: array, items: { title: BenefitDeductionSubType, properties: { id: { description: 'The sub-type deduction type ID (always an integer).', type: integer }, deductionTypeName: { description: 'The display name of the sub-type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this sub-type.', type: string }, allowableBenefitTypes: { description: 'Benefit plan types this sub-type applies to.', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type.', type: boolean }, canBeCollectedByTrax: { description: 'Whether this sub-type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'Additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', type: [string, 'null'] }, subTypes: { description: 'Always an empty array for sub-types.', type: array, items: { type: object } }, subTypeText: { description: 'Sub-type selection label. Empty string for leaf types.', type: string }, deductionNote: { description: 'Informational note for this sub-type.', type: string }, deductionNoteLink: { description: 'URL for the deduction note link.', type: string }, deductionNoteLinkText: { description: 'Display text for the deduction note link.', type: string } }, type: object } }, subTypeText: { description: 'A label or question displayed alongside sub-type selection (e.g. "Reportable on the W-2?"). Empty string for types without sub-types.', type: string }, deductionNote: { description: 'An informational note to display to the user when configuring this deduction type.', type: string }, deductionNoteLink: { description: 'A URL for a "learn more" link associated with the deduction note.', type: string }, deductionNoteLinkText: { description: 'The display text for the deduction note link.', type: string } } - type: object - '403': - description: 'The authenticated user does not have Benefits Administration permissions.' - '500': - description: 'An unexpected server error occurred.' + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - benefit - /api/v1/company-profile-data/industry-codes: - put: + - 'time_tracking:breaks' + post: tags: + - 'Time Tracking' - 'Public API' - - Company - summary: 'Update Company Industry Codes' - description: 'Updates the industry codes associated with a company.' - operationId: put-company-industry-codes + summary: 'Create Break Policy' + description: 'Create a break policy. Breaks and assignments can be optionally included and created at the same time.' + operationId: create-break-policy requestBody: required: true content: application/json: schema: - required: - - industryIds - properties: - industryIds: - description: 'List of industry IDs associated with the company. Currently limited to a single entry.' - type: array - items: { type: integer } - type: object - example: - industryIds: - - 1 + $ref: '#/components/schemas/TimeTracking-CreateTimeTrackingBreakPolicy-V1' responses: - '200': - description: 'Returns the updated list of enabled industries for the company' - content: - application/json: - schema: - title: UpdateCompanyIndustryCodesResponse - properties: - company_industries: { $ref: '#/components/schemas/CompanyIndustryCollection', description: 'List of enabled industries for the company' } - type: object - example: - company_industries: [{ industryId: 4, addedByCustomer: false, addedByUserId: 1, addedYmdt: '2021-09-01T12:00:00+00:00' }] - '400': - description: 'Bad request due to invalid request structure or multiple industry IDs provided' + '201': + description: 'Successfully created a break policy' content: application/json: schema: - title: UpdateCompanyIndustryCodes400Response - properties: - message: { type: string } - type: object - example: - message: 'Multiple industries per-company are not supported at this time.' - '401': - description: 'Missing or invalid authentication' + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' '403': - description: 'Insufficient permissions or release toggle not enabled' - content: - application/json: - schema: - title: UpdateCompanyIndustryCodes403Response - properties: - message: { type: string } - type: object - example: - message: 'You do not have permission to access this resource.' - '404': - description: 'Industry ID not found' + description: Forbidden content: application/json: schema: - title: UpdateCompanyIndustryCodes404Response - properties: - message: { type: string } - type: object - example: - message: 'The requested industry ID does not exist.' - '500': - description: 'Internal server error' + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid request data' content: application/json: schema: - title: UpdateCompanyIndustryCodes500Response - properties: - message: { type: string } - type: object - example: - message: 'An error occurred while processing your request.' + $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - 'company:details.write' - /api/v1/company_information: + - 'time_tracking:breaks.write' + '/api/v1/time-tracking/employees/{id}/break-availabilities': get: tags: - - Employees + - 'Time Tracking' - 'Public API' - summary: 'Get Company Information' - description: "Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings." - operationId: get-company-information + summary: 'List Employee Break Availabilities' + description: 'Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access.' + operationId: list-employee-break-availabilities + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: integer + - + name: effective + in: query + description: 'The employee''s local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\TH:i:s format (no timezone offset).' + required: false + schema: + type: string + pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$' + example: '2025-12-15T14:30:00' responses: '200': - description: 'Company information retrieved successfully.' + description: 'Successfully retrieved break availabilities for the specified employee' content: application/json: schema: - title: CompanyInformation - properties: - legalName: { description: 'The legal name of the company.', type: string } - displayName: { description: 'The display name of the company.', type: string } - address: { description: 'The primary address of the company.', properties: { line1: { description: 'The first line of the address.', type: string }, line2: { description: 'The second line of the address. May be an empty string.', type: string }, city: { description: 'The city.', type: string }, state: { description: 'The state or province abbreviation.', type: string }, zip: { description: 'The ZIP or postal code.', type: string } }, type: object } - phone: { description: 'The primary contact phone number of the company.', type: string } - type: object - example: - legalName: BambooHR - displayName: BambooHR - address: { line1: '335 S 560 W', line2: 'Suite 200', city: Lindon, state: UT, zip: '84042' } - phone: 801-724-6600 + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailabilityCollection-V1' '403': - description: 'The API user does not have permission to access company information.' + description: 'Forbidden - insufficient permissions to view this employee or break settings.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - 'company:info' - /api/v1/company-profile-integrations: + - 'time_tracking:breaks' + '/api/v1/time-tracking/employees/{id}/break-policies': get: tags: - - 'Company Profile' + - 'Time Tracking' - 'Public API' - summary: 'Get Company Profile Integrations' - description: "Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration." - operationId: get-company-profile-integrations + summary: 'List Employee Break Policies' + description: 'Retrieves break policies assigned to a specific employee. Requires permission to view the target employee.' + operationId: list-employee-break-policies + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: integer + - + name: offset + in: query + description: 'The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.' + required: false + schema: + type: integer + default: 0 + minimum: 0 + - + name: limit + in: query + description: 'The maximum number of items to return. Must be between 0 and 500. Defaults to 100.' + required: false + schema: + type: integer + default: 100 + maximum: 500 + minimum: 0 responses: '200': - description: 'List of enabled integration identifiers for the company.' + description: 'A list of break policies' content: application/json: schema: - title: CompanyProfileIntegrations - properties: - integrations: { description: 'List of installed integration identifiers.', type: array, items: { type: string } } + title: TimeTracking-PaginatedBreakPoliciesResponse-V1 type: object - example: - integrations: [BAMBOOHR_PAYROLL, GOOGLE_SSO, SLACK] + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyCollection-V1', description: 'The break policies' } }, type: object } '403': - description: 'The API user does not have permission to access company profile integrations.' - '500': - description: 'An unexpected error occurred while retrieving company profile integrations.' + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - 'company:details' - /api/v1/company-profile-data/company-information: - patch: + - 'time_tracking:breaks' + '/api/v1/time-tracking/break-policies/{id}/employees': + get: tags: - - 'Company Profile' + - 'Time Tracking' - 'Public API' - summary: 'Update company information (phone, address, legal name)' - description: 'Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data.' - operationId: patch-company-profile-company-information - requestBody: - required: true - content: - application/merge-patch+json: - schema: - properties: - legalName: - description: 'Legal name of the company (name_of_employer). Required (non-empty) when this field is present in the patch.' - type: string - phone: - description: 'Contact phone number. Required (non-empty) when this field is present in the patch.' - type: string - address: - description: 'Company address. When `address` is included in the patch (non-null object), `city`, `state`, and `zip` must all be sent as non-empty strings. `line1` and `line2` are optional (JSON null removes a line per merge-patch).' - properties: { line1: { description: 'Street address line 1 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', type: [string, 'null'] }, line2: { description: 'Street address line 2 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', type: [string, 'null'] }, city: { description: 'City. Required (non-empty) when address is patched.', type: string }, state: { description: 'State. Required (non-empty) when address is patched.', type: string }, zip: { description: 'Zip or postal code. Required (non-empty) when address is patched.', type: string } } - type: object - type: object + summary: 'List Break Policy Employees' + description: 'Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array.' + operationId: list-break-policy-employees + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + - + name: offset + in: query + description: 'The offset of items to retrieve' + schema: + type: integer + default: 0 + - + name: limit + in: query + description: 'The maximum items to retrieve' + schema: + type: integer + default: 100 + maximum: 500 responses: '200': - description: 'Successful response; same shape as GET company-profile-data' + description: 'A list of employees assigned to a break policy' content: application/json: schema: - title: CompanyProfileData - properties: - id: { type: integer } - subdomain: { type: [string, 'null'] } - legalName: { type: [string, 'null'] } - displayName: { type: [string, 'null'] } - address: { properties: { line1: { type: [string, 'null'] }, line2: { type: [string, 'null'] }, city: { type: [string, 'null'] }, state: { type: [string, 'null'] }, zip: { type: [string, 'null'] } }, type: object } - phone: { type: [string, 'null'] } - status: { type: string } - terminationDate: { type: [string, 'null'] } - industryCode: { type: [string, 'null'] } + title: TimeTracking-PaginatedBreakPolicyEmployeesResponse-V1 type: object - '400': - description: 'Invalid JSON or Content-Type' + allOf: + - { $ref: '#/components/schemas/TimeTracking-OffsetPaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/TimeTracking-BreakPolicyEmployeeCollection-V1', description: 'The employees' } }, type: object } + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - 'time_tracking:breaks' + '/api/v1/time-tracking/break-policies/{id}/sync': + put: + tags: + - 'Time Tracking' + - 'Public API' + summary: 'Sync Break Policy' + description: 'Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request.' + operationId: sync-break-policy + parameters: + - + name: id + in: path + description: 'The break policy ID.' + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-SyncTimeTrackingBreakPolicy-V1' + responses: + '200': + description: 'Break policy synced successfully' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicyWithRelations-V1' '403': - description: 'Permission denied' + description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Validation failed (invalid field types or incomplete profile after merge)' + '404': + description: 'Break policy not found' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error' + '422': + description: 'Invalid data provided' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - 'company:details.write' - /api/v1/company-profile-data/display-name: - put: + - 'time_tracking:breaks.write' + /api/v1/time-tracking/break-policies/suggestions: + post: tags: - - 'Company Profile' + - 'Time Tracking' - 'Public API' - summary: 'Update company display name' - description: 'Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services.' - operationId: put-company-profile-display-name + summary: 'Get Break Policy Suggestions' + description: 'Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill.' + operationId: get-break-policy-suggestions requestBody: + required: true content: application/json: schema: required: - - companyName + - prompt properties: - companyName: - description: 'The new display name for the company. Must be a non-empty string with a maximum length of 255 characters (character count, not bytes, so multibyte UTF-8 characters are properly supported).' + prompt: + description: 'The user''s request or question for break policy suggestions (e.g. "What policies do we need for our California employees?")' type: string - example: 'Acme Corporation' + minLength: 1 type: object responses: '200': - description: 'Company name updated successfully' - content: - application/json: - schema: - title: UpdateCompanyNameSuccessResponse - properties: - success: { description: 'Indicates whether the operation was successful', type: boolean, example: true } - type: object - '400': - description: 'Invalid request body or company name' + description: 'Suggestions returned successfully' content: application/json: schema: - title: UpdateCompanyNameBadRequestResponse + title: TimeTracking-BreakPolicySuggestionsResponse-V1 properties: - error: { properties: { message: { type: string } }, type: object } + suggestedPolicies: { type: array, items: { required: [id, title, breaks], properties: { id: { type: string }, title: { type: string }, description: { oneOf: [{ type: string }, { type: 'null' }] }, breaks: { type: array, items: { required: [name, duration, paid, availabilityType], properties: { name: { type: string }, duration: { type: integer }, paid: { type: boolean }, availabilityType: { type: string, enum: [anytime, hours_worked, time_of_day] }, availabilityMinHoursWorked: { oneOf: [{ type: number }, { type: 'null' }] } }, type: object } } }, type: object } } type: object - '403': - description: 'Permission denied' + '422': + description: 'Invalid request — prompt is missing or empty' content: application/json: schema: - title: UpdateCompanyNameForbiddenResponse - properties: - error: { properties: { message: { type: string } }, type: object } - type: object + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Internal server error — agent workflow failed' content: application/json: schema: - title: UpdateCompanyNameInternalErrorResponse - properties: - error: { properties: { message: { type: string } }, type: object } - type: object + $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - 'company:details.write' - /api/v1/compensation/benchmarks: + - 'time_tracking:breaks' + /api/v1/time-tracking/projects: get: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'List Compensation Benchmarks' - description: "Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract." - operationId: list-compensation-benchmarks + summary: 'List Time Tracking Projects' + description: 'Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500).' + operationId: list-projects + parameters: + - + name: filter + in: query + description: 'OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`.' + required: false + schema: + type: string + - + name: sort + in: query + description: 'Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`.' + required: false + schema: + type: string + - + name: page + in: query + description: 'The starting page for pagination. Defaults to 1.' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: pageSize + in: query + description: 'The number of items per page. Defaults to 100, maximum 500.' + required: false + schema: + type: integer + default: 100 + maximum: 500 + minimum: 1 responses: '200': - description: 'Object with a `jobLocationPairs` array and banner-dismissal flags.' + description: 'A paginated list of projects.' content: application/json: schema: - title: CompensationBenchmarksList - properties: - jobLocationPairs: { type: array, items: { title: CompensationBenchmarkJobLocationPair, properties: { jobDetails: { properties: { id: { type: string }, title: { type: string } }, type: object }, locationDetails: { properties: { id: { type: string }, name: { type: string }, location: { type: string }, country: { type: [string, 'null'] } }, type: [object, 'null'] }, isRemote: { type: boolean }, benchmarks: { description: 'Saved benchmarks attached to this job/location. Empty when none are configured.', type: array, items: { title: CompensationBenchmarkOverview, properties: { id: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { type: [number, 'null'] }, originalMin: { type: [number, 'null'] }, originalMax: { type: [number, 'null'] }, originalCurrencyCode: { type: [string, 'null'] } }, type: object }, sourceId: { type: [string, 'null'] }, sourceColor: { type: [string, 'null'] }, isMercer: { type: boolean }, dataYear: { description: 'Mercer data year; defaults to the current Mercer data year when missing on a Mercer benchmark. `null` for non-Mercer benchmarks.', type: [string, 'null'] } }, type: object } }, employees: { type: array, items: { title: CompensationBenchmarkJobLocationEmployee, properties: { id: { type: string }, name: { type: string }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, photoUrl: { type: string }, managerName: { type: [string, 'null'] }, managerTitle: { type: [string, 'null'] }, division: { properties: { id: { type: string }, value: { type: string } }, type: [object, 'null'] }, department: { properties: { id: { type: string }, value: { type: string } }, type: [object, 'null'] }, currencyConversionFailed: { type: boolean } }, type: object } }, internalJobPayBand: { properties: { jobId: { type: string }, group: { type: string }, level: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { type: [number, 'null'] }, originalMin: { type: [number, 'null'] }, originalMax: { type: [number, 'null'] }, originalCurrencyCode: { type: [string, 'null'] }, description: { type: string } }, type: object } }, type: [object, 'null'] } }, type: object } } - dismissReviewBanner: { type: boolean } - dismissAddLocationBanner: { type: boolean } - dismissMercerDataInfoBanner: { type: boolean } + title: Project-PaginatedTimeTrackingProjectsResponse-V1 type: object + allOf: + - { $ref: '#/components/schemas/Project-PaginatedResponseData-V1' } + - { properties: { data: { $ref: '#/components/schemas/Project-TimeTrackingProjectCollection-V1', description: 'The projects on the current page.' } }, type: object } + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to read compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while loading compensation benchmarks.' + '422': + description: 'Invalid query parameters (e.g., invalid `page`, `pageSize`, `filter`, or `sort`).' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks - put: + - 'time_tracking:project' + post: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Update Compensation Benchmark' - description: 'Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`.' - operationId: update-compensation-benchmark + summary: 'Create Time Tracking Project' + description: 'Creates a new time tracking project. Returns the newly created project resource on success.' + operationId: create-project requestBody: + required: true content: application/json: schema: - title: UpdateCompensationBenchmarkRequest - required: - - id - - currencyCode - - benchmarkValue - - benchmarkMin - - benchmarkMax - properties: - id: - description: 'ID of the benchmark to update.' - type: string - currencyCode: - description: 'ISO 4217 currency code for the benchmark values.' - type: string - mjlJobCode: - description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' - type: string - benchmarkValue: - description: 'Benchmark median value.' - type: number - benchmarkMin: - description: 'Benchmark minimum value.' - type: number - benchmarkMax: - description: 'Benchmark maximum value.' - type: number - benchmarkSource: - description: 'Free-text label describing where the benchmark came from.' - type: string - externalJobTitle: - type: string - externalLocation: - type: string - externalLevel: - type: string - externalJobDescription: - type: string - companiesSurveyed: - type: integer - employeesSurveyed: - type: integer - sourceId: - description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' - type: string - sourceDate: - description: 'Date the benchmark source data applies to.' - type: string - dataYear: - description: 'Year of the underlying survey data. Omitting this field clears `data_year` on the stored benchmark, so callers updating a Mercer benchmark should resend the existing value.' - type: string - externalCountry: - type: string - externalSecondaryLocation: - type: string - externalCompanySize: - type: string - externalIndustry: - type: string - type: object + $ref: '#/components/schemas/Project-CreateTimeTrackingProject-V1' responses: - '200': - description: 'Object containing the saved benchmark row and a status message.' + '201': + description: 'Project created successfully.' content: application/json: schema: - title: UpdatedCompensationBenchmark - properties: - savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { type: [string, 'null'] }, mercerJobCode: { type: [string, 'null'] }, benchmarkSource: { type: [string, 'null'] }, currencyCode: { type: [string, 'null'] }, benchmarkValue: { type: [number, 'null'] }, benchmarkMin: { type: [number, 'null'] }, benchmarkMax: { type: [number, 'null'] }, externalJobTitle: { type: [string, 'null'] }, externalLocation: { type: [string, 'null'] }, externalLevel: { type: [string, 'null'] }, externalJobDescription: { type: [string, 'null'] }, companiesSurveyed: { type: [integer, 'null'] }, employeesSurveyed: { type: [integer, 'null'] }, sourceId: { type: [string, 'null'] }, sourceDate: { type: [string, 'null'] }, dataYear: { type: [string, 'null'] }, externalCountry: { type: [string, 'null'] }, externalSecondaryLocation: { type: [string, 'null'] }, externalCompanySize: { type: [string, 'null'] }, externalIndustry: { type: [string, 'null'] } }, type: object } - message: { type: string } - type: object - '403': - description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '400': + description: 'Malformed request body.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while saving the benchmark.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - oauth: - - compensation_benchmarks.write - post: - tags: - - 'Compensation Benchmarking' - - 'Public API' - summary: 'Create Compensation Benchmark' - description: "Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`." - operationId: create-compensation-benchmark - requestBody: - content: - application/json: - schema: - title: CreateCompensationBenchmarkRequest - required: - - jobTitleId - - currencyCode - - benchmarkValue - - benchmarkMin - - benchmarkMax - properties: - jobTitleId: - description: 'ID of the company job title the benchmark applies to.' - type: string - jobLocationId: - description: 'Optional job location ID to scope the benchmark to a specific location.' - type: string - currencyCode: - description: 'ISO 4217 currency code for the benchmark values.' - type: string - mjlJobCode: - description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' - type: string - benchmarkValue: - description: 'Benchmark median value.' - type: number - benchmarkMin: - description: 'Benchmark minimum value.' - type: number - benchmarkMax: - description: 'Benchmark maximum value.' - type: number - benchmarkSource: - description: 'Free-text label describing where the benchmark came from.' - type: string - externalJobTitle: - type: string - externalLocation: - type: string - externalLevel: - type: string - externalJobDescription: - type: string - companiesSurveyed: - type: integer - employeesSurveyed: - type: integer - sourceId: - description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' - type: string - sourceDate: - description: 'Date the benchmark source data applies to.' - type: string - dataYear: - description: 'Year of the underlying survey data.' - type: string - externalCountry: - type: string - externalSecondaryLocation: - type: string - externalCompanySize: - type: string - externalIndustry: - type: string - type: object - responses: - '200': - description: 'Object containing the newly created benchmark row and a status message.' + '403': + description: 'Forbidden. Insufficient permissions.' content: application/json: schema: - title: CreatedCompensationBenchmark - properties: - savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { type: [string, 'null'] }, mercerJobCode: { type: [string, 'null'] }, benchmarkSource: { type: [string, 'null'] }, currencyCode: { type: [string, 'null'] }, benchmarkValue: { type: [number, 'null'] }, benchmarkMin: { type: [number, 'null'] }, benchmarkMax: { type: [number, 'null'] }, externalJobTitle: { type: [string, 'null'] }, externalLocation: { type: [string, 'null'] }, externalLevel: { type: [string, 'null'] }, externalJobDescription: { type: [string, 'null'] }, companiesSurveyed: { type: [integer, 'null'] }, employeesSurveyed: { type: [integer, 'null'] }, sourceId: { type: [string, 'null'] }, sourceDate: { type: [string, 'null'] }, dataYear: { type: [string, 'null'] }, externalCountry: { type: [string, 'null'] }, externalSecondaryLocation: { type: [string, 'null'] }, externalCompanySize: { type: [string, 'null'] }, externalIndustry: { type: [string, 'null'] } }, type: object } - message: { type: string } - type: object - '403': - description: 'The authenticated caller lacks permission to create compensation benchmarks.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Conflict. A project with this name already exists.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while creating the benchmark.' + '422': + description: 'Validation error (e.g. missing `name`, invalid `employeeIds`, name too long).' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks.write - /api/v1/compensation/benchmarks/details/export: + - 'time_tracking:project.write' + '/api/v1/time-tracking/projects/{projectId}': get: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Export Compensation Benchmark Details' - description: "Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job." - operationId: export-compensation-benchmark-details + summary: 'Get Time Tracking Project' + description: 'Retrieves a single time tracking project by its ID, including the list of employees assigned to it.' + operationId: get-project parameters: - - name: jobId - in: query - description: 'ID of the company job title to export benchmark details for.' + name: projectId + in: path + description: 'The project ID.' required: true schema: - type: string - - - name: locationId - in: query - description: 'Optional job location ID to restrict the export to one location.' - required: false - schema: - type: string + type: integer responses: '200': - description: 'CSV payload streamed with a `Content-Disposition: attachment` header. The filename is derived from the job title and location.' + description: 'Successfully retrieved the project.' content: - text/csv: + application/json: schema: - title: CompensationBenchmarkDetailsExport - type: string + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '401': + description: 'Unauthorized. Missing or invalid authentication.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to read compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while generating the CSV export. Also returned when `jobId` is missing.' + '404': + description: 'Project not found.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `projectId` is not a valid integer.' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks - /api/v1/compensation/benchmarks/details: - get: + - 'time_tracking:project' + '/api/v1/time-tracking/projects/{id}': + delete: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Get Compensation Benchmark Details' - description: 'Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values.' - operationId: get-compensation-benchmark-details + summary: 'Delete Time Tracking Project' + description: 'Deletes a time tracking project by its ID.' + operationId: delete-project parameters: - - name: jobId - in: query - description: 'ID of the company job title to fetch benchmark details for.' + name: id + in: path + description: 'The project ID.' required: true schema: - type: string - - - name: locationId - in: query - description: 'Optional job location ID. When omitted, results aggregate across all locations for the job.' - required: false - schema: - type: string + type: integer responses: - '200': - description: 'Benchmark detail object for the requested job (and optional location).' + '204': + description: 'Project deleted successfully.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: application/json: schema: - title: CompensationBenchmarkDetails - properties: - jobId: { type: string } - jobTitle: { type: string } - locationId: { type: [string, 'null'] } - location: { type: [string, 'null'] } - mercerBenchmarkDetails: { description: 'Populated when a Mercer benchmark is linked to this job/location.', properties: { id: { type: string }, source: { type: string }, jobCode: { type: string }, jobTitle: { type: string }, jobLocation: { type: string }, jobLevel: { type: [string, 'null'] }, jobDescription: { type: [string, 'null'] }, formattedJobDescription: { type: [array, 'null'], items: { type: string } }, companiesSurveyed: { type: [integer, 'null'] }, employeesSurveyed: { type: [integer, 'null'] }, lastReviewed: { type: [string, 'null'] }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { type: [number, 'null'] }, originalMin: { type: [number, 'null'] }, originalMax: { type: [number, 'null'] }, originalCurrencyCode: { type: [string, 'null'] }, description: { type: [string, 'null'] } }, type: object }, createdYmdt: { type: [string, 'null'] }, updatedYmdt: { type: [string, 'null'] }, dataYear: { type: [string, 'null'] } }, type: [object, 'null'] } - companyPayRange: { description: 'Pay range aggregated from the current employees in this job and location.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { type: [number, 'null'] }, originalMin: { type: [number, 'null'] }, originalMax: { type: [number, 'null'] }, originalCurrencyCode: { type: [string, 'null'] } }, type: [object, 'null'] } - internalJobPayBand: { description: 'Company-configured internal pay band for this job.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { type: [number, 'null'] }, originalMin: { type: [number, 'null'] }, originalMax: { type: [number, 'null'] }, originalCurrencyCode: { type: [string, 'null'] }, description: { type: [string, 'null'] } }, type: [object, 'null'] } - benchmarkValues: { description: 'All saved benchmarks for this job/location. Empty when no benchmarks exist.', type: array, items: { properties: { id: { type: integer }, jobTitle: { type: [string, 'null'] }, lastEdited: { type: [string, 'null'] }, sourceColorCode: { type: [string, 'null'] }, sourceDate: { type: [string, 'null'] }, createdYmdt: { type: [string, 'null'] }, updatedYmdt: { type: [string, 'null'] }, dataYear: { type: [string, 'null'] }, median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string } }, type: object } } - employees: { type: array, items: { title: CompensationBenchmarkDetailEmployee, properties: { id: { type: integer }, name: { type: string }, jobTitle: { properties: { id: { type: string }, value: { type: string }, jobTitle: { type: string } }, type: object }, location: { properties: { id: { type: string }, value: { type: string }, name: { type: string } }, type: [object, 'null'] }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, varianceFromPayBand: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: [object, 'null'] }, yearsAtCompany: { type: integer }, rangePenetration: { type: [number, 'null'] }, compaRatio: { type: [number, 'null'] }, compaRatioStatus: { type: [string, 'null'] }, photoUrl: { type: string }, country: { type: [string, 'null'] }, isRemote: { type: [boolean, 'null'] }, currencyConversionFailed: { type: boolean } }, type: object } } - type: object + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to read compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while loading benchmark details. Also returned when `jobId` is missing.' + '404': + description: 'Project not found.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided project ID is not a valid integer.' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks - '/api/v1/compensation/benchmarks/{id}': - delete: + - 'time_tracking:project.write' + patch: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Delete Compensation Benchmark' - description: 'Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`.' - operationId: delete-compensation-benchmark + summary: 'Update Time Tracking Project' + description: 'Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged.' + operationId: update-project parameters: - name: id in: path - description: 'Integer ID of the compensation benchmark to delete.' + description: 'The project ID.' required: true schema: type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-UpdateTimeTrackingProject-V1' responses: '200': - description: 'Literal string `"Success"` indicating the benchmark was deleted.' + description: 'Successfully updated the project.' content: application/json: schema: - title: DeleteCompensationBenchmarkResponse - type: string - '403': - description: 'The authenticated caller lacks permission to delete compensation benchmarks.' + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + '400': + description: 'Malformed request body.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while deleting the benchmark.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - oauth: - - compensation_benchmarks.write - /api/v1/compensation/benchmarks/sources: - get: - tags: - - 'Compensation Benchmarking' - - 'Public API' - summary: 'List Compensation Benchmark Sources' - description: 'Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark.' - operationId: list-compensation-benchmark-sources - responses: - '200': - description: 'Array of benchmark sources. Empty when no sources are configured.' + '403': + description: 'Forbidden. Insufficient permissions.' content: application/json: schema: - title: CompensationBenchmarkSources - type: array - items: - title: CompensationBenchmarkSource - properties: { id: { type: string }, name: { type: string }, sort: { description: 'Sort order position, returned as a numeric string.', type: string }, count: { description: 'Number of benchmarks attached to this source, returned as a numeric string.', type: string }, colorCode: { description: 'Hex color used to display the source in the UI.', type: [string, 'null'] } } - type: object - '403': - description: 'The authenticated caller lacks permission to read compensation benchmarks.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Project not found.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while loading benchmark sources.' + '409': + description: 'A project with the supplied name already exists.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error (e.g., invalid `projectId`, no fields provided, invalid types, or setting `hasTasks=true` on a project with no active tasks).' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks - put: + - 'time_tracking:project.write' + '/api/v1/time-tracking/projects/{projectId}/tasks': + get: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Update Compensation Benchmark Sources' - description: 'Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ "result": "success" }` when all updates are applied.' - operationId: update-compensation-benchmark-sources - requestBody: - content: - application/json: - schema: - title: UpdateCompensationBenchmarkSourcesRequest - required: - - benchmarkSources - properties: - benchmarkSources: - type: array - items: { title: UpdateCompensationBenchmarkSourceItem, required: [id, name], properties: { id: { description: 'ID of the existing benchmark source to update.', type: string }, name: { description: 'New display name for the source. Cannot equal `mercer`.', type: string }, sort: { description: 'Optional new sort position, as a numeric string.', type: string } }, type: object } - type: object + summary: 'List Time Tracking Project Tasks' + description: 'Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`.' + operationId: list-project-tasks + parameters: + - + name: projectId + in: path + description: 'The project ID.' + required: true + schema: + type: integer + - + name: 'statuses[]' + in: query + description: 'Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks.' + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - active + - deleted + default: + - active + - + name: page + in: query + description: 'The page number to retrieve (1-indexed).' + required: false + schema: + type: integer + default: 1 + minimum: 1 + - + name: pageSize + in: query + description: 'The maximum number of items per page.' + required: false + schema: + type: integer + default: 25 + maximum: 500 + minimum: 1 responses: '200': - description: 'Object containing `{ "result": "success" }` when all source updates succeed.' + description: 'Successfully retrieved tasks for the project.' content: application/json: schema: - title: UpdateCompensationBenchmarkSourcesResponse + title: Project-PaginatedTasksResponse-V1 + required: + - data + - meta + - _links properties: - result: { type: string } + data: { $ref: '#/components/schemas/Project-TimeTrackingTaskCollection-V1', description: 'Array of task resources for the current page.' } + meta: { required: [totalItems, page, pageSize, totalPages], properties: { totalItems: { type: integer, minimum: 0, example: 42 }, page: { type: integer, minimum: 1, example: 1 }, pageSize: { type: integer, minimum: 1, example: 25 }, totalPages: { type: integer, minimum: 0, example: 2 } }, type: object } + _links: { required: [prev, next], properties: { prev: { properties: { href: { type: string, format: uri } }, oneOf: [{ type: object }, { type: 'null' }] }, next: { properties: { href: { type: string, format: uri } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } type: object - '400': - description: 'The `benchmarkSources` array is missing, empty, contains items without `id` or `name`, or contains the reserved `mercer` name.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while updating benchmark sources.' + '404': + description: 'Project not found.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'A query parameter is invalid.' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks.write + - 'time_tracking:project' post: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Create Compensation Benchmark Source' - description: "Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name." - operationId: create-compensation-benchmark-source + summary: 'Create Time Tracking Project Task' + description: 'Creates a new task on the specified time tracking project.' + operationId: create-project-task + parameters: + - + name: projectId + in: path + description: 'The project ID.' + required: true + schema: + type: string requestBody: + required: true content: application/json: schema: - title: CreateCompensationBenchmarkSourceRequest - required: - - name - properties: - name: - description: 'Display name for the new benchmark source. Cannot be empty or equal to `mercer`.' - type: string - colorCode: - description: 'Optional hex color used to display the source in the UI.' - type: string - type: object + $ref: '#/components/schemas/Project-CreateTimeTrackingProjectTask-V1' responses: - '200': - description: "Object with the newly created source's ID and name." + '201': + description: 'Task created.' content: application/json: schema: - title: CreatedCompensationBenchmarkSource - properties: - id: { description: 'ID of the newly created benchmark source.', type: integer } - name: { type: string } - type: object - '400': - description: 'The `name` is missing, empty, or the reserved value `mercer`.' + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '403': + description: Forbidden. content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '403': - description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + '404': + description: 'Project not found.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while creating the benchmark source.' + '409': + description: 'Duplicate task name within the project.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error.' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks.write - delete: + - 'time_tracking:project.write' + '/api/v1/time-tracking/tasks/{id}': + get: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Delete Compensation Benchmark Source' - description: 'Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ "result": "success" }` when the source is removed.' - operationId: delete-compensation-benchmark-source - requestBody: - content: - application/json: - schema: - title: DeleteCompensationBenchmarkSourceRequest - required: - - id - properties: - id: - description: 'ID of the benchmark source to delete. Must be non-empty.' - type: string - type: object + summary: 'Get Time Tracking Task' + description: 'Retrieves a single time tracking task by its ID.' + operationId: get-task + parameters: + - + name: id + in: path + description: 'The task ID.' + required: true + schema: + type: integer responses: '200': - description: 'Object containing `{ "result": "success" }` when the source is deleted.' + description: 'Successfully retrieved the task.' content: application/json: schema: - title: DeleteCompensationBenchmarkSourceResponse - properties: - result: { type: string } - type: object - '400': - description: 'The id is missing, empty, or not a valid non-zero numeric identifier.' + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while deleting the benchmark source.' + '404': + description: 'Task not found.' content: - application/problem+json: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The provided `id` is not a valid integer.' + content: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks.write - /api/v1/compensation/benchmarks/import: - post: + - 'time_tracking:project' + delete: tags: - - 'Compensation Benchmarking' + - 'Time Tracking' - 'Public API' - summary: 'Import Compensation Benchmarks From CSV' - description: 'Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed.' - operationId: import-compensation-benchmarks - requestBody: - description: 'Multipart form containing a single `file` part with the CSV upload.' - required: true - content: - multipart/form-data: - schema: - title: ImportCompensationBenchmarksRequest - required: - - file - properties: - file: - description: 'CSV file to import.' - type: string - format: binary - type: object + summary: 'Delete Time Tracking Task' + description: 'Deletes a time tracking task by its ID.' + operationId: delete-task + parameters: + - + name: id + in: path + description: 'The task ID.' + required: true + schema: + type: integer responses: - '200': - description: 'Parsed CSV preview containing the raw rows and a suggested column map.' + '204': + description: 'The task was deleted successfully.' + '401': + description: 'Unauthorized. Missing or invalid authentication.' content: application/json: - schema: - title: ImportCompensationBenchmarksResponse - properties: - uploadData: { description: 'Parsed CSV rows. Each row is an array of cell values as strings.', type: array, items: { title: ImportCompensationBenchmarksRow, type: array, items: { type: string } } } - columnMap: { description: 'Suggested mapping between expected benchmark fields and CSV column headers.', type: array, items: { $ref: '#/components/schemas/CompensationBenchmarking-ColumnMap' } } - type: object - '400': - description: 'The multipart request is missing the `file` part.' - content: - application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated caller lacks permission to import compensation benchmarks.' + description: 'Forbidden. Insufficient permissions.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'The uploaded CSV could not be parsed (missing columns, invalid data, etc.).' + '404': + description: 'Task not found.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Unexpected server error while parsing the CSV upload.' + '422': + description: 'The provided `id` is not a valid integer.' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - compensation_benchmarks.write - /api/v1/employees: - get: + - 'time_tracking:project.write' + patch: tags: - - Employees + - 'Time Tracking' - 'Public API' - summary: 'List Employees' - description: "Returns a cursor-paginated collection of employees for the authenticated caller's company, with optional filtering and sorting. Each record contains a fixed set of identity and job fields (`employeeId`, `firstName`, `lastName`, `preferredName`, `photoUrl`, `jobTitleName`, `status`) plus any additional fields requested via `fields`; values the caller cannot see are returned as `null` and their field names are listed in `_restrictedFields`. Use `filter[ids]` to batch-fetch specific employees (IDs are obtained from prior responses of this endpoint or the Employee Directory), `filter[firstName]` / `filter[lastName]` / `filter[jobTitleName]` for case-insensitive substring matches, and `filter[status]` (`active` or `inactive`) to narrow by status. Prefer this endpoint for lightweight directory-style listings and batch lookups; for the full set of fields on a single employee use Get Employee, and for tabular reporting across many custom fields use the Datasets API." - operationId: list-employees + summary: 'Update Time Tracking Task' + description: 'Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided.' + operationId: update-task parameters: - - name: filter - in: query - description: 'Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data.' - required: false - style: deepObject - explode: true - schema: - $ref: '#/components/schemas/GetEmployeesFilterRequestObject' - - - name: sort - in: query - description: 'Comma-separated list of sortable fields. Prefix a field with "-" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information.' - required: false - schema: - type: string - - - name: fields - in: query - description: 'Comma-separated list of additional fields to include in the response beyond the default set. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null and their names are listed in `_restrictedFields`.' - required: false - schema: - type: array - items: - $ref: '#/components/schemas/EmployeeOptionalField' - example: 'workEmail,mobilePhone' - - - name: page - in: query - description: 'Cursor-based pagination parameters (`limit`, `after`, `before`).' - required: false - style: deepObject - explode: true + name: id + in: path + description: 'The task ID.' + required: true schema: - $ref: '#/components/schemas/EmployeeCursorPaginationQueryObject' + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project-UpdateTimeTrackingProjectTask-V1' responses: '200': - description: 'Paginated list of employees.' + description: 'Task updated.' content: application/json: schema: - $ref: '#/components/schemas/GetEmployeesResponseObject' - examples: - basic: - summary: 'Basic paginated result' - value: { data: [{ employeeId: '123', firstName: Ava, lastName: Nguyen, preferredName: Ava, photoUrl: 'https://cdn.example.com/p/123.jpg', jobTitleName: 'Engineering Manager', status: Active, _restrictedFields: [] }, { employeeId: '124', firstName: Sam, lastName: Park, preferredName: Sam, photoUrl: null, jobTitleName: 'Product Designer', status: Active, _restrictedFields: [photoUrl] }], meta: { total: 2456, page: { limit: 100, nextCursor: eyJjdXJzb3IiOiAiYWZ0ZXItMTI0In0=, prevCursor: null } }, _links: { self: { href: 'https://api.bamboohr.com/api/v1/employees?page%5Blimit%5D=100' }, next: { href: 'https://api.bamboohr.com/api/v1/employees?page%5Blimit%5D=100&page%5Bafter%5D=eyJ...' } } } - batchByIds: - summary: 'Batch fetch by a list of employee IDs' - value: { data: [{ employeeId: '200', firstName: Lena, lastName: Smith, preferredName: Lena, photoUrl: null, jobTitleName: 'QA Analyst', status: Active, _restrictedFields: [] }, { employeeId: '207', firstName: Marco, lastName: Lee, preferredName: null, photoUrl: null, jobTitleName: 'Support Engineer', status: Inactive, _restrictedFields: [photoUrl] }], meta: { total: 2, page: { limit: 2, nextCursor: null, prevCursor: null } }, _links: { self: { href: 'https://api.bamboohr.com/api/v1/employees?filter%5Bids%5D=200%2C207&page%5Blimit%5D=2' } } } - '400': - description: 'Invalid request parameters. The `error.code` is `BadRequest` for filter, sort, or field validation failures and `BadPage` when the `page` cursor is malformed, the wrong cursor direction is supplied, or the boundary employee changed between calls (for example, was deleted or no longer matches the filter).' + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + '403': + description: Forbidden. content: application/json: schema: - $ref: '#/components/schemas/Employee-StringCodeErrorResponse-V1' - '401': - description: Unauthorized. - '429': - description: 'Too many requests.' - '500': - description: 'Internal server error.' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Task not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate task name within the project.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - oauth: - - employee - - - oauth: - - 'employee:name' - - - oauth: - - 'employee:job' - - - oauth: - - employee_directory + basic: [] - oauth: - - 'sensitive_employee:protected_info' + - 'time_tracking:project.write' + /api/v1/time_tracking/clock_entries/delete: post: tags: - - Employees + - 'Time Tracking' - 'Public API' - summary: 'Create Employee' - description: "Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid employee field name may be included as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nTrax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division." - operationId: create-employee + summary: 'Delete Timesheet Clock Entries' + description: 'Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' + operationId: delete-timesheet-clock-entries-via-post requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/postNewEmployee' - application/xml: - schema: - $ref: '#/components/schemas/postNewEmployee' - text/xml: - schema: - $ref: '#/components/schemas/postNewEmployee' + $ref: '#/components/schemas/ClockEntryIdsSchema' responses: - '201': - description: 'Employee created successfully. No response body is returned. The Location header points to the new employee resource.' - headers: - Location: - description: 'The URL to view the employee in the web app. The ID of the employee will be included.' - schema: - type: string + '204': + description: 'Entries deleted successfully. No content returned.' '400': - description: 'If the posted XML or JSON is invalid or the minimum fields are not provided.' + description: 'Bad request parameters - missing or invalid clockEntryIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'If the API user does not have permission to add an employee.' + description: 'Forbidden. Insufficient permissions or timesheet already approved.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '409': - description: 'If an employee field was given an invalid value.' + description: 'One or more entries are still clocked in; clock out before deleting.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - employee.write - - - oauth: - - 'employee:assets.write' - - - oauth: - - 'employee:contact.write' - - - oauth: - - 'employee:compensation.write' - - - oauth: - - 'employee:custom_fields_encrypted.write' - - - oauth: - - 'employee:custom_fields.write' - - - oauth: - - 'employee:demographic.write' - - - oauth: - - 'employee:dependent.write' - - - oauth: - - 'employee:dependent:ssn.write' - - - oauth: - - 'employee:education.write' - - - oauth: - - 'employee:emergency_contacts.write' - - - oauth: - - 'employee:identification.write' - - - oauth: - - 'employee:job.write' - - - oauth: - - 'employee:management.write' - - - oauth: - - 'employee:name.write' - - - oauth: - - 'employee:photo.write' - - - oauth: - - 'employee:vaccination.write' - - - oauth: - - 'sensitive_employee:protected_info.write' - - - oauth: - - 'sensitive_employee:address.write' - - - oauth: - - 'sensitive_employee:creditcards.write' - - - oauth: - - 'employee:payroll.write' - - - oauth: - - employee - - - oauth: - - 'employee:job' - '/api/v1/employees/{id}/tables/{table}/{rowId}': + - time_tracking.write + /api/v1/time_tracking/hour_entries/delete: post: tags: - - 'Tabular Data' + - 'Time Tracking' - 'Public API' - summary: 'Update Table Row' - description: 'Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML.' - operationId: update-table-row - parameters: - - - name: id - in: path - description: 'The employee ID.' - required: true - schema: - type: string - - - name: table - in: path - description: 'The name of the table containing the row to update (e.g., jobInfo, compensation).' - required: true - schema: - type: string - - - name: rowId - in: path - description: 'The ID of the row to update.' - required: true - schema: - type: string + summary: 'Delete Timesheet Hour Entries' + description: 'Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries.' + operationId: delete-timesheet-hour-entries-via-post requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TableRowUpdate' - application/xml: - schema: - $ref: '#/components/schemas/TableRowUpdate' - text/xml: - schema: - $ref: '#/components/schemas/TableRowUpdate' + $ref: '#/components/schemas/HourEntryIdsSchema' responses: - '200': - description: 'Row updated successfully. A 200 response is returned as long as at least one field was updated, even if some fields were skipped due to permissions. No response body is returned.' + '204': + description: 'Entries deleted successfully. No content returned.' '400': - description: 'The posted JSON or XML is malformed, or required fields are missing.' + description: 'Bad request parameters - missing or invalid hourEntryIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Permission denied.' + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The employee, table, or row does not exist.' - '406': - description: 'One or more field values are invalid.' + description: 'Hour entry not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '409': - description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + description: 'Timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '412': - description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + description: 'Precondition failed - invalid time tracking configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - employee.write - - - oauth: - - 'employee:job.write' - - - oauth: - - 'employee:compensation.write' - - - oauth: - - 'employee:custom_fields.write' - - - oauth: - - 'employee:custom_fields_encrypted.write' - - - oauth: - - 'employee:assets.write' - - - oauth: - - 'employee:emergency_contacts.write' - - - oauth: - - 'sensitive_employee:creditcards.write' - - - oauth: - - 'employee:education.write' - delete: + - time_tracking.write + /api/v1/time_tracking/timesheet_entries: + get: tags: - - 'Tabular Data' + - 'Time Tracking' - 'Public API' - summary: 'Delete Employee Table Row' - description: "Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule." - operationId: delete-employee-table-row + summary: 'List Timesheet Entries' + description: 'Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone.' + operationId: list-timesheet-entries parameters: - - name: id - in: path - description: 'The employee ID.' + name: start + in: query + description: 'YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.' required: true schema: type: string + format: date + example: '2025-01-01' - - name: table - in: path - description: 'The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField).' + name: end + in: query + description: 'YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.' required: true schema: type: string + format: date + example: '2025-03-01' - - name: rowId - in: path - description: 'The ID of the specific row to delete.' - required: true + name: employeeIds + in: query + description: 'A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.' + required: false schema: type: string + pattern: '^\d+(,\d+)*$' + example: '1,2,3' responses: '200': - description: 'Returns `success: true` if the row was deleted. Returns `success: false` with an error message if the row was not found or could not be deleted.' + description: 'Returns the matching timesheet entries grouped by employee.' content: application/json: schema: - title: TableRowDeleteResponse - properties: - success: { description: 'Whether the row was successfully deleted.', type: boolean } - error: { description: 'Error message when success is false. Absent when success is true.', type: string } - type: object + $ref: '#/components/schemas/EmployeeTimesheetEntryCollectionTransformer' '400': - description: 'Bad request. Invalid employee ID or table name.' + description: 'Bad request parameters - invalid dates, date range exceeds 365 days, or malformed employeeIds.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '401': - description: Unauthorized. + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Permission denied. The caller lacks write access to this table for the specified employee.' - '409': - description: 'Conflict. The row has pending approval changes and cannot be deleted until they are resolved.' - '412': - description: 'Precondition failed. The row cannot be deleted because it is tied to an active pay schedule.' + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - employee.write - - - oauth: - - 'employee:job.write' - - - oauth: - - 'employee:compensation.write' - - - oauth: - - 'employee:custom_fields.write' - - - oauth: - - 'employee:custom_fields_encrypted.write' - - - oauth: - - 'employee:assets.write' - - - oauth: - - 'employee:emergency_contacts.write' - - - oauth: - - 'sensitive_employee:creditcards.write' - - - oauth: - - 'employee:education.write' - '/api/v1/files/{fileId}': - get: + - time_tracking + '/api/v1/time_tracking/employees/{employeeId}/clock_in': + post: tags: - - 'Company Files' + - 'Time Tracking' - 'Public API' - summary: 'Get Company File' - description: "Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section." - operationId: get-company-file + summary: 'Create Timesheet Clock-In Entry' + description: 'Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`.' + operationId: create-timesheet-clock-in-entry parameters: - - name: fileId + name: employeeId in: path - description: 'The ID of the company file to download.' + description: 'ID of the employee to clock in.' required: true schema: type: integer + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/ClockInRequestSchema' responses: '200': - description: "The raw file content. The Content-Type header reflects the file's MIME type." + description: 'The employee was successfully clocked in. Returns the new clock entry details.' content: - application/octet-stream: { } + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + '400': + description: 'Bad request parameters - invalid date, time, timezone, project, task, or note.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The API user does not have permission to access this file.' + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'No file exists with the given ID.' + description: 'Employee not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'A future clock entry exists; cannot clock in until it is resolved.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The employee is already clocked in, or timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration, invalid timezone, or employee is not configured for time tracking.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - company_file + - time_tracking.write + '/api/v1/time_tracking/employees/{employeeId}/clock_out': post: tags: - - 'Company Files' + - 'Time Tracking' - 'Public API' - summary: 'Update Company File' - description: 'Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated.' - operationId: update-company-file + summary: 'Create Timesheet Clock-Out Entry' + description: 'Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`.' + operationId: create-timesheet-clock-out-entry parameters: - - name: fileId + name: employeeId in: path - description: 'The ID of the company file to update.' + description: 'ID of the employee to clock out.' required: true schema: type: integer requestBody: - required: true + required: false content: application/json: schema: - $ref: '#/components/schemas/CompanyFileUpdate' + $ref: '#/components/schemas/ClockOutRequestSchema' responses: '200': - description: 'The company file was updated successfully.' + description: 'The employee was successfully clocked out. Returns the completed clock entry details.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' '400': - description: 'The request body contains malformed JSON or XML.' - '403': - description: 'The API user does not have permission to modify this file or its category.' - '404': - description: 'The file or the target category was not found.' - security: - - - basic: [] - - - oauth: - - company_file.write - delete: - tags: - - 'Company Files' - - 'Public API' - summary: 'Delete Company File' - description: 'Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use "Company Files > List Company Files" to obtain file IDs.' - operationId: delete-company-file - parameters: - - - name: fileId - in: path - description: 'The ID of the company file to delete.' - required: true - schema: - type: integer - responses: - '200': - description: 'The company file was deleted successfully. No response body is returned.' + description: 'Bad request parameters - invalid date, time, or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The API user does not have permission to delete the requested file.' + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The requested file was not found, or the Files tool is not enabled for the company.' + description: 'Employee not found, or the clock entry has already been removed.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The employee is not currently clocked in (already clocked out), or a timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration, invalid timezone, no open clock entries, or employee is not configured for time tracking.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'An internal server error occurred.' + description: 'Server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - company_file.write - '/api/v1/employees/{id}/files/{fileId}': - get: + - time_tracking.write + /api/v1/time_tracking/clock_entries/store: + post: tags: - - 'Employee Files' + - 'Time Tracking' - 'Public API' - summary: 'Get Employee File' - description: "Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the API key.\n\nUse \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404." - operationId: get-employee-file - parameters: - - - name: id - in: path - description: 'The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key.' - required: true - schema: - type: integer - - - name: fileId - in: path - description: 'The ID of the employee file to download.' - required: true - schema: - type: integer + summary: 'Create or Update Timesheet Clock Entries' + description: 'Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' + operationId: create-or-update-timesheet-clock-entries + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ClockEntriesSchema' responses: - '200': - description: "The employee file content streamed as a binary download. The Content-Type matches the file's stored MIME type and a Content-Disposition header provides the original filename." + '201': + description: 'Entries created or updated successfully. Returns the resulting clock entry details.' content: - application/octet-stream: + application/json: schema: - title: 'Employee File Download' - type: string - format: binary + $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' + '400': + description: 'Bad request parameters - invalid data, clock times, project, task, or note.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: "The API user does not have permission to access the requested employee or the file's section." + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The requested employee file was not found, or it has been archived or soft-deleted.' + description: 'Employee or timesheet entry not found.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '406': + description: 'Entry is beyond the end of the current period.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Conflicting entries exist, or timesheet type conflict.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - 'employee:file' + - time_tracking.write + /api/v1/time_tracking/hour_entries/store: post: tags: - - 'Employee Files' + - 'Time Tracking' - 'Public API' - summary: 'Update Employee File' - description: "Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs." - operationId: update-employee-file - parameters: - - - name: id - in: path - description: 'The ID of the employee whose file is being updated.' - required: true - schema: - type: integer - - - name: fileId - in: path - description: 'The ID of the employee file to update.' - required: true - schema: - type: integer + summary: 'Create or Update Timesheet Hour Entries' + description: 'Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created.' + operationId: create-or-update-timesheet-hour-entries requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/EmployeeFileUpdate' - application/xml: - schema: - $ref: '#/components/schemas/EmployeeFileUpdate' - responses: - '200': - description: 'The employee file metadata was updated successfully. No response body is returned.' - '400': - description: 'The request body contains malformed JSON or XML.' - '403': - description: "The API user does not have permission to modify the requested employee's file, its category, or the file belongs to a read-only section." - '404': - description: 'The requested employee file or target category was not found.' - '500': - description: 'An internal server error occurred.' - security: - - - basic: [] - - - oauth: - - 'employee:file.write' - delete: - tags: - - 'Employee Files' - - 'Public API' - summary: 'Delete Employee File' - description: "Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the API key. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs." - operationId: delete-employee-file - parameters: - - - name: id - in: path - description: 'The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key.' - required: true - schema: - type: integer - - - name: fileId - in: path - description: 'The ID of the employee file to delete.' - required: true - schema: - type: integer - responses: - '200': - description: 'The employee file was deleted successfully, or had already been deleted for this employee.' - '403': - description: "The caller does not have permission to delete this employee's file, or the file belongs to a BambooPayroll-managed section and the caller is not a payroll admin." - '404': - description: 'The file was not found for the specified employee, or the Files tool is not enabled for this company.' - '500': - description: 'An internal server error occurred.' - security: - - - basic: [] - - - oauth: - - 'employee:file.write' - /api/v1/pay-grades-and-bands/job-titles-with-employees: - get: - tags: - - 'Public API' - summary: 'List job titles with employees' - description: 'Get job titles with their associated employees for levels and bands configuration.' - operationId: 3af7d1ac36c35008b8ebb93fecbdb35b + $ref: '#/components/schemas/HourEntriesRequestSchema' responses: - '200': - description: 'Successful response' + '201': + description: 'Entries created or updated successfully. Returns the resulting hour entry details.' content: application/json: schema: - title: PayGradesAndBandsJobTitlesWithEmployeesResponse - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-JobTitleWithEmployees' - '403': - description: 'Insufficient permissions' + $ref: '#/components/schemas/TimesheetEntryInfoCollectionApiTransformer' + '400': + description: 'Bad request parameters - invalid hours, project, task, or note.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error' + '401': + description: 'Unauthorized. Invalid API credentials.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/status-counts: - get: - tags: - - 'Public API' - summary: 'Get compensation level group status counts' - description: 'Get the count of compensation level groups in each status (draft, published, historic).' - operationId: 99b887959832c80eead3a176acc0c2d4 - responses: - '200': - description: 'Successful response' + '403': + description: 'Forbidden. Insufficient user permissions or API access is not turned on.' content: application/json: schema: - $ref: '#/components/schemas/LevelsAndBands-GroupStatusCounts' - '403': - description: 'Insufficient permissions' + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Employee or timesheet entry not found.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error' + '406': + description: 'Request not acceptable.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/status: - get: - tags: - - 'Public API' - summary: 'Get levels and bands status' - description: 'Get the validation status of each step in the levels and bands configuration wizard.' - operationId: 6fbb2fe60e374d2204f1222252105945 - responses: - '200': - description: 'Successful response' + '409': + description: 'Timesheet type conflict.' content: application/json: schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBandsStatus' - '403': - description: 'Insufficient permissions' + $ref: '#/components/schemas/ProblemDetailsResponse' + '412': + description: 'Precondition failed - invalid company configuration or timezone.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Internal server error.' content: application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' security: + - + basic: [] - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/levels: + - time_tracking.write + /api/v1/webhooks: get: tags: + - Webhooks - 'Public API' - summary: 'List compensation level groups and levels' - description: 'Get all compensation level groups and levels with validation errors and warnings.' - operationId: db8c61787c931b69afbf9e501be85256 + summary: 'List Webhooks' + description: 'Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook''s ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use "Get Webhook" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events.' + operationId: list-webhooks responses: '200': - description: 'Successfully retrieved groups and levels' - content: - application/json: - schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' - '403': - description: 'Insufficient permissions' + description: 'An object with a `webhooks` array containing one summary entry per webhook owned by the authenticated user.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: WebhooksList + properties: + webhooks: { type: array, items: { properties: { id: { description: 'The ID of the webhook.', type: string, example: '1' }, name: { description: 'The name of the webhook.', type: string }, created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string }, lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', oneOf: [{ type: string }, { type: 'null' }] }, url: { description: 'The URL the webhook sends data to.', type: string } }, type: object } } + type: object + '401': + description: 'Unauthorized. No response body is returned.' '500': - description: 'Internal server error' + description: 'Internal server error.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' security: + - + basic: [] - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/pay-bands: - get: + - webhooks + post: tags: + - Webhooks - 'Public API' - summary: 'Get pay bands for levels' - description: 'Get pay bands for each compensation level with validation errors and warnings. If percentageRange is null, band type is min-mid-max; otherwise it is percentage-based.' - operationId: fb29d4d4790104b6892a4b6d6db67e19 + summary: 'Create Webhook' + description: "Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change.\n\nThe `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required.\n\nThe response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again.\n\nFor more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks.\n\nFor details on the payloads sent by each event, see the event reference:\n- [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook)\n- [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook)\n- [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook)" + operationId: create-webhook + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewWebHook' responses: - '200': - description: 'Successful response' + '201': + description: 'Webhook created successfully. The `privateKey` field is only returned in this response and cannot be retrieved again.' content: application/json: schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + title: Webhook + properties: + id: { description: 'The ID of the webhook.', type: string, example: '4' } + name: { description: 'The name of the webhook.', type: string, example: 'Example Webhook' } + created: { description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).', type: string, example: '2021-09-20 22:38:01' } + lastSent: { description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.', example: '2021-09-20 22:38:01', oneOf: [{ type: string }, { type: 'null' }] } + monitorFields: { description: 'A list of fields to monitor. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).', example: [firstName, lastName], oneOf: [{ type: array, items: { type: string } }, { type: 'null' }] } + postFields: { description: 'An object map of field ID or alias to the external name used in the webhook payload.', type: object, default: { }, example: { firstName: Name, lastName: Surname, dateOfBirth: DOB } } + url: { description: 'The URL the webhook sends data to.', type: string, example: 'https://www.example.com' } + format: { description: 'The payload format used by the webhook.', type: string, enum: [json, form-encoded], example: json } + privateKey: { description: 'The private key used to verify webhook authenticity via HMAC-SHA256. Only returned at creation time.', type: string } + includeCompanyDomain: { description: 'Whether the company domain is added to the webhook request header.', type: boolean, example: false } + events: { description: 'Events that trigger this webhook.', type: array, items: { $ref: '#/components/schemas/WebhookEventType' }, example: [employee.created, employee.updated, employee.deleted] } + type: object + '400': + description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + content: + application/json: + schema: + title: CreateWebhookBadRequestResponse + oneOf: + - { $ref: '#/components/schemas/WebhookBadRequest' } + - { $ref: '#/components/schemas/WebhookError' } + '401': + description: Unauthorized. + content: + application/json: { } '403': - description: 'Insufficient permissions' + description: 'The authenticated user does not have permission to access one or more of the specified fields. The response lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' '500': - description: 'Internal server error' + description: 'Internal error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' security: + - + basic: [] - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/job-titles: + - webhooks.write + - + oauth: + - webhooks + '/api/v1/webhooks/{id}': get: tags: + - Webhooks - 'Public API' - summary: 'Get job titles and level assignments' - description: 'Get job titles with their associated compensation levels and all groups/levels. Returns job titles mapped to level IDs and complete group/level hierarchy.' - operationId: 4acdbb25aa278f9f94b44b42ef9f1b27 - responses: - '200': - description: 'Successful response' - content: - application/json: - schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' - '403': - description: 'Insufficient permissions' + summary: 'Get Webhook' + description: 'Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist.' + operationId: get-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The full configuration of the requested webhook.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebHookResponse' + '401': + description: Unauthorized. + content: + application/json: { } + '403': + description: 'The webhook exists but belongs to a different user.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'No webhook exists with the given ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' '500': - description: 'Internal server error' + description: 'Internal server error.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' security: + - + basic: [] - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands/review: - get: + - webhooks + put: tags: + - Webhooks - 'Public API' - summary: 'Get levels and bands review data' - description: 'Get consolidated review data for levels and bands with all validation errors and warnings across all steps.' - operationId: 12c40475623893cf0434b3ae69e36975 + summary: 'Update Webhook' + description: "Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs." + operationId: update-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewWebHook' responses: '200': - description: 'Successful response' + description: 'The updated webhook.' content: application/json: schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + $ref: '#/components/schemas/WebHookResponse' + '400': + description: 'Request body is malformed or missing required fields. Common causes: missing `format`, missing `monitorFields` when required by the selected events, URL not starting with `https://`, or an invalid `format` value.' + content: + application/json: + schema: + title: UpdateWebhookBadRequestResponse + oneOf: + - { $ref: '#/components/schemas/WebhookBadRequest' } + - { $ref: '#/components/schemas/WebhookError' } + '401': + description: Unauthorized. '403': - description: 'Insufficient permissions' + description: 'The authenticated user does not have permission to access one or more of the specified fields, or does not have access to the webhook. When caused by field permission violations, `errors` is an array and lists which `monitorFields`, `postFields`, and `unknownFields` caused the violation. When caused by webhook ownership denial, `errors` is an object with a single `error` string (e.g. `{"errors":{"error":"You do not have access to webhook ID: 6"}}`).' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' + '404': + description: 'The webhook to be updated does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' '500': - description: 'Internal server error' + description: 'Internal server error.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' security: + - + basic: [] - oauth: - - pay_grades_and_bands - /api/v1/pay-grades-and-bands: - get: + - webhooks.write + - + oauth: + - webhooks + delete: tags: + - Webhooks - 'Public API' - summary: 'Get published levels and bands' - description: 'Get published levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' - operationId: cfacff2b34cf1e65ccd1ab188c5e1d12 + summary: 'Delete Webhook' + description: "Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs." + operationId: delete-webhook + parameters: + - + name: id + in: path + description: 'The webhook ID to delete.' + required: true + schema: + type: integer responses: '200': - description: 'Successful response' + description: 'Webhook deleted successfully. Returns a plain text confirmation message.' content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + title: WebhookDeletedResponse + type: string + example: 'Web hook has been deleted.' + '401': + description: Unauthorized. '403': - description: 'Insufficient permissions' + description: 'The authenticated user does not have permission to delete the requested webhook.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' + '404': + description: 'No webhook exists with the given ID.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' '500': - description: 'Internal server error' + description: 'Internal error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + $ref: '#/components/schemas/WebhookError' security: + - + basic: [] - oauth: - - pay_grades_and_bands - '/api/v1/performance/employees/{employeeId}/goals/filters': + - webhooks.write + - + oauth: + - webhooks + '/api/v1/webhooks/{id}/log': get: tags: - - Goals + - Webhooks - 'Public API' - summary: 'Get Goal Filters (v1)' - description: 'Deprecated. Use "Get Goal Filters (v1.1)" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version.' - operationId: get-goals-filters-v1 + summary: 'List Webhook Logs' + description: "Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window.\n\n**Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list." + operationId: list-webhook-logs parameters: - - name: employeeId + name: id in: path - description: 'employeeId is the employee ID to whom the goals are assigned.' + description: 'The webhook ID to get logs about.' required: true schema: type: integer responses: '200': - description: 'Returns goal status filter counts. Goals with milestones are excluded in this version.' + description: 'An array of webhook delivery log entries for the last 14 days (up to 200 entries). Returns an empty array if no deliveries have occurred.' content: application/json: schema: - $ref: '#/components/schemas/GoalFiltersV1' + title: WebhookLogListResponse + oneOf: + - { title: WebhookLogList, type: array, items: { title: WebhookLogEntry, properties: { webhookId: { description: 'The ID of the webhook.', type: string }, url: { description: 'The URL the webhook was delivered to.', type: string }, lastAttempted: { description: 'Datetime of the last delivery attempt (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when the delivery target could not be reached.', type: string }, lastSuccess: { description: 'Datetime of the last successful delivery (UTC, format: YYYY-MM-DD HH:MM:SS), or a status string such as "Webhook Not Found" when no successful delivery has been recorded.', type: string }, statusCode: { description: 'HTTP status code returned by the webhook endpoint on the last delivery attempt.', type: string }, format: { description: 'The payload format used for this delivery.', type: string }, employeeIds: { description: 'Array of employee IDs included in the webhook payload, returned as strings.', type: array, items: { type: string }, example: ['135'] } }, type: object } } + - { title: WebhookLogRateLimitResponse, properties: { error: { properties: { code: { type: integer, example: 429 }, message: { type: string, example: 'Over rate limit, please try again in 60 seconds' } }, type: object } }, type: object } '403': - description: 'The API user does not have permission to view goals for this employee.' + description: 'The authenticated user does not have permission to see the requested webhook.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '404': + description: 'The webhook does not exist.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' '500': - description: 'Something went wrong fetching filters.' - deprecated: true + description: 'Internal error' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' + '503': + description: 'Log search timed out. Returns a plain text error message. Try again later.' + content: + text/plain: + schema: + title: WebhookLogTimeoutResponse + type: string + example: 'Log search timed out. Try again later.' security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals': + - webhooks + /api/v1/webhooks/monitor_fields: get: tags: - - Goals + - Webhooks - 'Public API' - summary: 'List Goals' - description: 'Returns goals for an employee. The response contains a `goals` array of goal objects. Use the optional `filter` query parameter to restrict results to goals in a specific status (e.g. `status-inProgress`, `status-completed`, `status-closed`). If no filter is provided, goals in all statuses except closed are returned. Results are capped at 50 goals.' - operationId: list-goals - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to whom the goals are assigned.' - required: true - schema: - type: string - - - name: filter - in: query - description: 'Filter goals by status. If omitted, goals in all statuses except closed are returned. Unrecognized values are treated the same as omitting the parameter.' - schema: - type: string - enum: - - status-inProgress - - status-completed - - status-closed - - status-all + summary: 'List Monitor Fields' + description: 'Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook.' + operationId: list-monitor-fields responses: '200': - description: 'The response content will be a JSON document with the requested information.' + description: 'An object with a `fields` array containing one entry per monitorable employee field, including the field ID (as a string), human-readable name, and alias (null if no alias is defined).' content: application/json: schema: - title: GoalsList + title: MonitorFieldList + required: + - fields properties: - goals: { description: 'All goals of the selected employee', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } + fields: { description: 'The list of employee fields available for webhook monitoring.', type: array, items: { required: [id, name, alias], properties: { id: { description: 'The field ID, returned as a string.', type: string, example: '4175' }, name: { description: 'The human-readable field name.', type: string, example: 'Accrual Level Start Date' }, alias: { description: 'The field alias used in the BambooHR API (e.g. `firstName`). Null if no alias is defined for this field.', example: dateOfBirth, oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } type: object - '403': - description: 'The API user does not have permission to view goals for this employee.' + '401': + description: Unauthorized. + '500': + description: 'Internal server error.' + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookError' security: - basic: [] - oauth: - - goal - post: + - webhooks + /api/v1/webhooks/post-fields: + get: tags: - - Goals + - Webhooks - 'Public API' - summary: 'Create Goal' - description: 'Create a new goal for an employee.' - operationId: create-goal - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - required: - - title - - dueDate - - sharedWithEmployeeIds - properties: - title: - description: 'The title of the goal' - type: string - example: 'New Goal To update' - description: - description: 'A detailed description of the goal' - type: string - example: 'This should be fun!' - dueDate: - description: 'The due date for the goal in YYYY-MM-DD format' - type: string - format: date - example: '2025-12-17' - percentComplete: - description: 'The percentage of completion for the goal (0-100). Defaults to 0 if omitted.' - type: integer - maximum: 100 - minimum: 0 - example: 0 - completionDate: - description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error.' - type: [string, 'null'] - format: date - example: null - sharedWithEmployeeIds: - description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' - type: array - items: { type: integer } - example: [1234, 5678] - alignsWithOptionId: - description: 'ID of the option this goal aligns with' - type: [integer, 'null'] - milestones: - description: 'List of milestones for this goal' - type: [array, 'null'] - items: { properties: { title: { description: 'The title of the milestone', type: string, example: 'Surprise, it is a milestone' } }, type: object } - example: [{ title: 'Surprise, it is a milestone' }, { title: 'Now there are two of them!' }] - type: object + summary: 'Get Webhook Post Fields' + description: 'Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook.' + operationId: get-post-fields responses: - '201': - description: 'A goal object that includes the new goal.' + '200': + description: 'An object with `fields`, `tables`, and `pages` arrays. `fields` contains the postable employee fields with their IDs, aliases, types, and associated page/table IDs. `tables` and `pages` contain the referenced metadata for those associations.' content: application/json: schema: - $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' - '400': - description: 'The request body is invalid or required fields are missing or malformed (e.g. invalid dueDate, percentComplete out of range, completionDate provided with a non-100 percentComplete, sharedWithEmployeeIds not an array or missing the goal owner).' - content: - application/json: { } + $ref: '#/components/schemas/WebHookPostFieldResponseObject' '403': - description: 'If the API user does not have permission to create a goal for this employee.' - content: - application/json: { } - '500': - description: 'If there was a problem creating the goal.' + description: 'Permission denied.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/WebhookError' security: - basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}': - put: + - webhooks + '/api/v1/datasets/{datasetName}': + post: tags: - - Goals + - Datasets - 'Public API' - summary: 'Update Goal (v1)' - description: 'Deprecated. Use "Update Goal (v1.1)" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1.' - operationId: update-goal-v1 + summary: 'Get Data from Dataset (v1)' + description: "Deprecated. Use \"Get Data from Dataset (v2)\" instead.\n\nRetrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000).\n\nUse \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`.\n\nWhen any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`.\n\n**Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count.\n\n**Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last, next, range; int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty." + operationId: get-data-from-dataset-v1 parameters: - - name: employeeId + name: datasetName in: path - description: 'employeeId is the employee ID with whom the goal is associated.' + description: 'The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' required: true schema: type: string - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false schema: - type: string + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 requestBody: - description: "Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateGoalV1' + $ref: '#/components/schemas/DataRequest' responses: '200': - description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + description: 'Returns an object with `data` (array of record objects, or an object keyed by group value when `groupBy` is used), `aggregations` (array, empty when none requested), and `pagination`.' content: application/json: schema: - $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + $ref: '#/components/schemas/EmployeeResponse' '400': - description: 'The posted JSON is invalid.' - content: - application/json: { } + description: 'Invalid or missing argument(s), such as an unrecognised operator, malformed filter, invalid dataset name, or empty request body.' '403': - description: 'Goal is not editable or insufficient permissions.' - content: - application/json: { } - '404': - description: 'The goal specified by the given goalId was not found.' - content: - application/json: { } + description: 'Insufficient permissions to access this dataset.' '500': - description: 'If there was a problem updating the goal.' - content: - application/json: { } + description: 'An unexpected internal error occurred while retrieving data.' deprecated: true security: - basic: [] - oauth: - - goal.write - delete: + - report + '/api/v1/custom-reports/{reportId}': + get: tags: - - Goals + - 'Custom Reports' - 'Public API' - summary: 'Delete Goal' - description: 'Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success.' - operationId: delete-goal + summary: 'Get Report by ID' + description: "Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs.\n\nResponse shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`).\n\nThere is no schema-only response from this endpoint.\n\nThe `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults." + operationId: get-report-by-id parameters: - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - - - name: goalId + name: reportId in: path - description: 'goalId is the goal ID for the specified employee.' + description: 'The numeric ID of the saved custom report to execute.' required: true schema: - type: string - responses: - '204': - description: 'The goal was successfully deleted.' - '403': - description: 'The API user does not have permission to delete this goal.' - '404': - description: 'The goalId is zero or non-positive after integer cast, or the goal was not found.' - security: - - - basic: [] - - - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress': - put: - tags: - - Goals - - 'Public API' - summary: 'Update Goal Progress' - description: 'Update the progress percentage of an individual goal.' - operationId: update-goal-progress - parameters: + type: integer - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false schema: type: integer + default: 1 + minimum: 1 - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true + name: page_size + in: query + description: 'The number of records per page. Defaults to 500. Maximum is 1000.' + required: false schema: type: integer - requestBody: - description: 'The updated progress for the goal. Provide percentComplete (0-100) and optionally a completionDate when percentComplete is 100.' - required: true - content: - application/json: - schema: - required: - - percentComplete - properties: - percentComplete: - description: 'The percentage of completion for the goal (0-100)' - type: integer - maximum: 100 - minimum: 0 - example: 100 - completionDate: - description: 'The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100.' - type: [string, 'null'] - format: date - example: '2025-04-11' - type: object + default: 500 + maximum: 1000 + minimum: 1 responses: '200': - description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + description: "Paginated report data with dynamic employee fields based on the report's configuration." content: application/json: schema: - $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + $ref: '#/components/schemas/EmployeeResponse' '400': - description: 'The request is invalid. Possible causes: percentComplete is out of range (0–100), the goal has milestones (use the milestone progress endpoint instead), or the specified employee is not associated with this goal.' + description: 'Invalid or missing argument(s). Returned when the request fails validation or contains a type error.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '403': - description: 'Goal is not editable or insufficient permissions.' + description: 'Access denied. The caller does not have permission to view this report.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '404': - description: 'No goal found for the given goalId.' + description: 'Report not found. No saved custom report exists with the given ID.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'An unexpected error occurred while retrieving the report.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' security: - basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress': - put: + - report + /api/v1/datasets: + get: tags: - - Goals + - Datasets - 'Public API' - summary: 'Update Milestone Progress' - description: 'Update the progress of a milestone in a goal.' - operationId: update-goal-milestone-progress - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to whom the goals are assigned.' - required: true - schema: - type: string - - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true - schema: - type: string - - - name: milestoneId - in: path - description: 'milestoneId is the milestone ID for the specified goal.' - required: true - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - required: - - complete - properties: - complete: - description: 'Whether the milestone is complete or not' - type: boolean - example: true - type: object + summary: 'List Datasets (v1)' + description: "Deprecated. Use \"List Datasets (v1.2)\" instead.\n\nReturns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nThe response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint." + operationId: list-datasets-v1 responses: '200': - description: 'The milestone progress was successfully updated. The response contains the updated goal details.' + description: 'Returns an object containing a `datasets` array of available datasets.' content: application/json: schema: - $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' - '400': - description: 'The request was invalid. Please check the request parameters and try again.' + $ref: '#/components/schemas/DatasetResponseV1' '403': - description: 'User does not have permission to update this goal' - '404': - description: 'Goal or milestone not found' + description: 'Forbidden - insufficient permissions to access datasets.' '500': - description: 'Something went wrong updating your progress' + description: 'Internal server error while retrieving datasets.' + deprecated: true security: - basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith': - put: + - report + '/api/v1/datasets/{datasetName}/fields': + get: tags: - - Goals + - Datasets - 'Public API' - summary: 'Update Goal Sharing' - description: "Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's employee ID. Returns the updated goal object." - operationId: update-goal-sharing + summary: 'Get Fields from Dataset (v1)' + description: "Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead.\n\nReturns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names.\n\nPagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs.\n\nError responses (400, 403, 500) return plain-text bodies, not JSON." + operationId: get-fields-from-dataset-v1 parameters: - - name: employeeId + name: datasetName in: path - description: 'employeeId is the employee ID with whom the goal is associated.' + description: 'The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' required: true schema: type: string - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true + name: page + in: query + description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' + required: false schema: - type: string - requestBody: - description: 'Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' - required: true - content: - application/json: - schema: - properties: - sharedWithEmployeeIds: - description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' - type: array - items: { type: integer } - type: object + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of field records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 responses: '200': - description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' content: application/json: schema: - title: GoalResponse - properties: - goal: { $ref: '#/components/schemas/TransformedApiGoal' } - type: object + $ref: '#/components/schemas/DatasetFieldsResponse' '400': - description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array, sharedWithEmployeeIds is empty, or the specified employee is not associated with this goal.' - content: - application/json: { } + description: 'The specified dataset name was not found. The body is a plain-text message.' '403': - description: 'Goal is not editable or insufficient permissions.' - content: - application/json: { } - '404': - description: 'No goal found for the given goalId.' - content: - application/json: { } + description: 'Insufficient permissions to access dataset fields. The body is a plain-text message.' + '500': + description: 'Internal server error while fetching the dataset configuration. The body is a plain-text message.' + deprecated: true security: - basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/aggregate': + - report + /api/v1/custom-reports: get: tags: - - Goals + - 'Custom Reports' - 'Public API' - summary: 'Get Goals Aggregate (v1)' - description: 'Deprecated. Use "Get Goals Aggregate (v1.1)" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' - operationId: get-goals-aggregate-v1 + summary: 'List Reports' + description: "Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data.\n\nResults default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults.\n\nThe `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`." + operationId: list-reports parameters: - - name: employeeId - in: path - description: 'employeeId is the employee ID used to generate the aggregate information.' - required: true + name: page + in: query + description: 'The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1.' + required: false schema: - type: string + type: integer + default: 1 + minimum: 1 - - name: filter + name: page_size in: query - description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' required: false schema: - type: string + type: integer + default: 500 + maximum: 1000 + minimum: 1 responses: '200': - description: 'The response content will be a JSON object with the requested information.' + description: 'Returns an object containing a `reports` array of report objects and a `pagination` object with page navigation metadata.' content: application/json: schema: - title: GoalsAggregateV1 - properties: - canAlign: { description: 'The selected user can align goals with other users.', type: boolean, deprecated: true } - canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } - filters: { $ref: '#/components/schemas/GoalFiltersV1' } - selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } - goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } - persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } - comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: integer, example: 25, deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } - type: object + $ref: '#/components/schemas/ReportsResponse' '403': - description: 'The API user does not have permission to view goals for this employee.' - deprecated: true + description: 'The required feature toggle is not enabled for this account.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 'An unexpected error occurred while retrieving the list of reports.' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals/canCreateGoals': - get: + - report + '/api/v1/datasets/{datasetName}/field-options': + post: tags: - - Goals + - Datasets - 'Public API' - summary: 'Get Goal Creation Permission' - description: 'Determine if the API user has permission to create a goal for this employee.' - operationId: get-goal-creation-permission + summary: 'Get Field Options (v1)' + description: "Deprecated. Use \"Get Field Options (v1.2)\" instead.\n\nReturns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value.\n\nUnrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." + operationId: get-field-options-v1 parameters: - - name: employeeId + name: datasetName in: path - description: 'employeeId is the employee ID with whom the goal is associated.' + description: 'The name of the dataset to retrieve field options for.' required: true schema: type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FieldOptionsRequestSchema' responses: '200': - description: 'Returns whether the API user can create a goal for this employee.' + description: 'An object keyed by field name, where each value is an array of available option objects for that field.' content: application/json: schema: - title: CanCreateGoalsResponse - properties: - canCreateGoals: { description: 'Whether the API user can create a goal for this employee.', type: boolean, example: true } + title: FieldOptionsResponseV1 type: object + additionalProperties: + type: array + items: { $ref: '#/components/schemas/FieldOptionsTransformer' } + example: + status: + - { id: Active, value: Active } + - { id: Inactive, value: Inactive } '400': - description: 'The provided employeeId is invalid.' + description: 'Bad request - missing or invalid fields, filters, or request format.' + content: + application/json: + schema: + title: BadRequestV1 + properties: + error: { properties: { code: { type: integer, example: 0 }, message: { type: string, example: 'fields or groupBy missing' } }, type: object } + type: object '403': - description: 'The API user does not have permission to view goals for this employee.' + description: 'Forbidden - insufficient permissions to access this dataset.' + content: + application/json: + schema: + title: ForbiddenV1 + properties: + error: { properties: { code: { type: integer, example: 403 }, message: { type: string, example: 'You do not have permission to access this resource' } }, type: object } + type: object + '500': + description: 'Internal server error. The response body may be plain text rather than a structured JSON payload.' + deprecated: true security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals/shareOptions': + - field + /api/v1_2/datasets: get: tags: - - Goals + - Datasets - 'Public API' - summary: 'List Goal Sharing Options' - description: 'Provides a list of employees with whom the specified employee\''s goals may be shared.' - operationId: list-goal-share-options - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to get sharing options for.' - required: true - schema: - type: string - - - name: search - in: query - description: 'The search term used to filter employees returned. Will search name, employee ID and email.' - required: true - schema: - type: string - - - name: limit - in: query - description: 'Maximum number of employees to return. Defaults to 10, maximum 100.' - schema: - type: integer - default: 10 - maximum: 100 - minimum: 1 + summary: 'List Datasets (v1.2)' + description: "Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries.\n\nDatasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`).\n\nNote: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." + operationId: list-datasets-v1-2 responses: '200': - description: 'The response content will be a JSON document with a list of available employees with whom the goals can be shared.' + description: 'Returns an object containing a `datasets` array of available datasets.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing' + schema: + type: string content: application/json: schema: - title: ShareOptionsResponse + title: 'Datasets Response (v1.2)' properties: - persons: { description: 'List of employees with whom goals can be shared.', type: array, items: { $ref: '#/components/schemas/PersonInfoApiTransformer' } } + datasets: { description: 'Array of available datasets', type: array, items: { properties: { name: { description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.', type: string, example: employee }, label: { description: 'Human-readable display name for the dataset.', type: string, example: Employee } }, type: object } } type: object - '400': - description: 'The search parameter is invalid or empty.' '403': - description: 'Goals are not enabled, or the API user does not have permission to view sharing options for this employee.' + description: 'Forbidden - insufficient permissions to access datasets.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error while retrieving datasets.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments': + - report + '/api/v1_2/datasets/{datasetName}/fields': get: tags: - - Goals + - Datasets - 'Public API' - summary: 'List Goal Comments' - description: 'Get comments for a goal.' - operationId: list-goal-comments + summary: 'Get Fields from Dataset (v1.2)' + description: "Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side.\n\nThe `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other.\n\nFor fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list.\n\nNote: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header." + operationId: get-fields-from-dataset-v1-2 parameters: - - name: employeeId + name: datasetName in: path - description: 'employeeId is the employee ID with whom the goal is associated.' + description: 'The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' required: true schema: type: string - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true + name: page + in: query + description: 'The page number to retrieve. Defaults to 1.' + required: false schema: - type: string + type: integer + default: 1 + minimum: 1 + - + name: page_size + in: query + description: 'The number of records to retrieve per page. Defaults to 500. Maximum is 1000.' + required: false + schema: + type: integer + default: 500 + maximum: 1000 + minimum: 1 responses: '200': - description: 'Returns up to 50 comments for the specified goal, ordered by creation date.' + description: 'Returns an object containing pagination metadata, the dataset name and label, and a `fields` array of field descriptors.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing. Echoes the request header value if provided, otherwise generated server-side.' + schema: + type: string content: application/json: schema: - title: GoalCommentsResponse - properties: - comments: { description: 'Array of comment objects for the goal.', type: array, items: { properties: { id: { description: 'The comment ID.', type: string }, authorUserId: { description: 'The user ID of the comment author.', type: integer }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' }, text: { description: 'The text content of the comment.', type: string }, canEdit: { description: 'Whether the API user can edit this comment.', type: boolean }, canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } }, type: object } } - type: object + $ref: '#/components/schemas/DatasetFieldsResponse' '403': - description: 'The API user does not have permission to view comments for this goal, or the goal does not belong to this employee.' - '404': - description: 'The specified goalId is invalid (non-positive integer).' + description: 'Insufficient permissions to access dataset fields. Uses RFC 7807 problem+json.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The specified dataset name was not found. The `code` field is `DATASET_NOT_FOUND`.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error while fetching the dataset configuration.' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing.' + schema: + type: string + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - goal + - report + '/api/v1_2/datasets/{datasetName}/field-options': post: tags: - - Goals + - Datasets - 'Public API' - summary: 'Create Goal Comment' - description: 'Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID.' - operationId: create-goal-comment + summary: 'Get Field Options (v1.2)' + description: "Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset.\n\nUse this endpoint when you already have dataset field names from `get-fields-from-dataset-v1-2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. \n\nNote: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON." + operationId: get-field-options-v1-2 parameters: - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - - - name: goalId + name: datasetName in: path - description: 'goalId is the goal ID for the specified employee.' + description: 'The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' required: true schema: type: string @@ -6350,319 +6453,331 @@ paths: content: application/json: schema: - required: - - text - properties: - text: - description: 'The text content of the comment.' - type: string - type: object + $ref: '#/components/schemas/FieldOptionsRequestSchema' responses: - '201': - description: 'A goal comment object with the new goal comment ID.' + '200': + description: 'An object keyed by field name, where each value is an array of available option objects for that field.' content: application/json: schema: - title: GoalCommentResponse - properties: - id: { description: 'The comment ID.', type: string } - authorUserId: { description: 'The user ID of the comment author.', type: integer } - createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } - text: { description: 'The text content of the comment.', type: string } - canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } - canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + title: FieldOptionsResponseV1_2 type: object + additionalProperties: + type: array + items: { $ref: '#/components/schemas/FieldOptionsTransformer' } + example: + status: + - { id: Active, value: Active } + - { id: Inactive, value: Inactive } '400': - description: 'The goal does not belong to the specified employee, or the comment text is blank.' + description: 'Bad request - invalid fields, filters, or request format. Uses RFC 7807 problem+json.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'If the API user does not have permission to add a comment to the specified goal.' - content: - application/json: { } - '404': - description: 'The specified goalId was not found.' + description: 'Forbidden - insufficient permissions to access this dataset. Uses RFC 7807 problem+json.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error. The response body may be plain text rather than a structured payload.' security: - basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}': - put: + - field + x-mcp-annotations: + readOnlyHint: true + destructiveHint: false + openWorldHint: false + '/api/v2/datasets/{datasetName}/data': + post: tags: - - Goals + - Datasets - 'Public API' - summary: 'Update Goal Comment' - description: 'Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object.' - operationId: update-goal-comment + summary: 'Get Data from Dataset (v2)' + description: "Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`).\n\nUse this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead.\n\nDiscover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1-2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`); the field set is dataset-specific.\n\nField-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here.\n\nFilter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`.\n\n`orderBy` is a comma-separated list of `<field> <asc|desc>` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified.\n\nField-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence).\n\nPagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`).\n\nNote: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header." + operationId: get-data-from-dataset-v2 parameters: - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true - schema: - type: string - - - name: commentId + name: datasetName in: path - description: 'commentId is the comment ID for the specified goal.' + description: 'Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1-2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`.' required: true schema: type: string + example: employee requestBody: + description: 'Request parameters for dataset data retrieval' required: true content: application/json: schema: required: - - text + - fields properties: - text: - description: 'The updated text content of the comment.' - type: string + fields: + description: "Field names to return for each row. Names are dataset-specific; discover valid names via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1-2`). The field-name vocabulary differs from the dedicated employee endpoints (e.g., the `employee` dataset uses `jobInformationReportsTo` / `jobInformationDepartment` / `employmentStatus` rather than List Employees' `reportsTo` / `department` / `status`)." + type: array + items: { type: string } + example: [firstName, lastName, employmentStatus] + filter: + description: "OData-style filter expression. Comparison operators: `eq`, `ne`, `lt`, `le`, `gt`, `ge`. List-membership operator: `in (...)` (the parser does not support `not in`; use `ne` for the inverse). Logical operators: `and`, `or`. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type. `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields. Ordering operators (`lt`, `le`, `gt`, `ge`) work on numeric and date fields. `in (...)` is the natural fit on options-type fields like `status`, `employmentStatus`, and `jobInformationDepartment`, and is also accepted on text, numeric, and date fields when the list has a single value (equivalent to `eq`). Multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). String literals are wrapped in single quotes. Filter fields do not need to appear in `fields`." + example: "firstName eq 'Ashley' or firstName eq 'Charlotte'" + oneOf: [{ type: string }, { type: 'null' }] + orderBy: + description: 'Comma-separated sort rules; each rule is a field name followed by `asc` or `desc`. Every field referenced in `orderBy` must also appear in `fields` — otherwise the request is rejected with `400` and code `UE-1001`. Omit to leave row order unspecified.' + example: 'lastName asc, firstName desc' + oneOf: [{ type: string }, { type: 'null' }] + page: + description: 'Page number to retrieve (1-indexed). Defaults to 1.' + type: integer + default: 1 + minimum: 1 + example: 1 + pageSize: + description: 'Number of records per page. Defaults to 100. Maximum is 1000.' + type: integer + default: 100 + maximum: 1000 + minimum: 1 + example: 25 type: object responses: '200': - description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal comment response object for the specified commentId.' - content: - application/json: + description: 'Object containing `data` (array of record objects each wrapping requested values under a `fields` object), `links` (pagination URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (`page`, `pageSize`, `totalPages`, `totalItems`).' + headers: + X-Request-ID: + description: 'Correlation ID for request tracing. Echoes the client-provided value or a generated identifier.' schema: - title: GoalCommentResponse + type: string + content: + application/json: + schema: + title: DatasetDataResponseV2 properties: - id: { description: 'The comment ID.', type: string } - authorUserId: { description: 'The user ID of the comment author.', type: integer } - createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } - text: { description: 'The text content of the comment.', type: string } - canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } - canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + data: { description: 'Array of record objects. Each object contains a `fields` object whose keys are the requested field names. Values may be strings, numbers, booleans, arrays/objects, or null depending on the dataset field and value.', type: array, items: { properties: { fields: { type: object, additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: array, items: { } }, { type: object }, { type: 'null' }] } } }, type: object } } + links: { description: 'Pagination navigation links. Contains `next` and/or `prev` URLs when applicable.', properties: { next: { oneOf: [{ type: string }, { type: 'null' }] }, prev: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + meta: { description: 'Pagination metadata.', properties: { page: { type: integer }, pageSize: { type: integer }, totalPages: { type: integer }, totalItems: { type: integer } }, type: object } type: object '400': - description: 'The goal does not belong to the specified employee, or the comment text is blank.' + description: 'Missing or invalid parameters.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized. '403': - description: 'Goal is not editable or insufficient permissions.' + description: 'Insufficient permissions to access the requested dataset.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '404': - description: 'The goal specified by the given goalId was not found.' + description: 'The specified dataset does not exist or is not accessible.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '413': + description: 'The request produced too much data.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Validation failed, such as an invalid filter expression or pagination value.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - goal.write - delete: + - report + x-mcp-annotations: + readOnlyHint: true + destructiveHint: false + openWorldHint: false + /api/v1/applicant_tracking/applications: + get: tags: - - Goals - 'Public API' - summary: 'Delete Goal Comment' - description: 'Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success.' - operationId: delete-goal-comment + - 'Applicant Tracking' + summary: 'Get Job Applications' + description: 'Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like.' + operationId: get-applications parameters: - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true + name: page + in: query + description: 'The page number' + schema: + type: integer + - + name: jobId + in: query + description: 'A Job Id to limit results to' + schema: + type: integer + - + name: applicationStatusId + in: query + description: 'One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).' schema: type: string - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true + name: applicationStatus + in: query + description: 'One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.' schema: type: string - - name: commentId - in: path - description: 'commentId is the ID of a specific comment for the specified goal.' - required: true + name: jobStatusGroups + in: query + description: 'One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.' schema: type: string - responses: - '204': - description: 'The comment was successfully deleted. No response body is returned.' - '400': - description: 'The goal does not belong to the specified employee.' - content: - application/json: { } - '403': - description: 'Goal is not editable or insufficient permissions.' - content: - application/json: { } - '404': - description: 'The goal specified by the given goalId was not found.' - content: - application/json: { } - security: - - basic: [] + name: searchString + in: query + description: 'A general search criteria by which to find applications.' + schema: + type: string - - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate': - get: - tags: - - Goals - - 'Public API' - summary: 'Get Goal Aggregate' - description: 'Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request.' - operationId: get-goal-aggregate - parameters: + name: sortBy + in: query + description: 'A specific field to sort the results by.' + schema: + type: string + enum: + - first_name + - job_title + - rating + - phone + - status + - last_updated + - created_date - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true + name: sortOrder + in: query + description: 'Order by which to sort results.' schema: type: string + enum: + - ASC + - DESC - - name: goalId - in: path - description: 'goalId is the Goal ID used to generate the aggregate information.' - required: true + name: newSince + in: query + description: 'Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).' schema: type: string + example: '2024-01-01 13:00:00' responses: '200': - description: 'The response content will be a JSON object with the requested information.' + description: 'Success. Returns a paginated list of applications.' content: application/json: schema: - title: GoalAggregate + title: ApplicationsList properties: - goal: { $ref: '#/components/schemas/TransformedApiGoal' } - canAlign: { description: 'The selected user can align goals with other users.', type: boolean } - canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } - alignsWithOptions: { description: 'All possible goals that this goal could be aligned with.', type: array, items: { properties: { id: { description: 'Id of the goal that the selected goal could be aligned with.', type: integer, example: 8 }, title: { description: 'Title of the goal that the selected goal could be aligned with.', type: string, example: 'Get all team goals for January complete.' } }, type: object } } - comments: { description: 'Comments linked to selected goal.', type: array, items: { properties: { id: { description: 'Id of the comment.', type: string, example: '2' }, authorUserId: { description: 'Id of the author of the comment.', type: integer, example: 1534 }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2022-05-23T15:52:42Z' }, text: { description: 'The actual text of the comment.', type: string, example: 'This goal is taking longer than I thought.' }, canEdit: { description: 'Can the comment be edited.', type: boolean }, canDelete: { description: 'Can the comment be deleted.', type: boolean } }, type: object } } - persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } + paginationComplete: { description: 'Indicates whether there are more pages of results available', type: boolean } + nextPageUrl: { description: 'URL to fetch the next page of results, or null if there are no more results', oneOf: [{ type: string }, { type: 'null' }] } + applications: { description: 'List of application objects', type: array, items: { properties: { id: { description: 'Application ID', type: integer }, appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time }, status: { description: 'Current status of the application', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, rating: { description: 'Candidate rating (1-5) or null if not rated', oneOf: [{ type: integer }, { type: 'null' }] }, applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: "Applicant's first name", type: string }, lastName: { description: "Applicant's last name", type: string }, avatar: { description: "URL to applicant's avatar image, or null", oneOf: [{ type: string }, { type: 'null' }] }, email: { description: "Applicant's email address", type: string }, source: { description: 'Source of the application', type: string } }, type: object }, job: { description: 'Information about the job position', properties: { id: { description: 'Job position ID', type: integer }, title: { description: 'Job position title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object } }, type: object } }, type: object } } type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } '403': - description: 'The API user does not have permission to view this goal.' - '404': - description: 'The specified goalId was not found.' + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals/alignmentOptions': + - 'hiring:applications' + /api/v1/applicant_tracking/statuses: get: tags: - - Goals - 'Public API' - summary: 'Get Alignable Goal Options' - description: "Returns the list of goals that the specified employee's goal can be aligned with. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the API user." - operationId: get-alignable-goal-options - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to get alignable goal options for.' - required: true - schema: - type: string - - - name: goalId - in: query - description: 'Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user.' - required: false - schema: - type: integer + - 'Applicant Tracking' + summary: 'Get Applicant Statuses' + description: 'Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses.' + operationId: get-statuses responses: '200': - description: 'The response content will be a JSON document with a list of goals that are available alignment options.' + description: 'Success. Returns an array of applicant status objects.' content: application/json: schema: - title: AlignmentOptionsResponse - properties: - alignsWithOptions: { description: 'Array of goals available as alignment targets for the employee.', type: array, items: { properties: { id: { description: 'The goal ID.', type: string }, title: { description: 'The display title of the goal.', type: string } }, type: object } } - type: object - '400': - description: 'The provided goalId does not belong to the specified employee.' + title: ApplicantStatusList + type: array + items: + title: ApplicantStatus + properties: { id: { description: 'Status ID', type: string }, code: { description: 'Internal status code, or null for custom statuses', oneOf: [{ type: string }, { type: 'null' }] }, name: { description: 'Status display name', type: string }, translatedName: { description: 'Translated display name', type: string }, description: { description: 'Optional description of the status', oneOf: [{ type: string }, { type: 'null' }] }, enabled: { description: 'Whether the status is currently active and selectable', type: boolean }, manageable: { description: 'Whether the status can be managed (edited/deleted) by the company', type: boolean } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } '403': - description: 'The employeeId resolves to 0 (invalid path segment), or the API user lacks permission to view the specified goal.' - '404': - description: 'The provided goalId is zero or non-positive after integer cast (e.g. goalId=0, goalId=-1, or a non-numeric value such as goalId=abc).' + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } security: - basic: [] - oauth: - - goal - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/close': - post: + - 'hiring:applications' + /api/v1/applicant_tracking/locations: + get: tags: - - Goals - 'Public API' - summary: 'Close Goal' - description: 'Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Note: Cascading goals with visible children cannot be closed.' - operationId: close-goal - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true - schema: - type: string - requestBody: - description: 'An optional comment to record when closing the goal.' - required: false - content: - application/json: - schema: - properties: - comment: - description: 'Optional comment to record when closing the goal.' - type: [string, 'null'] - example: 'Closing this goal as the deadline has passed.' - type: object + - 'Applicant Tracking' + summary: 'Get Company Locations' + description: 'Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint.' + operationId: get-company-locations responses: - '201': - description: 'The goal was successfully closed. The response body contains the updated goal object.' + '200': + description: 'Success. Returns an array of location objects.' content: application/json: schema: - title: GoalResponse - properties: - goal: { $ref: '#/components/schemas/TransformedApiGoal' } - type: object - '400': - description: 'The request is invalid. Possible causes: the specified employee is not associated with this goal, or the goal is a cascading goal with visible children and cannot be closed.' + title: LocationsList + type: array + items: + $ref: '#/components/schemas/Location' + '401': + description: 'Unauthorized. Invalid API credentials.' content: application/json: { } '403': - description: 'Goal is not editable or insufficient permissions.' + description: 'Insufficient user permissions or API access is not turned on.' content: application/json: { } '404': - description: 'The goal specified by the given goalId was not found.' + description: 'Bad request url.' content: application/json: { } security: @@ -6670,826 +6785,805 @@ paths: basic: [] - oauth: - - goal.write - '/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen': - post: + - 'hiring:applications' + /api/v1/applicant_tracking/hiring_leads: + get: tags: - - Goals - 'Public API' - summary: 'Reopen Goal' - description: 'Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object.' - operationId: reopen-goal - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: string - - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true - schema: - type: string + - 'Applicant Tracking' + summary: 'Get Hiring Leads' + description: 'Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint.' + operationId: get-hiring-leads responses: - '201': - description: 'The goal was successfully reopened. The response body contains the updated goal object.' + '200': + description: 'Success. Returns an array of employees who can be assigned as hiring leads.' content: application/json: schema: - title: GoalResponse - properties: - goal: { $ref: '#/components/schemas/TransformedApiGoal' } - type: object - '400': - description: 'The request is invalid. The specified employee is not associated with this goal.' + title: HiringLeadsList + type: array + items: + title: HiringLead + properties: { employeeId: { description: 'The employee ID to use as the `hiringLead` value in the Create Job Opening request', type: integer }, preferredFullName: { description: "The employee's preferred full name", type: string } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' content: application/json: { } '403': - description: 'Goal is not editable or insufficient permissions.' + description: 'Insufficient user permissions or API access is not turned on.' content: application/json: { } '404': - description: 'The goal specified by the given goalId was not found.' + description: 'Bad request url.' content: application/json: { } security: - basic: [] - - - oauth: - - goal.write - '/api/v1_1/performance/employees/{employeeId}/goals/filters': - get: + /api/v1/applicant_tracking/application: + post: tags: - - Goals - 'Public API' - summary: 'Get Goal Filters (v1.1)' - description: 'Deprecated. Use "Get Goal Filters (v1.2)" instead. Get the number of goals per status for an employee. Note: Compared to "Get Goal Filters (v1)", this version includes actions.' - operationId: get-goals-filters-v1.1 - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to whom the goals are assigned.' - required: true - schema: - type: integer + - 'Applicant Tracking' + summary: 'Create Candidate' + description: "Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId." + operationId: create-candidate + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - firstName + - jobId + - lastName + properties: + firstName: + description: 'The first name of the candidate.' + type: string + lastName: + description: 'The last name of the candidate.' + type: string + email: + description: 'The email address of the candidate. Must be a valid email address.' + type: string + format: email + phoneNumber: + description: 'The phone number of the candidate.' + type: string + source: + description: 'The source of the candidate application, e.g. LinkedIn, Indeed, etc.' + type: string + jobId: + description: 'The id of the job opening for the candidate application.' + type: integer + address: + description: 'The street address of the candidate.' + type: string + city: + description: 'The city of the candidate.' + type: string + state: + description: 'The state or province of the candidate. Accepts state name, abbreviation, or ISO code.' + type: string + zip: + description: 'The zip code or postal code of the candidate.' + type: string + country: + description: 'The country of the candidate. Accepts country name or ISO code.' + type: string + linkedinUrl: + description: 'The LinkedIn profile URL of the candidate. Must match `https?://(.*\.)?linkedin.com/...`.' + type: string + format: uri + dateAvailable: + description: 'The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).' + type: string + format: date + desiredSalary: + description: 'The desired salary of the candidate.' + type: string + referredBy: + description: 'The person or entity that referred the candidate.' + type: string + websiteUrl: + description: 'The personal website, blog, or online portfolio of the candidate. Must be a valid URL.' + type: string + format: uri + highestEducation: + description: 'The highest completed education level of the candidate.' + type: string + enum: ['GED or Equivalent', 'High School', 'Some College', 'College - Associates', 'College - Bachelor of Arts', 'College - Bachelor of Fine Arts', 'College - Bachelor of Science', 'College - Master of Arts', 'College - Master of Fine Arts', 'College - Master of Science', 'College - Master of Business Administration', 'College - Doctorate', 'Medical Doctor', Other] + collegeName: + description: 'The college or university of the candidate.' + type: string + references: + description: 'A list of references supplied by the candidate.' + type: string + resume: + description: 'Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' + type: string + format: binary + coverLetter: + description: 'Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.' + type: string + format: binary + type: object responses: '200': - description: 'Contains the map of goal statuses, their counts, and available actions' + description: 'Success. Returns the result status and the new candidate ID.' content: application/json: schema: - $ref: '#/components/schemas/GoalFiltersV1_1' + title: CreateCandidateResponse + properties: + result: { description: "Always 'success' on a successful request", type: string } + candidateId: { description: 'The ID of the newly created candidate', type: integer } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } '403': - description: 'The API user does not have permission to view goals for this employee.' - '500': - description: 'Something went wrong fetching filters.' - deprecated: true + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '422': + description: 'Unprocessable entity. One or more parameters failed validation.' + content: + application/json: { } security: - basic: [] - oauth: - - goal - '/api/v1_1/performance/employees/{employeeId}/goals/aggregate': - get: + - 'hiring:applications.write' + /api/v1/applicant_tracking/job_opening: + post: tags: - - Goals - 'Public API' - summary: 'Get Goals Aggregate (v1.1)' - description: 'Deprecated. Use "Get Goals Aggregate (v1.2)" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to "Get Goals Aggregate (v1)", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' - operationId: get-goals-aggregate-v1.1 - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID used to generate the aggregate information.' - required: true - schema: - type: string - - - name: filter - in: query - description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' - required: false - schema: - type: string - responses: - '200': - description: 'The response content will be a JSON object with the requested information.' - content: - application/json: - schema: - title: GoalsAggregateV1_1 - properties: - canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true, deprecated: true } - canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } - filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } - selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } - goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } - persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } - comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25', deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } - type: object - '403': - description: 'The API user does not have permission to view goals for this employee.' - deprecated: true - security: - - - basic: [] - - - oauth: - - goal - '/api/v1_1/performance/employees/{employeeId}/goals/{goalId}': - put: - tags: - - Goals - - 'Public API' - summary: 'Update Goal (v1.1)' - description: 'Update a goal. This version supports updating the milestones contained within a goal. Note: Compared to "Update Goal (v1)", this version adds milestone updates.' - operationId: update-goal-v1.1 - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID with whom the goal is associated.' - required: true - schema: - type: integer - - - name: goalId - in: path - description: 'goalId is the goal ID for the specified employee.' - required: true - schema: - type: integer + - 'Applicant Tracking' + summary: 'Create Job Opening' + description: 'Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID.' + operationId: create-job-opening requestBody: - description: "Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." required: true content: - application/json: + multipart/form-data: schema: required: - - title - - dueDate - - sharedWithEmployeeIds + - employmentType + - hiringLead + - jobDescription + - jobStatus + - postingTitle properties: - title: - description: 'The title of the goal' + postingTitle: + description: 'The posting title of the job opening.' type: string - example: 'Edited Goal With Milestones' - description: - description: 'A detailed description of the goal' + jobStatus: + description: 'The status of the job opening.' type: string - example: 'Lets go!' - dueDate: - description: 'The due date for the goal in YYYY-MM-DD format' + enum: [Draft, Open, 'On Hold', Filled, Canceled] + hiringLead: + description: 'The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.' + type: integer + department: + description: 'The department of the job opening.' type: string - format: date - example: '2024-03-17' - percentComplete: - description: 'The percentage of completion for the goal (0-100). Defaults to 0 if omitted. Ignored when milestonesEnabled is true.' + employmentType: + description: 'The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.' + type: string + minimumExperience: + description: 'The minimum experience level that qualifies a candidate for the job opening.' + type: string + enum: [Entry-level, Mid-level, Experienced, Manager/Supervisor, "Senior Manager/Supervisor'", Executive, 'Senior Executive'] + compensation: + description: 'The pay rate or compensation for the job opening.' + type: string + jobLocation: + description: 'The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.' type: integer - maximum: 100 - minimum: 0 - completionDate: - description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error. Ignored when milestonesEnabled is true.' - type: [string, 'null'] - format: date - sharedWithEmployeeIds: - description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' - type: array - items: { type: integer } - example: [1234, 5678] - alignsWithOptionId: - description: 'ID of the option this goal aligns with' - type: [integer, 'null'] - milestonesEnabled: - description: 'Flag indicating whether milestones are enabled for this goal' - type: boolean - example: true - deletedMilestoneIds: - description: 'List of milestone IDs to be deleted from the goal' - type: array - items: { type: integer } - example: [490] - milestones: - description: 'List of milestones to add to this goal' - type: array - items: { properties: { title: { description: 'The title of the milestone', type: string } }, type: object } + jobDescription: + description: 'The long-form text description of the job opening.' + type: string + applicationQuestionResume: + description: 'Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionAddress: + description: 'Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionLinkedinUrl: + description: 'Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionDateAvailable: + description: 'Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionDesiredSalary: + description: 'Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionCoverLetter: + description: 'Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionReferredBy: + description: 'Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionWebsiteUrl: + description: 'Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionHighestEducation: + description: 'Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionCollege: + description: 'Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).' + type: string + enum: ['true', 'false', Required] + applicationQuestionReferences: + description: 'Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).' + type: string + enum: ['true', 'false', Required] + internalJobCode: + description: 'The internal job code for the job opening.' + type: string + locationType: + description: 'The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.' + type: integer + enum: [0, 1, 2] type: object responses: '200': - description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' + description: 'Success. Returns the result status and the new job opening ID.' content: application/json: schema: - $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' - '400': - description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array or missing the goal owner, percentComplete is out of range (0–100), the goal has milestones and percentComplete cannot be manually updated, or the goal is a cascading goal (not supported by this endpoint).' + title: CreateJobOpeningResponse + properties: + result: { description: "Always 'success' on a successful request", type: string } + jobOpeningId: { description: 'The ID of the newly created job opening', type: string } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' content: application/json: { } '403': - description: 'Goal is not editable or insufficient permissions.' + description: 'Insufficient user permissions or API access is not turned on.' content: application/json: { } '404': - description: 'The goal specified by the given goalId was not found.' + description: 'Bad request url.' content: application/json: { } - '500': - description: 'Something went wrong editing your goal.' + '422': + description: 'Unprocessable entity. One or more parameters failed validation.' content: application/json: { } security: - basic: [] - - - oauth: - - goal.write - '/api/v1_2/performance/employees/{employeeId}/goals/filters': + /api/v1/benefit/company_benefit: get: tags: - - Goals + - Benefits - 'Public API' - summary: 'Get Goal Filters (v1.2)' - description: 'Get the number of goals per status for an employee, including goals with milestones. Note: Compared to "Get Goal Filters (v1.1)", this version returns goals with milestones.' - operationId: get-goals-filters-v1.2 - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID to whom the goals are assigned.' - required: true - schema: - type: integer + summary: 'List Company Benefits' + description: 'Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use "Get a company benefit".' + operationId: list-company-benefits responses: '200': - description: 'Contains the map of goal statuses, their counts, and available actions' + description: 'An object containing a companyBenefits array of benefit plan summaries.' content: application/json: schema: - $ref: '#/components/schemas/GoalFiltersV1_1' - '403': - description: 'The API user does not have permission to view goals for this employee.' + title: CompanyBenefitsListResponse + properties: + companyBenefits: { description: 'List of company benefit plan summaries.', type: array, items: { $ref: '#/components/schemas/CompanyBenefitSummary' } } + type: object + '401': + description: 'Unauthorized. Invalid or missing authentication credentials.' '500': - description: 'Something went wrong fetching filters.' + description: 'Internal server error.' security: - basic: [] - oauth: - - goal - '/api/v1_2/performance/employees/{employeeId}/goals/aggregate': + - benefit + /api/v1/benefit/employee_benefit: get: tags: - - Goals + - Benefits - 'Public API' - summary: 'Get Goals Aggregate (v1.2)' - description: 'Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee, including goals that contain milestones. Note: Compared to "Get Goals Aggregate (v1.1)", this version returns all goals, including goals that contain milestones.' - operationId: get-goals-aggregate-v1.2 - parameters: - - - name: employeeId - in: path - description: 'employeeId is the employee ID used to generate the aggregate information.' - required: true - schema: - type: integer - - - name: filter - in: query - description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' - required: false - schema: - type: string + summary: 'List Employee Benefits' + description: "Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields.\n\nA JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values.\n\nFuture-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them.\n\nNote: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future." + operationId: list-employee-benefits + requestBody: + description: 'Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted.' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeBenefitFilters' responses: '200': - description: 'The response content will be a JSON object with the requested information.' + description: "An object containing an employeeBenefits array, each item representing one employee's benefit enrollments." content: application/json: schema: - title: GoalsAggregateV1_2 + title: EmployeeBenefitsListResponse properties: - canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true } - canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } - filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } - selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress } - goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } - persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } - comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25' }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2 } }, type: object } } + employeeBenefits: { description: 'List of per-employee benefit enrollment records.', type: array, items: { properties: { employeeId: { description: 'The ID of the employee.', type: integer }, payFrequency: { description: "The employee's current pay frequency (e.g., 'semi-monthly', 'biweekly'), or null if no pay schedule is set.", oneOf: [{ type: string }, { type: 'null' }] }, employeeBenefit: { description: "The employee's benefit plan enrollments, including both current and future scheduled changes.", type: array, items: { properties: { companyBenefitId: { description: 'The ID of the company benefit plan.', type: string }, companyBenefitName: { description: 'The name of the company benefit plan.', type: string }, coverageLevel: { description: 'The coverage level for this enrollment, or null if not applicable.', oneOf: [{ type: string }, { type: 'null' }] }, deductionEndDate: { description: 'The date deductions end for this enrollment (YYYY-MM-DD), or null.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, deductionStartDate: { description: 'The date deductions begin for this enrollment (YYYY-MM-DD), or null.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, enrollmentStatus: { description: 'The current or scheduled enrollment status.', type: string, enum: [Eligible, Enrolled, Waived, Withdrew, Terminated, Ineligible] }, enrollmentStatusEffectiveDate: { description: 'The date the enrollment status takes effect (YYYY-MM-DD).', type: string, format: date }, currencyCode: { description: 'ISO 4217 currency code for deduction amounts, or null if not applicable.', oneOf: [{ type: string }, { type: 'null' }] }, employeeAmount: { description: 'The employee-paid deduction amount.', oneOf: [{ type: number }, { type: 'null' }] }, employeeAmountType: { description: "The unit for employeeAmount (e.g., '%', '$').", oneOf: [{ type: string }, { type: 'null' }] }, employeePercentBasedOn: { description: "The basis for percent-based employee deductions (e.g., 'Gross'), or null.", oneOf: [{ type: string }, { type: 'null' }] }, employeeCapAmount: { description: 'The cap on employee deductions, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, employeeCapAmountType: { description: 'The unit for employeeCapAmount, or null.', oneOf: [{ type: string }, { type: 'null' }] }, employeeAnnualMax: { description: 'The annual maximum employee contribution, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, companyAmount: { description: 'The employer-paid contribution amount.', oneOf: [{ type: number }, { type: 'null' }] }, companyAmountType: { description: "The unit for companyAmount (e.g., '%', '$').", oneOf: [{ type: string }, { type: 'null' }] }, companyPercentBasedOn: { description: "The basis for percent-based employer contributions (e.g., 'Gross'), or null.", oneOf: [{ type: string }, { type: 'null' }] }, companyCapAmount: { description: 'The cap on employer contributions, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, companyCapAmountType: { description: 'The unit for companyCapAmount, or null.', oneOf: [{ type: string }, { type: 'null' }] }, companyAnnualMax: { description: 'The annual maximum employer contribution, or null if none.', oneOf: [{ type: number }, { type: 'null' }] }, occurrencesPerYear: { description: "The number of deduction occurrences per year based on the employee's pay schedule.", type: integer } }, type: object } } }, type: object } } type: object + '400': + description: 'Bad request. The request body is missing or not valid JSON, the `filters` object is missing, none of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` was provided, or `enrollmentStatusEffectiveDate` is not in `YYYY-MM-DD` format.' + '401': + description: 'Unauthorized. Invalid or missing authentication credentials.' '403': - description: 'The API user does not have permission to view goals for this employee.' + description: 'Forbidden. The authenticated caller does not have permission to view benefit data.' + '500': + description: 'Internal server error.' security: - basic: [] - oauth: - - goal - '/api/v1/timetracking/record/{id}': + - benefit + /api/v1/benefit/member_benefit: get: tags: - - Hours + - Benefits - 'Public API' - summary: 'Get Time Tracking Record' - description: 'Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response.' - operationId: get-time-tracking-record - parameters: - - - name: id - in: path - description: 'The time tracking record ID used to originally create the record.' - required: true - schema: - type: string + summary: 'List Member Benefit Events' + description: 'Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access.' + operationId: list-member-benefit-events responses: '200': - description: 'Successfully retrieved the time tracking record.' - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTrackingRecordSchema' - '400': - description: 'Invalid or missing argument.' + description: 'An object containing a members array of member benefit event records.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: MemberBenefitEventsResponse + properties: + members: { description: 'List of member benefit event records, one entry per employee or dependent.', type: array, items: { $ref: '#/components/schemas/MemberBenefitEvent' } } + type: object '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'Unauthorized. Invalid or missing authentication credentials.' '403': - description: 'Forbidden. Insufficient permissions to view this record.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '500': - description: 'Internal server error.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'Forbidden. The authenticated user does not have benefit settings access.' security: - basic: [] - oauth: - - time_tracking - /api/v1/timetracking/add: - post: + - benefit + /api/v1/benefits/member-benefits: + get: tags: + - Benefits - 'Public API' - - Hours - summary: 'Create Hour Record' - description: 'Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records.' - operationId: create-time-tracking-hour-record - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTrackingRecord' + summary: 'List Member Benefits' + description: 'Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use "List Company Benefits" to get valid planId values.' + operationId: list-member-benefits + parameters: + - + name: calendarYear + in: query + description: 'The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.' + required: true + schema: + type: string + pattern: '^\d{4}$' + example: '2024' + - + name: page + in: query + description: 'The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.' + required: false + schema: + type: string + default: '1' + example: '1' + - + name: pageSize + in: query + description: 'The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.' + required: false + schema: + type: string + default: '25' + example: '25' responses: - '201': - description: 'Record created. Returns the new time tracking ID.' + '200': + description: 'A paginated list of member benefit enrollment records for the requested calendar year.' content: application/json: schema: - $ref: '#/components/schemas/TimeTrackingIdResponseSchema' + title: MemberBenefitsGetSuccessResponse + properties: + data: { type: array, items: { properties: { memberId: { description: 'The member identifier. Formatted as "employee.{id}" for employees and "dependent.{id}" for dependents.', type: string }, subscriberId: { description: 'The employee ID of the plan subscriber as a string. For dependent members, this is the ID of the employee they are enrolled under.', type: string }, plans: { type: array, items: { properties: { planId: { description: 'The benefit plan ID.', type: string }, dateRanges: { type: array, items: { properties: { startDate: { description: 'Start date of the enrollment period (YYYY-MM-DD).', type: string, format: date }, endDate: { description: 'End date of the enrollment period (YYYY-MM-DD), or null if the enrollment has no calculated end date.', oneOf: [{ type: string, format: date }, { type: 'null' }] }, status: { description: 'The enrollment status for this date range.', type: string, enum: [ENROLLED, WAIVED, TERMINATED, WITHDREW, ELIGIBLE, INELIGIBLE] } }, type: object } } }, type: object } } }, type: object } } + meta: { properties: { page: { description: 'The current page number.', type: integer }, pageSize: { description: 'The number of items per page.', type: integer }, totalPages: { description: 'Total number of pages available.', type: integer }, totalItems: { description: 'Total number of member records across all pages.', type: integer } }, type: object } + _links: { properties: { next: { properties: { href: { description: 'URL for the next page of results. Points to the current page when already on the last page.', type: string } }, type: object }, prev: { properties: { href: { description: 'URL for the previous page of results. Points to page 1 when already on the first page.', type: string } }, type: object } }, type: object } + type: object '400': - description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' + description: 'Validation error. Returned when calendarYear is missing or not a 4-digit year, or when page or pageSize are out of range.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: MemberBenefitsGetValidationErrorResponse + properties: + code: { type: string, example: VALIDATION_ERROR } + message: { type: string, example: 'required property calendarYear is missing' } + type: object '403': - description: 'Forbidden. Insufficient user permissions.' + description: 'Permission denied. The authenticated user is not a benefit admin.' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: MemberBenefitsGetPermissionDeniedResponse + properties: + code: { type: string, example: PERMISSION_DENIED } + message: { type: string, example: 'Must be benefit admin user' } + type: object security: - basic: [] - oauth: - - time_tracking.write - /api/v1/timetracking/record: - post: + - benefit + /api/v1/benefits/settings/deduction_types/all: + get: tags: + - Benefits - 'Public API' - - Hours - summary: 'Create or Update Hour Records' - description: "Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures." - operationId: create-or-update-time-tracking-hour-records - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeTrackingRecordBulk' + summary: 'List Benefit Deduction Types' + description: 'Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions.' + operationId: list-benefit-deduction-types responses: - '201': - description: "Returns an array of per-item results. Each item has a `success` boolean and a `response` object containing the resulting `id` on success, or a `message` describing the failure. Note: HTTP 201 is returned even when individual items fail; inspect each item's `success` field for partial failures." + '200': + description: 'An array of benefit deduction type objects.' content: application/json: schema: - $ref: '#/components/schemas/TimeTrackingBulkResponseSchema' + title: BenefitDeductionTypesResponse + type: array + items: + title: BenefitDeductionType + properties: { id: { description: 'The deduction type ID. Integer for leaf types (e.g. 1 for 401(k)); string slug for grouped parent types (e.g. "pretax_subtype").', oneOf: [{ type: integer }, { type: string }] }, deductionTypeName: { description: 'The display name of the deduction type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this type.', type: string }, allowableBenefitTypes: { description: 'The benefit plan types this deduction type can be applied to (e.g. "health", "dental", "retirement").', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type (e.g. garnishments).', type: boolean }, canBeCollectedByTrax: { description: 'Whether this deduction type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'An optional additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden for this deduction type.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', oneOf: [{ type: string }, { type: 'null' }] }, subTypes: { description: 'Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types.', type: array, items: { title: BenefitDeductionSubType, properties: { id: { description: 'The sub-type deduction type ID (always an integer).', type: integer }, deductionTypeName: { description: 'The display name of the sub-type.', type: string }, defaultDeductionCode: { description: 'The default payroll deduction code for this sub-type.', type: string }, allowableBenefitTypes: { description: 'Benefit plan types this sub-type applies to.', type: array, items: { type: string } }, nonBenefitDeductionType: { description: 'Whether this is a non-benefit deduction type.', type: boolean }, canBeCollectedByTrax: { description: 'Whether this sub-type can be collected via Trax Payroll.', type: boolean }, additionalDescription: { description: 'Additional description for display purposes.', type: string }, hideAnnualMax: { description: 'Whether the annual maximum field should be hidden.', type: boolean }, managedDeductionType: { description: 'The managed deduction type identifier, if applicable. Null if not managed.', oneOf: [{ type: string }, { type: 'null' }] }, subTypes: { description: 'Always an empty array for sub-types.', type: array, items: { type: object } }, subTypeText: { description: 'Sub-type selection label. Empty string for leaf types.', type: string }, deductionNote: { description: 'Informational note for this sub-type.', type: string }, deductionNoteLink: { description: 'URL for the deduction note link.', type: string }, deductionNoteLinkText: { description: 'Display text for the deduction note link.', type: string } }, type: object } }, subTypeText: { description: 'A label or question displayed alongside sub-type selection (e.g. "Reportable on the W-2?"). Empty string for types without sub-types.', type: string }, deductionNote: { description: 'An informational note to display to the user when configuring this deduction type.', type: string }, deductionNoteLink: { description: 'A URL for a "learn more" link associated with the deduction note.', type: string }, deductionNoteLinkText: { description: 'The display text for the deduction note link.', type: string } } + type: object '403': - description: 'Forbidden. Insufficient user permissions.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'The authenticated user does not have Benefits Administration permissions.' + '500': + description: 'An unexpected server error occurred.' security: - basic: [] - oauth: - - time_tracking.write - /api/v1/timetracking/adjust: + - benefit + /api/v1/company-profile-data/industry-codes: put: tags: - 'Public API' - - Hours - summary: 'Update Hour Record' - description: 'Edits an existing hour record by `timeTrackingId`.' - operationId: update-time-tracking-record + - Company + summary: 'Update Company Industry Codes' + description: 'Updates the industry codes associated with a company.' + operationId: put-company-industry-codes requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/AdjustTimeTrackingRequestSchema' + required: + - industryIds + properties: + industryIds: + description: 'List of industry IDs associated with the company. Currently limited to a single entry.' + type: array + items: { type: integer } + type: object + example: + industryIds: + - 1 responses: - '201': - description: 'Record updated. Returns the time tracking ID.' + '200': + description: 'Returns the updated list of enabled industries for the company' content: application/json: schema: - $ref: '#/components/schemas/TimeTrackingIdResponseSchema' + title: UpdateCompanyIndustryCodesResponse + properties: + company_industries: { $ref: '#/components/schemas/CompanyIndustryCollection', description: 'List of enabled industries for the company' } + type: object + example: + company_industries: [{ industryId: 4, addedByCustomer: false, addedByUserId: 1, addedYmdt: '2021-09-01T12:00:00+00:00' }] '400': - description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' + description: 'Bad request due to invalid request structure or multiple industry IDs provided' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdateCompanyIndustryCodes400Response + properties: + message: { type: string } + type: object + example: + message: 'Multiple industries per-company are not supported at this time.' + '401': + description: 'Missing or invalid authentication' '403': - description: 'Forbidden. Insufficient user permissions.' + description: 'Insufficient permissions or release toggle not enabled' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - security: - - - basic: [] - - - oauth: - - time_tracking.write - '/api/v1/timetracking/delete/{id}': - delete: - tags: - - 'Public API' - - Hours - summary: 'Delete Hour Record' - description: 'Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility.' - operationId: delete-time-tracking-hour-record - parameters: - - - name: id - in: path - description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' - required: true - schema: - type: string - responses: - '200': - description: 'Record removed.' + title: UpdateCompanyIndustryCodes403Response + properties: + message: { type: string } + type: object + example: + message: 'You do not have permission to access this resource.' + '404': + description: 'Industry ID not found' content: application/json: schema: - $ref: '#/components/schemas/TimeTrackingDeleteResponseSchema' - '400': - description: 'If the time tracking ID cannot be found.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '403': - description: 'Forbidden. Insufficient permissions to delete this record.' + title: UpdateCompanyIndustryCodes404Response + properties: + message: { type: string } + type: object + example: + message: 'The requested industry ID does not exist.' + '500': + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdateCompanyIndustryCodes500Response + properties: + message: { type: string } + type: object + example: + message: 'An error occurred while processing your request.' security: - - - basic: [] - oauth: - - time_tracking.write - '/api/v1/meta/provinces/{countryId}': + - 'company:details.write' + /api/v1/company_information: get: tags: - - 'Account Information' + - Employees - 'Public API' - summary: 'Get States by Country ID' - description: 'Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation. Each entry includes a numeric ID, an abbreviation label (e.g. "UT"), an ISO 3166-2 code (e.g. "US-UT"), and a full name. Pass the country ID from the Get Countries endpoint to retrieve its subdivisions.' - operationId: get-states-by-country-id - parameters: - - - name: countryId - in: path - description: 'The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs.' - required: true - schema: - type: integer + summary: 'Get Company Information' + description: "Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings." + operationId: get-company-information responses: '200': - description: 'List of states/provinces for the specified country.' + description: 'Company information retrieved successfully.' content: application/json: schema: - $ref: '#/components/schemas/StateProvinceResponseSchema' - '400': - description: 'The provided country ID is invalid.' + title: CompanyInformation + properties: + legalName: { description: 'The legal name of the company.', type: string } + displayName: { description: 'The display name of the company.', type: string } + address: { description: 'The primary address of the company.', properties: { line1: { description: 'The first line of the address.', type: string }, line2: { description: 'The second line of the address. May be an empty string.', type: string }, city: { description: 'The city.', type: string }, state: { description: 'The state or province abbreviation.', type: string }, zip: { description: 'The ZIP or postal code.', type: string } }, type: object } + phone: { description: 'The primary contact phone number of the company.', type: string } + type: object + example: + legalName: BambooHR + displayName: BambooHR + address: { line1: '335 S 560 W', line2: 'Suite 200', city: Lindon, state: UT, zip: '84042' } + phone: 801-724-6600 + '403': + description: 'The API user does not have permission to access company information.' security: - basic: [] - oauth: - - field - /api/v1/meta/countries/options: + - 'company:info' + /api/v1/company-profile-integrations: get: tags: - - 'Account Information' + - 'Company Profile' - 'Public API' - summary: 'Get Countries' - description: 'Returns the full list of countries supported by BambooHR, each with a numeric string ID, full name, and ISO 3166-1 alpha-2 code. The returned IDs can be passed to the Get States by Country ID endpoint to retrieve the corresponding states or provinces.' - operationId: get-countries-options + summary: 'Get Company Profile Integrations' + description: "Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration." + operationId: get-company-profile-integrations responses: '200': - description: 'List of all supported countries.' + description: 'List of enabled integration identifiers for the company.' content: application/json: schema: - $ref: '#/components/schemas/CountriesResponseSchema' + title: CompanyProfileIntegrations + properties: + integrations: { description: 'List of installed integration identifiers.', type: array, items: { type: string } } + type: object + example: + integrations: [BAMBOOHR_PAYROLL, GOOGLE_SSO, SLACK] + '403': + description: 'The API user does not have permission to access company profile integrations.' + '500': + description: 'An unexpected error occurred while retrieving company profile integrations.' security: - basic: [] - oauth: - - field - /api/v1/meta/timezones: - get: + - 'company:details' + /api/v1/company-profile-data/company-information: + patch: tags: - - 'Account Information' + - 'Company Profile' - 'Public API' - summary: 'List timezones' - description: 'Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters.' - operationId: 5c5fb0f1211ae1c9451753f92f1053b6 - parameters: - - - name: pageSize - in: query - description: 'The number of items to return per page.' - schema: - type: integer - default: 500 - - - name: page - in: query - description: 'The page number to retrieve.' - schema: - type: integer - default: 1 - - - name: sort - in: query - description: 'Ordering by OData (Open Data Protocol) v4 specification' - schema: - type: string - default: '' - - - name: select - in: query - description: 'Projection (field selection) by OData specification' - schema: - type: string - default: '' - - - name: filter - in: query - description: 'Filter by an OData (Open Data Protocol) v4 specification' - schema: - type: string - default: '' + summary: 'Update company information (phone, address, legal name)' + description: 'Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data.' + operationId: patch-company-profile-company-information + requestBody: + required: true + content: + application/merge-patch+json: + schema: + properties: + legalName: + description: 'Legal name of the company (name_of_employer). Required (non-empty) when this field is present in the patch.' + type: string + phone: + description: 'Contact phone number. Required (non-empty) when this field is present in the patch.' + type: string + address: + description: 'Company address. When `address` is included in the patch (non-null object), `city`, `state`, and `zip` must all be sent as non-empty strings. `line1` and `line2` are optional (JSON null removes a line per merge-patch).' + properties: { line1: { description: 'Street address line 1 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', oneOf: [{ type: string }, { type: 'null' }] }, line2: { description: 'Street address line 2 (employerAddress). Optional; JSON null removes the value per merge-patch semantics.', oneOf: [{ type: string }, { type: 'null' }] }, city: { description: 'City. Required (non-empty) when address is patched.', type: string }, state: { description: 'State. Required (non-empty) when address is patched.', type: string }, zip: { description: 'Zip or postal code. Required (non-empty) when address is patched.', type: string } } + type: object + type: object responses: '200': - description: 'A paginated list of timezones' + description: 'Successful response; same shape as GET company-profile-data' content: application/json: schema: - title: TimezoneListResponse - allOf: - - { $ref: '#/components/schemas/PagedResponse' } - - { properties: { data: { description: 'Array of timezone resources for the current page', type: array, items: { $ref: '#/components/schemas/TimezoneResource' } } }, type: object } + title: CompanyProfileData + properties: + id: { type: integer } + subdomain: { oneOf: [{ type: string }, { type: 'null' }] } + legalName: { oneOf: [{ type: string }, { type: 'null' }] } + displayName: { oneOf: [{ type: string }, { type: 'null' }] } + address: { properties: { line1: { oneOf: [{ type: string }, { type: 'null' }] }, line2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, state: { oneOf: [{ type: string }, { type: 'null' }] }, zip: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + phone: { oneOf: [{ type: string }, { type: 'null' }] } + status: { type: string } + terminationDate: { oneOf: [{ type: string }, { type: 'null' }] } + industryCode: { oneOf: [{ type: string }, { type: 'null' }] } + type: object '400': - description: 'Invalid query parameters' + description: 'Invalid JSON or Content-Type' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '401': - description: Unauthorized + '403': + description: 'Permission denied' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '403': - description: Forbidden + '422': + description: 'Validation failed (invalid field types or incomplete profile after merge)' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error' content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - security: [] - /api/v1/hris/org/locations: - get: + security: + - + oauth: + - 'company:details.write' + /api/v1/company-profile-data/display-name: + put: tags: - - Locations + - 'Company Profile' - 'Public API' - summary: 'List job locations' - description: 'Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters.' - operationId: get-locations - parameters: - - - name: pageSize - in: query - description: 'The number of items to return per page.' - schema: - type: integer - default: 500 - - - name: page - in: query - description: 'The page number to retrieve.' - schema: - type: integer - default: 0 - - - name: sort - in: query - description: 'Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' - schema: - type: string - default: '' - - - name: select - in: query - description: 'Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' - schema: - type: string - default: '' - - - name: filter - in: query - description: 'Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation' - schema: - type: string - default: '' - - - name: expand - in: query - description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' - explode: false - schema: - type: array - items: - type: string - enum: - - state - - country - default: [] + summary: 'Update company display name' + description: 'Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services.' + operationId: put-company-profile-display-name + requestBody: + content: + application/json: + schema: + required: + - companyName + properties: + companyName: + description: 'The new display name for the company. Must be a non-empty string with a maximum length of 255 characters (character count, not bytes, so multibyte UTF-8 characters are properly supported).' + type: string + example: 'Acme Corporation' + type: object responses: '200': - description: 'A paginated list of job locations' + description: 'Company name updated successfully' content: application/json: schema: - title: PagedLocationResponse - allOf: - - { $ref: '#/components/schemas/PagedResponse' } - - { properties: { data: { description: 'Array of location resources for the current page', type: array, items: { $ref: '#/components/schemas/LocationResponseObject' } } }, type: object } - '401': - description: Unauthorized + title: UpdateCompanyNameSuccessResponse + properties: + success: { description: 'Indicates whether the operation was successful', type: boolean, example: true } + type: object + '400': + description: 'Invalid request body or company name' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdateCompanyNameBadRequestResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid input.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '429': - description: 'Too Many Requests' + description: 'Permission denied' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdateCompanyNameForbiddenResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object '500': - description: 'Internal Server Error' + description: 'Internal server error' content: application/json: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdateCompanyNameInternalErrorResponse + properties: + error: { properties: { message: { type: string } }, type: object } + type: object security: - oauth: - - field - post: + - 'company:details.write' + /api/v1/compensation/benchmarks: + get: tags: - - Locations + - 'Compensation Benchmarking' - 'Public API' - summary: 'Create a job location' - description: 'Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional.' - operationId: create-location - requestBody: - required: true - content: - application/json: - schema: - required: - - label - - address - properties: - label: - description: 'Display name for the location' - type: string - archived: - description: 'Whether the location is archived' - type: boolean - default: false - address: - description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' - required: [remoteLocation] - properties: { address1: { type: [string, 'null'] }, address2: { type: [string, 'null'] }, city: { type: [string, 'null'] }, stateId: { type: [string, 'null'] }, zipcode: { type: [string, 'null'] }, countryId: { type: [string, 'null'] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', type: [string, 'null'] }, remoteLocation: { type: boolean } } - type: object - type: object + summary: 'List Compensation Benchmarks' + description: "Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract." + operationId: list-compensation-benchmarks responses: - '201': - description: 'The created location' + '200': + description: 'Object with a `jobLocationPairs` array and banner-dismissal flags.' content: application/json: schema: - $ref: '#/components/schemas/LocationResponseObject' + title: CompensationBenchmarksList + properties: + jobLocationPairs: { type: array, items: { title: CompensationBenchmarkJobLocationPair, properties: { jobDetails: { properties: { id: { type: string }, title: { type: string } }, type: object }, locationDetails: { properties: { id: { type: string }, name: { type: string }, location: { type: string }, country: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, isRemote: { type: boolean }, benchmarks: { description: 'Saved benchmarks attached to this job/location. Empty when none are configured.', type: array, items: { title: CompensationBenchmarkOverview, properties: { id: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceColor: { oneOf: [{ type: string }, { type: 'null' }] }, isMercer: { type: boolean }, dataYear: { description: 'Mercer data year; defaults to the current Mercer data year when missing on a Mercer benchmark. `null` for non-Mercer benchmarks.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } }, employees: { type: array, items: { title: CompensationBenchmarkJobLocationEmployee, properties: { id: { type: string }, name: { type: string }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, photoUrl: { type: string }, managerName: { oneOf: [{ type: string }, { type: 'null' }] }, managerTitle: { oneOf: [{ type: string }, { type: 'null' }] }, division: { properties: { id: { type: string }, value: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, department: { properties: { id: { type: string }, value: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, currencyConversionFailed: { type: boolean } }, type: object } }, internalJobPayBand: { properties: { jobId: { type: string }, group: { type: string }, level: { type: string }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { type: string } }, type: object } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } } + dismissReviewBanner: { type: boolean } + dismissAddLocationBanner: { type: boolean } + dismissMercerDataInfoBanner: { type: boolean } + type: object '403': - description: 'Permission denied' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Location not found' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'Duplicate location label' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid fields' + description: 'The authenticated caller lacks permission to read compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Unexpected server error while loading compensation benchmarks.' content: application/problem+json: schema: @@ -7497,63 +7591,96 @@ paths: security: - oauth: - - field.write - '/api/v1/hris/org/locations/{id}': - get: + - compensation_benchmarks + put: tags: - - Locations + - 'Compensation Benchmarking' - 'Public API' - summary: 'Get a job location' - description: 'Retrieves a single job location by its ID. Returns the full location resource including address details.' - operationId: get-location - parameters: - - - name: id - in: path - description: 'The ID of the location' - required: true - schema: - type: string - - - name: expand - in: query - description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' - explode: false - schema: - type: array - items: - type: string - enum: - - state - - country - default: [] + summary: 'Update Compensation Benchmark' + description: 'Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`.' + operationId: update-compensation-benchmark + requestBody: + content: + application/json: + schema: + title: UpdateCompensationBenchmarkRequest + required: + - id + - currencyCode + - benchmarkValue + - benchmarkMin + - benchmarkMax + properties: + id: + description: 'ID of the benchmark to update.' + type: string + currencyCode: + description: 'ISO 4217 currency code for the benchmark values.' + type: string + mjlJobCode: + description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' + type: string + benchmarkValue: + description: 'Benchmark median value.' + type: number + benchmarkMin: + description: 'Benchmark minimum value.' + type: number + benchmarkMax: + description: 'Benchmark maximum value.' + type: number + benchmarkSource: + description: 'Free-text label describing where the benchmark came from.' + type: string + externalJobTitle: + type: string + externalLocation: + type: string + externalLevel: + type: string + externalJobDescription: + type: string + companiesSurveyed: + type: integer + employeesSurveyed: + type: integer + sourceId: + description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' + type: string + sourceDate: + description: 'Date the benchmark source data applies to.' + type: string + dataYear: + description: 'Year of the underlying survey data. Omitting this field clears `data_year` on the stored benchmark, so callers updating a Mercer benchmark should resend the existing value.' + type: string + externalCountry: + type: string + externalSecondaryLocation: + type: string + externalCompanySize: + type: string + externalIndustry: + type: string + type: object responses: '200': - description: 'The requested location' + description: 'Object containing the saved benchmark row and a status message.' content: application/json: schema: - $ref: '#/components/schemas/LocationResponseObject' - '422': - description: 'Invalid expand options' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + title: UpdatedCompensationBenchmark + properties: + savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { oneOf: [{ type: string }, { type: 'null' }] }, mercerJobCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkSource: { oneOf: [{ type: string }, { type: 'null' }] }, currencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkValue: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMin: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMax: { oneOf: [{ type: number }, { type: 'null' }] }, externalJobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, externalLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalLevel: { oneOf: [{ type: string }, { type: 'null' }] }, externalJobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, externalCountry: { oneOf: [{ type: string }, { type: 'null' }] }, externalSecondaryLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalCompanySize: { oneOf: [{ type: string }, { type: 'null' }] }, externalIndustry: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + message: { type: string } + type: object '403': - description: 'Permission denied' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Location not found' + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Unexpected server error while saving the benchmark.' content: application/problem+json: schema: @@ -7561,77 +7688,146 @@ paths: security: - oauth: - - field - put: + - compensation_benchmarks.write + post: tags: - - Locations + - 'Compensation Benchmarking' - 'Public API' - summary: 'Update a job location' - description: 'Updates an existing job location.' - operationId: update-location - parameters: - - - name: id - in: path - description: 'The ID of the location to update' - required: true - schema: - type: string + summary: 'Create Compensation Benchmark' + description: "Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`." + operationId: create-compensation-benchmark requestBody: - required: true content: application/json: schema: + title: CreateCompensationBenchmarkRequest required: - - label - - address - properties: - label: - description: 'Updated display name' + - jobTitleId + - currencyCode + - benchmarkValue + - benchmarkMin + - benchmarkMax + properties: + jobTitleId: + description: 'ID of the company job title the benchmark applies to.' + type: string + jobLocationId: + description: 'Optional job location ID to scope the benchmark to a specific location.' + type: string + currencyCode: + description: 'ISO 4217 currency code for the benchmark values.' + type: string + mjlJobCode: + description: 'Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.' + type: string + benchmarkValue: + description: 'Benchmark median value.' + type: number + benchmarkMin: + description: 'Benchmark minimum value.' + type: number + benchmarkMax: + description: 'Benchmark maximum value.' + type: number + benchmarkSource: + description: 'Free-text label describing where the benchmark came from.' + type: string + externalJobTitle: + type: string + externalLocation: + type: string + externalLevel: + type: string + externalJobDescription: + type: string + companiesSurveyed: + type: integer + employeesSurveyed: + type: integer + sourceId: + description: 'ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.' + type: string + sourceDate: + description: 'Date the benchmark source data applies to.' + type: string + dataYear: + description: 'Year of the underlying survey data.' + type: string + externalCountry: + type: string + externalSecondaryLocation: + type: string + externalCompanySize: + type: string + externalIndustry: type: string - archived: - description: 'Whether the location is archived' - type: boolean - default: false - address: - description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' - required: [remoteLocation] - properties: { address1: { type: [string, 'null'] }, address2: { type: [string, 'null'] }, city: { type: [string, 'null'] }, stateId: { type: [string, 'null'] }, zipcode: { type: [string, 'null'] }, countryId: { type: [string, 'null'] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', type: [string, 'null'] }, remoteLocation: { type: boolean } } - type: object type: object responses: '200': - description: 'The updated location' + description: 'Object containing the newly created benchmark row and a status message.' content: application/json: schema: - $ref: '#/components/schemas/LocationResponseObject' + title: CreatedCompensationBenchmark + properties: + savedBenchmark: { properties: { id: { type: string }, jobTitleId: { type: string }, jobLocationId: { oneOf: [{ type: string }, { type: 'null' }] }, mercerJobCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkSource: { oneOf: [{ type: string }, { type: 'null' }] }, currencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, benchmarkValue: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMin: { oneOf: [{ type: number }, { type: 'null' }] }, benchmarkMax: { oneOf: [{ type: number }, { type: 'null' }] }, externalJobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, externalLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalLevel: { oneOf: [{ type: string }, { type: 'null' }] }, externalJobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, sourceId: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, externalCountry: { oneOf: [{ type: string }, { type: 'null' }] }, externalSecondaryLocation: { oneOf: [{ type: string }, { type: 'null' }] }, externalCompanySize: { oneOf: [{ type: string }, { type: 'null' }] }, externalIndustry: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object } + message: { type: string } + type: object '403': - description: 'Permission denied' + description: 'The authenticated caller lacks permission to create compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Location not found' + '500': + description: 'Unexpected server error while creating the benchmark.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'Duplicate location label' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/details/export: + get: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Export Compensation Benchmark Details' + description: "Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job." + operationId: export-compensation-benchmark-details + parameters: + - + name: jobId + in: query + description: 'ID of the company job title to export benchmark details for.' + required: true + schema: + type: string + - + name: locationId + in: query + description: 'Optional job location ID to restrict the export to one location.' + required: false + schema: + type: string + responses: + '200': + description: 'CSV payload streamed with a `Content-Disposition: attachment` header. The filename is derived from the job title and location.' content: - application/problem+json: + text/csv: schema: - $ref: '#/components/schemas/ProblemDetailsResponse' - '422': - description: 'Invalid fields' + title: CompensationBenchmarkDetailsExport + type: string + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Unexpected server error while generating the CSV export. Also returned when `jobId` is missing.' content: application/problem+json: schema: @@ -7639,45 +7835,96 @@ paths: security: - oauth: - - field.write - delete: + - compensation_benchmarks + /api/v1/compensation/benchmarks/details: + get: tags: - - Locations + - 'Compensation Benchmarking' - 'Public API' - summary: 'Delete a job location' - description: 'Deletes a job location by its ID. Returns 204 No Content on success.' - operationId: delete-location + summary: 'Get Compensation Benchmark Details' + description: 'Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values.' + operationId: get-compensation-benchmark-details parameters: - - name: id - in: path - description: 'The ID of the location to delete' + name: jobId + in: query + description: 'ID of the company job title to fetch benchmark details for.' required: true schema: type: string + - + name: locationId + in: query + description: 'Optional job location ID. When omitted, results aggregate across all locations for the job.' + required: false + schema: + type: string responses: - '204': - description: 'Location deleted successfully' + '200': + description: 'Benchmark detail object for the requested job (and optional location).' + content: + application/json: + schema: + title: CompensationBenchmarkDetails + properties: + jobId: { type: string } + jobTitle: { type: string } + locationId: { oneOf: [{ type: string }, { type: 'null' }] } + location: { oneOf: [{ type: string }, { type: 'null' }] } + mercerBenchmarkDetails: { description: 'Populated when a Mercer benchmark is linked to this job/location.', properties: { id: { type: string }, source: { type: string }, jobCode: { type: string }, jobTitle: { type: string }, jobLocation: { type: string }, jobLevel: { oneOf: [{ type: string }, { type: 'null' }] }, jobDescription: { oneOf: [{ type: string }, { type: 'null' }] }, formattedJobDescription: { oneOf: [{ type: array, items: { type: string } }, { type: 'null' }] }, companiesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, employeesSurveyed: { oneOf: [{ type: integer }, { type: 'null' }] }, lastReviewed: { oneOf: [{ type: string }, { type: 'null' }] }, values: { properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { oneOf: [{ type: string }, { type: 'null' }] } }, type: object }, createdYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, updatedYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + companyPayRange: { description: 'Pay range aggregated from the current employees in this job and location.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + internalJobPayBand: { description: 'Company-configured internal pay band for this job.', properties: { median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string }, originalMedian: { oneOf: [{ type: number }, { type: 'null' }] }, originalMin: { oneOf: [{ type: number }, { type: 'null' }] }, originalMax: { oneOf: [{ type: number }, { type: 'null' }] }, originalCurrencyCode: { oneOf: [{ type: string }, { type: 'null' }] }, description: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } + benchmarkValues: { description: 'All saved benchmarks for this job/location. Empty when no benchmarks exist.', type: array, items: { properties: { id: { type: integer }, jobTitle: { oneOf: [{ type: string }, { type: 'null' }] }, lastEdited: { oneOf: [{ type: string }, { type: 'null' }] }, sourceColorCode: { oneOf: [{ type: string }, { type: 'null' }] }, sourceDate: { oneOf: [{ type: string }, { type: 'null' }] }, createdYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, updatedYmdt: { oneOf: [{ type: string }, { type: 'null' }] }, dataYear: { oneOf: [{ type: string }, { type: 'null' }] }, median: { type: number }, min: { type: number }, max: { type: number }, currencyCode: { type: string } }, type: object } } + employees: { type: array, items: { title: CompensationBenchmarkDetailEmployee, properties: { id: { type: integer }, name: { type: string }, jobTitle: { properties: { id: { type: string }, value: { type: string }, jobTitle: { type: string } }, type: object }, location: { properties: { id: { type: string }, value: { type: string }, name: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, salary: { properties: { amount: { type: number }, currencyCode: { type: string } }, type: object }, varianceFromPayBand: { properties: { amount: { type: number }, currencyCode: { type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, yearsAtCompany: { type: integer }, rangePenetration: { oneOf: [{ type: number }, { type: 'null' }] }, compaRatio: { oneOf: [{ type: number }, { type: 'null' }] }, compaRatioStatus: { oneOf: [{ type: string }, { type: 'null' }] }, photoUrl: { type: string }, country: { oneOf: [{ type: string }, { type: 'null' }] }, isRemote: { oneOf: [{ type: boolean }, { type: 'null' }] }, currencyConversionFailed: { type: boolean } }, type: object } } + type: object '403': - description: 'Permission denied' + description: 'The authenticated caller lacks permission to read compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '409': - description: 'The location is in use and cannot be deleted. You can archive a location in use to prevent future usage.' + '500': + description: 'Unexpected server error while loading benchmark details. Also returned when `jobId` is missing.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' - '404': - description: 'Location not found' + security: + - + oauth: + - compensation_benchmarks + '/api/v1/compensation/benchmarks/{id}': + delete: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Delete Compensation Benchmark' + description: 'Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`.' + operationId: delete-compensation-benchmark + parameters: + - + name: id + in: path + description: 'Integer ID of the compensation benchmark to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Literal string `"Success"` indicating the benchmark was deleted.' + content: + application/json: + schema: + title: DeleteCompensationBenchmarkResponse + type: string + '403': + description: 'The authenticated caller lacks permission to delete compensation benchmarks.' content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error' + description: 'Unexpected server error while deleting the benchmark.' content: application/problem+json: schema: @@ -7685,247 +7932,393 @@ paths: security: - oauth: - - field.write - /api/v1/meta/fields: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/sources: get: tags: - - 'Account Information' + - 'Compensation Benchmarking' - 'Public API' - summary: 'List Fields' - description: 'Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account.' - operationId: list-fields - parameters: - - - $ref: '#/components/parameters/AcceptHeaderParameter' + summary: 'List Compensation Benchmark Sources' + description: 'Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark.' + operationId: list-compensation-benchmark-sources responses: '200': - description: 'A list of all available employee fields in the account.' + description: 'Array of benchmark sources. Empty when no sources are configured.' content: application/json: schema: - title: FieldsResponse + title: CompensationBenchmarkSources type: array items: - title: Field - required: [id, name, type] - properties: { id: { description: 'The field identifier. For subfields this is a dotted string (e.g., "4340.4"); for top-level fields it may be an integer.', oneOf: [{ type: string }, { type: integer }] }, name: { description: 'The display name of the field.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list, checkbox).', type: string }, alias: { description: 'The API alias for the field. Only present when the field has an alias.', type: string }, deprecated: { description: 'Whether the field is deprecated and should no longer be used. Only present for deprecated fields.', type: boolean } } + title: CompensationBenchmarkSource + properties: { id: { type: string }, name: { type: string }, sort: { description: 'Sort order position, returned as a numeric string.', type: string }, count: { description: 'Number of benchmarks attached to this source, returned as a numeric string.', type: string }, colorCode: { description: 'Hex color used to display the source in the UI.', oneOf: [{ type: string }, { type: 'null' }] } } type: object - application/xml: { } + '403': + description: 'The authenticated caller lacks permission to read compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while loading benchmark sources.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - - - oauth: - - employee - oauth: - - field - /api/v1/meta/users: - get: + - compensation_benchmarks + put: tags: - - 'Account Information' + - 'Compensation Benchmarking' - 'Public API' - summary: 'List Users' - description: "Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available.\n\nPass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response.\n\nThe response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML." - operationId: list-users - parameters: - - - $ref: '#/components/parameters/AcceptHeaderParameter' - - - name: status - in: query - description: 'Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.' - required: false - schema: - type: string - example: enabled + summary: 'Update Compensation Benchmark Sources' + description: 'Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ "result": "success" }` when all updates are applied.' + operationId: update-compensation-benchmark-sources + requestBody: + content: + application/json: + schema: + title: UpdateCompensationBenchmarkSourcesRequest + required: + - benchmarkSources + properties: + benchmarkSources: + type: array + items: { title: UpdateCompensationBenchmarkSourceItem, required: [id, name], properties: { id: { description: 'ID of the existing benchmark source to update.', type: string }, name: { description: 'New display name for the source. Cannot equal `mercer`.', type: string }, sort: { description: 'Optional new sort position, as a numeric string.', type: string } }, type: object } + type: object responses: '200': - description: 'An object whose keys are user IDs (as strings) and whose values are user objects. When the Accept header requests XML, a `<users>` document is returned instead.' + description: 'Object containing `{ "result": "success" }` when all source updates succeed.' content: application/json: schema: - title: ListUsersResponse - description: 'Object keyed by user ID. Each key is a user ID string; each value is a user object.' - type: object - additionalProperties: - properties: { id: { description: 'The user ID.', type: integer }, employeeId: { description: 'The ID of the employee record linked to this user. Always present in the JSON response; `0` when no employee record is associated.', type: integer }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address. Resolved in priority order: work email, home email, account email.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } } - type: object - application/xml: - schema: - title: ListUsersXmlResponse + title: UpdateCompensationBenchmarkSourcesResponse properties: - user: { type: array, items: { properties: { id: { description: 'The user ID.', type: integer, xml: { attribute: true } }, employeeId: { description: 'The employee record ID. Present as an XML attribute only when the user has an associated employee record.', type: integer, xml: { attribute: true } }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } }, type: object, xml: { name: user } }, xml: { name: user, wrapped: false } } + result: { type: string } type: object - xml: - name: users - '401': - description: 'Unauthorized. The API key is missing or invalid.' + '400': + description: 'The `benchmarkSources` array is missing, empty, contains items without `id` or `name`, or contains the reserved `mercer` name.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Forbidden. The caller does not have permission to access this endpoint.' + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while updating benchmark sources.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - user - '/api/v1/employees/{id}': - get: + - compensation_benchmarks.write + post: tags: - - Employees + - 'Compensation Benchmarking' - 'Public API' - summary: 'Get Employee' - description: "Returns employee data for the specified employee ID. \n\t\tSpecify which fields to return using the `fields` query parameter (comma-separated list of field names). \n\t\tSee the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields) for available field names.\n\t\tField Id's as well as custom field aliases can be used in the `fields` parameter. \n\t\tCustom field aliases can be found in the `alias` property returned by the List Fields endpoint.\n\t\tThis endpoint is suitable for retrieving basic employee information, including current values from historical tables such as job title or compensation. \n\t\tBy default only current values are returned; set `onlyCurrent` to false to include future-dated values from historical table fields.\n\t\t\n\nUsage note: The maximum number of fields per request is 400." - operationId: get-employee - parameters: - - - name: id - in: path - description: 'The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).' - required: true - schema: - type: string - - - name: fields - in: query - description: 'Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names.' - required: false - schema: - type: string - default: 'firstName,lastName' - - - name: onlyCurrent - in: query - description: 'Setting to false will return future-dated values from history table fields. Defaults to true.' - required: false - schema: - type: boolean - default: true - - - $ref: '#/components/parameters/AcceptHeaderParameter' + summary: 'Create Compensation Benchmark Source' + description: "Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name." + operationId: create-compensation-benchmark-source + requestBody: + content: + application/json: + schema: + title: CreateCompensationBenchmarkSourceRequest + required: + - name + properties: + name: + description: 'Display name for the new benchmark source. Cannot be empty or equal to `mercer`.' + type: string + colorCode: + description: 'Optional hex color used to display the source in the UI.' + type: string + type: object responses: '200': - description: 'A dictionary of the requested employee fields and their values. Fields the caller does not have permission to view are omitted.' + description: "Object with the newly created source's ID and name." content: application/json: schema: - $ref: '#/components/schemas/GetEmployeeResponse' - application/xml: - schema: - $ref: '#/components/schemas/GetEmployeeResponse' + title: CreatedCompensationBenchmarkSource + properties: + id: { description: 'ID of the newly created benchmark source.', type: integer } + name: { type: string } + type: object '400': - description: 'The request exceeded the maximum number of allowed fields (400).' + description: 'The `name` is missing, empty, or the reserved value `mercer`.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The API user does not have permission to see the requested employee.' - '404': - description: 'The employee does not exist.' + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while creating the benchmark source.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - - - oauth: - - employee - - - oauth: - - 'employee:assets' - - - oauth: - - 'employee:contact' - - - oauth: - - 'employee:compensation' - - - oauth: - - 'employee:custom_fields_encrypted' - - - oauth: - - 'employee:custom_fields' - - - oauth: - - 'employee:demographic' - - - oauth: - - 'employee:dependent' - - - oauth: - - 'employee:dependent:ssn' - - - oauth: - - 'employee:education' - - - oauth: - - 'employee:emergency_contacts' - - - oauth: - - 'employee:identification' - - - oauth: - - 'employee:job' - - - oauth: - - 'employee:management' - - - oauth: - - 'employee:name' - - - oauth: - - 'employee:photo' - - - oauth: - - 'employee:vaccination' - - - oauth: - - 'sensitive_employee:protected_info' - - - oauth: - - 'sensitive_employee:address' - oauth: - - 'sensitive_employee:creditcards' - - - oauth: - - 'employee:job.write' - post: + - compensation_benchmarks.write + delete: tags: - - Employees + - 'Compensation Benchmarking' - 'Public API' - summary: 'Update Employee' - description: "Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid employee field name may be used as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nTrax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division." - operationId: update-employee - parameters: - - - name: id - in: path - description: 'The employee ID.' - required: true - schema: - type: string + summary: 'Delete Compensation Benchmark Source' + description: 'Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ "result": "success" }` when the source is removed.' + operationId: delete-compensation-benchmark-source requestBody: - required: true content: application/json: schema: - $ref: '#/components/schemas/Employee' - application/xml: - schema: - $ref: '#/components/schemas/Employee' - text/xml: - schema: - $ref: '#/components/schemas/Employee' + title: DeleteCompensationBenchmarkSourceRequest + required: + - id + properties: + id: + description: 'ID of the benchmark source to delete. Must be non-empty.' + type: string + type: object responses: '200': - description: 'Employee updated successfully. No response body is returned.' + description: 'Object containing `{ "result": "success" }` when the source is deleted.' + content: + application/json: + schema: + title: DeleteCompensationBenchmarkSourceResponse + properties: + result: { type: string } + type: object '400': - description: 'Provided JSON is malformed, or required fields are missing.' + description: 'The id is missing, empty, or not a valid non-zero numeric identifier.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The API user does not have permission to see the employee or to update any of the requested fields.' - '404': - description: 'The employee does not exist.' - '409': - description: 'A field was given an invalid value (e.g., duplicate email, invalid state/country, incompatible pay type).' - security: - - - basic: [] + description: 'The authenticated caller lacks permission to modify compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while deleting the benchmark source.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/compensation/benchmarks/import: + post: + tags: + - 'Compensation Benchmarking' + - 'Public API' + summary: 'Import Compensation Benchmarks From CSV' + description: 'Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed.' + operationId: import-compensation-benchmarks + requestBody: + description: 'Multipart form containing a single `file` part with the CSV upload.' + required: true + content: + multipart/form-data: + schema: + title: ImportCompensationBenchmarksRequest + required: + - file + properties: + file: + description: 'CSV file to import.' + type: string + format: binary + type: object + responses: + '200': + description: 'Parsed CSV preview containing the raw rows and a suggested column map.' + content: + application/json: + schema: + title: ImportCompensationBenchmarksResponse + properties: + uploadData: { description: 'Parsed CSV rows. Each row is an array of cell values as strings.', type: array, items: { title: ImportCompensationBenchmarksRow, type: array, items: { type: string } } } + columnMap: { description: 'Suggested mapping between expected benchmark fields and CSV column headers.', type: array, items: { $ref: '#/components/schemas/CompensationBenchmarking-ColumnMap' } } + type: object + '400': + description: 'The multipart request is missing the `file` part.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'The authenticated caller lacks permission to import compensation benchmarks.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'The uploaded CSV could not be parsed (missing columns, invalid data, etc.).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error while parsing the CSV upload.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - compensation_benchmarks.write + /api/v1/employees: + get: + tags: + - Employees + - 'Public API' + summary: 'List Employees' + description: "Returns a cursor-paginated collection of employees for the authenticated caller's company. The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead." + operationId: list-employees + parameters: + - + name: filter + in: query + description: 'Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported.' + required: false + style: deepObject + explode: true + schema: + $ref: '#/components/schemas/GetEmployeesFilterRequestObject' + - + name: sort + in: query + description: 'Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error.' + required: false + schema: + type: string + example: '-lastName,firstName' + - + name: fields + in: query + description: "Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array." + required: false + style: form + explode: false + schema: + type: array + items: + $ref: '#/components/schemas/EmployeeOptionalField' + example: 'workEmail,mobilePhone' + - + name: page + in: query + description: "Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page." + required: false + style: deepObject + explode: true + schema: + $ref: '#/components/schemas/EmployeeCursorPaginationQueryObject' + responses: + '200': + description: 'Paginated list of employees.' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeesResponseObject' + examples: + basic: + summary: 'Basic paginated result' + value: { data: [{ employeeId: '123', firstName: Ava, lastName: Nguyen, preferredName: Ava, photoUrl: 'https://cdn.example.com/p/123.jpg', jobTitleName: 'Engineering Manager', status: Active, _restrictedFields: [] }, { employeeId: '124', firstName: Sam, lastName: Park, preferredName: Sam, photoUrl: null, jobTitleName: 'Product Designer', status: Active, _restrictedFields: [photoUrl] }], meta: { total: 2456, page: { limit: 100, nextCursor: eyJuZXh0RW1wbG95ZWUiOjEyNX0=, prevCursor: null } }, _links: { self: { href: 'https://example.bamboohr.com/api/v1/employees?page%5Blimit%5D=100' }, next: { href: 'https://example.bamboohr.com/api/v1/employees?page%5Blimit%5D=100&page%5Bafter%5D=eyJuZXh0RW1wbG95ZWUiOjEyNX0%3D' } } } + batchByIds: + summary: 'Batch fetch by a list of employee IDs' + value: { data: [{ employeeId: '200', firstName: Lena, lastName: Smith, preferredName: Lena, photoUrl: null, jobTitleName: 'QA Analyst', status: Active, _restrictedFields: [] }, { employeeId: '207', firstName: Marco, lastName: Lee, preferredName: null, photoUrl: null, jobTitleName: 'Support Engineer', status: Inactive, _restrictedFields: [photoUrl] }], meta: { total: 2, page: { limit: 250, nextCursor: null, prevCursor: null } }, _links: { self: { href: 'https://example.bamboohr.com/api/v1/employees?filter%5Bids%5D=200%2C207' } } } + '400': + description: 'Invalid request parameters. The `error.code` is `BadRequest` for filter, sort, or field validation failures (for example an unknown sort field, or `filter[status]` outside `active` / `inactive`) and `BadPage` when the `page` cursor is malformed, the wrong cursor direction is supplied, or the boundary employee changed between calls (for example, was deleted or no longer matches the filter).' + content: + application/json: + schema: + $ref: '#/components/schemas/Employee-StringCodeErrorResponse-V1' + '401': + description: Unauthorized. + '429': + description: 'Too many requests.' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:name' + - + oauth: + - 'employee:job' + - + oauth: + - employee_directory + - + oauth: + - 'sensitive_employee:protected_info' + post: + tags: + - Employees + - 'Public API' + summary: 'Create Employee' + description: "Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nThis endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo.\n\nTrax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location." + operationId: create-employee + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/postNewEmployee' + application/xml: + schema: + $ref: '#/components/schemas/postNewEmployee' + text/xml: + schema: + $ref: '#/components/schemas/postNewEmployee' + responses: + '201': + description: 'Employee created successfully.' + headers: + Location: + description: 'The URL to view the employee in the web app. The ID of the employee will be included.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' + '400': + description: 'If the posted XML or JSON is invalid or the minimum fields are not provided.' + '403': + description: 'If the API user does not have permission to add an employee.' + '409': + description: 'If an employee field was given an invalid value.' + security: + - + basic: [] - oauth: - employee.write @@ -7995,49 +8388,57 @@ paths: - oauth: - 'employee:job' - '/api/v1/employees/changed/tables/{table}': + '/api/v1/employees/{id}': get: tags: - - 'Tabular Data' + - Employees - 'Public API' - summary: 'Get Changed Employee Table Data' - description: "Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps." - operationId: get-changed-employee-table-data + summary: 'Get Employee' + description: 'Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead.' + operationId: get-employee parameters: - - name: table + name: id in: path - description: 'The name of the table to retrieve changed data for (e.g., jobInfo, compensation).' + description: 'The employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{"id": "0"}` with no other fields. List Employees (`list-employees`) does not accept this sentinel.' required: true schema: type: string - - name: since + name: fields in: query - description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' - required: true + description: 'Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response.' + required: false schema: type: string - format: date-time + - + name: onlyCurrent + in: query + description: 'When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned.' + required: false + schema: + type: boolean + default: true + - + $ref: '#/components/parameters/AcceptHeaderParameter' responses: '200': - description: 'Changed table data for the specified table, grouped by employee ID.' + description: 'An object keyed by field name with the requested employee''s values. `id` is always present and is a string. Fields the authenticated caller cannot view are silently omitted. When `Accept: application/xml`, the body is an `<employee id="...">` element with one `<field id="...">` child per returned field.' content: application/json: schema: - title: ChangedEmployeeTableDataResponse - required: - - table - - employees - properties: - table: { description: 'The requested table name.', type: string } - employees: { description: 'Map of employee IDs to changed table data for that employee.', type: object, additionalProperties: { properties: { lastChanged: { description: 'ISO 8601 timestamp of the last change for this employee.', type: string, format: date-time }, rows: { description: 'The table rows for this employee.', type: array, items: { type: object, additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } } } }, type: object } } - type: object - application/xml: { } + $ref: '#/components/schemas/GetEmployeeResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' '400': - description: 'The since parameter is missing or is not a valid ISO 8601 date.' + description: 'The `fields` parameter contained more than 400 entries.' + '401': + description: Unauthorized. + '403': + description: 'The authenticated user does not have permission to view this employee.' '404': - description: 'The specified table does not exist.' + description: 'No employee was found for the supplied ID.' security: - basic: [] @@ -8046,110 +8447,71 @@ paths: - employee - oauth: - - 'employee:job' + - 'employee:assets' - oauth: - - 'employee:compensation' + - 'employee:contact' - oauth: - - 'employee:custom_fields' + - 'employee:compensation' - oauth: - 'employee:custom_fields_encrypted' - oauth: - - 'employee:assets' + - 'employee:custom_fields' - oauth: - - 'employee:emergency_contacts' + - 'employee:demographic' - oauth: - - 'sensitive_employee:creditcards' + - 'employee:dependent' + - + oauth: + - 'employee:dependent:ssn' - oauth: - 'employee:education' - '/api/v1/employees/{id}/tables/{table}': - get: - tags: - - 'Tabular Data' - - 'Public API' - summary: 'Get Employee Table Data' - description: 'Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response.' - operationId: get-employee-table-data - parameters: - - - name: id - in: path - description: 'The employee ID. Use the special value "all" to retrieve table data for all employees the API user has access to.' - required: true - schema: - type: string - - - name: table - in: path - description: 'The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus).' - required: true - schema: - type: string - - - $ref: '#/components/parameters/AcceptHeaderParameter' - responses: - '200': - description: 'All rows for the specified employee and table.' - content: - application/json: - schema: - title: EmployeeTableDataResponse - type: array - items: - title: EmployeeTableRow - description: "A single row from the requested table. The returned fields depend on the table and the caller's field-level permissions." - properties: { id: { description: 'The table row ID.', type: string }, employeeId: { description: 'The employee ID that owns this row.', type: string } } - type: object - additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } - application/xml: { } - '404': - description: 'The employee or table does not exist.' - security: - - basic: [] + oauth: + - 'employee:emergency_contacts' - oauth: - - employee + - 'employee:identification' - oauth: - 'employee:job' - oauth: - - 'employee:compensation' + - 'employee:management' - oauth: - - 'employee:custom_fields' + - 'employee:name' - oauth: - - 'employee:custom_fields_encrypted' + - 'employee:photo' - oauth: - - 'employee:assets' + - 'employee:vaccination' - oauth: - - 'employee:emergency_contacts' + - 'sensitive_employee:protected_info' - oauth: - - 'sensitive_employee:creditcards' + - 'sensitive_employee:address' - oauth: - - 'employee:education' + - 'sensitive_employee:creditcards' - oauth: - 'employee:job.write' post: tags: - - 'Tabular Data' + - Employees - 'Public API' - summary: 'Create Table Row' - description: 'Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history.' - operationId: create-table-row + summary: 'Update Employee' + description: "Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields).\n\nThis endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo).\n\nTrax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location." + operationId: update-employee parameters: - name: id @@ -8158,40 +8520,33 @@ paths: required: true schema: type: string - - - name: table - in: path - description: 'The name of the table to add a row to (e.g., jobInfo, compensation).' - required: true - schema: - type: string requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TableRowUpdate' + $ref: '#/components/schemas/Employee' application/xml: schema: - $ref: '#/components/schemas/TableRowUpdate' + $ref: '#/components/schemas/Employee' text/xml: schema: - $ref: '#/components/schemas/TableRowUpdate' + $ref: '#/components/schemas/Employee' responses: '200': - description: 'Row added successfully. No response body is returned.' + description: 'Employee updated successfully.' + content: + application/json: + schema: + $ref: '#/components/schemas/GetEmployeeResponse' '400': - description: 'The posted JSON or XML is malformed, or required fields are missing.' + description: 'Provided JSON is malformed, or required fields are missing.' '403': - description: 'Permission denied.' + description: 'The API user does not have permission to see the employee or to update any of the requested fields.' '404': - description: 'The employee or table does not exist.' - '406': - description: 'One or more field values are invalid.' + description: 'The employee does not exist.' '409': - description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' - '412': - description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + description: 'A field was given an invalid value (e.g., duplicate email, invalid state/country, incompatible pay type).' security: - basic: [] @@ -8200,42 +8555,106 @@ paths: - employee.write - oauth: - - 'employee:job.write' + - 'employee:assets.write' + - + oauth: + - 'employee:contact.write' - oauth: - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' - oauth: - 'employee:custom_fields.write' - oauth: - - 'employee:custom_fields_encrypted.write' + - 'employee:demographic.write' - oauth: - - 'employee:assets.write' + - 'employee:dependent.write' + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:education.write' - oauth: - 'employee:emergency_contacts.write' + - + oauth: + - 'employee:identification.write' + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:management.write' + - + oauth: + - 'employee:name.write' + - + oauth: + - 'employee:photo.write' + - + oauth: + - 'employee:vaccination.write' + - + oauth: + - 'sensitive_employee:protected_info.write' + - + oauth: + - 'sensitive_employee:address.write' - oauth: - 'sensitive_employee:creditcards.write' - oauth: - - 'employee:education.write' + - 'employee:payroll.write' - oauth: - employee - oauth: - 'employee:job' - '/api/v1_1/employees/{id}/tables/{table}/{rowId}': + delete: + tags: + - Employees + - 'Public API' + summary: 'Delete employee' + description: 'Permanently deletes an employee record and all associated data.' + operationId: delete-employee + parameters: + - + name: id + in: path + description: 'ID of the employee to delete.' + required: true + schema: + type: integer + responses: + '204': + description: 'Employee deleted successfully.' + '403': + description: 'Insufficient permissions.' + '500': + description: 'Internal server error.' + '404': + description: 'Employee not found.' + security: + - + oauth: + - employee.write + '/api/v1/employees/{id}/tables/{table}/{rowId}': post: tags: - 'Tabular Data' - 'Public API' - summary: 'Update Table Row v1.1' - description: 'Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases.' - operationId: update-table-row-v1-1 + summary: 'Update Table Row' + description: 'Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML.' + operationId: update-table-row parameters: - name: id @@ -8247,10 +8666,10 @@ paths: - name: table in: path - description: 'The name of the table containing the row to update (e.g., jobInfo, compensation).' + description: 'The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' required: true schema: - type: string + $ref: '#/components/schemas/TableName' - name: rowId in: path @@ -8315,14 +8734,13 @@ paths: - oauth: - 'employee:education.write' - '/api/v1_1/employees/{id}/tables/{table}': - post: + delete: tags: - 'Tabular Data' - 'Public API' - summary: 'Create Table Row v1.1' - description: 'Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases.' - operationId: create-table-row-v1-1 + summary: 'Delete Employee Table Row' + description: "Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list." + operationId: delete-employee-table-row parameters: - name: id @@ -8334,37 +8752,34 @@ paths: - name: table in: path - description: 'The name of the table to add a row to (e.g., jobInfo, compensation).' + description: 'The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: rowId + in: path + description: 'The ID of the specific row to delete.' required: true schema: type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TableRowUpdate' - application/xml: - schema: - $ref: '#/components/schemas/TableRowUpdate' - text/xml: - schema: - $ref: '#/components/schemas/TableRowUpdate' responses: '200': - description: 'Row added successfully. No response body is returned.' + description: 'Returns `success: true` if the row was deleted. Returns `success: false` with an error message if the row was not found or could not be deleted.' + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowDeleteResponse' '400': - description: 'The posted JSON or XML is malformed, or required fields are missing.' + description: 'Bad request. Invalid employee ID or table name.' + '401': + description: Unauthorized. '403': - description: 'Permission denied.' - '404': - description: 'The employee or table does not exist.' - '406': - description: 'One or more field values are invalid.' + description: 'Permission denied. The caller lacks write access to this table for the specified employee.' '409': - description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + description: 'Conflict. The row has pending approval changes and cannot be deleted until they are resolved.' '412': - description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + description: 'Precondition failed. The row cannot be deleted because it is tied to an active pay schedule.' security: - basic: [] @@ -8395,225 +8810,222 @@ paths: - oauth: - 'employee:education.write' - /api/v1/employees/changed: + '/api/v1/files/{fileId}': get: tags: - - 'Last Change Information' + - 'Company Files' - 'Public API' - summary: 'Get Changed Employee IDs' - description: 'Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp.' - operationId: get-changed-employee-ids + summary: 'Get Company File' + description: "Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section." + operationId: get-company-file parameters: - - name: since - in: query - description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' + name: fileId + in: path + description: 'The ID of the company file to download.' required: true schema: - type: string - format: date-time - - - name: type - in: query - description: 'Filter by change type. If omitted, all change types are returned.' - required: false - schema: - type: string - enum: - - inserted - - updated - - deleted - - all + type: integer responses: '200': - description: 'The latest change timestamp in the result set and a map of employees changed since the given timestamp.' + description: "The raw file content. The Content-Type header reflects the file's MIME type." content: - application/json: - schema: - title: ChangedEmployeeIdsResponse - required: - - latest - - employees - properties: - latest: { description: 'The latest last-changed timestamp among the returned employees.', type: string, format: date-time } - employees: { description: 'Map of employee IDs to change metadata for each changed employee.', type: object, additionalProperties: { properties: { id: { description: 'The employee ID.', type: string }, action: { description: 'The type of change: Inserted, Updated, or Deleted.', type: string, enum: [Inserted, Updated, Deleted] }, lastChanged: { description: 'ISO 8601 timestamp of the last change.', type: string, format: date-time } }, type: object } } - type: object - application/xml: { } - '400': - description: 'The since parameter is missing, is not a valid ISO 8601 date, or the type parameter is invalid.' + application/octet-stream: { } + '403': + description: 'The API user does not have permission to access this file.' + '404': + description: 'No file exists with the given ID.' security: - basic: [] - oauth: - - public.user - - - oauth: - - public.integration - '/api/v1/employees/{employeeId}/photo/{size}': - get: + - company_file + post: tags: - - Photos + - 'Company Files' - 'Public API' - summary: 'Get Employee Photo' - description: 'Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The server always sets `Content-Type: image/jpeg`, but the underlying byte payload may reflect the original upload format.' - operationId: get-employee-photo + summary: 'Update Company File' + description: 'Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated.' + operationId: update-company-file parameters: - - name: employeeId + name: fileId in: path - description: 'The ID of the employee whose photo to retrieve.' + description: 'The ID of the company file to update.' required: true schema: type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyFileUpdate' + responses: + '200': + description: 'The company file was updated successfully.' + '400': + description: 'The request body contains malformed JSON or XML.' + '403': + description: 'The API user does not have permission to modify this file or its category.' + '404': + description: 'The file or the target category was not found.' + security: - - name: size + basic: [] + - + oauth: + - company_file.write + delete: + tags: + - 'Company Files' + - 'Public API' + summary: 'Delete Company File' + description: 'Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use "Company Files > List Company Files" to obtain file IDs.' + operationId: delete-company-file + parameters: + - + name: fileId in: path - description: 'The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.' + description: 'The ID of the company file to delete.' required: true schema: - type: string - enum: - - original - - large - - medium - - small - - xs - - tiny + type: integer + responses: + '200': + description: 'The company file was deleted successfully. No response body is returned.' + '403': + description: 'The API user does not have permission to delete the requested file.' + '404': + description: 'The requested file was not found, or the Files tool is not enabled for the company.' + '500': + description: 'An internal server error occurred.' + security: - - name: width - in: query - description: 'Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.' - required: false + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{id}/files/{fileId}': + get: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Get Employee File' + description: "Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the API key.\n\nUse \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404." + operationId: get-employee-file + parameters: + - + name: id + in: path + description: 'The ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key.' + required: true schema: type: integer - - name: height - in: query - description: 'Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.' - required: false + name: fileId + in: path + description: 'The ID of the employee file to download.' + required: true schema: type: integer responses: '200': - description: 'Image bytes returned with Content-Type: image/jpeg. The payload may reflect the original upload format and is not guaranteed to be JPEG-encoded.' + description: "The employee file content streamed as a binary download. The Content-Type matches the file's stored MIME type and a Content-Disposition header provides the original filename." content: - image/jpeg: { } + application/octet-stream: + schema: + title: 'Employee File Download' + type: string + format: binary '403': - description: "The API user does not have permission to view this employee's photo." + description: "The API user does not have permission to access the requested employee or the file's section." '404': - description: 'The employee does not exist, no photo is on file, or an unrecognized size was specified.' + description: 'The requested employee file was not found, or it has been archived or soft-deleted.' security: - basic: [] - oauth: - - 'employee:photo' - /api/v1/reports/custom: + - 'employee:file' post: tags: - - Reports + - 'Employee Files' - 'Public API' - summary: 'Request Custom Report' - description: "**Deprecated. Use Datasets > Get Data from Dataset instead.**\n\nGenerates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default.\n\nThe request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `<report>` document as described in the XML request body schema.\n\nThe `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404.\n\nField IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400." - operationId: request-custom-report + summary: 'Update Employee File' + description: "Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs." + operationId: update-employee-file parameters: - - name: Accept - in: header - description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' - schema: - type: string - enum: - - application/json - - text/xml - - text/csv - - application/pdf - - application/vnd.ms-excel - - - name: format - in: query - description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' - required: false + name: id + in: path + description: 'The ID of the employee whose file is being updated.' + required: true schema: - type: string - enum: - - json - - xml - - csv - - xls - - pdf + type: integer - - name: onlyCurrent - in: query - description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + name: fileId + in: path + description: 'The ID of the employee file to update.' + required: true schema: - type: boolean - default: true + type: integer requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/RequestCustomReport' + $ref: '#/components/schemas/EmployeeFileUpdate' application/xml: schema: - title: RequestCustomReportXml - description: "XML report definition. The root element must be `<report>`. Supported child elements:\n\n- `<title>` — optional report label string.\n- `<fields>` — required; contains one `<field id=\"fieldAlias\"/>` element per column, where `id` is the BambooHR field alias (e.g. `firstName`, `workEmail`). Unknown or inaccessible field IDs are silently omitted.\n- `<filterDuplicates>` — optional; set to `no` to disable duplicate row filtering (default is enabled).\n- `<filters>` — optional; supported child elements:\n - `<lastChanged includeNull=\"yes|no\">2025-01-01T00:00:00+0000</lastChanged>` — ISO 8601 date-time string (offset format `+0000` or `+00:00`). `includeNull` defaults to `yes`.\n - `<employeeIds>` — contains one `<employeeId>` element per integer employee ID to include." - type: object + $ref: '#/components/schemas/EmployeeFileUpdate' responses: '200': - description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each with `id`, `type`, and `name`), and an `employees` array (each with `id` and one key per requested field). For XML, returns a `<report>` document. For CSV/XLS/PDF, returns the file content with the appropriate content-type header.' - content: - application/json: - schema: - title: RequestCustomReportResponse - properties: - title: { description: 'The report title.', type: string } - fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } - employees: { description: 'One object per employee. Each object contains an `id` property plus one key per requested field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } - type: object - text/xml: { } - text/csv: { } - application/pdf: { } - application/vnd.ms-excel: { } + description: 'The employee file metadata was updated successfully. No response body is returned.' '400': - description: 'Bad request. Returned when the request body is malformed JSON or XML, or when more than 400 fields are requested. Unknown or inaccessible field IDs are silently omitted and do not cause a 400.' + description: 'The request body contains malformed JSON or XML.' + '403': + description: "The API user does not have permission to modify the requested employee's file, its category, or the file belongs to a read-only section." '404': - description: 'Report format not found. Returned when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' - deprecated: true + description: 'The requested employee file or target category was not found.' + '500': + description: 'An internal server error occurred.' security: - basic: [] - oauth: - - report - /api/v1/employees/files/categories: - post: + - 'employee:file.write' + delete: tags: - 'Employee Files' - 'Public API' - summary: 'Create Employee File Category' - description: 'Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `<category>` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category.' - operationId: create-employee-file-category - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostNewEmployeeFileCategory' - application/xml: - schema: - $ref: '#/components/schemas/PostNewEmployeeFileCategory' + summary: 'Delete Employee File' + description: "Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the API key. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs." + operationId: delete-employee-file + parameters: + - + name: id + in: path + description: 'The ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key.' + required: true + schema: + type: integer + - + name: fileId + in: path + description: 'The ID of the employee file to delete.' + required: true + schema: + type: integer responses: '200': - description: 'The request was processed but no categories were created (empty payload).' - '201': - description: 'All specified categories were created successfully. No response body is returned.' - '400': - description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + description: 'The employee file was deleted successfully, or had already been deleted for this employee.' '403': - description: 'The API user does not have permission to create employee file categories.' + description: "The caller does not have permission to delete this employee's file, or the file belongs to a BambooPayroll-managed section and the caller is not a payroll admin." + '404': + description: 'The file was not found for the specified employee, or the Files tool is not enabled for this company.' '500': description: 'An internal server error occurred.' security: @@ -8622,1483 +9034,1356 @@ paths: - oauth: - 'employee:file.write' - /api/v1/files/categories: - post: + /api/v1/pay-grades-and-bands/job-titles-with-employees: + get: tags: - - 'Company Files' - 'Public API' - summary: 'Create Company File Category' - description: 'Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error.' - operationId: create-company-file-category - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NewCompanyFileCategory' - application/xml: - schema: - $ref: '#/components/schemas/NewCompanyFileCategory' + summary: 'List job titles with employees' + description: 'Get job titles with their associated employees for levels and bands configuration.' + operationId: 3af7d1ac36c35008b8ebb93fecbdb35b responses: '200': - description: 'The request was processed but no categories were created (empty payload).' - '201': - description: 'All specified categories were created successfully.' - '400': - description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + description: 'Successful response' + content: + application/json: + schema: + title: PayGradesAndBandsJobTitlesWithEmployeesResponse + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitleWithEmployees' '403': - description: 'The API user does not have permission to create company file categories, or the category name is reserved.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'An internal server error occurred.' + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - company_file.write - '/api/v1/employees/{id}/files': - post: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/status-counts: + get: tags: - - 'Employee Files' - 'Public API' - summary: 'Upload Employee File' - description: "Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled." - operationId: upload-employee-file - parameters: - - - name: id - in: path - description: '{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).' - required: true - schema: - type: string - default: '0' - requestBody: - required: true - content: - multipart/form-data: - schema: - required: - - fileName - - category - - file - properties: - fileName: - description: 'The display name for the uploaded file.' - type: string - category: - description: 'The ID of the employee file section to upload the file into.' - type: integer - share: - description: 'Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.' - type: string - enum: ['yes', 'no'] - file: - description: 'The file to upload.' - type: string - format: binary - type: object + summary: 'Get compensation level group status counts' + description: 'Get the count of compensation level groups in each status (draft, published, historic).' + operationId: 99b887959832c80eead3a176acc0c2d4 responses: - '201': - description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' - '400': - description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-GroupStatusCounts' '403': - description: 'The API user does not have permission to access the requested employee or their file section.' - '404': - description: 'The employee or the specified file category was not found.' - '413': - description: "The file exceeds the 20MB limit or the company's storage limit." - '503': - description: 'The file storage API is temporarily unavailable.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - 'employee:file.write' - /api/v1/files: - post: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/status: + get: tags: - - 'Company Files' - 'Public API' - summary: 'Upload Company File' - description: 'Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation.' - operationId: upload-company-file - requestBody: - required: true - content: - multipart/form-data: - schema: - required: - - fileName - - category - - file - properties: - fileName: - description: 'The display name for the uploaded file.' - type: string - category: - description: 'The ID of the file category (section) to upload the file into.' - type: integer - share: - description: 'Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.' - type: string - enum: ['yes', 'no'] - file: - description: 'The file to upload.' - type: string - format: binary - type: object + summary: 'Get levels and bands status' + description: 'Get the validation status of each step in the levels and bands configuration wizard.' + operationId: 6fbb2fe60e374d2204f1222252105945 responses: - '201': - description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' - '400': - description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBandsStatus' '403': - description: 'The API user does not have permission to upload files, or the target category is read-only.' - '404': - description: 'The specified category ID was not found.' - '413': - description: "The file exceeds the 20MB limit or the company's storage limit." - '503': - description: 'The file storage API is temporarily unavailable.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - company_file.write - '/api/v1/employees/{employeeId}/time_off/policies': + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/levels: get: tags: - - 'Time Off' - 'Public API' - summary: 'List Employee Time Off Policies' - description: 'Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date.' - operationId: list-employee-time-off-policies - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee.' - required: true - schema: - type: integer + summary: 'List compensation level groups and levels' + description: 'Get all compensation level groups and levels with validation errors and warnings.' + operationId: db8c61787c931b69afbf9e501be85256 responses: '200': - description: 'The list of time off policies assigned to the employee. Only includes regular (accruing) policy types.' + description: 'Successfully retrieved groups and levels' content: application/json: schema: - title: EmployeeTimeOffPoliciesResponse - type: array - items: - title: EmployeeTimeOffPolicyAssignment - properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' '403': - description: 'Insufficient permissions to view time off policy assignments.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_off + - pay_grades_and_bands put: tags: - - 'Time Off' - 'Public API' - summary: 'Assign Time Off Policies' - description: 'Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies.' - operationId: assign-time-off-policies - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee to assign policies to.' - required: true - schema: - type: integer + summary: 'Save compensation level groups and levels' + description: 'Upsert compensation level groups and levels. Creates new groups or levels or updates existing ones. Does not delete existing data not included in the request.' + operationId: 432e469fe5959a6ccd765d02018e7db4 requestBody: required: true content: application/json: schema: - type: array - items: - required: - - timeOffPolicyId - - accrualStartDate - properties: - timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } - accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', type: [string, 'null'], format: date } - type: object - example: - - - timeOffPolicyId: 4 - accrualStartDate: '2024-02-01' - - - timeOffPolicyId: 5 - accrualStartDate: null + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' responses: '200': - description: 'The current list of assigned policies for the employee.' + description: 'Successfully saved groups and levels' content: application/json: schema: - title: AssignedTimeOffPoliciesResponse - type: array - items: - title: AssignedTimeOffPolicy - properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } - type: object + title: PayGradesAndBandsSaveLevelsResponse + properties: + status: { type: string, example: success } + type: object '400': - description: 'Invalid request. Possible causes: employee not found, missing hire date, malformed JSON, missing timeOffPolicyId, or a policy is already assigned for the time off type.' - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid request body' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient permissions to assign time off policies.' - '422': - description: 'Unprocessable entity. The operation is not allowed for this employee, for example because of EOR restrictions.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_off.write - '/api/v1_1/employees/{employeeId}/time_off/policies': + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/pay-bands: get: tags: - - 'Time Off' - 'Public API' - summary: 'List Employee Time Off Policies v1.1' - description: 'Returns the time off policies currently assigned to the specified employee, including manual and unlimited policy types that v1 excludes.' - operationId: list-employee-time-off-policies-v1.1 - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee.' - required: true - schema: - type: integer + summary: 'Get pay bands for levels' + description: 'Get pay bands for each compensation level with validation errors and warnings. If percentageRange is null, band type is min-mid-max; otherwise it is percentage-based.' + operationId: fb29d4d4790104b6892a4b6d6db67e19 responses: '200': - description: 'The list of time off policies assigned to the employee, including manual and unlimited types.' + description: 'Successful response' content: application/json: schema: - title: EmployeeTimeOffPoliciesV1_1Response - type: array - items: - title: EmployeeTimeOffPolicyAssignmentV1_1 - properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', type: [string, 'null'], format: date } } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' '403': - description: 'Insufficient permissions to view time off policy assignments.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_off + - pay_grades_and_bands put: tags: - - 'Time Off' - 'Public API' - summary: 'Assign Time Off Policies v1.1' - description: 'Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types.' - operationId: assign-time-off-policies-v1.1 - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee to assign policies to.' - required: true - schema: - type: integer + summary: 'Update pay bands' + description: 'Bulk update pay bands for compensation levels.' + operationId: ad7871529b2a9c6612f8dd3c62192c08 requestBody: required: true content: application/json: schema: - type: array - items: - required: - - timeOffPolicyId - - accrualStartDate - properties: - timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } - accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', type: [string, 'null'], format: date } - type: object - example: - - - timeOffPolicyId: 4 - accrualStartDate: '2024-02-01' - - - timeOffPolicyId: 5 - accrualStartDate: null + required: + - payBands + - payBandType + properties: + payBandType: + type: string + enum: [percentRange, minMidMax] + payBands: + type: array + items: { $ref: '#/components/schemas/LevelsAndBands-PayBand' } + type: object responses: '200': - description: 'The current list of assigned policies for the employee, including manual and unlimited types.' + description: 'Successfully updated pay bands' content: application/json: schema: - title: AssignedTimeOffPoliciesV1_1Response - type: array - items: - title: AssignedTimeOffPolicyV1_1 - properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', type: [string, 'null'], format: date } } - type: object + title: PayGradesAndBandsUpdatePayBandsResponse + properties: + status: { type: string, example: success } + type: object '400': - description: 'Invalid request. Possible causes: malformed JSON, missing required fields, missing hire date, or duplicate policy type.' - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid pay bands payload' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient permissions to assign time off policies.' - '422': - description: 'Unprocessable entity. The operation is not allowed for this employee (e.g., EOR restrictions).' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_off.write - '/api/v1/applicant_tracking/applications/{applicationId}': + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/job-titles: get: tags: - 'Public API' - - 'Applicant Tracking' - summary: 'Get Job Application Details' - description: 'Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings.' - operationId: get-application-details - parameters: - - - name: applicationId - in: path - description: 'The ID of the application to retrieve details for.' - required: true - schema: - type: integer + summary: 'Get job titles and level assignments' + description: 'Get job titles with their associated compensation levels and all groups/levels. Returns job titles mapped to level IDs and complete group/level hierarchy.' + operationId: 4acdbb25aa278f9f94b44b42ef9f1b27 responses: '200': - description: 'Success. Returns the full application detail object.' + description: 'Successful response' content: application/json: schema: - title: ApplicationDetails - properties: - id: { description: 'Application ID', type: integer } - appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time } - status: { properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string }, dateChanged: { description: 'ISO 8601 datetime when status was last changed', type: string, format: date-time }, changedByUser: { description: 'The user who last changed the status, or null if changed by the system', properties: { id: { description: 'User ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', type: [string, 'null'] }, jobTitle: { description: "User's job title", properties: { id: { type: [integer, 'null'] }, label: { type: [string, 'null'] } }, type: [object, 'null'] } }, type: [object, 'null'] } }, type: object } - rating: { description: 'Applicant rating (1-5), or null if not yet rated', type: [integer, 'null'] } - resumeFileId: { description: 'ID of the attached resume file, or null if not provided', type: [integer, 'null'] } - coverLetterFileId: { description: 'ID of the attached cover letter file, or null if not provided', type: [integer, 'null'] } - attachmentCount: { description: 'Total number of attachments on this application, or null', type: [integer, 'null'] } - attachments: { description: 'List of attachments on this application, or null if none exist', type: [array, 'null'], items: { properties: { id: { description: 'Attachment ID', type: integer }, name: { description: 'Attachment file name', type: string }, fileUrl: { description: 'URL to download the attachment', type: string } }, type: object } } - movedTo: { description: 'List of applications this applicant was moved to, or null if not moved', type: [array, 'null'], items: { type: object } } - movedFrom: { description: 'List of applications this applicant was moved from, or null if not moved', type: [array, 'null'], items: { type: object } } - alsoConsideredForCount: { description: 'Count of other job openings this applicant is also being considered for', type: integer } - duplicateApplicationCount: { description: 'Count of duplicate applications from this applicant', type: integer } - referredBy: { description: 'Name of the person who referred this applicant, or null', type: [string, 'null'] } - desiredSalary: { description: "Applicant's desired salary, or null if not provided", type: [string, 'null'] } - commentCount: { description: 'Number of comments on this application', type: integer } - emailCount: { description: 'Number of emails sent for this application', type: integer } - eventCount: { description: 'Number of events associated with this application', type: integer } - questionsAndAnswers: { description: "List of custom application questions and the applicant's answers", type: array, items: { properties: { question: { properties: { id: { description: 'Question ID', type: integer }, label: { description: 'Question text', type: string } }, type: object }, answer: { properties: { id: { description: 'Answer ID', type: integer }, label: { description: 'Answer text', type: string } }, type: object }, hasRevisions: { description: 'Whether this answer has revision history', type: [boolean, 'null'] }, isArchived: { description: 'Whether this answer is archived', type: [boolean, 'null'] }, archivedDate: { description: 'ISO 8601 datetime when the answer was archived, or null', type: [string, 'null'], format: date-time }, editedDate: { description: 'ISO 8601 datetime when the answer was last edited, or null', type: [string, 'null'], format: date-time }, editedEndDate: { description: 'ISO 8601 datetime for the end date of the edit window, or null', type: [string, 'null'], format: date-time } }, type: object } } - applicationReferences: { description: 'Free-text references provided by the applicant, or null', type: [string, 'null'] } - applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, email: { description: 'Email address', type: string }, phoneNumber: { description: 'Phone number', type: [string, 'null'] }, avatar: { description: "URL to the applicant's avatar image, or null", type: [string, 'null'] }, source: { description: "Source of the application (e.g. 'LinkedIn', 'Referral'), or null", type: [string, 'null'] }, twitterUsername: { description: "Applicant's Twitter/X username, or null", type: [string, 'null'] }, address: { description: 'Applicant address', properties: { addressLine1: { type: [string, 'null'] }, addressLine2: { type: [string, 'null'] }, city: { type: [string, 'null'] }, state: { type: [string, 'null'] }, zipcode: { type: [string, 'null'] }, country: { type: [string, 'null'] } }, type: [object, 'null'] }, linkedinUrl: { description: 'LinkedIn profile URL', type: [string, 'null'] }, websiteUrl: { description: 'Personal website URL', type: [string, 'null'] }, availableStartDate: { description: "Candidate's available start date (yyyy-mm-dd)", type: [string, 'null'], format: date }, education: { description: "Applicant's education information", properties: { institution: { description: 'Name of the educational institution', type: [string, 'null'] }, level: { description: 'Highest level of education', properties: { id: { description: 'Education level ID', type: integer }, label: { description: 'Education level name', type: string } }, type: [object, 'null'] } }, type: [object, 'null'] } }, type: object } - job: { description: 'Information about the job position applied to', properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', type: [integer, 'null'] }, label: { description: 'Title text', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID of the hiring lead', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', type: [string, 'null'] }, jobTitle: { description: "Hiring lead's job title", properties: { id: { type: [integer, 'null'] }, label: { type: [string, 'null'] } }, type: [object, 'null'] } }, type: [object, 'null'] } }, type: object } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' '403': - description: 'Insufficient user permissions or API access is not turned on.' - '404': - description: 'Application not found.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - basic: [] - '/api/v1/applicant_tracking/applications/{applicationId}/comments': - post: + oauth: + - pay_grades_and_bands + put: tags: - 'Public API' - - 'Applicant Tracking' - summary: 'Create Job Application Comment' - description: 'Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted.' - operationId: create-application-comment - parameters: - - - name: applicationId - in: path - description: 'The ID of the application to add a comment to.' - required: true - schema: - type: integer + summary: 'Update job title level assignments' + description: 'Replace draft job title-to-level assignments with the provided associations.' + operationId: 2a0b847ceec3a4f9bfe20cf27e10e81a requestBody: - description: 'Comment object to post' required: true content: application/json: schema: - required: - - comment - properties: - type: - description: 'The comment type. Defaults to `comment` if omitted.' - type: string - comment: - description: 'The comment being posted.' - type: string - type: object - example: - type: comment - comment: 'I really like this applicant' + $ref: '#/components/schemas/LevelsAndBands-JobTitleAssignmentsRequest' responses: '200': - description: 'Success. Returns the type and ID of the created comment.' + description: 'Successfully updated job title assignments' content: application/json: schema: - title: CreateCommentResponse + title: PayGradesAndBandsUpdateJobTitlesResponse properties: - type: { description: "The type of comment created, e.g. 'comment'", type: string } - id: { description: 'The ID of the newly created comment', type: integer } + status: { type: string, example: success } type: object '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid request body' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Insufficient permissions' content: - application/json: { } - '404': - description: 'Bad request url.' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - basic: [] - /api/v1/applicant_tracking/jobs: + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/review: get: tags: - 'Public API' - - 'Applicant Tracking' - summary: 'Get Job Summaries' - description: 'Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings.' - operationId: get-job-summaries - parameters: - - - name: statusGroups - in: query - description: 'One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.' - schema: - type: string - - - name: status_ids - in: query - description: 'One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.' - schema: - type: string + summary: 'Get levels and bands review data' + description: 'Get consolidated review data for levels and bands with all validation errors and warnings across all steps.' + operationId: 12c40475623893cf0434b3ae69e36975 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: - - name: sortBy - in: query - description: 'A specific field to sort the results by.' - schema: - type: string - enum: - - count - - title - - lead - - created - - status + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands: + get: + tags: + - 'Public API' + summary: 'Get published levels and bands' + description: 'Get published levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' + operationId: cfacff2b34cf1e65ccd1ab188c5e1d12 + responses: + '200': + description: 'Successful response' + content: + application/json: + schema: + $ref: '#/components/schemas/LevelsAndBands-LevelsAndBands' + '403': + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: - - name: sortOrder - in: query - description: 'Order by which to sort results.' - schema: - type: string - enum: - - ASC - - DESC + oauth: + - pay_grades_and_bands + /api/v1/pay-grades-and-bands/publish: + post: + tags: + - 'Public API' + summary: 'Publish draft compensation level groups' + description: 'Publish all draft compensation level groups and mark any published groups as historic.' + operationId: 22932a81ba129f22114ccdef397af933 responses: '200': - description: 'Success. Returns an array of job opening summary objects.' + description: 'Successfully published draft groups' content: application/json: schema: - title: JobSummariesList - type: array - items: - title: JobSummary - properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', type: [integer, 'null'] }, label: { description: 'Title text', type: string } }, type: object }, postedDate: { description: 'ISO 8601 datetime when the job opening was posted', type: string, format: date-time }, location: { description: 'Location information', properties: { id: { description: 'Location ID', type: integer }, label: { description: 'Location display name', type: string }, address: { description: 'Full address of the location', type: object } }, type: [object, 'null'] }, department: { description: 'Department information', properties: { id: { description: 'Department ID', type: integer }, label: { description: 'Department name', type: string } }, type: [object, 'null'] }, status: { description: 'Job opening status', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', type: [string, 'null'] }, jobTitle: { description: "Hiring lead's job title", type: [object, 'null'] } }, type: [object, 'null'] }, newApplicantsCount: { description: "Number of applicants in 'New' status", type: integer }, activeApplicantsCount: { description: 'Number of applicants in an active status', type: integer }, totalApplicantsCount: { description: 'Total number of applicants', type: integer }, postingUrl: { description: 'Public URL for the job posting, or null if not posted', type: [string, 'null'] } } - type: object + title: PayGradesAndBandsPublishResponse + properties: + status: { type: string, example: success } + type: object '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid data' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Insufficient permissions' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - basic: [] - '/api/v1/applicant_tracking/applications/{applicationId}/status': + oauth: + - pay_grades_and_bands.write + /api/v1/pay-grades-and-bands/import: post: tags: - 'Public API' - - 'Applicant Tracking' - summary: 'Update Applicant Status' - description: 'Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs.' - operationId: update-applicant-status - parameters: - - - name: applicationId - in: path - description: 'The ID of the application whose status should be updated.' - required: true - schema: - type: integer + summary: 'Import levels and bands from CSV' + description: 'Parse and validate a levels and bands CSV upload and return suggested mappings and validation results.' + operationId: cdd8659ca89fb38042fd56feab507edf requestBody: - description: 'The new status to assign to the application.' required: true content: - application/json: + multipart/form-data: schema: required: - - status + - file properties: - status: - description: 'The ID of the status to assign to the application. Use the Get Applicant Statuses endpoint to get available status IDs.' - type: integer + file: + description: 'Levels and bands import CSV' + type: string + format: binary type: object - example: - status: 2 responses: '200': - description: 'Success. Returns the type and ID of the status change record.' + description: 'Successfully parsed CSV' content: application/json: schema: - title: UpdateApplicantStatusResponse - properties: - type: { description: "Always 'positionApplicantStatus'", type: string } - id: { description: 'The ID of the created status change record', type: integer } - type: object + $ref: '#/components/schemas/LevelsAndBands-UploadResponse' '400': - description: 'Bad request. The error message is returned in the `x-bamboohr-error-message` response header; the body is empty.' - headers: - x-bamboohr-error-message: - description: "Human-readable error message describing why the request failed (e.g. 'Invalid status')." - schema: - type: string + description: 'Multipart request missing file' content: - text/html: { } - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Insufficient permissions' content: - application/json: { } - '404': - description: 'Bad request url.' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Uploaded CSV could not be parsed or validated' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - basic: [] - /api/v1/benefitcoverages: - get: + oauth: + - pay_grades_and_bands.write + '/api/v1/pay-grades-and-bands/levels/{segment}': + delete: tags: - - Benefits - 'Public API' - summary: 'List Benefit Coverages' - description: 'Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a "Benefit Coverages" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access.' - operationId: list-benefit-coverages + summary: 'Delete groups by status or delete one level' + description: 'Delete compensation level groups when `segment` is `draft`, `published`, or `historic`, or delete a single compensation level when `segment` is a numeric level identifier.' + operationId: 0da9c9f851462d2e44dfe866b8e67e74 parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' + name: segment + in: path + description: 'Either `draft`, `published`, or `historic` to delete groups by status, or a numeric level id to delete one level.' + required: true + schema: + type: string + example: draft responses: '200': - description: 'A collection of benefit coverage levels ordered by sort order.' + description: 'Successfully deleted groups (`{"status":"success"}`) or returned updated hierarchy after deleting a level.' content: application/json: schema: - title: BenefitCoveragesResponse - properties: - 'Benefit Coverages': { description: 'Array of benefit coverage level objects.', type: array, items: { properties: { id: { description: 'The coverage level ID.', type: string }, shortName: { description: 'The short display name for this coverage level (e.g. "Employee + Spouse").', type: string }, description: { description: 'An optional longer description of the coverage level. Null if not set.', type: [string, 'null'] }, sortOrder: { description: 'The display sort order for this coverage level.', type: string }, benefitPlanId: { description: 'The benefit plan this coverage level belongs to, or null for company-wide coverage levels.', type: [string, 'null'] } }, type: object } } + title: PayGradesAndBandsDeleteResponse type: object - application/xml: { } + '400': + description: 'Invalid segment' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'The authenticated user does not have Benefits Administration permissions.' + description: 'Insufficient permissions' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Level not found' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - benefit - '/api/v1/employeedependents/{id}': + - pay_grades_and_bands.write + '/api/v1/performance/employees/{employeeId}/goals/filters': get: tags: - - Benefits + - Goals - 'Public API' - summary: 'Get Employee Dependent' - description: 'Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key "Employee Dependents" containing a single-element array. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' - operationId: get-employee-dependent + summary: 'Get Goal Filters (v1)' + description: 'Deprecated. Use "Get Goal Filters (v1.1)" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version.' + operationId: get-goals-filters-v1 parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' - - - name: id + name: employeeId in: path - description: 'The numeric ID of the employee dependent to retrieve.' + description: 'employeeId is the employee ID to whom the goals are assigned.' required: true schema: type: integer responses: '200': - description: 'The requested employee dependent.' + description: 'Returns goal status filter counts. Goals with milestones are excluded in this version.' content: application/json: schema: - $ref: '#/components/schemas/EmployeeDependentsResponse' - application/xml: { } - '400': - description: 'The specified dependent ID was not found.' + $ref: '#/components/schemas/GoalFiltersV1' '403': - description: 'The authenticated user does not have Benefits Administration permissions.' + description: 'The API user does not have permission to view goals for this employee.' + '500': + description: 'Something went wrong fetching filters.' + deprecated: true security: - basic: [] - oauth: - - 'employee:dependent:ssn' - - - oauth: - - 'employee:dependent' - put: - tags: - - Benefits + - goal + '/api/v1/performance/employees/{employeeId}/goals': + get: + tags: + - Goals - 'Public API' - summary: 'Update Employee Dependent' - description: 'Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing.' - operationId: update-employee-dependent + summary: 'List Goals' + description: 'Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says "all goals", "including closed", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal.' + operationId: list-goals parameters: - - name: id + name: employeeId in: path - description: 'The numeric ID of the employee dependent to update.' + description: 'employeeId is the employee ID to whom the goals are assigned.' required: true schema: - type: integer - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeeDependent' - application/xml: - schema: - $ref: '#/components/schemas/EmployeeDependent' + type: string + - + name: filter + in: query + description: 'Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission.' + schema: + type: string + enum: + - status-inProgress + - status-completed + - status-closed + - status-all responses: '200': - description: 'The updated dependent record. Format matches the request Content-Type (JSON or XML).' + description: 'The response content will be a JSON document with the requested information.' content: application/json: schema: - $ref: '#/components/schemas/EmployeeDependentsResponse' - application/xml: { } - '400': - description: 'The request body is invalid or contains a validation error (e.g. invalid relationship, gender, state code, country code, or date format).' + title: GoalsList + properties: + goals: { description: 'All goals of the selected employee', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } + type: object '403': - description: 'The authenticated user does not have permission to update this dependent.' - '409': - description: 'A duplicate record conflict was detected.' - '500': - description: 'An unexpected server error occurred.' + description: 'The API user does not have permission to view goals for this employee.' security: - basic: [] - oauth: - - 'employee:dependent:ssn.write' - - - oauth: - - 'employee:dependent.write' - /api/v1/employeedependents: - get: + - goal + post: tags: - - Benefits + - Goals - 'Public API' - summary: 'List Employee Dependents' - description: 'Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key "Employee Dependents" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' - operationId: list-employee-dependents + summary: 'Create Goal' + description: 'Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal''s progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ "title": string }` objects; the goal''s percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal).' + operationId: create-goal parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' - - - name: employeeid - in: query - description: 'The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.' - required: false + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true schema: - type: integer + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - title + - dueDate + - sharedWithEmployeeIds + properties: + title: + description: 'The title of the goal' + type: string + example: 'New Goal To update' + description: + description: 'A detailed description of the goal' + type: string + example: 'This should be fun!' + dueDate: + description: 'The due date for the goal in YYYY-MM-DD format' + type: string + format: date + example: '2025-12-17' + percentComplete: + description: 'Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`.' + type: integer + maximum: 100 + minimum: 0 + example: 0 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error.' + example: null + oneOf: [{ type: string, format: date }, { type: 'null' }] + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + example: [1234, 5678] + alignsWithOptionId: + description: 'ID of the option this goal aligns with' + oneOf: [{ type: integer }, { type: 'null' }] + milestones: + description: 'Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal.' + type: array + items: { properties: { title: { description: 'The title of the milestone', type: string, example: 'Surprise, it is a milestone' } }, type: object } + example: [{ title: 'Surprise, it is a milestone' }, { title: 'Now there are two of them!' }] + type: object responses: - '200': - description: 'A collection of employee dependents.' + '201': + description: 'A goal object that includes the new goal.' content: application/json: schema: - $ref: '#/components/schemas/EmployeeDependentsResponse' - application/xml: { } + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request body is invalid or required fields are missing or malformed (e.g. invalid dueDate, percentComplete out of range, completionDate provided with a non-100 percentComplete, sharedWithEmployeeIds not an array or missing the goal owner).' + content: + application/json: { } '403': - description: 'The authenticated user does not have Benefits Administration permissions.' + description: 'If the API user does not have permission to create a goal for this employee.' + content: + application/json: { } + '500': + description: 'If there was a problem creating the goal.' + content: + application/json: { } security: - basic: [] - oauth: - - 'employee:dependent:ssn' - - - oauth: - - 'employee:dependent' - post: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}': + put: tags: - - Benefits + - Goals - 'Public API' - summary: 'Create Employee Dependent' - description: 'Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing.' - operationId: create-employee-dependent + summary: 'Update Goal (v1)' + description: 'Deprecated. Use "Update Goal (v1.1)" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1.' + operationId: update-goal-v1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string requestBody: + description: "Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." required: true content: application/json: schema: - $ref: '#/components/schemas/EmployeeDependent' - application/xml: - schema: - $ref: '#/components/schemas/EmployeeDependent' + $ref: '#/components/schemas/UpdateGoalV1' responses: '200': - description: 'The newly created dependent record. Format matches the request Content-Type (JSON or XML).' + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' content: application/json: schema: - $ref: '#/components/schemas/EmployeeDependentsResponse' - application/xml: { } + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' '400': - description: 'The request body is invalid or contains a validation error (e.g. missing employeeId, invalid relationship, gender, state code, country code, or date format).' + description: 'The posted JSON is invalid.' + content: + application/json: { } '403': - description: 'The authenticated user does not have permission to add a dependent.' - '409': - description: 'A duplicate record conflict was detected.' + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } '500': - description: 'An unexpected server error occurred.' + description: 'If there was a problem updating the goal.' + content: + application/json: { } + deprecated: true security: - basic: [] - oauth: - - 'employee:dependent:ssn.write' - - - oauth: - - 'employee:dependent.write' - /api/v1/employees/directory: - get: + - goal.write + delete: tags: - - Employees + - Goals - 'Public API' - summary: 'Get Employees Directory' - description: "Returns the company employee directory, including a fieldset definition and an array of employee records. Only returns employees with an employee status of 'Active'. By default only current employees are returned; pass onlyCurrent=false to include employees where hire date or employment status are in the future. If the caller has org-chart access but not full directory access, a reduced fieldset is returned. Returns 403 if neither directory nor org-chart sharing is enabled for the company. Returns 404 if the directory is empty. The response format is controlled by the Accept header." - operationId: get-employees-directory + summary: 'Delete Goal' + description: 'Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found.' + operationId: delete-goal parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string - - name: onlyCurrent - in: query - description: 'When true (the default), only current employees are returned. Set to false to include future employees that have a hire date or employment status effective date in the future.' - required: false + name: goalId + in: path + description: 'The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`.' + required: true schema: - type: boolean - default: true + type: string responses: - '200': - description: 'Employee directory with fieldset definitions and employee data.' - content: - application/json: - schema: - title: JsonDirectoryEmployee - properties: - fields: { description: 'Array of field definitions included in this directory response. Each entry describes one key that appears in the employee objects.', type: array, items: { properties: { id: { description: 'Field identifier used as the key in employee records.', type: string }, type: { description: 'Field data type (e.g. text, list, email, bool, url, employee).', type: string }, name: { description: 'Field display name.', type: string } }, type: object } } - employees: { description: "Array of employee records. Each object contains an 'id' (string) plus keys matching the 'id' values from the 'fields' array. The set of keys varies by company configuration. The 'canUploadPhoto' value is an integer (1 or 0).", type: array, items: { type: object, additionalProperties: true } } - type: object - application/xml: - schema: - title: XmlDirectoryEmployee - properties: - fieldset: { description: 'Field definitions included in this directory response.', properties: { field: { type: array, items: { properties: { id: { description: 'Field identifier on the field element.', type: string, xml: { attribute: true } }, value: { description: 'Field display name serialized as the field element text content.', type: string } }, type: object } } }, type: object } - employees: { description: 'Employee records.', properties: { employee: { type: array, items: { properties: { id: { description: 'Employee ID on the employee element.', type: string, xml: { attribute: true } }, field: { description: 'Employee field values. Each field element has an id attribute and its text content is the value. Currency fields also have a currency attribute. The set of field ids varies by company directory configuration.', type: array, items: { properties: { id: { description: 'Field identifier on the field element.', type: string, xml: { attribute: true } }, value: { description: 'Field value serialized as the field element text content.', type: string } }, type: object } } }, type: object } } }, type: object } - type: object - xml: - name: directory + '204': + description: 'The goal was successfully deleted.' '403': - description: 'The company directory is not shared company-wide and the caller does not have org-chart access.' + description: 'The API user does not have permission to delete this goal.' '404': - description: 'The directory is empty (no employees matched the filter).' - '500': - description: 'An internal server error occurred while generating the directory report.' + description: 'The goalId is zero or non-positive after integer cast, or the goal was not found.' security: - basic: [] - oauth: - - employee_directory - /api/v1/files/view: - get: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress': + put: tags: - - 'Company Files' + - Goals - 'Public API' - summary: 'Get Company Files and Categories' - description: 'Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML.' - operationId: list-company-files + summary: 'Update Goal Progress' + description: 'Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete.' + operationId: update-goal-progress + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: integer + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: integer + requestBody: + description: 'The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead.' + required: true + content: + application/json: + schema: + required: + - percentComplete + properties: + percentComplete: + description: 'The percentage of completion for the goal (0-100)' + type: integer + maximum: 100 + minimum: 0 + example: 100 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Required when percentComplete is 100.' + example: '2025-04-11' + oneOf: [{ type: string, format: date }, { type: 'null' }] + type: object responses: '200': - description: 'List of company file categories and their visible files.' + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' content: application/json: schema: - title: CompanyFilesResponse - properties: - categories: { description: 'List of company file categories.', type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canUploadFiles: { description: 'Whether the requesting user can upload files to this category.', type: string, enum: ['yes', 'no'] }, files: { description: 'Files visible to the requesting user in this category.', type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename including extension.', type: string }, size: { description: 'File size in bytes.', type: string }, dateCreated: { description: 'Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployees: { description: 'Whether the file is shared with all employees.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the requesting user can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the requesting user can delete this file.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } - type: object - application/xml: { } + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request is invalid. Possible causes: percentComplete is out of range (0–100), the goal has milestones (use the milestone progress endpoint instead), or the specified employee is not associated with this goal.' + content: + application/json: { } '403': - description: 'The API user does not have permission to access company files.' + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'No goal found for the given goalId.' + content: + application/json: { } security: - basic: [] - oauth: - - company_file - '/api/v1/employees/{id}/files/view': - get: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress': + put: tags: - - 'Employee Files' + - Goals - 'Public API' - summary: 'List Employee Files' - description: "Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories." - operationId: list-employee-files + summary: 'Update Milestone Progress' + description: "Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics." + operationId: update-goal-milestone-progress parameters: - - name: id + name: employeeId in: path - description: 'The ID of the employee whose files are being listed.' + description: 'employeeId is the employee ID to whom the goals are assigned.' required: true schema: - type: integer + type: string - - name: Accept - in: header - description: 'Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML.' - required: false + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true schema: type: string - default: application/xml + - + name: milestoneId + in: path + description: 'milestoneId is the milestone ID for the specified goal.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - complete + properties: + complete: + description: 'Whether the milestone is complete or not' + type: boolean + example: true + type: object responses: '200': - description: "The employee's file categories and files. Each category contains permission flags and an array of file metadata." + description: 'The milestone progress was successfully updated. The response contains the updated goal details.' content: application/json: schema: - title: JsonEmployeeFiles - properties: - employee: { properties: { id: { description: 'Employee ID.', type: integer } }, type: object } - categories: { type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canRenameCategory: { description: 'Whether the caller can rename this category.', type: string, enum: ['yes', 'no'] }, canDeleteCategory: { description: 'Whether the caller can delete this category.', type: string, enum: ['yes', 'no'] }, canUploadFiles: { description: 'Whether the caller can upload files to this category.', type: string, enum: ['yes', 'no'] }, displayIfEmpty: { description: 'Whether to display the category when it has no files.', type: string, enum: ['yes', 'no'] }, files: { type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename.', type: string }, size: { description: 'File size in bytes.', type: integer }, dateCreated: { description: 'UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployee: { description: 'Whether the file is shared with the employee.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the caller can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the caller can delete this file.', type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { description: 'Whether the caller can toggle the share-with-employee setting.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } - type: object - application/xml: - schema: - title: XmlEmployeeFiles - properties: - id: { description: 'Employee ID on the root `<employee>` element.', type: string, xml: { attribute: true } } - category: { type: array, items: { properties: { id: { description: 'Category ID on the `<category>` element.', type: string, xml: { attribute: true } }, name: { type: string }, canRenameCategory: { type: string, enum: ['yes', 'no'] }, canDeleteCategory: { type: string, enum: ['yes', 'no'] }, canUploadFiles: { type: string, enum: ['yes', 'no'] }, displayIfEmpty: { type: string, enum: ['yes', 'no'] }, file: { type: array, items: { properties: { id: { description: 'File ID on the `<file>` element.', type: string, xml: { attribute: true } }, name: { type: string }, originalFileName: { type: string }, size: { description: 'File size in bytes (serialized as string in XML).', type: string }, dateCreated: { description: 'UTC creation timestamp in `YYYY-MM-DD HH:MM:SS` format.', type: string }, createdBy: { type: string }, shareWithEmployee: { type: string, enum: ['yes', 'no'] }, canRenameFile: { type: string, enum: ['yes', 'no'] }, canDeleteFile: { type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } - type: object - xml: - name: employee + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' + '400': + description: 'The request was invalid. Please check the request parameters and try again.' '403': - description: "The API user does not have permission to access the requested employee's files." + description: 'User does not have permission to update this goal' '404': - description: 'The requested employee was not found, or the employee has no accessible file categories.' + description: 'Goal or milestone not found' + '500': + description: 'Something went wrong updating your progress' security: - basic: [] - oauth: - - 'employee:file' - /api/v1/login: - post: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith': + put: tags: - - Login + - Goals - 'Public API' - summary: Login - description: "Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests.\n\nThis endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead.\n\n`applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device.\n\nResponse format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header.\n\nNote: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response." - operationId: login + summary: 'Update Goal Sharing' + description: "Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's employee ID. Returns the updated goal object." + operationId: update-goal-sharing parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string - - name: format - in: query - description: 'When set to `json`, forces a JSON response regardless of the `Accept` header.' - required: false + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true schema: type: string - enum: - - json requestBody: + description: 'Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' required: true content: - application/x-www-form-urlencoded: + application/json: schema: - $ref: '#/components/schemas/Login' + properties: + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + type: object responses: '200': - description: 'Successful authentication.' + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' content: application/json: schema: - title: LoginResponse - required: - - success - - userId - - key - - apiUrl - properties: - success: { description: 'Always `true` on HTTP 200.', type: boolean } - userId: { description: 'The authenticated user ID.', type: integer } - employeeId: { description: 'The employee ID linked to this user. `null` when no employee record is associated.', type: [integer, 'null'] } - key: { description: 'The API key to use for subsequent requests.', type: string } - apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } - type: object - application/xml: - schema: - title: LoginXmlResponse + title: GoalResponse properties: - response: { description: 'Always `authenticated` on HTTP 200.', type: string } - userId: { description: 'The authenticated user ID.', type: integer } - employeeId: { description: 'The employee ID linked to this user. Rendered as `<employeeId isNull="yes"/>` when no employee record is associated.', type: integer } - key: { description: 'The API key to use for subsequent requests.', type: string } - apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } + goal: { $ref: '#/components/schemas/TransformedApiGoal' } type: object - xml: - name: auth + '400': + description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array, sharedWithEmployeeIds is empty, or the specified employee is not associated with this goal.' + content: + application/json: { } '403': - description: 'Forbidden. Credential or key failure. Credential and key failures include a response body; mobile application key rejections return an empty body.' + description: 'Goal is not editable or insufficient permissions.' content: - application/json: - schema: - title: LoginFailureResponse - required: - - success - properties: - success: { description: 'Always `false`.', type: boolean } - type: object - application/xml: - schema: - title: LoginFailureXmlResponse - properties: - response: { description: 'Always `declined`.', type: string } - type: object - xml: - name: auth - '500': - description: 'Internal Server Error. API key creation failed.' + application/json: { } + '404': + description: 'No goal found for the given goalId.' content: - application/json: - schema: - title: LoginFailureResponse - required: - - success - properties: - success: { description: 'Always `false`.', type: boolean } - type: object - application/xml: - schema: - title: LoginFailureXmlResponse - properties: - response: { description: 'Always `declined`.', type: string } - type: object - xml: - name: auth - deprecated: true - security: [] - /api/v1/meta/lists: + application/json: { } + security: + - + basic: [] + - + oauth: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/aggregate': get: tags: - - 'Account Information' + - Goals - 'Public API' - summary: 'List List Fields' - description: 'Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` should not appear as current options, but are included so that historical data can reference the value.' - operationId: list-list-fields + summary: 'Get Goals Aggregate (v1)' + description: 'Deprecated. Use "Get Goals Aggregate (v1.1)" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' + operationId: get-goals-aggregate-v1 parameters: - - name: format + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: string + - + name: filter in: query - description: 'Set to "json" to receive JSON output as an alternative to using the Accept header.' + description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' required: false schema: type: string - enum: - - json - - - $ref: '#/components/parameters/AcceptHeaderParameter' responses: '200': - description: 'All list field details, including field IDs, option values, and manageability.' + description: 'The response content will be a JSON object with the requested information.' content: application/json: schema: - title: ListFieldsResponse - type: array - items: - $ref: '#/components/schemas/ListFieldDetail' - application/xml: { } + title: GoalsAggregateV1 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, deprecated: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: integer, example: 25, deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } + type: object '403': - description: 'The API user does not have permission to view employee fields.' + description: 'The API user does not have permission to view goals for this employee.' + deprecated: true security: - basic: [] - oauth: - - field - '/api/v1/meta/lists/{listFieldId}': - put: + - goal + '/api/v1/performance/employees/{employeeId}/goals/canCreateGoals': + get: tags: - - 'Account Information' + - Goals - 'Public API' - summary: 'Update List Field Values' - description: "Create, update, or archive options for a list field. To update an existing option, specify its ID. To create a new option, omit the `id` attribute. To archive an option while preserving it for historical data, set the `archived` attribute to `yes`.\n\nResponse format note: A successful response returns the full updated list in XML format." - operationId: update-list-field-values + summary: 'Get Goal Creation Permission' + description: 'Determine if the API user has permission to create a goal for this employee.' + operationId: get-goal-creation-permission parameters: - - name: listFieldId + name: employeeId in: path - description: 'The ID of the list field to update.' + description: 'employeeId is the employee ID with whom the goal is associated.' required: true schema: type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ListFieldValues' - text/xml: - schema: - description: 'XML payload describing the list options to create, update, or archive.' - type: string responses: '200': - description: 'All requested changes were applied. Returns the full updated list of options for the specified list field as XML.' + description: 'Returns whether the API user can create a goal for this employee.' content: - text/xml: + application/json: schema: - $ref: '#/components/schemas/ListFieldDetail' + title: CanCreateGoalsResponse + properties: + canCreateGoals: { description: 'Whether the API user can create a goal for this employee.', type: boolean, example: true } + type: object '400': - description: 'The posted JSON is invalid or malformed.' + description: 'The provided employeeId is invalid.' '403': - description: 'The list is not editable, or the API user does not have sufficient permissions.' - '404': - description: 'The specified list field or option ID does not exist.' - '409': - description: 'A duplicate list value conflicted with the value specified.' - security: - - - basic: [] - - - oauth: - - field.write - /api/v1/meta/tables: - get: - tags: - - 'Account Information' - - 'Public API' - summary: 'List Tabular Fields' - description: 'Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus).' - operationId: list-tabular-fields - parameters: - - - $ref: '#/components/parameters/AcceptHeaderParameter' - responses: - '200': - description: "A list of all tabular fields in the account, with each table's fields and their metadata." - content: - application/json: - schema: - title: TabularFieldsResponse - type: array - items: - title: TabularField - properties: { alias: { description: 'The API alias for the table (e.g., jobInfo, compensation).', type: string }, fields: { description: 'The fields in this table.', type: array, items: { properties: { id: { description: 'The field ID.', type: integer }, name: { description: 'The display name of the field.', type: string }, alias: { description: 'The API alias for the field within this table.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list).', type: string } }, type: object } } } - type: object - application/xml: { } + description: 'The API user does not have permission to view goals for this employee.' security: - basic: [] - oauth: - - field - '/api/v1/reports/{id}': + - goal + '/api/v1/performance/employees/{employeeId}/goals/shareOptions': get: tags: - - Reports + - Goals - 'Public API' - summary: 'Get Company Report' - description: "**Deprecated. Use Custom Reports > Get Report by ID instead.**\n\nReturns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific.\n\nThe caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404." - operationId: get-company-report + summary: 'List Goal Sharing Options' + description: 'Provides a list of employees with whom the specified employee\''s goals may be shared.' + operationId: list-goal-share-options parameters: - - name: Accept - in: header - description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' - schema: - type: string - enum: - - application/json - - text/xml - - text/csv - - application/pdf - - application/vnd.ms-excel - - - name: id + name: employeeId in: path - description: 'The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.' + description: 'employeeId is the employee ID to get sharing options for.' required: true - schema: - type: integer - - - name: format - in: query - description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' - required: false schema: type: string - enum: - - json - - xml - - csv - - xls - - pdf - - name: fd + name: search in: query - description: 'Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).' + description: 'The search term used to filter employees returned. Will search name, employee ID and email.' + required: true schema: type: string - enum: - - 'yes' - - 'no' - - name: onlyCurrent + name: limit in: query - description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + description: 'Maximum number of employees to return. Defaults to 10, maximum 100.' schema: - type: boolean - default: true + type: integer + default: 10 + maximum: 100 + minimum: 1 responses: '200': - description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each element has `id`, `type`, and `name`), and an `employees` array (each element has `id` plus one key per report field). For XML (`text/xml`), returns a `<report>` document. For CSV/XLS/PDF, returns file content with the appropriate content-type header.' + description: 'The response content will be a JSON document with a list of available employees with whom the goals can be shared.' content: application/json: schema: - title: GetCompanyReportResponse + title: ShareOptionsResponse properties: - title: { description: 'The report title.', type: string } - fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } - employees: { description: 'One object per employee. Each object contains an `id` property plus one key per report field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } + persons: { description: 'List of employees with whom goals can be shared.', type: array, items: { $ref: '#/components/schemas/PersonInfoApiTransformer' } } type: object - text/xml: { } - text/csv: { } - application/pdf: { } - application/vnd.ms-excel: { } + '400': + description: 'The search parameter is invalid or empty.' '403': - description: 'Access denied. The authenticated user does not have permission to view this report.' - '404': - description: 'Not found. Returned when the report ID does not exist or belongs to a different company, when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' - deprecated: true + description: 'Goals are not enabled, or the API user does not have permission to view sharing options for this employee.' security: - basic: [] - oauth: - - report - '/api/v1/employees/{employeeId}/time_off/calculator': + - goal + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments': get: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'Get Time Off Balance' - description: "Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided." - operationId: get-time-off-balance + summary: 'List Goal Comments' + description: 'Returns comments for a goal, including each comment''s ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says "my comment" rather than providing a comment ID.' + operationId: list-goal-comments parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' - - - name: end - in: query - description: 'The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.' - required: false + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true schema: type: string - format: date - example: '2026-12-31' - - - name: precision - in: query - description: 'Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.' - required: false - schema: - type: integer - default: 2 - maximum: 4 - minimum: 0 - example: 2 - - name: employeeId + name: goalId in: path - description: 'The ID of the employee to get time off balances for.' + description: 'goalId is the goal ID for the specified employee.' required: true schema: - type: integer + type: string responses: '200': - description: 'An array of time off balance entries, one per assigned time off type.' + description: 'Returns up to 50 comments for the specified goal, ordered by creation date.' content: application/json: schema: - title: TimeOffBalanceResponse - type: array - items: - title: TimeOffBalanceEntry - properties: { timeOffType: { description: 'The ID of the time off type.', type: string }, name: { description: 'The name of the time off type.', type: string }, units: { description: "The unit of measurement for the balance (e.g. 'hours' or 'days').", type: string, example: hours }, balance: { description: 'The calculated time off balance as of the specified date, rounded using `precision`.', type: string, example: '24.50' }, end: { description: 'The date the balance was calculated as of, in YYYY-MM-DD format.', type: string, format: date }, policyType: { description: 'The type of time off policy assigned to the employee for this time off type.', type: string, enum: [accruing, discretionary, manual] }, usedYearToDate: { description: 'The amount of time off used year-to-date as of the specified date, rounded using `precision`.', type: string, example: '12.25' } } - type: object - application/xml: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + title: GoalCommentsResponse + properties: + comments: { description: 'Array of comment objects for the goal.', type: array, items: { properties: { id: { description: 'The comment ID.', type: string }, authorUserId: { description: 'The user ID of the comment author.', type: integer }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' }, text: { description: 'The text content of the comment.', type: string }, canEdit: { description: 'Whether the API user can edit this comment.', type: boolean }, canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } }, type: object } } + type: object + '403': + description: 'The API user does not have permission to view comments for this goal, or the goal does not belong to this employee.' '404': - description: 'Employee not found. Some clients may receive an empty HTML response body for this legacy error case.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailsResponse' + description: 'The specified goalId is invalid (non-positive integer).' security: - basic: [] - oauth: - - time_off - '/api/v1/employees/{employeeId}/time_off/history': - put: + - goal + post: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'Create Time Off History Item' - description: 'Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted.' - operationId: create-time-off-history + summary: 'Create Goal Comment' + description: 'Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID.' + operationId: create-goal-comment parameters: - name: employeeId in: path - description: 'The ID of the employee.' + description: 'employeeId is the employee ID with whom the goal is associated.' required: true schema: - type: integer + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TimeOffHistory' - application/xml: - schema: - $ref: '#/components/schemas/TimeOffHistory' + required: + - text + properties: + text: + description: 'The text content of the comment.' + type: string + type: object responses: '201': - description: 'The history item has been created.' + description: 'A goal comment object with the new goal comment ID.' content: - application/json: { } + application/json: + schema: + title: GoalCommentResponse + properties: + id: { description: 'The comment ID.', type: string } + authorUserId: { description: 'The user ID of the comment author.', type: integer } + createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } + text: { description: 'The text content of the comment.', type: string } + canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } + canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + type: object '400': - description: 'Empty or malformed JSON/XML, an invalid date format, an invalid event type, an invalid time off request, an invalid time off type, or an invalid override amount.' + description: 'The goal does not belong to the specified employee, or the comment text is blank.' content: application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' '403': - description: 'Invalid permissions to perform this action.' + description: 'If the API user does not have permission to add a comment to the specified goal.' content: application/json: { } '404': - description: 'Employee not found.' - '409': - description: 'The time off request already has a history item.' + description: 'The specified goalId was not found.' content: application/json: { } - '503': - description: 'Service unavailable due to a database error.' security: - basic: [] - oauth: - - time_off.write - '/api/v1/employees/{employeeId}/time_off/balance_adjustment': + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}': put: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'Adjust Time Off Balance' - description: "Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types." - operationId: adjust-time-off-balance + summary: 'Update Goal Comment' + description: "Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification." + operationId: update-goal-comment parameters: - name: employeeId in: path - description: 'The ID of the employee.' + description: 'employeeId is the employee ID with whom the goal is associated.' required: true schema: - type: integer + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + - + name: commentId + in: path + description: 'commentId is the comment ID for the specified goal.' + required: true + schema: + type: string requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/AdjustTimeOffBalance' - application/xml: - schema: - $ref: '#/components/schemas/AdjustTimeOffBalance' + required: + - text + properties: + text: + description: 'The updated text content of the comment.' + type: string + type: object responses: - '201': - description: 'The balance adjustment has been created.' + '200': + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal comment response object for the specified commentId.' content: - application/json: { } + application/json: + schema: + title: GoalCommentResponse + properties: + id: { description: 'The comment ID.', type: string } + authorUserId: { description: 'The user ID of the comment author.', type: integer } + createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2025-04-10T15:36:38Z' } + text: { description: 'The text content of the comment.', type: string } + canEdit: { description: 'Whether the API user can edit this comment.', type: boolean } + canDelete: { description: 'Whether the API user can delete this comment.', type: boolean } + type: object '400': - description: 'Empty or malformed JSON/XML, an invalid date format, an invalid time off type, an invalid override amount, or an attempt to adjust a discretionary time off type.' + description: 'The goal does not belong to the specified employee, or the comment text is blank.' content: application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' '403': - description: 'Insufficient permissions to perform this action.' + description: 'Goal is not editable or insufficient permissions.' content: application/json: { } '404': - description: 'Employee not found.' - '503': - description: 'Service unavailable due to a database error.' - security: - - - basic: [] - - - oauth: - - time_off.write - /api/v1/meta/time_off/policies: - get: - tags: - - 'Time Off' - - 'Public API' - summary: 'List Time Off Policies' - description: 'Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted.' - operationId: list-time-off-policies - parameters: - - - $ref: '#/components/parameters/AcceptHeaderParameter' - responses: - '200': - description: 'A list of all non-deleted time off policies, sorted alphabetically by name.' + description: 'The goal specified by the given goalId was not found.' content: - application/json: - schema: - title: TimeOffPoliciesResponse - type: array - items: - title: TimeOffPolicy - properties: { id: { description: 'The policy ID.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type this policy belongs to.', type: integer }, name: { description: 'The policy name.', type: string }, effectiveDate: { description: 'Deprecated. Always null.', type: [string, 'null'] }, type: { description: 'The policy type.', type: string, enum: [accruing, discretionary, manual] } } - type: object - '401': - description: 'Unauthorized. Invalid API credentials.' - '403': - description: 'Insufficient permissions to view time off policies.' + application/json: { } security: - basic: [] - oauth: - - time_off - '/api/v1/employees/{employeeId}/time_off/request': - put: + - goal.write + delete: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'Create Time Off Request' - description: 'Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Approved and denied requests are recorded directly without triggering approval notifications. A `previousRequest` ID supersedes an existing request, cancelling the original. Accepts both JSON and XML request bodies.' - operationId: create-time-off-request + summary: 'Delete Goal Comment' + description: "Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification." + operationId: delete-goal-comment parameters: - name: employeeId in: path - description: 'The ID of the employee to create the time off request for.' + description: 'employeeId is the employee ID with whom the goal is associated.' required: true schema: - type: integer - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TimeOffRequest' - application/xml: - schema: - $ref: '#/components/schemas/TimeOffRequest' + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string + - + name: commentId + in: path + description: 'commentId is the ID of a specific comment for the specified goal.' + required: true + schema: + type: string responses: - '201': - description: 'Request created. The `Location` header contains the URL of the new request. When `Accept: application/json` is set, the response body contains the created request.' - content: - application/json: { } + '204': + description: 'The comment was successfully deleted. No response body is returned.' '400': - description: 'Malformed JSON or XML, an invalid time off type, an invalid previous request ID, or other invalid request data.' + description: 'The goal does not belong to the specified employee.' content: application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' '403': - description: 'Forbidden. The caller does not have permission to create or record this request for the employee, time off type, or requested status.' + description: 'Goal is not editable or insufficient permissions.' content: application/json: { } '404': - description: 'Employee not found.' - content: - application/json: { } - '422': - description: 'Unprocessable entity. Returned when a remote/EOR time off request cannot be created for the requested action.' + description: 'The goal specified by the given goalId was not found.' content: application/json: { } security: @@ -10106,228 +10391,206 @@ paths: basic: [] - oauth: - - time_off.write - '/api/v1/time_off/requests/{requestId}/status': - put: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate': + get: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'Update Time Off Request Status' - description: 'Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step.' - operationId: update-time-off-request-status + summary: 'Get Goal Aggregate' + description: 'Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request.' + operationId: get-goal-aggregate parameters: - - name: requestId + name: employeeId in: path - description: 'The ID of the time off request to update.' + description: 'employeeId is the employee ID with whom the goal is associated.' required: true schema: - type: integer - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/request' - application/xml: - schema: - $ref: '#/components/schemas/request' + type: string + - + name: goalId + in: path + description: 'goalId is the Goal ID used to generate the aggregate information.' + required: true + schema: + type: string responses: '200': - description: 'The status has been updated.' - content: - application/json: { } - '400': - description: 'If the posted XML is invalid or the status is not "approved", "denied", "canceled", or "declined".' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' - '403': - description: 'If the current user doesn\''t have access to change the status in this way.' + description: 'The response content will be a JSON object with the requested information.' content: - application/json: { } - '404': - description: 'If the time off request ID doesn\''t exist.' - content: - application/json: { } + application/json: + schema: + title: GoalAggregate + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } + canAlign: { description: 'The selected user can align goals with other users.', type: boolean } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } + alignsWithOptions: { description: 'All possible goals that this goal could be aligned with.', type: array, items: { properties: { id: { description: 'Id of the goal that the selected goal could be aligned with.', type: integer, example: 8 }, title: { description: 'Title of the goal that the selected goal could be aligned with.', type: string, example: 'Get all team goals for January complete.' } }, type: object } } + comments: { description: 'Comments linked to selected goal.', type: array, items: { properties: { id: { description: 'Id of the comment.', type: string, example: '2' }, authorUserId: { description: 'Id of the author of the comment.', type: integer, example: 1534 }, createdAt: { description: 'ISO 8601 UTC timestamp when the comment was created.', type: string, example: '2022-05-23T15:52:42Z' }, text: { description: 'The actual text of the comment.', type: string, example: 'This goal is taking longer than I thought.' }, canEdit: { description: 'Can the comment be edited.', type: boolean }, canDelete: { description: 'Can the comment be deleted.', type: boolean } }, type: object } } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } + type: object + '403': + description: 'The API user does not have permission to view this goal.' + '404': + description: 'The specified goalId was not found.' security: - basic: [] - oauth: - - time_off.write - /api/v1/time_off/requests: + - goal + '/api/v1/performance/employees/{employeeId}/goals/alignmentOptions': get: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'List Time Off Requests' - description: 'Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve.' - operationId: list-time-off-requests + summary: 'Get Alignable Goal Options' + description: 'Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the API user. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as "alignment options are permission-restricted," not as proof that the goal ID is invalid.' + operationId: get-alignable-goal-options parameters: - - - $ref: '#/components/parameters/AcceptHeaderParameter' - - - name: id - in: query - description: 'A particular request ID to limit the response to.' - schema: - type: integer - - - name: action - in: query - description: 'Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.' - schema: - type: string - default: view - enum: - - view - - approve - - myRequests - name: employeeId - in: query - description: 'A particular employee ID to limit the response to.' - schema: - type: integer - - - name: start - in: query - description: 'Only include requests that end on or after this date. YYYY-MM-DD format.' - required: true - schema: - type: string - format: date - - - name: end - in: query - description: 'Only include requests that start on or before this date. YYYY-MM-DD format.' + in: path + description: 'employeeId is the employee ID to get alignable goal options for.' required: true - schema: - type: string - format: date - - - name: type - in: query - description: 'A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.' - schema: - type: string - - - name: status - in: query - description: 'A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.' schema: type: string - - name: excludeNote + name: goalId in: query - description: 'When set to any truthy value, omits the `notes` object from each request in the response.' + description: 'Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid.' + required: false schema: - type: string + type: integer responses: '200': - description: 'A list of time off requests matching the specified filters.' + description: 'The response content will be a JSON document with a list of goals that are available alignment options.' content: application/json: schema: - title: TimeOffRequestsResponse - type: array - items: - title: TimeOffRequest - properties: { id: { description: 'The time off request ID.', type: integer, example: 1348 }, employeeId: { description: 'The ID of the employee.', type: integer, example: 5 }, name: { description: "The employee's full name.", type: string }, start: { description: 'The start date of the request in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'The end date of the request in YYYY-MM-DD format.', type: string, format: date }, created: { description: 'The date the request was created in YYYY-MM-DD format (company timezone).', type: string, format: date }, status: { description: 'The current status of the request.', properties: { lastChanged: { description: 'The date the status was last changed (company timezone).', type: string, format: date }, lastChangedByUserId: { description: 'The user ID who last changed the status.', type: integer }, status: { description: 'The current status value.', type: string } }, type: object }, type: { description: 'The time off type for this request.', properties: { id: { description: 'The time off type ID.', type: integer }, name: { description: 'The time off type name.', type: string }, icon: { description: 'The icon name for the time off type.', type: string } }, type: object }, amount: { description: 'The amount of time off requested.', properties: { unit: { description: 'The unit of measurement.', type: string, enum: [hours, days] }, amount: { description: 'The total amount requested.', type: number } }, type: object }, actions: { description: 'Actions the current user can perform on this request.', properties: { view: { description: 'Whether the user can view this request.', type: boolean }, edit: { description: 'Whether the user can edit this request.', type: boolean }, cancel: { description: 'Whether the user can cancel this request.', type: boolean }, approve: { description: 'Whether the user can approve this request.', type: boolean }, deny: { description: 'Whether the user can deny this request.', type: boolean }, bypass: { description: 'Whether the user can bypass the approval workflow.', type: boolean } }, type: object }, dates: { description: 'A map of dates (YYYY-MM-DD) to daily amounts.', type: object, additionalProperties: { type: number } }, notes: { description: 'Notes from employee and/or manager. Omitted when `excludeNote` is set.', properties: { employee: { description: 'Note from the employee.', type: string }, manager: { description: 'Note from the manager.', type: string } }, type: object } } - type: object - application/xml: { } + title: AlignmentOptionsResponse + properties: + alignsWithOptions: { description: 'Array of goals available as alignment targets for the employee.', type: array, items: { properties: { id: { description: 'The goal ID.', type: string }, title: { description: 'The display title of the goal.', type: string } }, type: object } } + type: object '400': - description: 'Invalid or missing start/end date.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'The provided goalId does not belong to the specified employee.' + '403': + description: 'The employeeId resolves to 0 (invalid path segment), or the API user lacks permission to view the specified goal.' + '404': + description: 'The provided goalId is zero or non-positive after integer cast (e.g. goalId=0, goalId=-1, or a non-numeric value such as goalId=abc).' security: - basic: [] - oauth: - - time_off - /api/v1/meta/time_off/types: - get: + - goal + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/close': + post: tags: - - 'Time Off' + - Goals - 'Public API' - summary: 'List Time Off Types' - description: "Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request." - operationId: list-time-off-types + summary: 'Close Goal' + description: "Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed." + operationId: close-goal parameters: - - $ref: '#/components/parameters/AcceptHeaderParameter' + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string - - name: mode - in: query - description: 'Set to `request` to limit the results to time off types the authenticated employee can request.' + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true schema: type: string - enum: - - request + requestBody: + description: 'An optional comment to record when closing the goal.' + required: false + content: + application/json: + schema: + properties: + comment: + description: 'Optional comment to record when closing the goal.' + example: 'Closing this goal as the deadline has passed.' + oneOf: [{ type: string }, { type: 'null' }] + type: object responses: - '200': - description: "Active time off types and the company's default hours-per-day schedule." + '201': + description: 'The goal was successfully closed. The response body contains the updated goal object.' content: application/json: schema: - title: 'Time Off Types and Default Hours' - required: - - timeOffTypes - - defaultHours + title: GoalResponse properties: - timeOffTypes: { title: 'Time Off Types', type: array, items: { required: [id, name, units, color, icon, source], properties: { id: { description: 'Time off type ID', type: integer, example: 64 }, name: { description: 'Time off type name', type: string, example: Vacation }, units: { description: 'Units for time off', type: string, enum: [hours, days] }, color: { description: 'Hex color code', type: [string, 'null'], example: 56afdd }, icon: { description: 'Icon identifier for the time off type', type: [string, 'null'], example: airplane }, source: { description: 'Source of the time off type', type: string, enum: [internal, remote] } }, type: object } } - defaultHours: { title: 'Default Hours', type: array, items: { required: [name, amount], properties: { name: { description: 'Day of week', type: string, example: Monday }, amount: { description: 'Default hours for the day. Returned as a stringified decimal value.', type: string, example: '8' } }, type: object } } + goal: { $ref: '#/components/schemas/TransformedApiGoal' } type: object - '401': - description: 'Unauthorized. Invalid API credentials.' + '400': + description: 'The request is invalid. Possible causes: the specified employee is not associated with this goal, or the goal is a cascading goal with visible children and cannot be closed.' + content: + application/json: { } + '403': + description: 'Goal is not editable or insufficient permissions.' + content: + application/json: { } + '404': + description: 'The goal specified by the given goalId was not found.' + content: + application/json: { } security: - basic: [] - oauth: - - time_off - /api/v1/training/type: - get: + - goal.write + '/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen': + post: tags: - - Training + - Goals - 'Public API' - summary: 'List Training Types' - description: 'Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings.' - operationId: list-training-types + summary: 'Reopen Goal' + description: "Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics." + operationId: reopen-goal + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: string + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' + required: true + schema: + type: string responses: - '200': - description: 'Returns all training types as an object keyed by training type ID.' + '201': + description: 'The goal was successfully reopened. The response body contains the updated goal object.' content: application/json: schema: - title: TrainingTypeMap - description: 'Object keyed by training type ID, where each value is a TrainingType.' + title: GoalResponse + properties: + goal: { $ref: '#/components/schemas/TransformedApiGoal' } type: object - additionalProperties: - $ref: '#/components/schemas/TrainingType' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'The request is invalid. The specified employee is not associated with this goal.' content: application/json: { } '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Goal is not editable or insufficient permissions.' content: application/json: { } '404': - description: 'Bad request url.' - content: - application/json: { } - '500': - description: 'Internal server error.' + description: 'The goal specified by the given goalId was not found.' content: application/json: { } security: @@ -10335,183 +10598,187 @@ paths: basic: [] - oauth: - - training - post: + - goal.write + '/api/v1_1/performance/employees/{employeeId}/goals/filters': + get: tags: - - Training + - Goals - 'Public API' - summary: 'Create Training Type' - description: "Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings." - operationId: create-training-type - requestBody: - description: 'Training object to post' - required: true - content: - application/json: - schema: - required: - - name - properties: - name: - description: 'Name of the new training type.' - type: string - frequency: - description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' - type: integer - renewable: - description: 'Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals.' - type: boolean - category: - description: 'The category is optional and you can pass either a category id or a category name.' - properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: 'First Aid Trainings' } } - type: object - required: - description: 'Is this a required training?' - type: boolean - dueFromHireDate: - description: 'Number of days before the training is due for new hires. Not valid unless training is required.' - type: integer - linkUrl: - description: 'Optional URL that can be included with a training.' - type: string - description: - description: 'Description for the training.' - type: string - allowEmployeesToMarkComplete: - description: 'Allows all employees who can view the training to be able to mark it complete.' - type: boolean - type: object - example: - name: 'My New Training' - frequency: '12' - renewable: '1' - category: - id: '3' - name: CustomApiCategoryName2 - required: '' - dueFromHireDate: - unit: day - amount: '30' + summary: 'Get Goal Filters (v1.1)' + description: 'Deprecated. Use "Get Goal Filters (v1.2)" instead. Get the number of goals per status for an employee. Note: Compared to "Get Goal Filters (v1)", this version includes actions.' + operationId: get-goals-filters-v1.1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID to whom the goals are assigned.' + required: true + schema: + type: integer responses: - '201': - description: Created + '200': + description: 'Contains the map of goal statuses, their counts, and available actions' content: application/json: schema: - $ref: '#/components/schemas/TrainingType' - '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } + $ref: '#/components/schemas/GoalFiltersV1_1' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' - content: - application/json: { } + description: 'The API user does not have permission to view goals for this employee.' '500': - description: 'Internal server error.' + description: 'Something went wrong fetching filters.' + deprecated: true + security: + - + basic: [] + - + oauth: + - goal + '/api/v1_1/performance/employees/{employeeId}/goals/aggregate': + get: + tags: + - Goals + - 'Public API' + summary: 'Get Goals Aggregate (v1.1)' + description: 'Deprecated. Use "Get Goals Aggregate (v1.2)" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to "Get Goals Aggregate (v1)", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2.' + operationId: get-goals-aggregate-v1.1 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: string + - + name: filter + in: query + description: 'Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.' + required: false + schema: + type: string + responses: + '200': + description: 'The response content will be a JSON object with the requested information.' content: - application/json: { } + application/json: + schema: + title: GoalsAggregateV1_1 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true, deprecated: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true, deprecated: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress, deprecated: true } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' }, deprecated: true } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353, deprecated: true }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45, deprecated: true }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim, deprecated: true }, lastName: { description: 'Last name of the person.', type: string, example: Johnson, deprecated: true }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg', deprecated: true } }, type: object }, deprecated: true } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25', deprecated: true }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2, deprecated: true } }, type: object }, deprecated: true } + type: object + '403': + description: 'The API user does not have permission to view goals for this employee.' + deprecated: true security: - basic: [] - oauth: - - training.write - '/api/v1/training/type/{trainingTypeId}': + - goal + '/api/v1_1/performance/employees/{employeeId}/goals/{goalId}': put: tags: - - Training + - Goals - 'Public API' - summary: 'Update Training Type' - description: 'Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings.' - operationId: update-training-type + summary: 'Update Goal (v1.1)' + description: 'Update a goal''s top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to "Update Goal (v1)", this version adds milestone updates.' + operationId: update-goal-v1.1 parameters: - - name: trainingTypeId + name: employeeId in: path - description: 'The ID of the training type to update.' + description: 'employeeId is the employee ID with whom the goal is associated.' + required: true + schema: + type: integer + - + name: goalId + in: path + description: 'goalId is the goal ID for the specified employee.' required: true schema: type: integer requestBody: - description: 'Training type object to update to' + description: 'Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced.' required: true content: application/json: schema: + required: + - title + - dueDate + - sharedWithEmployeeIds properties: - name: - description: 'Name of the training type.' - type: string - frequency: - description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' - type: integer - renewable: - description: 'Renewable is optional but if you are setting it to true you must pass a frequency.' - type: boolean - category: - description: 'Category is optional and passing an empty value will remove the category from the training type. Passing a name will assign the training type to the new training category.' - properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: CustomApiCategoryName2 } } - type: object - required: - description: 'Is this a required training?' - type: boolean - dueFromHireDate: - description: 'Number of days before the training is due for new hires. Not valid unless training is required.' - type: integer - linkUrl: - description: 'Optional URL that can be included with a training.' + title: + description: 'The title of the goal' type: string + example: 'Edited Goal With Milestones' description: - description: 'Description for the training.' + description: 'A detailed description of the goal' type: string - allowEmployeesToMarkComplete: - description: 'Allows all employees who can view the training to be able to mark it complete.' + example: 'Lets go!' + dueDate: + description: 'The due date for the goal in YYYY-MM-DD format' + type: string + format: date + example: '2024-03-17' + percentComplete: + description: 'The percentage of completion for the goal (0-100). Defaults to 0 if omitted. Ignored when milestonesEnabled is true.' + type: integer + maximum: 100 + minimum: 0 + completionDate: + description: 'The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error. Ignored when milestonesEnabled is true.' + oneOf: [{ type: string, format: date }, { type: 'null' }] + sharedWithEmployeeIds: + description: 'List of employee IDs with whom the goal is shared. Must include the employee ID of the goal owner.' + type: array + items: { type: integer } + example: [1234, 5678] + alignsWithOptionId: + description: 'ID of the option this goal aligns with' + oneOf: [{ type: integer }, { type: 'null' }] + milestonesEnabled: + description: 'Flag indicating whether milestones are enabled for this goal' type: boolean + example: true + deletedMilestoneIds: + description: 'List of milestone IDs to be deleted from the goal' + type: array + items: { type: integer } + example: [490] + milestones: + description: 'Optional. New milestones to add to the goal. Each object in this array creates a new milestone — even if its title matches an existing milestone. Do not include existing milestones here unless you intentionally want duplicates. To remove milestones, use `deletedMilestoneIds`.' + type: array + items: { properties: { title: { description: 'The title of the milestone', type: string } }, type: object } type: object - example: - name: 'My Edited Training' - frequency: '12' - renewable: '1' - category: - name: 'Existing or new training category' - required: '' - dueFromHireDate: - unit: day - amount: '30' responses: '200': - description: 'Returns the updated training type.' + description: 'A successful response indicates that all the requested changes were made. The content of the response will be the goal response object for the specified goalId.' content: application/json: schema: - $ref: '#/components/schemas/TrainingType' + $ref: '#/components/schemas/TransformedApiEmployeeGoalDetails' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'The request is invalid. Possible causes: sharedWithEmployeeIds is not an array or missing the goal owner, percentComplete is out of range (0–100), the goal has milestones and percentComplete cannot be manually updated, or the goal is a cascading goal (not supported by this endpoint).' content: application/json: { } '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Goal is not editable or insufficient permissions.' content: application/json: { } '404': - description: 'Bad request url.' + description: 'The goal specified by the given goalId was not found.' content: application/json: { } '500': - description: 'Internal server error.' + description: 'Something went wrong editing your goal.' content: application/json: { } security: @@ -10519,423 +10786,402 @@ paths: basic: [] - oauth: - - training.write - delete: + - goal.write + '/api/v1_2/performance/employees/{employeeId}/goals/filters': + get: tags: - - Training + - Goals - 'Public API' - summary: 'Delete Training Type' - description: 'Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request.' - operationId: delete-training-type + summary: 'Get Goal Filters (v1.2)' + description: 'Get the number of goals per status for an employee, including goals with milestones. Note: Compared to "Get Goal Filters (v1.1)", this version returns goals with milestones.' + operationId: get-goals-filters-v1.2 parameters: - - name: trainingTypeId + name: employeeId in: path - description: 'The ID of the training type to delete.' + description: 'employeeId is the employee ID to whom the goals are assigned.' required: true schema: type: integer responses: '200': - description: 'Deleted successfully. No response body.' - '400': - description: 'Bad request. This also occurs when the training type still has associated employee records that must be removed first.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Contains the map of goal statuses, their counts, and available actions' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/GoalFiltersV1_1' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url or training type does not exist.' - content: - application/json: { } - '405': - description: 'Training type was unable to be deleted.' - content: - application/json: { } + description: 'The API user does not have permission to view goals for this employee.' + '500': + description: 'Something went wrong fetching filters.' security: - basic: [] - oauth: - - training.write - /api/v1/training/category: + - goal + '/api/v1_2/performance/employees/{employeeId}/goals/aggregate': get: tags: - - Training + - Goals - 'Public API' - summary: 'List Training Categories' - description: 'Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings.' - operationId: list-training-categories + summary: 'Get Goals Aggregate (v1.2)' + description: 'Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to "Get Goals Aggregate (v1.1)", this version returns goals that contain milestones.' + operationId: get-goals-aggregate-v1.2 + parameters: + - + name: employeeId + in: path + description: 'employeeId is the employee ID used to generate the aggregate information.' + required: true + schema: + type: integer + - + name: filter + in: query + description: "Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list." + required: false + schema: + type: string responses: '200': - description: 'Returns all training categories as an object keyed by category ID.' + description: 'The response content will be a JSON object with the requested information.' content: application/json: schema: - title: TrainingCategoryMap - description: 'Object keyed by category ID, where each value is a TrainingCategory.' + title: GoalsAggregateV1_2 + properties: + canAlign: { description: 'The selected user can align goals with other users.', type: boolean, example: true } + canCreateGoals: { description: 'The selected user can create a goal.', type: boolean, example: true } + filters: { $ref: '#/components/schemas/GoalFiltersV1_1' } + selectedFilter: { description: 'The id of the current selected filter.', type: string, example: status-inProgress } + goals: { description: 'All goals in selected filter.', type: array, items: { $ref: '#/components/schemas/TransformedApiGoal' } } + persons: { description: 'A list of people with access to the goal.', type: array, items: { properties: { employeeId: { description: 'The id of this employee.', type: integer, example: 4353 }, userId: { description: 'The user id of the person if applicable.', type: integer, example: 45 }, displayFirstName: { description: 'First name of the person.', type: string, example: Tim }, lastName: { description: 'Last name of the person.', type: string, example: Johnson }, photoUrl: { description: 'url of the user profile image.', type: string, example: 'https://tim.johnson.jpg' } }, type: object } } + comments: { description: 'A list of how many comments belong to each goal.', type: array, items: { properties: { goalId: { description: 'The goalId that the comments are linked to.', type: string, example: '25' }, commentCount: { description: 'How many comments are linked to the goal', type: integer, example: 2 } }, type: object } } type: object - additionalProperties: - $ref: '#/components/schemas/TrainingCategory' + '403': + description: 'The API user does not have permission to view goals for this employee.' + security: + - + basic: [] + - + oauth: + - goal + '/api/v1/timetracking/record/{id}': + get: + tags: + - Hours + - 'Public API' + summary: 'Get Time Tracking Record' + description: 'Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response.' + operationId: get-time-tracking-record + parameters: + - + name: id + in: path + description: 'The time tracking record ID used to originally create the record.' + required: true + schema: + type: string + responses: + '200': + description: 'Successfully retrieved the time tracking record.' + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingRecordSchema' '400': - description: 'Bad request parameters.' + description: 'Invalid or missing argument.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '401': description: 'Unauthorized. Invalid API credentials.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' + description: 'Forbidden. Insufficient permissions to view this record.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': description: 'Internal server error.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - training + - time_tracking + /api/v1/timetracking/add: post: tags: - - Training - 'Public API' - summary: 'Create Training Category' - description: "Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings." - operationId: create-training-category + - Hours + summary: 'Create Hour Record' + description: 'Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records.' + operationId: create-time-tracking-hour-record requestBody: - description: 'Training category to post' required: true content: application/json: schema: - required: - - name - properties: - name: - description: 'Name of the new training category.' - type: string - type: object - example: - name: 'My New Training Category' + $ref: '#/components/schemas/TimeTrackingRecord' responses: '201': - description: Created + description: 'Record created. Returns the new time tracking ID.' content: application/json: schema: - $ref: '#/components/schemas/TrainingCategory' + $ref: '#/components/schemas/TimeTrackingIdResponseSchema' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Forbidden. Insufficient user permissions.' content: - application/json: { } - '404': - description: 'Bad request url.' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_tracking.write + /api/v1/timetracking/record: + post: + tags: + - 'Public API' + - Hours + summary: 'Create or Update Hour Records' + description: "Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures." + operationId: create-or-update-time-tracking-hour-records + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingRecordBulk' + responses: + '201': + description: "Returns an array of per-item results. Each item has a `success` boolean and a `response` object containing the resulting `id` on success, or a `message` describing the failure. Note: HTTP 201 is returned even when individual items fail; inspect each item's `success` field for partial failures." content: - application/json: { } - '500': - description: 'Internal server error.' + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingBulkResponseSchema' + '403': + description: 'Forbidden. Insufficient user permissions.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - training.write - '/api/v1/training/category/{trainingCategoryId}': + - time_tracking.write + /api/v1/timetracking/adjust: put: tags: - - Training - 'Public API' - summary: 'Update Training Category' - description: 'Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings.' - operationId: update-training-category - parameters: - - - name: trainingCategoryId - in: path - description: 'The ID of the training category to update.' - required: true - schema: - type: integer + - Hours + summary: 'Update Hour Record' + description: 'Edits an existing hour record by `timeTrackingId`.' + operationId: update-time-tracking-record requestBody: - description: 'Training category to update' required: true content: application/json: schema: - required: - - name - properties: - name: - description: 'Name of the training category.' - type: string - type: object - example: - name: 'My Training Category' + $ref: '#/components/schemas/AdjustTimeTrackingRequestSchema' responses: - '200': - description: 'Returns the updated training category.' + '201': + description: 'Record updated. Returns the time tracking ID.' content: application/json: schema: - $ref: '#/components/schemas/TrainingCategory' + $ref: '#/components/schemas/TimeTrackingIdResponseSchema' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'If any required field is missing, referenced IDs are invalid, or the posted JSON is invalid.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' - content: - application/json: { } - '409': - description: 'A training category with the same name already exists.' + description: 'Forbidden. Insufficient user permissions.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - training.write + - time_tracking.write + '/api/v1/timetracking/delete/{id}': delete: tags: - - Training - 'Public API' - summary: 'Delete Training Category' - description: 'Delete an existing training category. The owner of the API key used must have access to training settings.' - operationId: delete-training-category + - Hours + summary: 'Delete Hour Record' + description: 'Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility.' + operationId: delete-time-tracking-hour-record parameters: - - name: trainingCategoryId + name: id in: path - description: 'The ID of the training category to delete.' + description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' required: true schema: - type: integer + type: string responses: '200': - description: 'Deleted successfully. No response body.' - '401': - description: 'Unauthorized. Invalid API credentials.' - content: - application/json: { } - '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'Record removed.' content: - application/json: { } - '404': - description: 'Bad request url or training category does not exist.' + application/json: + schema: + $ref: '#/components/schemas/TimeTrackingDeleteResponseSchema' + '400': + description: 'If the time tracking ID cannot be found.' content: - application/json: { } - '500': - description: 'Internal server error.' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Forbidden. Insufficient permissions to delete this record.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - basic: [] - oauth: - - training.write - '/api/v1/training/record/employee/{employeeId}': - get: + - time_tracking.write + /api/v1/compensation/total_rewards/employees: + post: tags: - - Training + - 'Total Rewards' - 'Public API' - summary: 'List Employee Training Records' - description: "Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee." - operationId: list-employee-trainings - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee to get a list of trainings for.' - required: true - schema: - type: integer - - - name: type - in: query - description: 'Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.' - schema: - type: integer + summary: 'Add Employees to Total Rewards' + description: 'Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users.' + operationId: add-total-rewards-employees + requestBody: + required: true + content: + application/json: + schema: + required: + - employeeIds + properties: + employeeIds: + description: 'List of employee IDs to add to Total Rewards.' + type: array + items: { type: integer } + type: object responses: '200': - description: 'Returns training records keyed by record ID, or an empty array when the employee has no records.' - content: - application/json: - schema: - title: TrainingRecordMap - description: 'Returns an empty array when the employee has no records, or an object keyed by training record ID when records exist.' - oneOf: - - { description: 'Object keyed by training record ID, each value is a TrainingRecord.', type: object, additionalProperties: { $ref: '#/components/schemas/TrainingRecord' } } - - { description: 'Empty array returned when the employee has no training records.', type: array, items: { }, maxItems: 0 } + description: 'Employees successfully added to Total Rewards.' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid request (e.g. missing or empty employeeIds).' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' + description: 'The authenticated caller lacks permission to manage Total Rewards employees.' content: - application/json: { } - '404': - description: 'Bad request url.' - content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' + description: 'Unexpected server error.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - training - post: + - total_rewards.write + x-description: 'Add Employees to Total Rewards' + delete: tags: - - Training + - 'Total Rewards' - 'Public API' - summary: 'Create Employee Training Record' - description: "Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee." - operationId: create-employee-training-record - parameters: - - - name: employeeId - in: path - description: 'The ID of the employee to add a training record to.' - required: true - schema: - type: integer + summary: 'Remove Employees from Total Rewards' + description: 'Remove employees from Total Rewards. Their Total Rewards profiles will be deleted.' + operationId: remove-total-rewards-employees requestBody: - description: 'Training object to post' required: true content: application/json: schema: required: - - completed - - type + - employeeIds properties: - completed: - description: 'Completed is a required field and must be in yyyy-mm-dd format.' - type: string - cost: - description: 'Optional cost for the training record.' - properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } - type: object - instructor: - description: 'Name of the training instructor.' - type: string - hours: - description: 'Number of hours for the training.' - type: number - credits: - description: 'Credits earned for the training.' - type: number - notes: - description: 'Optional notes about the training record.' - type: string - type: - description: 'This must be an existing training type ID.' - type: integer + employeeIds: + description: 'List of employee IDs to remove from Total Rewards.' + type: array + items: { type: integer } type: object - example: - completed: '2026-03-12' - cost: - currency: USD - amount: '100.00' - instructor: 'Bob Jones' - hours: '16' - credits: '4' - notes: 'sample note' - type: '4' responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/TrainingRecord' + '200': + description: 'Employees successfully removed from Total Rewards.' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid request (e.g. missing or empty employeeIds).' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' + description: 'The authenticated caller lacks permission to manage Total Rewards employees.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' + description: 'Unexpected server error.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - training.write - '/api/v1/training/record/{employeeTrainingRecordId}': + - total_rewards.write + x-description: 'Remove Employees from Total Rewards' + '/api/v1/compensation/total_rewards/onboarding/{stepName}': put: tags: - - Training + - 'Total Rewards' - 'Public API' - summary: 'Update Employee Training Record' - description: "Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee." - operationId: update-employee-training-record + summary: 'Set Total Rewards Onboarding Step Status' + description: 'Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration.' + operationId: set-total-rewards-onboarding-step parameters: - - name: employeeTrainingRecordId + name: stepName in: path - description: 'The ID of the training record to update.' + description: 'Name of the onboarding step.' required: true schema: - type: integer + type: string requestBody: - description: 'Training object to update' required: true content: application/json: @@ -10944,3973 +11190,11731 @@ paths: - completed properties: completed: - description: 'Completed is the only required field and must be in yyyy-mm-dd format. The other parameters are optional.' - type: string - cost: - description: 'Optional cost for the training record.' - properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } - type: object - instructor: - description: 'Name of the training instructor.' - type: string - hours: - description: 'Number of hours for the training.' - type: number - credits: - description: 'Credits earned for the training.' - type: number - notes: - description: 'Optional notes about the training record.' - type: string + description: 'Whether the step is completed.' + type: boolean type: object - example: - completed: '2026-03-12' - cost: - currency: USD - amount: '100.00' - instructor: 'Bob Jones' - hours: '16' - credits: '4' - notes: 'sample note' responses: - '201': - description: Updated + '200': + description: 'Onboarding step status updated successfully.' content: application/json: schema: - $ref: '#/components/schemas/TrainingRecord' + $ref: '#/components/schemas/TotalRewardsOnboardingStep' '400': - description: 'Bad request parameters.' - content: - application/json: { } - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Invalid argument (e.g. invalid step name or non-boolean completed value).' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url.' - content: - application/json: { } - '405': - description: 'Training record could not be updated.' + description: 'The authenticated caller lacks permission to manage Total Rewards onboarding.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '500': - description: 'Internal server error.' - security: + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: - - basic: [] + oauth: + - total_rewards.write + x-description: 'Set Total Rewards Onboarding Step Status' + /api/v1/compensation/total_rewards/custom_disclaimer: + put: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Set Total Rewards Custom Disclaimer' + description: 'Set the company-wide Total Rewards custom disclaimer text shown on employee statements.' + operationId: set-total-rewards-custom-disclaimer + requestBody: + required: true + content: + application/json: + schema: + required: + - customDisclaimer + properties: + customDisclaimer: + description: 'Custom disclaimer text.' + type: string + type: object + responses: + '200': + description: 'Custom disclaimer updated successfully.' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards settings.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: - oauth: - - training.write + - total_rewards.write + x-description: 'Set Total Rewards Custom Disclaimer' delete: tags: - - Training + - 'Total Rewards' - 'Public API' - summary: 'Delete Employee Training Record' - description: 'Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type.' - operationId: delete-employee-training-record + summary: 'Remove Total Rewards Custom Disclaimer' + description: 'Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements.' + operationId: remove-total-rewards-custom-disclaimer + responses: + '200': + description: 'Custom disclaimer removed successfully.' + '403': + description: 'The authenticated caller lacks permission to manage Total Rewards settings.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards.write + x-description: 'Remove Total Rewards Custom Disclaimer' + '/api/v1/compensation/total_rewards/{employeeId}/statement': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Get Total Rewards Statement' + description: 'Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data.' + operationId: get-total-rewards-statement parameters: - - name: employeeTrainingRecordId + name: employeeId in: path - description: 'The ID of the training record to delete.' + description: 'The ID of the employee.' required: true schema: - type: integer + type: string responses: '200': - description: 'Deleted successfully. No response body.' - '401': - description: 'Unauthorized. Invalid API credentials.' + description: 'Total Rewards statement for the employee.' content: - application/json: { } + application/json: + schema: + $ref: '#/components/schemas/TotalRewards-EmployeeStatement' '403': - description: 'Insufficient user permissions or API access is not turned on.' - content: - application/json: { } - '404': - description: 'Bad request url or training record does not exist.' + description: "The authenticated caller lacks permission to view this employee's Total Rewards statement." content: - application/json: { } - '405': - description: 'Unable to delete training record.' + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' content: - application/json: { } + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - basic: [] + oauth: + - total_rewards + x-description: 'Get Total Rewards Statement' + /api/v1/meta/provinces: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get All Provinces' + description: 'Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. "UT"), an ISO 3166-2 code (e.g. "US-UT"), and a full name. Use the countryId field to filter client-side.' + operationId: get-all-provinces + responses: + '200': + description: 'Flat array of all states/provinces across all countries.' + content: + application/json: + schema: + title: AllProvincesResponse + type: array + items: + title: ProvinceItem + properties: { id: { description: 'State/province ID', type: integer }, countryId: { description: 'ID of the country this state/province belongs to', type: string }, label: { description: 'State/province abbreviation (e.g. "UT")', type: string }, iso: { description: 'ISO 3166-2 code (e.g. "US-UT")', type: string }, name: { description: 'Full name of the state/province', type: string } } + type: object + security: - oauth: - - training.write - '/api/v1/employees/{employeeId}/photo': - post: + - meta + '/api/v1/meta/provinces/{countryId}': + get: tags: - - Photos + - 'Account Information' - 'Public API' - summary: 'Upload Employee Photo' - description: "Uploads a new photo for an employee. The request must be a `multipart/form-data` POST with a `file` field. Confirmed supported formats: JPEG, PNG, BMP. Other formats (e.g. HEIC, SVG, AVIF, TIFF) are not reliably supported and may return 415, 500, or 502. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB. The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled." - operationId: upload-employee-photo + summary: 'List states and provinces for a country by Country ID' + description: 'Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. "UT"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. "US-UT"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list.' + operationId: get-states-by-country-id parameters: - - name: employeeId + name: countryId in: path - description: 'The ID of the employee whose photo is being uploaded.' + description: 'Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`.' required: true schema: type: integer - requestBody: - required: true - content: - multipart/form-data: - schema: - required: - - file - properties: - file: - description: "The image file to upload as the employee's photo." - type: string - format: binary - type: object responses: - '201': - description: 'The photo was uploaded and processed successfully.' + '200': + description: 'List of states/provinces. The `options` array items match StateProvinceSchema; `label` is always the subdivision abbreviation used for sorting.' + content: + application/json: + schema: + $ref: '#/components/schemas/StateProvinceResponseSchema' '400': - description: 'The request is invalid: no file provided, zero-byte file, or the maximum number of photo uploads (32767) has been exceeded.' - '403': - description: 'The API user does not have permission to upload photos for this employee.' - '404': - description: 'The employee does not exist.' - '413': - description: 'The uploaded file exceeds the 20MB size limit.' - '415': - description: 'The image does not meet requirements: not square (width and height differ by more than one pixel), smaller than 150×150 pixels, or the file could not be read as a supported image format.' + description: 'The provided country ID is invalid.' security: - basic: [] - oauth: - - 'employee:photo.write' - /api/v1/time_off/whos_out: + - field + /api/v1/meta/currency/types: get: tags: - - 'Time Off' + - 'Account Information' - 'Public API' - summary: 'List Who’s Out' - description: 'Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both time off entries and holidays, each identified by type.' - operationId: list-whos-out - parameters: + summary: 'Get all currency types' + description: 'Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body.' + operationId: get-all-currency-types + responses: + '200': + description: '200 OK with a JSON array of currency objects, each with `id`, `code`, `name`, `symbol`, and `symbolPosition`.' + content: + application/json: + schema: + title: MetaCurrencyTypesListResponse + type: array + items: + title: MetaCurrencyTypeItem + properties: { id: { description: 'Internal currency id', type: integer }, code: { description: 'ISO 4217-style currency code (e.g. USD, EUR)', type: string }, name: { description: 'Human-readable currency name (HTML entities decoded in the response)', type: string }, symbol: { description: 'Display symbol for the currency in UI', type: string }, symbolPosition: { description: 'Placement of the symbol relative to the amount: 0 = prefix, 1 = postfix (this is a numeric code, not a string label).', type: integer, enum: [0, 1] } } + type: object + security: - - $ref: '#/components/parameters/AcceptHeaderParameter' + basic: [] + /api/v1/meta/company: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get company properties' + description: 'Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access.' + operationId: get-meta-company + responses: + '200': + description: 'Company id, name, domain, and baseApiUrl gateway URL.' + content: + application/json: + schema: + title: MetaCompanyPropertiesResponse + properties: + id: { description: 'Bamboo company identifier (numeric).', type: integer } + name: { description: 'Company display name.', type: string } + domain: { description: 'Company’s Bamboo subdomain (same value used in the `baseApiUrl` path segment after `gateway.php/`)', type: string } + baseApiUrl: { description: 'Full HTTPS URL of the public API gateway for this company, typically `https://` + the data-center–specific API host for this tenant + ` /api/gateway.php/` + the company’s `domain` from this response. This is the entry point the integrator uses for legacy gateway-style API traffic, not a generic “base URL” name alone.', type: string } + type: object + security: - - name: start - in: query - description: 'Start date in YYYY-MM-DD format. Defaults to today.' - schema: - type: string - format: date + oauth: + - 'company:info' + /api/v1/meta/countries/options: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get Countries' + description: 'Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset).' + operationId: get-countries-options + parameters: - - name: end + name: isoCode in: query - description: 'End date in YYYY-MM-DD format. Defaults to 14 days after the start date.' + description: 'ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array.' + required: false schema: type: string - format: date + maxLength: 2 + minLength: 2 + pattern: '^[A-Za-z]{2}$' + responses: + '200': + description: 'When `isoCode` is omitted: a JSON array of all country objects. When `isoCode` is provided: the matching country as a single object.' + content: + application/json: + schema: + title: CountriesOptionsResponse + oneOf: + - { $ref: '#/components/schemas/CountriesResponseSchema' } + - { $ref: '#/components/schemas/CountrySchema' } + '404': + description: 'No country found for the given `isoCode`.' + '422': + description: '`isoCode` is present but malformed (not exactly two alpha characters).' + security: - - name: filter - in: query - description: "Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled." - schema: - type: string - enum: - - 'off' + basic: [] + - + oauth: + - field + - + oauth: + - meta + /api/v1/meta/industries: + get: + tags: + - 'Public API' + summary: 'Get Industries' + description: 'Returns the complete list of industry reference data including codes. Use the returned IDs when creating or updating company profiles.' + operationId: get-industries responses: '200': - description: 'A date-sorted list of employees who are out and company holidays.' + description: 'List of all industries.' content: application/json: schema: - title: WhosOutResponse + title: IndustriesListResponse type: array items: - title: WhosOutEntry - properties: { id: { description: 'The time off request ID or holiday ID.', type: integer }, type: { description: 'Whether this entry is a time off request or a company holiday.', type: string, enum: [timeOff, holiday] }, employeeId: { description: 'The employee ID. Only present for timeOff entries.', type: integer }, name: { description: 'The employee name or holiday name.', type: string }, start: { description: 'Start date in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'End date in YYYY-MM-DD format.', type: string, format: date } } + title: Industry + properties: { id: { description: 'Industry ID', type: integer }, name: { description: 'Industry name', type: string } } type: object - application/xml: { } '401': - description: 'Unauthorized. Invalid API credentials.' + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' '403': - description: "The Who's Out feature is disabled for this account." + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' security: - - - basic: [] - oauth: - - time_off -components: - schemas: - CursorPagedResponseMetadata: - description: 'Metadata information for employee list responses including total count and pagination details' - required: - - total - - page - properties: - total: - description: 'Total number of employees matching the filter criteria' - type: integer - page: - $ref: '#/components/schemas/CursorPagesResponse' - description: 'Pagination information for the current response' - type: object - CursorPagesResponse: - description: 'Pagination information for employee list responses including limit and cursor-based navigation' - required: + - meta + '/api/v1/meta/countries/{id}': + get: + tags: + - 'Public API' + summary: 'Get country by ID' + description: 'Returns a single country by catalog id. Response fields match each element of GET /api/v1/meta/countries/options (`id`, `name`, `isoCode` and nullability).' + operationId: get-meta-country-by-id + parameters: + - + name: id + in: path + description: 'Country id from GET /api/v1/meta/countries/options (`id` on the desired row).' + required: true + schema: + type: integer + minimum: 1 + responses: + '200': + description: 'Country resource.' + content: + application/json: + schema: + $ref: '#/components/schemas/CountrySchema' + '422': + description: 'Invalid path id (not a positive integer).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No country exists for the given id.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/timezones: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List timezones' + description: 'Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters.' + operationId: 5c5fb0f1211ae1c9451753f92f1053b6 + parameters: + - + name: pageSize + in: query + description: 'The number of items to return per page.' + schema: + type: integer + default: 500 + - + name: page + in: query + description: 'The page number to retrieve.' + schema: + type: integer + default: 1 + - + name: sort + in: query + description: 'Ordering by OData (Open Data Protocol) v4 specification' + schema: + type: string + default: '' + - + name: select + in: query + description: 'Projection (field selection) by OData specification' + schema: + type: string + default: '' + - + name: filter + in: query + description: 'Filter by an OData (Open Data Protocol) v4 specification' + schema: + type: string + default: '' + responses: + '200': + description: 'A paginated list of timezones' + content: + application/json: + schema: + title: TimezoneListResponse + allOf: + - { $ref: '#/components/schemas/PagedResponse' } + - { properties: { data: { description: 'Array of timezone resources for the current page', type: array, items: { $ref: '#/components/schemas/TimezoneResource' } } }, type: object } + '400': + description: 'Invalid query parameters' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: [] + '/api/v1/meta/timezones/{id}': + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get timezone by ID' + description: 'Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint.' + operationId: baa7162824294d030115568d1d8e6ca7 + parameters: + - + name: id + in: path + description: 'The numeric ID of the timezone to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The timezone resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TimezoneResource' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Timezone not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + '/api/v1/meta/timezones/by-zip/{zip}': + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'Get timezone by ZIP code' + description: 'Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404.' + operationId: 10d66d8561dd7dac50ff9c21ef63d83b + parameters: + - + name: zip + in: path + description: 'A 5-digit US ZIP code.' + required: true + schema: + type: string + pattern: '^\d{5}$' + example: '84604' + responses: + '200': + description: 'The timezone resource' + content: + application/json: + schema: + $ref: '#/components/schemas/TimezoneResource' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No timezone found for the provided ZIP code' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid ZIP format' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/bank-holidays: + get: + tags: + - 'Public API' + summary: 'List bank holidays' + description: 'Returns the list of global bank holiday reference dates (US federal and related bank holidays maintained in BambooHR). This is distinct from company-configured holidays. Optionally filter to holidays whose dates fall in a single calendar year.' + operationId: get-bank-holidays + parameters: + - + name: year + in: query + description: 'When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned.' + required: false + schema: + type: integer + maximum: 9999 + minimum: 1 + responses: + '200': + description: 'Bank holidays retrieved successfully' + content: + application/json: + schema: + title: BankHolidaysListResponse + type: array + items: + title: BankHoliday + properties: { id: { description: 'Stable bank holiday identifier', type: integer }, name: { description: 'Holiday display name', type: string }, date: { description: 'Holiday date in YYYY-MM-DD form', type: string, format: date } } + type: object + '422': + description: 'Invalid query parameters' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/meta/currency-conversions: + get: + tags: + - 'Public API' + summary: 'Get currency conversion rates' + description: 'Returns a snapshot of currency conversion rates for the specified base currency, keyed by ISO 4217 currency code. Rate map keys match the `code` field from GET /api/v1/meta/currency/types. Timestamps are ISO 8601 UTC with a Z offset.' + operationId: get-currency-conversions + parameters: + - + name: baseCurrency + in: query + description: 'ISO 4217 base currency code (e.g. USD, EUR). Defaults to USD when omitted.' + required: false + schema: + type: string + default: USD + maxLength: 3 + minLength: 3 + pattern: '^[A-Za-z]{3}$' + responses: + '200': + description: 'Currency conversion rates retrieved successfully' + content: + application/json: + schema: + title: CurrencyConversionsResponse + properties: + baseCurrency: { description: 'ISO 4217 base currency code', type: string, example: USD } + lastUpdated: { description: 'ISO 8601 UTC timestamp of the last rate update', type: string, format: date-time, example: '2026-04-07T12:00:00Z' } + nextUpdate: { description: 'ISO 8601 UTC timestamp of the next scheduled rate update', type: string, format: date-time, example: '2026-04-08T12:00:00Z' } + rates: { description: 'Map of ISO 4217 currency codes to numeric conversion rates relative to the base currency', type: object, additionalProperties: { type: number } } + type: object + '400': + description: 'Invalid parameter type for baseCurrency' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Malformed baseCurrency query parameter' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'No conversion rate snapshot found for the requested base currency' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '503': + description: 'Backing store or dependency temporarily unavailable' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - meta + /api/v1/hris/org/locations: + get: + tags: + - Locations + - 'Public API' + summary: 'List job locations' + description: 'Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters.' + operationId: get-locations + parameters: + - + name: pageSize + in: query + description: 'The number of items to return per page.' + schema: + type: integer + default: 500 + - + name: page + in: query + description: 'The page number to retrieve.' + schema: + type: integer + default: 0 + - + name: sort + in: query + description: 'Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' + schema: + type: string + default: '' + - + name: select + in: query + description: 'Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt' + schema: + type: string + default: '' + - + name: filter + in: query + description: 'Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation' + schema: + type: string + default: '' + - + name: expand + in: query + description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' + explode: false + schema: + type: array + items: + type: string + enum: + - state + - country + default: [] + responses: + '200': + description: 'A paginated list of job locations' + content: + application/json: + schema: + title: PagedLocationResponse + allOf: + - { $ref: '#/components/schemas/PagedResponse' } + - { properties: { data: { description: 'Array of location resources for the current page', type: array, items: { $ref: '#/components/schemas/LocationResponseObject' } } }, type: object } + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid input.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '429': + description: 'Too Many Requests' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal Server Error' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field + post: + tags: + - Locations + - 'Public API' + summary: 'Create a job location' + description: 'Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional.' + operationId: create-location + requestBody: + required: true + content: + application/json: + schema: + required: + - label + - address + properties: + label: + description: 'Display name for the location' + type: string + archived: + description: 'Whether the location is archived' + type: boolean + default: false + address: + description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' + required: [remoteLocation] + properties: { address1: { oneOf: [{ type: string }, { type: 'null' }] }, address2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, stateId: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, countryId: { oneOf: [{ type: string }, { type: 'null' }] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', oneOf: [{ type: string }, { type: 'null' }] }, remoteLocation: { type: boolean } } + type: object + type: object + responses: + '201': + description: 'The created location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate location label' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid fields' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + '/api/v1/hris/org/locations/{id}': + get: + tags: + - Locations + - 'Public API' + summary: 'Get a job location' + description: 'Retrieves a single job location by its ID. Returns the full location resource including address details.' + operationId: get-location + parameters: + - + name: id + in: path + description: 'The ID of the location' + required: true + schema: + type: string + - + name: expand + in: query + description: 'Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country' + explode: false + schema: + type: array + items: + type: string + enum: + - state + - country + default: [] + responses: + '200': + description: 'The requested location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '422': + description: 'Invalid expand options' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field + put: + tags: + - Locations + - 'Public API' + summary: 'Update a job location' + description: 'Updates an existing job location.' + operationId: update-location + parameters: + - + name: id + in: path + description: 'The ID of the location to update' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + required: + - label + - address + properties: + label: + description: 'Updated display name' + type: string + archived: + description: 'Whether the location is archived' + type: boolean + default: false + address: + description: 'Address details for the location. When remoteLocation is true, none are required and must be null or omitted' + required: [remoteLocation] + properties: { address1: { oneOf: [{ type: string }, { type: 'null' }] }, address2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, stateId: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, countryId: { oneOf: [{ type: string }, { type: 'null' }] }, timezone: { description: 'The utcName value from the /api/v1/meta/timezones endpoint', oneOf: [{ type: string }, { type: 'null' }] }, remoteLocation: { type: boolean } } + type: object + type: object + responses: + '200': + description: 'The updated location' + content: + application/json: + schema: + $ref: '#/components/schemas/LocationResponseObject' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'Duplicate location label' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '422': + description: 'Invalid fields' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + delete: + tags: + - Locations + - 'Public API' + summary: 'Delete a job location' + description: 'Deletes a job location by its ID. Returns 204 No Content on success.' + operationId: delete-location + parameters: + - + name: id + in: path + description: 'The ID of the location to delete' + required: true + schema: + type: string + responses: + '204': + description: 'Location deleted successfully' + '403': + description: 'Permission denied' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '409': + description: 'The location is in use and cannot be deleted. You can archive a location in use to prevent future usage.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '404': + description: 'Location not found' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Internal server error' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - field.write + '/api/v1/compensation/total_rewards/{employeeId}': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Check Total Rewards Profile Availability' + description: 'Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access.' + operationId: check-total-rewards-profile + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to check.' + required: true + schema: + type: string + responses: + '204': + description: 'Employee has an active Total Rewards profile and the user can view it.' + '404': + description: 'Employee does not have a Total Rewards profile or the user lacks permission.' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards + x-description: 'Check Total Rewards Profile Availability' + '/api/v1/compensation/total_rewards/{employeeId}/printable': + get: + tags: + - 'Total Rewards' + - 'Public API' + summary: 'Get Printable Total Rewards Statement' + description: "Generate and return a PDF printable version of the employee's Total Rewards statement." + operationId: get-total-rewards-printable-statement + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: string + - + name: multiplier + in: query + description: 'Hours-per-week multiplier for annualizing hourly pay.' + required: false + schema: + type: number + - + name: year + in: query + description: 'Statement year. Defaults to the current year when omitted.' + required: false + schema: + type: integer + responses: + '200': + description: 'PDF document streamed with Content-Disposition: attachment.' + content: + application/pdf: { } + '400': + description: 'Invalid argument (e.g. bad year or multiplier).' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '403': + description: "The authenticated caller lacks permission to view this employee's Total Rewards statement." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + '500': + description: 'Unexpected server error.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + oauth: + - total_rewards + x-description: 'Get Printable Total Rewards Statement' + /api/v1/meta/fields: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Fields' + description: 'Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account.' + operationId: list-fields + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A list of all available employee fields in the account.' + content: + application/json: + schema: + title: FieldsResponse + type: array + items: + title: Field + required: [id, name, type] + properties: { id: { description: 'The field identifier. For subfields this is a dotted string (e.g., "4340.4"); for top-level fields it may be an integer.', oneOf: [{ type: string }, { type: integer }] }, name: { description: 'The display name of the field.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list, checkbox).', type: string }, alias: { description: 'The API alias for the field. Only present when the field has an alias.', type: string }, deprecated: { description: 'Whether the field is deprecated and should no longer be used. Only present for deprecated fields.', type: boolean } } + type: object + application/xml: { } + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - field + /api/v1/meta/users: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Users' + description: "Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available.\n\nPass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response.\n\nThe response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML." + operationId: list-users + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: status + in: query + description: 'Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.' + required: false + schema: + type: string + example: enabled + responses: + '200': + description: 'An object whose keys are user IDs (as strings) and whose values are user objects. When the Accept header requests XML, a `<users>` document is returned instead.' + content: + application/json: + schema: + title: ListUsersResponse + description: 'Object keyed by user ID. Each key is a user ID string; each value is a user object.' + type: object + additionalProperties: + properties: { id: { description: 'The user ID.', type: integer }, employeeId: { description: 'The ID of the employee record linked to this user. Always present in the JSON response; `0` when no employee record is associated.', type: integer }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address. Resolved in priority order: work email, home email, account email.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } } + type: object + application/xml: + schema: + title: ListUsersXmlResponse + properties: + user: { type: array, items: { properties: { id: { description: 'The user ID.', type: integer, xml: { attribute: true } }, employeeId: { description: 'The employee record ID. Present as an XML attribute only when the user has an associated employee record.', type: integer, xml: { attribute: true } }, firstName: { description: 'First name.', type: string }, lastName: { description: 'Last name.', type: string }, email: { description: "The user's email address.", type: string }, status: { description: 'Account status.', type: string, enum: [enabled, disabled] }, lastLogin: { description: 'ISO 8601 timestamp of the most recent login. Omitted when the user has never logged in.', type: string, format: date-time } }, type: object, xml: { name: user } }, xml: { name: user, wrapped: false } } + type: object + xml: + name: users + '401': + description: 'Unauthorized. The API key is missing or invalid.' + '403': + description: 'Forbidden. The caller does not have permission to access this endpoint.' + security: + - + basic: [] + - + oauth: + - user + '/api/v1/employees/changed/tables/{table}': + get: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Get Changed Employee Table Data' + description: "Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps." + operationId: get-changed-employee-table-data + parameters: + - + name: table + in: path + description: 'The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: since + in: query + description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' + required: true + schema: + type: string + format: date-time + responses: + '200': + description: 'Changed table data for the specified table, grouped by employee ID.' + content: + application/json: + schema: + title: ChangedEmployeeTableDataResponse + required: + - table + - employees + properties: + table: { description: 'The requested table name.', type: string } + employees: { description: 'Map of employee IDs to changed table data for that employee.', type: object, additionalProperties: { properties: { lastChanged: { description: 'ISO 8601 timestamp of the last change for this employee.', type: string, format: date-time }, rows: { description: 'The table rows for this employee.', type: array, items: { type: object, additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } } } }, type: object } } + type: object + application/xml: { } + '400': + description: 'The since parameter is missing or is not a valid ISO 8601 date.' + '404': + description: 'The specified table does not exist.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:job' + - + oauth: + - 'employee:compensation' + - + oauth: + - 'employee:custom_fields' + - + oauth: + - 'employee:custom_fields_encrypted' + - + oauth: + - 'employee:assets' + - + oauth: + - 'employee:emergency_contacts' + - + oauth: + - 'sensitive_employee:creditcards' + - + oauth: + - 'employee:education' + '/api/v1/employees/{id}/tables/{table}': + get: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Get Employee Table Data' + description: 'Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response.' + operationId: get-employee-table-data + parameters: + - + name: id + in: path + description: 'The employee ID. Use the special value "all" to retrieve table data for all employees the API user has access to.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'All rows for the specified employee and table.' + content: + application/json: + schema: + title: EmployeeTableDataResponse + type: array + items: + title: EmployeeTableRow + description: "A single row from the requested table. The returned fields depend on the table and the caller's field-level permissions." + properties: { id: { description: 'The table row ID.', type: string }, employeeId: { description: 'The employee ID that owns this row.', type: string } } + type: object + additionalProperties: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: array, items: { anyOf: [{ type: string }, { type: number }, { type: boolean }, { type: integer }, { type: object, additionalProperties: true }, { type: 'null' }] } }, { type: object, additionalProperties: true }, { type: 'null' }] } + application/xml: { } + '404': + description: 'The employee or table does not exist.' + security: + - + basic: [] + - + oauth: + - employee + - + oauth: + - 'employee:job' + - + oauth: + - 'employee:compensation' + - + oauth: + - 'employee:custom_fields' + - + oauth: + - 'employee:custom_fields_encrypted' + - + oauth: + - 'employee:assets' + - + oauth: + - 'employee:emergency_contacts' + - + oauth: + - 'sensitive_employee:creditcards' + - + oauth: + - 'employee:education' + - + oauth: + - 'employee:job.write' + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Create Table Row' + description: 'Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history.' + operationId: create-table-row + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row added successfully. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee or table does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + - + oauth: + - employee + - + oauth: + - 'employee:job' + '/api/v1_1/employees/{id}/tables/{table}/{rowId}': + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Update Table Row v1.1' + description: 'Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases.' + operationId: update-table-row-v1-1 + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + - + name: rowId + in: path + description: 'The ID of the row to update.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row updated successfully. A 200 response is returned as long as at least one field was updated, even if some fields were skipped due to permissions. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee, table, or row does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + '/api/v1_1/employees/{id}/tables/{table}': + post: + tags: + - 'Tabular Data' + - 'Public API' + summary: 'Create Table Row v1.1' + description: 'Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases.' + operationId: create-table-row-v1-1 + parameters: + - + name: id + in: path + description: 'The employee ID.' + required: true + schema: + type: string + - + name: table + in: path + description: 'The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list.' + required: true + schema: + $ref: '#/components/schemas/TableName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowUpdate' + application/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + text/xml: + schema: + $ref: '#/components/schemas/TableRowUpdate' + responses: + '200': + description: 'Row added successfully. No response body is returned.' + '400': + description: 'The posted JSON or XML is malformed, or required fields are missing.' + '403': + description: 'Permission denied.' + '404': + description: 'The employee or table does not exist.' + '406': + description: 'One or more field values are invalid.' + '409': + description: 'Conflict. The provided field values conflict with business rules or payroll constraints.' + '412': + description: 'Precondition failed. The update requires an active pay schedule or other required prerequisite data.' + security: + - + basic: [] + - + oauth: + - employee.write + - + oauth: + - 'employee:job.write' + - + oauth: + - 'employee:compensation.write' + - + oauth: + - 'employee:custom_fields.write' + - + oauth: + - 'employee:custom_fields_encrypted.write' + - + oauth: + - 'employee:assets.write' + - + oauth: + - 'employee:emergency_contacts.write' + - + oauth: + - 'sensitive_employee:creditcards.write' + - + oauth: + - 'employee:education.write' + /api/v1/employees/changed: + get: + tags: + - 'Last Change Information' + - 'Public API' + summary: 'Get Changed Employee IDs' + description: 'Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp.' + operationId: get-changed-employee-ids + parameters: + - + name: since + in: query + description: 'ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.' + required: true + schema: + type: string + format: date-time + - + name: type + in: query + description: 'Filter by change type. If omitted, all change types are returned.' + required: false + schema: + type: string + enum: + - inserted + - updated + - deleted + - all + responses: + '200': + description: 'The latest change timestamp in the result set and a map of employees changed since the given timestamp.' + content: + application/json: + schema: + title: ChangedEmployeeIdsResponse + required: + - latest + - employees + properties: + latest: { description: 'The latest last-changed timestamp among the returned employees.', type: string, format: date-time } + employees: { description: 'Map of employee IDs to change metadata for each changed employee.', type: object, additionalProperties: { properties: { id: { description: 'The employee ID.', type: string }, action: { description: 'The type of change: Inserted, Updated, or Deleted.', type: string, enum: [Inserted, Updated, Deleted] }, lastChanged: { description: 'ISO 8601 timestamp of the last change.', type: string, format: date-time } }, type: object } } + type: object + application/xml: { } + '400': + description: 'The since parameter is missing, is not a valid ISO 8601 date, or the type parameter is invalid.' + security: + - + basic: [] + - + oauth: + - public.user + - + oauth: + - public.integration + '/api/v1/employees/{employeeId}/photo/{size}': + get: + tags: + - Photos + - 'Public API' + summary: 'Get Employee Photo' + description: "Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation: by default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`.\n\nA 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"<value>\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug." + operationId: get-employee-photo + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee whose photo to retrieve.' + required: true + schema: + type: integer + - + name: size + in: path + description: 'The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.' + required: true + schema: + type: string + enum: + - original + - large + - medium + - small + - xs + - tiny + - + name: width + in: query + description: 'Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.' + required: false + schema: + type: integer + - + name: height + in: query + description: 'Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.' + required: false + schema: + type: integer + responses: + '200': + description: 'Employee photo, returned in one of two shapes via standard HTTP content negotiation: binary `image/*` bytes by default (matching the stored format), or `application/json` with `{ mimeType, fileBase64 }` when the caller sends `Accept: application/json`.' + content: + 'image/*': { } + application/json: + schema: + title: EmployeePhotoJsonResponse + required: + - mimeType + - fileBase64 + properties: + mimeType: { description: 'The actual MIME type of the underlying image (e.g. `image/jpeg`, `image/png`, `image/bmp`, `image/gif`, `image/tiff`). Use this to identify the format of the decoded bytes.', type: string } + fileBase64: { description: 'Base64-encoded image bytes. Decoding produces the same bytes returned by the binary variant of this endpoint.', type: string, format: byte } + type: object + '403': + description: "The authenticated user does not have permission to view this employee's photo." + '404': + description: 'Returned in three distinct cases: the employee does not exist, the employee has no photo on file, or the requested size is not a recognized value. The `x-bamboohr-error-message` response header reports which case applies (`Employee not found`, `Employee photo not found`, or `Size: "<value>" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`). "Employee photo not found" is the expected response for an employee who simply has not uploaded a photo and should not be treated as an error to debug.' + headers: + x-bamboohr-error-message: + description: 'Identifies which 404 case occurred. One of: `Employee not found`, `Employee photo not found`, or `Size: "<value>" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`.' + schema: + type: string + security: + - + basic: [] + - + oauth: + - 'employee:photo' + /api/v1/reports/custom: + post: + tags: + - Reports + - 'Public API' + summary: 'Request Custom Report' + description: "**Deprecated. Use Datasets > Get Data from Dataset instead.**\n\nGenerates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default.\n\nThe request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `<report>` document as described in the XML request body schema.\n\nThe `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404.\n\nField IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400." + operationId: request-custom-report + parameters: + - + name: Accept + in: header + description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' + schema: + type: string + enum: + - application/json + - text/xml + - text/csv + - application/pdf + - application/vnd.ms-excel + - + name: format + in: query + description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' + required: false + schema: + type: string + enum: + - json + - xml + - csv + - xls + - pdf + - + name: onlyCurrent + in: query + description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + schema: + type: boolean + default: true + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RequestCustomReport' + application/xml: + schema: + title: RequestCustomReportXml + description: "XML report definition. The root element must be `<report>`. Supported child elements:\n\n- `<title>` — optional report label string.\n- `<fields>` — required; contains one `<field id=\"fieldAlias\"/>` element per column, where `id` is the BambooHR field alias (e.g. `firstName`, `workEmail`). Unknown or inaccessible field IDs are silently omitted.\n- `<filterDuplicates>` — optional; set to `no` to disable duplicate row filtering (default is enabled).\n- `<filters>` — optional; supported child elements:\n - `<lastChanged includeNull=\"yes|no\">2025-01-01T00:00:00+0000</lastChanged>` — ISO 8601 date-time string (offset format `+0000` or `+00:00`). `includeNull` defaults to `yes`.\n - `<employeeIds>` — contains one `<employeeId>` element per integer employee ID to include." + type: object + responses: + '200': + description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each with `id`, `type`, and `name`), and an `employees` array (each with `id` and one key per requested field). For XML, returns a `<report>` document. For CSV/XLS/PDF, returns the file content with the appropriate content-type header.' + content: + application/json: + schema: + title: RequestCustomReportResponse + properties: + title: { description: 'The report title.', type: string } + fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per employee. Each object contains an `id` property plus one key per requested field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } + type: object + text/xml: { } + text/csv: { } + application/pdf: { } + application/vnd.ms-excel: { } + '400': + description: 'Bad request. Returned when the request body is malformed JSON or XML, or when more than 400 fields are requested. Unknown or inaccessible field IDs are silently omitted and do not cause a 400.' + '404': + description: 'Report format not found. Returned when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + /api/v1/employees/files/categories: + post: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Create Employee File Category' + description: 'Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `<category>` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category.' + operationId: create-employee-file-category + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PostNewEmployeeFileCategory' + application/xml: + schema: + $ref: '#/components/schemas/PostNewEmployeeFileCategory' + responses: + '200': + description: 'The request was processed but no categories were created (empty payload).' + '201': + description: 'All specified categories were created successfully. No response body is returned.' + '400': + description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + '403': + description: 'The API user does not have permission to create employee file categories.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + /api/v1/files/categories: + post: + tags: + - 'Company Files' + - 'Public API' + summary: 'Create Company File Category' + description: 'Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error.' + operationId: create-company-file-category + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewCompanyFileCategory' + application/xml: + schema: + $ref: '#/components/schemas/NewCompanyFileCategory' + responses: + '200': + description: 'The request was processed but no categories were created (empty payload).' + '201': + description: 'All specified categories were created successfully.' + '400': + description: 'The request body contains malformed JSON or XML, an empty category name, or a category name that already exists.' + '403': + description: 'The API user does not have permission to create company file categories, or the category name is reserved.' + '500': + description: 'An internal server error occurred.' + security: + - + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{id}/files': + post: + tags: + - 'Employee Files' + - 'Public API' + summary: 'Upload Employee File' + description: "Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled." + operationId: upload-employee-file + parameters: + - + name: id + in: path + description: '{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).' + required: true + schema: + type: string + default: '0' + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - fileName + - category + - file + properties: + fileName: + description: 'The display name for the uploaded file.' + type: string + category: + description: 'The ID of the employee file section to upload the file into.' + type: integer + share: + description: 'Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.' + type: string + enum: ['yes', 'no'] + file: + description: 'The file to upload.' + type: string + format: binary + type: object + responses: + '201': + description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' + '400': + description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '403': + description: 'The API user does not have permission to access the requested employee or their file section.' + '404': + description: 'The employee or the specified file category was not found.' + '413': + description: "The file exceeds the 20MB limit or the company's storage limit." + '503': + description: 'The file storage API is temporarily unavailable.' + security: + - + basic: [] + - + oauth: + - 'employee:file.write' + /api/v1/files: + post: + tags: + - 'Company Files' + - 'Public API' + summary: 'Upload Company File' + description: 'Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation.' + operationId: upload-company-file + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - fileName + - category + - file + properties: + fileName: + description: 'The display name for the uploaded file.' + type: string + category: + description: 'The ID of the file category (section) to upload the file into.' + type: integer + share: + description: 'Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.' + type: string + enum: ['yes', 'no'] + file: + description: 'The file to upload.' + type: string + format: binary + type: object + responses: + '201': + description: 'The file was uploaded successfully. The `Location` header contains the URL of the new file resource.' + '400': + description: 'The request is invalid: missing file name, missing file, zero-byte file, or unsupported file extension.' + '403': + description: 'The API user does not have permission to upload files, or the target category is read-only.' + '404': + description: 'The specified category ID was not found.' + '413': + description: "The file exceeds the 20MB limit or the company's storage limit." + '503': + description: 'The file storage API is temporarily unavailable.' + security: + - + basic: [] + - + oauth: + - company_file.write + '/api/v1/employees/{employeeId}/time_off/policies': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Employee Time Off Policies' + description: 'Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date.' + operationId: list-employee-time-off-policies + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + responses: + '200': + description: 'The list of time off policies assigned to the employee. Only includes regular (accruing) policy types.' + content: + application/json: + schema: + title: EmployeeTimeOffPoliciesResponse + type: array + items: + title: EmployeeTimeOffPolicyAssignment + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policy assignments.' + security: + - + basic: [] + - + oauth: + - time_off + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Assign Time Off Policies' + description: 'Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies.' + operationId: assign-time-off-policies + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to assign policies to.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + required: + - timeOffPolicyId + - accrualStartDate + properties: + timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } + accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', oneOf: [{ type: string, format: date }, { type: 'null' }] } + type: object + example: + - + timeOffPolicyId: 4 + accrualStartDate: '2024-02-01' + - + timeOffPolicyId: 5 + accrualStartDate: null + responses: + '200': + description: 'The current list of assigned policies for the employee.' + content: + application/json: + schema: + title: AssignedTimeOffPoliciesResponse + type: array + items: + title: AssignedTimeOffPolicy + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format.', type: string, format: date } } + type: object + '400': + description: 'Invalid request. Possible causes: employee not found, missing hire date, malformed JSON, missing timeOffPolicyId, or a policy is already assigned for the time off type.' + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to assign time off policies.' + '422': + description: 'Unprocessable entity. The operation is not allowed for this employee, for example because of EOR restrictions.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1_1/employees/{employeeId}/time_off/policies': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Employee Time Off Policies v1.1' + description: 'Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them.' + operationId: list-employee-time-off-policies-v1.1 + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + responses: + '200': + description: 'The list of time off policies assigned to the employee, including manual and unlimited types.' + content: + application/json: + schema: + title: EmployeeTimeOffPoliciesV1_1Response + type: array + items: + title: EmployeeTimeOffPolicyAssignmentV1_1 + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', oneOf: [{ type: string, format: date }, { type: 'null' }] } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policy assignments.' + security: + - + basic: [] + - + oauth: + - time_off + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Assign Time Off Policies v1.1' + description: 'Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types.' + operationId: assign-time-off-policies-v1.1 + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to assign policies to.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + required: + - timeOffPolicyId + - accrualStartDate + properties: + timeOffPolicyId: { description: 'The ID of the time off policy to assign.', type: integer } + accrualStartDate: { description: 'The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.', oneOf: [{ type: string, format: date }, { type: 'null' }] } + type: object + example: + - + timeOffPolicyId: 4 + accrualStartDate: '2024-02-01' + - + timeOffPolicyId: 5 + accrualStartDate: null + responses: + '200': + description: 'The current list of assigned policies for the employee, including manual and unlimited types.' + content: + application/json: + schema: + title: AssignedTimeOffPoliciesV1_1Response + type: array + items: + title: AssignedTimeOffPolicyV1_1 + properties: { timeOffPolicyId: { description: 'The ID of the assigned time off policy.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type.', type: integer }, accrualStartDate: { description: 'The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.', oneOf: [{ type: string, format: date }, { type: 'null' }] } } + type: object + '400': + description: 'Invalid request. Possible causes: malformed JSON, missing required fields, missing hire date, or duplicate policy type.' + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to assign time off policies.' + '422': + description: 'Unprocessable entity. The operation is not allowed for this employee (e.g., EOR restrictions).' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/applicant_tracking/applications/{applicationId}': + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Job Application Details' + description: 'Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings.' + operationId: get-application-details + parameters: + - + name: applicationId + in: path + description: 'The ID of the application to retrieve details for.' + required: true + schema: + type: integer + responses: + '200': + description: 'Success. Returns the full application detail object.' + content: + application/json: + schema: + title: ApplicationDetails + properties: + id: { description: 'Application ID', type: integer } + appliedDate: { description: 'ISO 8601 datetime when the application was submitted', type: string, format: date-time } + status: { properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string }, dateChanged: { description: 'ISO 8601 datetime when status was last changed', type: string, format: date-time }, changedByUser: { description: 'The user who last changed the status, or null if changed by the system', properties: { id: { description: 'User ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "User's job title", properties: { id: { oneOf: [{ type: integer }, { type: 'null' }] }, label: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + rating: { description: 'Applicant rating (1-5), or null if not yet rated', oneOf: [{ type: integer }, { type: 'null' }] } + resumeFileId: { description: 'ID of the attached resume file, or null if not provided', oneOf: [{ type: integer }, { type: 'null' }] } + coverLetterFileId: { description: 'ID of the attached cover letter file, or null if not provided', oneOf: [{ type: integer }, { type: 'null' }] } + attachmentCount: { description: 'Total number of attachments on this application, or null', oneOf: [{ type: integer }, { type: 'null' }] } + attachments: { description: 'List of attachments on this application, or null if none exist', oneOf: [{ type: array, items: { properties: { id: { description: 'Attachment ID', type: integer }, name: { description: 'Attachment file name', type: string }, fileUrl: { description: 'URL to download the attachment', type: string } }, type: object } }, { type: 'null' }] } + movedTo: { description: 'List of applications this applicant was moved to, or null if not moved', oneOf: [{ type: array, items: { type: object } }, { type: 'null' }] } + movedFrom: { description: 'List of applications this applicant was moved from, or null if not moved', oneOf: [{ type: array, items: { type: object } }, { type: 'null' }] } + alsoConsideredForCount: { description: 'Count of other job openings this applicant is also being considered for', type: integer } + duplicateApplicationCount: { description: 'Count of duplicate applications from this applicant', type: integer } + referredBy: { description: 'Name of the person who referred this applicant, or null', oneOf: [{ type: string }, { type: 'null' }] } + desiredSalary: { description: "Applicant's desired salary, or null if not provided", oneOf: [{ type: string }, { type: 'null' }] } + commentCount: { description: 'Number of comments on this application', type: integer } + emailCount: { description: 'Number of emails sent for this application', type: integer } + eventCount: { description: 'Number of events associated with this application', type: integer } + questionsAndAnswers: { description: "List of custom application questions and the applicant's answers", type: array, items: { properties: { question: { properties: { id: { description: 'Question ID', type: integer }, label: { description: 'Question text', type: string } }, type: object }, answer: { properties: { id: { description: 'Answer ID', type: integer }, label: { description: 'Answer text', type: string } }, type: object }, hasRevisions: { description: 'Whether this answer has revision history', oneOf: [{ type: boolean }, { type: 'null' }] }, isArchived: { description: 'Whether this answer is archived', oneOf: [{ type: boolean }, { type: 'null' }] }, archivedDate: { description: 'ISO 8601 datetime when the answer was archived, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, editedDate: { description: 'ISO 8601 datetime when the answer was last edited, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] }, editedEndDate: { description: 'ISO 8601 datetime for the end date of the edit window, or null', oneOf: [{ type: string, format: date-time }, { type: 'null' }] } }, type: object } } + applicationReferences: { description: 'Free-text references provided by the applicant, or null', oneOf: [{ type: string }, { type: 'null' }] } + applicant: { description: 'Information about the applicant', properties: { id: { description: 'Applicant ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, email: { description: 'Email address', type: string }, phoneNumber: { description: 'Phone number', oneOf: [{ type: string }, { type: 'null' }] }, avatar: { description: "URL to the applicant's avatar image, or null", oneOf: [{ type: string }, { type: 'null' }] }, source: { description: "Source of the application (e.g. 'LinkedIn', 'Referral'), or null", oneOf: [{ type: string }, { type: 'null' }] }, twitterUsername: { description: "Applicant's Twitter/X username, or null", oneOf: [{ type: string }, { type: 'null' }] }, address: { description: 'Applicant address', properties: { addressLine1: { oneOf: [{ type: string }, { type: 'null' }] }, addressLine2: { oneOf: [{ type: string }, { type: 'null' }] }, city: { oneOf: [{ type: string }, { type: 'null' }] }, state: { oneOf: [{ type: string }, { type: 'null' }] }, zipcode: { oneOf: [{ type: string }, { type: 'null' }] }, country: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, linkedinUrl: { description: 'LinkedIn profile URL', oneOf: [{ type: string }, { type: 'null' }] }, websiteUrl: { description: 'Personal website URL', oneOf: [{ type: string }, { type: 'null' }] }, availableStartDate: { description: "Candidate's available start date (yyyy-mm-dd)", oneOf: [{ type: string, format: date }, { type: 'null' }] }, education: { description: "Applicant's education information", properties: { institution: { description: 'Name of the educational institution', oneOf: [{ type: string }, { type: 'null' }] }, level: { description: 'Highest level of education', properties: { id: { description: 'Education level ID', type: integer }, label: { description: 'Education level name', type: string } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + job: { description: 'Information about the job position applied to', properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID of the hiring lead', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "Hiring lead's job title", properties: { id: { oneOf: [{ type: integer }, { type: 'null' }] }, label: { oneOf: [{ type: string }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] } }, type: object } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient user permissions or API access is not turned on.' + '404': + description: 'Application not found.' + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + '/api/v1/applicant_tracking/applications/{applicationId}/comments': + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Create Job Application Comment' + description: 'Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted.' + operationId: create-application-comment + parameters: + - + name: applicationId + in: path + description: 'The ID of the application to add a comment to.' + required: true + schema: + type: integer + requestBody: + description: 'Comment object to post' + required: true + content: + application/json: + schema: + required: + - comment + properties: + type: + description: 'The comment type. Defaults to `comment` if omitted.' + type: string + comment: + description: 'The comment being posted.' + type: string + type: object + example: + type: comment + comment: 'I really like this applicant' + responses: + '200': + description: 'Success. Returns the type and ID of the created comment.' + content: + application/json: + schema: + title: CreateCommentResponse + properties: + type: { description: "The type of comment created, e.g. 'comment'", type: string } + id: { description: 'The ID of the newly created comment', type: integer } + type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications.write' + /api/v1/applicant_tracking/jobs: + get: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Get Job Summaries' + description: 'Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings.' + operationId: get-job-summaries + parameters: + - + name: statusGroups + in: query + description: 'One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.' + schema: + type: string + - + name: status_ids + in: query + description: 'One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.' + schema: + type: string + - + name: sortBy + in: query + description: 'A specific field to sort the results by.' + schema: + type: string + enum: + - count + - title + - lead + - created + - status + - + name: sortOrder + in: query + description: 'Order by which to sort results.' + schema: + type: string + enum: + - ASC + - DESC + responses: + '200': + description: 'Success. Returns an array of job opening summary objects.' + content: + application/json: + schema: + title: JobSummariesList + type: array + items: + title: JobSummary + properties: { id: { description: 'Job opening ID', type: integer }, title: { description: 'Job title', properties: { id: { description: 'Title ID, or null if not set', oneOf: [{ type: integer }, { type: 'null' }] }, label: { description: 'Title text', type: string } }, type: object }, postedDate: { description: 'ISO 8601 datetime when the job opening was posted', type: string, format: date-time }, location: { description: 'Location information', properties: { id: { description: 'Location ID', type: integer }, label: { description: 'Location display name', type: string }, address: { description: 'Full address of the location', type: object } }, oneOf: [{ type: object }, { type: 'null' }] }, department: { description: 'Department information', properties: { id: { description: 'Department ID', type: integer }, label: { description: 'Department name', type: string } }, oneOf: [{ type: object }, { type: 'null' }] }, status: { description: 'Job opening status', properties: { id: { description: 'Status ID', type: integer }, label: { description: 'Status name', type: string } }, type: object }, hiringLead: { description: 'The hiring lead for this job opening', properties: { employeeId: { description: 'Employee ID', type: integer }, firstName: { description: 'First name', type: string }, lastName: { description: 'Last name', type: string }, avatar: { description: 'URL to avatar image', oneOf: [{ type: string }, { type: 'null' }] }, jobTitle: { description: "Hiring lead's job title", oneOf: [{ type: object }, { type: 'null' }] } }, oneOf: [{ type: object }, { type: 'null' }] }, newApplicantsCount: { description: "Number of applicants in 'New' status", type: integer }, activeApplicantsCount: { description: 'Number of applicants in an active status', type: integer }, totalApplicantsCount: { description: 'Total number of applicants', type: integer }, postingUrl: { description: 'Public URL for the job posting, or null if not posted', oneOf: [{ type: string }, { type: 'null' }] } } + type: object + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications' + '/api/v1/applicant_tracking/applications/{applicationId}/status': + post: + tags: + - 'Public API' + - 'Applicant Tracking' + summary: 'Update Applicant Status' + description: 'Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs.' + operationId: update-applicant-status + parameters: + - + name: applicationId + in: path + description: 'The ID of the application whose status should be updated.' + required: true + schema: + type: integer + requestBody: + description: 'The new status to assign to the application.' + required: true + content: + application/json: + schema: + required: + - status + properties: + status: + description: 'The ID of the status to assign to the application. Use the Get Applicant Statuses endpoint to get available status IDs.' + type: integer + type: object + example: + status: 2 + responses: + '200': + description: 'Success. Returns the type and ID of the status change record.' + content: + application/json: + schema: + title: UpdateApplicantStatusResponse + properties: + type: { description: "Always 'positionApplicantStatus'", type: string } + id: { description: 'The ID of the created status change record', type: integer } + type: object + '400': + description: 'Bad request. The error message is returned in the `x-bamboohr-error-message` response header; the body is empty.' + headers: + x-bamboohr-error-message: + description: "Human-readable error message describing why the request failed (e.g. 'Invalid status')." + schema: + type: string + content: + text/html: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - 'hiring:applications.write' + /api/v1/benefitcoverages: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Benefit Coverages' + description: 'Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a "Benefit Coverages" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access.' + operationId: list-benefit-coverages + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A collection of benefit coverage levels ordered by sort order.' + content: + application/json: + schema: + title: BenefitCoveragesResponse + properties: + 'Benefit Coverages': { description: 'Array of benefit coverage level objects.', type: array, items: { properties: { id: { description: 'The coverage level ID.', type: string }, shortName: { description: 'The short display name for this coverage level (e.g. "Employee + Spouse").', type: string }, description: { description: 'An optional longer description of the coverage level. Null if not set.', oneOf: [{ type: string }, { type: 'null' }] }, sortOrder: { description: 'The display sort order for this coverage level.', type: string }, benefitPlanId: { description: 'The benefit plan this coverage level belongs to, or null for company-wide coverage levels.', oneOf: [{ type: string }, { type: 'null' }] } }, type: object } } + type: object + application/xml: { } + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - benefit + '/api/v1/employeedependents/{id}': + get: + tags: + - Benefits + - 'Public API' + summary: 'Get Employee Dependent' + description: 'Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key "Employee Dependents" containing a single-element array. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' + operationId: get-employee-dependent + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: id + in: path + description: 'The numeric ID of the employee dependent to retrieve.' + required: true + schema: + type: integer + responses: + '200': + description: 'The requested employee dependent.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The specified dependent ID was not found.' + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn' + - + oauth: + - 'employee:dependent' + put: + tags: + - Benefits + - 'Public API' + summary: 'Update Employee Dependent' + description: 'Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing.' + operationId: update-employee-dependent + parameters: + - + name: id + in: path + description: 'The numeric ID of the employee dependent to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependent' + application/xml: + schema: + $ref: '#/components/schemas/EmployeeDependent' + responses: + '200': + description: 'The updated dependent record. Format matches the request Content-Type (JSON or XML).' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The request body is invalid or contains a validation error (e.g. invalid relationship, gender, state code, country code, or date format).' + '403': + description: 'The authenticated user does not have permission to update this dependent.' + '409': + description: 'A duplicate record conflict was detected.' + '500': + description: 'An unexpected server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:dependent.write' + /api/v1/employeedependents: + get: + tags: + - Benefits + - 'Public API' + summary: 'List Employee Dependents' + description: 'Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key "Employee Dependents" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. "xxx-xx-1234"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions.' + operationId: list-employee-dependents + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: employeeid + in: query + description: 'The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.' + required: false + schema: + type: integer + responses: + '200': + description: 'A collection of employee dependents.' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '403': + description: 'The authenticated user does not have Benefits Administration permissions.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn' + - + oauth: + - 'employee:dependent' + post: + tags: + - Benefits + - 'Public API' + summary: 'Create Employee Dependent' + description: 'Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept "yes" or "no". `state` accepts a state code (e.g. "UT") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. "US"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing.' + operationId: create-employee-dependent + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependent' + application/xml: + schema: + $ref: '#/components/schemas/EmployeeDependent' + responses: + '200': + description: 'The newly created dependent record. Format matches the request Content-Type (JSON or XML).' + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeDependentsResponse' + application/xml: { } + '400': + description: 'The request body is invalid or contains a validation error (e.g. missing employeeId, invalid relationship, gender, state code, country code, or date format).' + '403': + description: 'The authenticated user does not have permission to add a dependent.' + '409': + description: 'A duplicate record conflict was detected.' + '500': + description: 'An unexpected server error occurred.' + security: + - + basic: [] + - + oauth: + - 'employee:dependent:ssn.write' + - + oauth: + - 'employee:dependent.write' + /api/v1/employees/directory: + get: + tags: + - Employees + - 'Public API' + summary: 'Get Employees Directory' + description: "Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. Response format follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `<directory>` document with `<fieldset>` and `<employees>` children. Employee `id` values are returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list." + operationId: get-employees-directory + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: onlyCurrent + in: query + description: 'When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected.' + required: false + schema: + type: boolean + default: true + responses: + '200': + description: 'Directory fieldset and matching employee records, encoded per the `Accept` header.' + content: + application/json: + schema: + title: EmployeesDirectoryJsonResponse + properties: + fields: { description: 'Field definitions included in this response. Each entry describes one key that appears on every employee object. The set of fields is fixed by company directory configuration; the `canUploadPhoto` entry is always appended.', type: array, items: { properties: { id: { description: 'Field identifier; appears as a key on each employee object.', type: string }, type: { description: 'Field data type. Observed values include `text`, `list`, `email`, `bool`, `url`, and `employee`.', type: string }, name: { description: 'Human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per directory employee. Every object includes `id` (employee ID as a string) and `canUploadPhoto` (1 if the authenticated caller may upload a photo for this employee, 0 otherwise), plus one key per entry in `fields`. The exact key set varies with company directory configuration. Field values are returned in the JSON type indicated by the matching `fields[].type` (for example, `bool` fields are JSON booleans).', type: array, items: { type: object, additionalProperties: true } } + type: object + application/xml: + schema: + title: EmployeesDirectoryXmlResponse + properties: + fieldset: { description: 'Field definitions included in this response.', properties: { field: { type: array, items: { properties: { id: { description: 'Field identifier; matches the `id` attribute on each `<field>` element inside `<employee>`.', type: string, xml: { attribute: true } }, value: { description: "Human-readable field label, serialized as the element's text content.", type: string } }, type: object } } }, type: object } + employees: { description: 'Directory employee records.', properties: { employee: { type: array, items: { properties: { id: { description: 'Employee ID, serialized as an attribute on the `<employee>` element.', type: string, xml: { attribute: true } }, field: { description: 'Field values for the employee. Each `<field>` element has an `id` attribute matching one of the `<fieldset>` ids and the value as element text. Currency fields additionally carry a `currency` attribute (ISO currency code). Boolean fields are serialized as the strings `true`/`false`; the appended `canUploadPhoto` field is serialized as `yes`/`no`.', type: array, items: { properties: { id: { description: 'Field identifier matching one of the ids in `<fieldset>`.', type: string, xml: { attribute: true } }, value: { description: 'Field value serialized as element text content.', type: string } }, type: object } } }, type: object } } }, type: object } + type: object + xml: + name: directory + '401': + description: Unauthorized. + '403': + description: "The authenticated user's company has neither company-wide directory sharing nor org-chart sharing enabled, so no directory is available." + '404': + description: 'The resulting directory is empty (no employees matched the filter for this company configuration).' + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - employee_directory + /api/v1/files/view: + get: + tags: + - 'Company Files' + - 'Public API' + summary: 'Get Company Files and Categories' + description: 'Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML.' + operationId: list-company-files + responses: + '200': + description: 'List of company file categories and their visible files.' + content: + application/json: + schema: + title: CompanyFilesResponse + properties: + categories: { description: 'List of company file categories.', type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canUploadFiles: { description: 'Whether the requesting user can upload files to this category.', type: string, enum: ['yes', 'no'] }, files: { description: 'Files visible to the requesting user in this category.', type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename including extension.', type: string }, size: { description: 'File size in bytes.', type: string }, dateCreated: { description: 'Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployees: { description: 'Whether the file is shared with all employees.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the requesting user can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the requesting user can delete this file.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + application/xml: { } + '403': + description: 'The API user does not have permission to access company files.' + security: + - + basic: [] + - + oauth: + - company_file + '/api/v1/employees/{id}/files/view': + get: + tags: + - 'Employee Files' + - 'Public API' + summary: 'List Employee Files' + description: "Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories." + operationId: list-employee-files + parameters: + - + name: id + in: path + description: 'The ID of the employee whose files are being listed.' + required: true + schema: + type: integer + - + name: Accept + in: header + description: 'Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML.' + required: false + schema: + type: string + default: application/xml + responses: + '200': + description: "The employee's file categories and files. Each category contains permission flags and an array of file metadata." + content: + application/json: + schema: + title: JsonEmployeeFiles + properties: + employee: { properties: { id: { description: 'Employee ID.', type: integer } }, type: object } + categories: { type: array, items: { properties: { id: { description: 'Category ID.', type: integer }, name: { description: 'Category display name.', type: string }, canRenameCategory: { description: 'Whether the caller can rename this category.', type: string, enum: ['yes', 'no'] }, canDeleteCategory: { description: 'Whether the caller can delete this category.', type: string, enum: ['yes', 'no'] }, canUploadFiles: { description: 'Whether the caller can upload files to this category.', type: string, enum: ['yes', 'no'] }, displayIfEmpty: { description: 'Whether to display the category when it has no files.', type: string, enum: ['yes', 'no'] }, files: { type: array, items: { properties: { id: { description: 'File ID.', type: integer }, name: { description: 'File display name.', type: string }, originalFileName: { description: 'Original uploaded filename.', type: string }, size: { description: 'File size in bytes.', type: integer }, dateCreated: { description: 'UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`).', type: string }, createdBy: { description: 'Full name of the user who uploaded the file.', type: string }, shareWithEmployee: { description: 'Whether the file is shared with the employee.', type: string, enum: ['yes', 'no'] }, canRenameFile: { description: 'Whether the caller can rename this file.', type: string, enum: ['yes', 'no'] }, canDeleteFile: { description: 'Whether the caller can delete this file.', type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { description: 'Whether the caller can toggle the share-with-employee setting.', type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + application/xml: + schema: + title: XmlEmployeeFiles + properties: + id: { description: 'Employee ID on the root `<employee>` element.', type: string, xml: { attribute: true } } + category: { type: array, items: { properties: { id: { description: 'Category ID on the `<category>` element.', type: string, xml: { attribute: true } }, name: { type: string }, canRenameCategory: { type: string, enum: ['yes', 'no'] }, canDeleteCategory: { type: string, enum: ['yes', 'no'] }, canUploadFiles: { type: string, enum: ['yes', 'no'] }, displayIfEmpty: { type: string, enum: ['yes', 'no'] }, file: { type: array, items: { properties: { id: { description: 'File ID on the `<file>` element.', type: string, xml: { attribute: true } }, name: { type: string }, originalFileName: { type: string }, size: { description: 'File size in bytes (serialized as string in XML).', type: string }, dateCreated: { description: 'UTC creation timestamp in `YYYY-MM-DD HH:MM:SS` format.', type: string }, createdBy: { type: string }, shareWithEmployee: { type: string, enum: ['yes', 'no'] }, canRenameFile: { type: string, enum: ['yes', 'no'] }, canDeleteFile: { type: string, enum: ['yes', 'no'] }, canChangeShareWithEmployeeFieldValue: { type: string, enum: ['yes', 'no'] } }, type: object } } }, type: object } } + type: object + xml: + name: employee + '403': + description: "The API user does not have permission to access the requested employee's files." + '404': + description: 'The requested employee was not found, or the employee has no accessible file categories.' + security: + - + basic: [] + - + oauth: + - 'employee:file' + /api/v1/login: + post: + tags: + - Login + - 'Public API' + summary: Login + description: "Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests.\n\nThis endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead.\n\n`applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device.\n\nResponse format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header.\n\nNote: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response." + operationId: login + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: format + in: query + description: 'When set to `json`, forces a JSON response regardless of the `Accept` header.' + required: false + schema: + type: string + enum: + - json + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Login' + responses: + '200': + description: 'Successful authentication.' + content: + application/json: + schema: + title: LoginResponse + required: + - success + - userId + - key + - apiUrl + properties: + success: { description: 'Always `true` on HTTP 200.', type: boolean } + userId: { description: 'The authenticated user ID.', type: integer } + employeeId: { description: 'The employee ID linked to this user. `null` when no employee record is associated.', oneOf: [{ type: integer }, { type: 'null' }] } + key: { description: 'The API key to use for subsequent requests.', type: string } + apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } + type: object + application/xml: + schema: + title: LoginXmlResponse + properties: + response: { description: 'Always `authenticated` on HTTP 200.', type: string } + userId: { description: 'The authenticated user ID.', type: integer } + employeeId: { description: 'The employee ID linked to this user. Rendered as `<employeeId isNull="yes"/>` when no employee record is associated.', type: integer } + key: { description: 'The API key to use for subsequent requests.', type: string } + apiUrl: { description: 'The base URL for subsequent API calls.', type: string, format: uri } + type: object + xml: + name: auth + '403': + description: 'Forbidden. Credential or key failure. Credential and key failures include a response body; mobile application key rejections return an empty body.' + content: + application/json: + schema: + title: LoginFailureResponse + required: + - success + properties: + success: { description: 'Always `false`.', type: boolean } + type: object + application/xml: + schema: + title: LoginFailureXmlResponse + properties: + response: { description: 'Always `declined`.', type: string } + type: object + xml: + name: auth + '500': + description: 'Internal Server Error. API key creation failed.' + content: + application/json: + schema: + title: LoginFailureResponse + required: + - success + properties: + success: { description: 'Always `false`.', type: boolean } + type: object + application/xml: + schema: + title: LoginFailureXmlResponse + properties: + response: { description: 'Always `declined`.', type: string } + type: object + xml: + name: auth + deprecated: true + security: [] + /api/v1/meta/lists: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List List Fields' + description: 'Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users.' + operationId: list-list-fields + parameters: + - + name: format + in: query + description: 'Set to "json" to receive JSON output as an alternative to using the Accept header.' + required: false + schema: + type: string + enum: + - json + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'All list field details, including field IDs, option values, and manageability.' + content: + application/json: + schema: + title: ListFieldsResponse + type: array + items: + $ref: '#/components/schemas/ListFieldDetail' + application/xml: + schema: + title: ListFieldsXmlResponse + type: array + items: + $ref: '#/components/schemas/ListFieldDetail' + xml: + name: lists + wrapped: true + example: "<?xml version=\"1.0\"?>\n<lists>\n <list id=\"3\" fieldId=\"1\" alias=\"department\" manageable=\"yes\" multiple=\"no\">\n <name>Department</name>\n <options>\n <option id=\"45\" archived=\"no\" createdDate=\"2022-06-01T12:00:00+00:00\" archivedDate=\"\">Engineering</option>\n <option id=\"46\" archived=\"yes\" createdDate=\"2020-01-15T09:00:00+00:00\" archivedDate=\"2023-03-10T14:00:00+00:00\">Legacy Team</option>\n </options>\n </list>\n</lists>" + '403': + description: 'The API user does not have permission to view employee fields.' + security: + - + basic: [] + - + oauth: + - field + '/api/v1/meta/lists/{listFieldId}': + put: + tags: + - 'Account Information' + - 'Public API' + summary: 'Update List Field Values' + description: 'Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405.' + operationId: update-list-field-values + parameters: + - + name: listFieldId + in: path + description: 'The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`.' + required: true + schema: + type: string + - + name: format + in: query + description: 'Set to "json" to receive JSON output as an alternative to using the Accept header.' + required: false + schema: + type: string + enum: + - json + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ListFieldValues' + text/xml: + schema: + $ref: '#/components/schemas/ListFieldValuesXml' + responses: + '200': + description: 'All requested changes were applied. Returns the full updated list.' + content: + application/json: + schema: + $ref: '#/components/schemas/ListFieldDetail' + text/xml: + schema: + $ref: '#/components/schemas/ListFieldDetail' + '400': + description: 'The request body is invalid or malformed.' + '403': + description: 'The list is not editable, or the API user does not have sufficient permissions.' + '404': + description: 'The specified list field or option ID does not exist.' + '405': + description: 'One or more of the specified options belong to a non-manageable list field and cannot be modified.' + '409': + description: 'A duplicate list value conflicted with the value specified.' + security: + - + basic: [] + - + oauth: + - field.write + /api/v1/meta/tables: + get: + tags: + - 'Account Information' + - 'Public API' + summary: 'List Tabular Fields' + description: 'Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list.' + operationId: list-tabular-fields + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: "A list of all tabular fields in the account, with each table's fields and their metadata." + content: + application/json: + schema: + title: TabularFieldsResponse + type: array + items: + title: TabularField + properties: { alias: { description: 'The API alias for the table (e.g., jobInfo, compensation).', type: string }, fields: { description: 'The fields in this table.', type: array, items: { properties: { id: { description: 'The field ID.', type: integer }, name: { description: 'The display name of the field.', type: string }, alias: { description: 'The API alias for the field within this table.', type: string }, type: { description: 'The data type of the field (e.g., text, date, list).', type: string } }, type: object } } } + type: object + application/xml: { } + security: + - + basic: [] + - + oauth: + - field + '/api/v1/reports/{id}': + get: + tags: + - Reports + - 'Public API' + summary: 'Get Company Report' + description: "**Deprecated. Use Custom Reports > Get Report by ID instead.**\n\nReturns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific.\n\nThe caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404." + operationId: get-company-report + parameters: + - + name: Accept + in: header + description: 'The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404.' + schema: + type: string + enum: + - application/json + - text/xml + - text/csv + - application/pdf + - application/vnd.ms-excel + - + name: id + in: path + description: 'The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.' + required: true + schema: + type: integer + - + name: format + in: query + description: 'The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.' + required: false + schema: + type: string + enum: + - json + - xml + - csv + - xls + - pdf + - + name: fd + in: query + description: 'Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).' + schema: + type: string + enum: + - 'yes' + - 'no' + - + name: onlyCurrent + in: query + description: 'Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true.' + schema: + type: boolean + default: true + responses: + '200': + description: 'Report data in the requested format. For JSON, returns an object with a `title` string, a `fields` array (each element has `id`, `type`, and `name`), and an `employees` array (each element has `id` plus one key per report field). For XML (`text/xml`), returns a `<report>` document. For CSV/XLS/PDF, returns file content with the appropriate content-type header.' + content: + application/json: + schema: + title: GetCompanyReportResponse + properties: + title: { description: 'The report title.', type: string } + fields: { description: 'Metadata for each field included in the report.', type: array, items: { properties: { id: { description: 'The field ID.', type: string }, type: { description: 'The field data type.', type: string }, name: { description: 'The human-readable field label.', type: string } }, type: object } } + employees: { description: 'One object per employee. Each object contains an `id` property plus one key per report field.', type: array, items: { properties: { id: { description: 'The employee ID.', type: string } }, type: object, additionalProperties: { type: string } } } + type: object + text/xml: { } + text/csv: { } + application/pdf: { } + application/vnd.ms-excel: { } + '403': + description: 'Access denied. The authenticated user does not have permission to view this report.' + '404': + description: 'Not found. Returned when the report ID does not exist or belongs to a different company, when an unsupported `format` value is supplied (e.g. `?format=bogus`), or when `format` is omitted and the `Accept` header is not one of the supported exact values (`application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`).' + deprecated: true + security: + - + basic: [] + - + oauth: + - report + '/api/v1/employees/{employeeId}/time_off/calculator': + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'Get Time Off Balance' + description: "Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided." + operationId: get-time-off-balance + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: end + in: query + description: 'The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.' + required: false + schema: + type: string + format: date + example: '2026-12-31' + - + name: precision + in: query + description: 'Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.' + required: false + schema: + type: integer + default: 2 + maximum: 4 + minimum: 0 + example: 2 + - + name: employeeId + in: path + description: 'The ID of the employee to get time off balances for.' + required: true + schema: + type: integer + responses: + '200': + description: 'An array of time off balance entries, one per assigned time off type.' + content: + application/json: + schema: + title: TimeOffBalanceResponse + type: array + items: + title: TimeOffBalanceEntry + properties: { timeOffType: { description: 'The ID of the time off type.', type: string }, name: { description: 'The name of the time off type.', type: string }, units: { description: "The unit of measurement for the balance (e.g. 'hours' or 'days').", type: string, example: hours }, balance: { description: 'The calculated time off balance as of the specified date, rounded using `precision`.', type: string, example: '24.50' }, end: { description: 'The date the balance was calculated as of, in YYYY-MM-DD format.', type: string, format: date }, policyType: { description: 'The type of time off policy assigned to the employee for this time off type.', type: string, enum: [accruing, discretionary, manual] }, usedYearToDate: { description: 'The amount of time off used year-to-date as of the specified date, rounded using `precision`.', type: string, example: '12.25' } } + type: object + application/xml: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '404': + description: 'Employee not found. Some clients may receive an empty HTML response body for this legacy error case.' + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetailsResponse' + security: + - + basic: [] + - + oauth: + - time_off + '/api/v1/employees/{employeeId}/time_off/history': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Create Time Off History Item' + description: 'Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted.' + operationId: create-time-off-history + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffHistory' + application/xml: + schema: + $ref: '#/components/schemas/TimeOffHistory' + responses: + '201': + description: 'The history item has been created.' + content: + application/json: { } + '400': + description: 'Empty or malformed JSON/XML, an invalid date format, an invalid event type, an invalid time off request, an invalid time off type, or an invalid override amount.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Invalid permissions to perform this action.' + content: + application/json: { } + '404': + description: 'Employee not found.' + '409': + description: 'The time off request already has a history item.' + content: + application/json: { } + '503': + description: 'Service unavailable due to a database error.' + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/employees/{employeeId}/time_off/balance_adjustment': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Adjust Time Off Balance' + description: "Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types." + operationId: adjust-time-off-balance + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AdjustTimeOffBalance' + application/xml: + schema: + $ref: '#/components/schemas/AdjustTimeOffBalance' + responses: + '201': + description: 'The balance adjustment has been created.' + content: + application/json: { } + '400': + description: 'Empty or malformed JSON/XML, an invalid date format, an invalid time off type, an invalid override amount, or an attempt to adjust a discretionary time off type.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to perform this action.' + content: + application/json: { } + '404': + description: 'Employee not found.' + '503': + description: 'Service unavailable due to a database error.' + security: + - + basic: [] + - + oauth: + - time_off.write + /api/v1/meta/time_off/policies: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Policies' + description: 'Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted.' + operationId: list-time-off-policies + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + responses: + '200': + description: 'A list of all non-deleted time off policies, sorted alphabetically by name.' + content: + application/json: + schema: + title: TimeOffPoliciesResponse + type: array + items: + title: TimeOffPolicy + properties: { id: { description: 'The policy ID.', type: integer }, timeOffTypeId: { description: 'The ID of the time off type this policy belongs to.', type: integer }, name: { description: 'The policy name.', type: string }, effectiveDate: { description: 'Deprecated. Always null.', oneOf: [{ type: string }, { type: 'null' }] }, type: { description: 'The policy type.', type: string, enum: [accruing, discretionary, manual] } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Insufficient permissions to view time off policies.' + security: + - + basic: [] + - + oauth: + - time_off + '/api/v1/employees/{employeeId}/time_off/request': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Create Time Off Request' + description: "Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies." + operationId: create-time-off-request + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to create the time off request for.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffRequest' + application/xml: + schema: + $ref: '#/components/schemas/TimeOffRequest' + responses: + '201': + description: 'Request created. The `Location` header contains the URL of the new request. When `Accept: application/json` is set, the response body contains the full created request — use the `id` field to chain follow-up operations (e.g. approve, cancel, supersede) without a separate lookup.' + content: + application/json: + schema: + title: CreatedTimeOffRequest + properties: + id: { description: 'The newly created time off request ID. Use this to chain follow-up operations such as approving, canceling, or superseding the request.', type: integer, example: 1668 } + employeeId: { description: 'The ID of the employee the request was created for.', type: integer } + name: { description: "The employee's full name. Only present when the employee record could be loaded.", type: string } + start: { description: 'The start date of the request in YYYY-MM-DD format.', type: string, format: date } + end: { description: 'The end date of the request in YYYY-MM-DD format.', type: string, format: date } + created: { description: 'The date the request was created in YYYY-MM-DD format (company timezone).', type: string, format: date } + status: { description: 'The current status of the request.', properties: { status: { description: 'The current status value (e.g. `approved`, `denied`, `requested`).', type: string }, lastChanged: { description: 'The date and time the status was last changed, formatted as `YYYY-MM-DD HH:MM:SS` in the company timezone.', type: string }, lastChangedByUserId: { description: 'The user ID who last changed the status.', type: integer } }, type: object } + type: { description: 'The time off type for this request. Only present when the underlying time off type record could be loaded.', properties: { id: { description: 'The time off type ID.', type: integer }, name: { description: 'The time off type name.', type: string } }, type: object } + amount: { description: 'The amount of time off requested. Only present when the underlying time off type record could be loaded.', properties: { unit: { description: 'The unit of measurement.', type: string, enum: [hours, days] }, amount: { description: 'The total amount requested.', type: number } }, type: object } + dates: { description: 'A map of dates (YYYY-MM-DD) to daily amounts. Only present when daily details were attached to the request.', type: object, additionalProperties: { type: number } } + notes: { description: 'Notes from employee and/or manager. The object is always present; the `employee` and `manager` keys are each included only when a non-empty note was provided.', properties: { employee: { description: 'Note from the employee.', type: string }, manager: { description: 'Note from the manager.', type: string } }, type: object } + comments: { description: 'Comments attached to the request. Always present; empty array when no comments exist.', type: array, items: { type: object } } + approvers: { description: 'The approval chain for this request. Only present when the request has approvers.', type: array, items: { $ref: '#/components/schemas/EmployeeTimeOffRequestApproverResponse' } } + actions: { description: 'Actions the current user can perform on this request. Only present when PTO action permissions are available. Keys are restricted to `view`, `edit`, `cancel`, `approve`, `deny`, `bypass`; values are booleans.', type: object, additionalProperties: { type: boolean } } + overlappingRequests: { description: 'Other existing time off requests whose date ranges overlap this request. Only present when overlap data was loaded with the request.', type: array, items: { type: object } } + policyType: { description: 'The policy type backing this request (e.g. accruing, manual, unlimited).', type: string } + usedYearToDate: { description: 'Amount of this time off type the employee has used year-to-date as of the request date.', oneOf: [{ type: number }, { type: 'null' }] } + balanceOnDateOfRequest: { description: "The employee's balance for this time off type on the date of the request.", oneOf: [{ type: number }, { type: 'null' }] } + type: object + '400': + description: 'Malformed JSON or XML, an invalid time off type, an invalid previous request ID, or other invalid request data.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'Forbidden. The caller does not have permission to create or record this request for the employee, time off type, or requested status.' + content: + application/json: { } + '404': + description: 'Employee not found.' + content: + application/json: { } + '422': + description: 'Unprocessable entity. Returned when a remote/EOR time off request cannot be created for the requested action.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - time_off.write + '/api/v1/time_off/requests/{requestId}/status': + put: + tags: + - 'Time Off' + - 'Public API' + summary: 'Update Time Off Request Status' + description: 'Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step.' + operationId: update-time-off-request-status + parameters: + - + name: requestId + in: path + description: 'The ID of the time off request to update.' + required: true + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/request' + application/xml: + schema: + $ref: '#/components/schemas/request' + responses: + '200': + description: 'The status has been updated successfully. The response body is intentionally empty — no content is returned. Treat any empty body on a 200 response as a success indicator; do not attempt to parse the body as JSON.' + '400': + description: 'If the posted XML is invalid or the status is not "approved", "denied", "canceled", or "declined".' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: 'If the current user doesn\''t have access to change the status in this way.' + content: + application/json: { } + '404': + description: 'If the time off request ID doesn\''t exist.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - time_off.write + /api/v1/time_off/requests: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Requests' + description: 'Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve.' + operationId: list-time-off-requests + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: id + in: query + description: 'A particular request ID to limit the response to.' + schema: + type: integer + - + name: action + in: query + description: 'Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.' + schema: + type: string + default: view + enum: + - view + - approve + - myRequests + - + name: employeeId + in: query + description: 'A particular employee ID to limit the response to.' + schema: + type: integer + - + name: start + in: query + description: "The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date." + required: true + schema: + type: string + format: date + - + name: end + in: query + description: "The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date." + required: true + schema: + type: string + format: date + - + name: type + in: query + description: 'A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.' + schema: + type: string + - + name: status + in: query + description: 'A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.' + schema: + type: string + - + name: excludeNote + in: query + description: 'When set to any truthy value, omits the `notes` object from each request in the response.' + schema: + type: string + responses: + '200': + description: 'A list of time off requests matching the specified filters.' + content: + application/json: + schema: + title: TimeOffRequestsResponse + type: array + items: + title: TimeOffRequest + properties: { id: { description: 'The time off request ID.', type: integer, example: 1348 }, employeeId: { description: 'The ID of the employee.', type: integer, example: 5 }, name: { description: "The employee's full name.", type: string }, start: { description: 'The start date of the request in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'The end date of the request in YYYY-MM-DD format.', type: string, format: date }, created: { description: 'The date the request was created in YYYY-MM-DD format (company timezone).', type: string, format: date }, status: { description: 'The current status of the request.', properties: { lastChanged: { description: 'The date the status was last changed (company timezone).', type: string, format: date }, lastChangedByUserId: { description: 'The user ID who last changed the status.', type: integer }, status: { description: 'The current status value.', type: string } }, type: object }, type: { description: 'The time off type for this request.', properties: { id: { description: 'The time off type ID.', type: integer }, name: { description: 'The time off type name.', type: string }, icon: { description: 'The icon name for the time off type.', type: string } }, type: object }, amount: { description: 'The amount of time off requested.', properties: { unit: { description: 'The unit of measurement.', type: string, enum: [hours, days] }, amount: { description: 'The total amount requested.', type: number } }, type: object }, actions: { description: 'Actions the current user can perform on this request.', properties: { view: { description: 'Whether the user can view this request.', type: boolean }, edit: { description: 'Whether the user can edit this request.', type: boolean }, cancel: { description: 'Whether the user can cancel this request.', type: boolean }, approve: { description: 'Whether the user can approve this request.', type: boolean }, deny: { description: 'Whether the user can deny this request.', type: boolean }, bypass: { description: 'Whether the user can bypass the approval workflow.', type: boolean } }, type: object }, dates: { description: 'A map of dates (YYYY-MM-DD) to daily amounts.', type: object, additionalProperties: { type: number } }, notes: { description: 'Notes from employee and/or manager. Omitted when `excludeNote` is set.', properties: { employee: { description: 'Note from the employee.', type: string }, manager: { description: 'Note from the manager.', type: string } }, type: object } } + type: object + application/xml: { } + '400': + description: 'Invalid or missing start/end date.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + security: + - + basic: [] + - + oauth: + - time_off + /api/v1/meta/time_off/types: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Time Off Types' + description: "Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request." + operationId: list-time-off-types + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: mode + in: query + description: 'Set to `request` to limit the results to time off types the authenticated employee can request.' + schema: + type: string + enum: + - request + responses: + '200': + description: "Active time off types and the company's default hours-per-day schedule." + content: + application/json: + schema: + title: 'Time Off Types and Default Hours' + required: + - timeOffTypes + - defaultHours + properties: + timeOffTypes: { title: 'Time Off Types', type: array, items: { required: [id, name, units, color, icon, source], properties: { id: { description: 'Time off type ID', type: integer, example: 64 }, name: { description: 'Time off type name', type: string, example: Vacation }, units: { description: 'Units for time off', type: string, enum: [hours, days] }, color: { description: 'Hex color code', example: 56afdd, oneOf: [{ type: string }, { type: 'null' }] }, icon: { description: 'Icon identifier for the time off type', example: airplane, oneOf: [{ type: string }, { type: 'null' }] }, source: { description: 'Source of the time off type', type: string, enum: [internal, remote] } }, type: object } } + defaultHours: { title: 'Default Hours', type: array, items: { required: [name, amount], properties: { name: { description: 'Day of week', type: string, example: Monday }, amount: { description: 'Default hours for the day. Returned as a stringified decimal value.', type: string, example: '8' } }, type: object } } + type: object + '401': + description: 'Unauthorized. Invalid API credentials.' + security: + - + basic: [] + - + oauth: + - time_off + /api/v1/training/type: + get: + tags: + - Training + - 'Public API' + summary: 'List Training Types' + description: 'Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings.' + operationId: list-training-types + responses: + '200': + description: 'Returns all training types as an object keyed by training type ID.' + content: + application/json: + schema: + title: TrainingTypeMap + description: 'Object keyed by training type ID, where each value is a TrainingType.' + type: object + additionalProperties: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Training Type' + description: "Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings." + operationId: create-training-type + requestBody: + description: 'Training object to post' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the new training type.' + type: string + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + renewable: + description: 'Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals.' + type: boolean + category: + description: 'The category is optional and you can pass either a category id or a category name.' + properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: 'First Aid Trainings' } } + type: object + required: + description: 'Is this a required training?' + type: boolean + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid unless training is required.' + type: integer + linkUrl: + description: 'Optional URL that can be included with a training.' + type: string + description: + description: 'Description for the training.' + type: string + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + example: + name: 'My New Training' + frequency: '12' + renewable: '1' + category: + id: '3' + name: CustomApiCategoryName2 + required: '' + dueFromHireDate: + unit: day + amount: '30' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/type/{trainingTypeId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Training Type' + description: 'Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings.' + operationId: update-training-type + parameters: + - + name: trainingTypeId + in: path + description: 'The ID of the training type to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training type object to update to' + required: true + content: + application/json: + schema: + properties: + name: + description: 'Name of the training type.' + type: string + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + renewable: + description: 'Renewable is optional but if you are setting it to true you must pass a frequency.' + type: boolean + category: + description: 'Category is optional and passing an empty value will remove the category from the training type. Passing a name will assign the training type to the new training category.' + properties: { id: { description: 'Category ID', type: integer, example: '3' }, name: { description: 'Category Name', type: string, example: CustomApiCategoryName2 } } + type: object + required: + description: 'Is this a required training?' + type: boolean + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid unless training is required.' + type: integer + linkUrl: + description: 'Optional URL that can be included with a training.' + type: string + description: + description: 'Description for the training.' + type: string + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + example: + name: 'My Edited Training' + frequency: '12' + renewable: '1' + category: + name: 'Existing or new training category' + required: '' + dueFromHireDate: + unit: day + amount: '30' + responses: + '200': + description: 'Returns the updated training type.' + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingType' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Training Type' + description: 'Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request.' + operationId: delete-training-type + parameters: + - + name: trainingTypeId + in: path + description: 'The ID of the training type to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '400': + description: 'Bad request. This also occurs when the training type still has associated employee records that must be removed first.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training type does not exist.' + content: + application/json: { } + '405': + description: 'Training type was unable to be deleted.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + /api/v1/training/category: + get: + tags: + - Training + - 'Public API' + summary: 'List Training Categories' + description: 'Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings.' + operationId: list-training-categories + responses: + '200': + description: 'Returns all training categories as an object keyed by category ID.' + content: + application/json: + schema: + title: TrainingCategoryMap + description: 'Object keyed by category ID, where each value is a TrainingCategory.' + type: object + additionalProperties: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Training Category' + description: "Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings." + operationId: create-training-category + requestBody: + description: 'Training category to post' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the new training category.' + type: string + type: object + example: + name: 'My New Training Category' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/category/{trainingCategoryId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Training Category' + description: 'Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings.' + operationId: update-training-category + parameters: + - + name: trainingCategoryId + in: path + description: 'The ID of the training category to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training category to update' + required: true + content: + application/json: + schema: + required: + - name + properties: + name: + description: 'Name of the training category.' + type: string + type: object + example: + name: 'My Training Category' + responses: + '200': + description: 'Returns the updated training category.' + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingCategory' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '409': + description: 'A training category with the same name already exists.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Training Category' + description: 'Delete an existing training category. The owner of the API key used must have access to training settings.' + operationId: delete-training-category + parameters: + - + name: trainingCategoryId + in: path + description: 'The ID of the training category to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training category does not exist.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/record/employee/{employeeId}': + get: + tags: + - Training + - 'Public API' + summary: 'List Employee Training Records' + description: "Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee." + operationId: list-employee-trainings + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to get a list of trainings for.' + required: true + schema: + type: integer + - + name: type + in: query + description: 'Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.' + schema: + type: integer + responses: + '200': + description: 'Returns training records keyed by record ID, or an empty array when the employee has no records.' + content: + application/json: + schema: + title: TrainingRecordMap + description: 'Returns an empty array when the employee has no records, or an object keyed by training record ID when records exist.' + oneOf: + - { description: 'Object keyed by training record ID, each value is a TrainingRecord.', type: object, additionalProperties: { $ref: '#/components/schemas/TrainingRecord' } } + - { description: 'Empty array returned when the employee has no training records.', type: array, items: { }, maxItems: 0 } + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training + post: + tags: + - Training + - 'Public API' + summary: 'Create Employee Training Record' + description: "Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee." + operationId: create-employee-training-record + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee to add a training record to.' + required: true + schema: + type: integer + requestBody: + description: 'Training object to post' + required: true + content: + application/json: + schema: + required: + - completed + - type + properties: + completed: + description: 'Completed is a required field and must be in yyyy-mm-dd format.' + type: string + cost: + description: 'Optional cost for the training record.' + properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } + type: object + instructor: + description: 'Name of the training instructor.' + type: string + hours: + description: 'Number of hours for the training.' + type: number + credits: + description: 'Credits earned for the training.' + type: number + notes: + description: 'Optional notes about the training record.' + type: string + type: + description: 'This must be an existing training type ID.' + type: integer + type: object + example: + completed: '2026-03-12' + cost: + currency: USD + amount: '100.00' + instructor: 'Bob Jones' + hours: '16' + credits: '4' + notes: 'sample note' + type: '4' + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingRecord' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '500': + description: 'Internal server error.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/training/record/{employeeTrainingRecordId}': + put: + tags: + - Training + - 'Public API' + summary: 'Update Employee Training Record' + description: "Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee." + operationId: update-employee-training-record + parameters: + - + name: employeeTrainingRecordId + in: path + description: 'The ID of the training record to update.' + required: true + schema: + type: integer + requestBody: + description: 'Training object to update' + required: true + content: + application/json: + schema: + required: + - completed + properties: + completed: + description: 'Completed is the only required field and must be in yyyy-mm-dd format. The other parameters are optional.' + type: string + cost: + description: 'Optional cost for the training record.' + properties: { currency: { description: "ISO 4217 currency code (e.g. 'USD').", type: string }, amount: { description: "Monetary amount as a decimal string (e.g. '100.00').", type: string } } + type: object + instructor: + description: 'Name of the training instructor.' + type: string + hours: + description: 'Number of hours for the training.' + type: number + credits: + description: 'Credits earned for the training.' + type: number + notes: + description: 'Optional notes about the training record.' + type: string + type: object + example: + completed: '2026-03-12' + cost: + currency: USD + amount: '100.00' + instructor: 'Bob Jones' + hours: '16' + credits: '4' + notes: 'sample note' + responses: + '201': + description: Updated + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingRecord' + '400': + description: 'Bad request parameters.' + content: + application/json: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url.' + content: + application/json: { } + '405': + description: 'Training record could not be updated.' + content: + application/json: { } + '500': + description: 'Internal server error.' + security: + - + basic: [] + - + oauth: + - training.write + delete: + tags: + - Training + - 'Public API' + summary: 'Delete Employee Training Record' + description: 'Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type.' + operationId: delete-employee-training-record + parameters: + - + name: employeeTrainingRecordId + in: path + description: 'The ID of the training record to delete.' + required: true + schema: + type: integer + responses: + '200': + description: 'Deleted successfully. No response body.' + '401': + description: 'Unauthorized. Invalid API credentials.' + content: + application/json: { } + '403': + description: 'Insufficient user permissions or API access is not turned on.' + content: + application/json: { } + '404': + description: 'Bad request url or training record does not exist.' + content: + application/json: { } + '405': + description: 'Unable to delete training record.' + content: + application/json: { } + security: + - + basic: [] + - + oauth: + - training.write + '/api/v1/employees/{employeeId}/photo': + post: + tags: + - Photos + - 'Public API' + summary: 'Upload Employee Photo' + description: "Uploads a new photo for an employee. Accepts either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled." + operationId: upload-employee-photo + parameters: + - + name: employeeId + in: path + description: 'The ID of the employee whose photo is being uploaded.' + required: true + schema: + type: integer + requestBody: + required: true + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + description: "The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB." + type: string + format: binary + type: object + application/json: + schema: + required: + - fileBase64 + properties: + fileBase64: + description: 'Base64-encoded image bytes. Same format/size/dimension rules as the multipart `file` field: JPEG, PNG, BMP, or GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream); square within 1 pixel; at least 150×150 pixels; decoded payload no larger than 20MB. Whitespace inside the base64 string is tolerated and stripped before decoding.' + type: string + format: byte + type: object + responses: + '201': + description: 'The photo was uploaded and processed successfully. No response body is returned.' + '400': + description: 'The request is invalid: no file provided, zero-byte file, or the maximum number of photo uploads (32767) has been exceeded.' + '402': + description: 'The photo could not be processed: the image crop failed, or the file contents could not be read.' + '403': + description: 'The authenticated user does not have permission to upload photos for this employee.' + '404': + description: 'The employee does not exist.' + '413': + description: 'The uploaded file exceeds the 20MB size limit.' + '415': + description: 'The image does not meet requirements: not square (width and height differ by more than one pixel), smaller than 150×150 pixels, or the file could not be read as a supported image format.' + security: + - + basic: [] + - + oauth: + - 'employee:photo.write' + /api/v1/time_off/whos_out: + get: + tags: + - 'Time Off' + - 'Public API' + summary: 'List Who’s Out' + description: 'Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`.' + operationId: list-whos-out + parameters: + - + $ref: '#/components/parameters/AcceptHeaderParameter' + - + name: start + in: query + description: 'Start date in YYYY-MM-DD format. Defaults to today.' + schema: + type: string + format: date + - + name: end + in: query + description: 'End date in YYYY-MM-DD format. Defaults to 14 days after the start date.' + schema: + type: string + format: date + - + name: filter + in: query + description: "Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`." + schema: + type: string + enum: + - 'off' + responses: + '200': + description: 'A date-sorted list of employees who are out and company holidays.' + content: + application/json: + schema: + title: WhosOutResponse + type: array + items: + title: WhosOutEntry + properties: { id: { description: 'The time off request ID or holiday ID.', type: integer }, type: { description: "Whether this entry is a time off request or a company holiday. Entries have two shapes depending on `type`: `timeOff` entries include `employeeId` and `name` (the employee's name); `holiday` entries include only `name` (the holiday name) and omit `employeeId`. Always check `type` before accessing `employeeId`.", type: string, enum: [timeOff, holiday] }, employeeId: { description: 'The employee ID. Only present for `timeOff` entries; omitted for `holiday` entries.', type: integer }, name: { description: "For `timeOff` entries, the employee's name. For `holiday` entries, the holiday's name.", type: string }, start: { description: 'Start date in YYYY-MM-DD format.', type: string, format: date }, end: { description: 'End date in YYYY-MM-DD format.', type: string, format: date } } + type: object + application/xml: { } + '401': + description: 'Unauthorized. Invalid API credentials.' + '403': + description: "The Who's Out feature is disabled for this account." + security: + - + basic: [] + - + oauth: + - time_off +components: + schemas: + CursorPagedResponseMetadata: + description: 'Metadata information for employee list responses including total count and pagination details' + required: + - total + - page + properties: + total: + description: 'Total number of employees matching the filter criteria' + type: integer + page: + $ref: '#/components/schemas/CursorPagesResponse' + description: 'Pagination information for the current response' + type: object + CursorPagesResponse: + description: 'Pagination information for employee list responses including limit and cursor-based navigation' + required: - limit - nextCursor - prevCursor properties: - limit: - description: 'Maximum number of items per page' - type: - - integer - - 'null' - nextCursor: - description: 'Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter.' - type: - - string - - 'null' - prevCursor: - description: 'Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter.' - type: - - string - - 'null' + limit: + description: 'Maximum number of items per page' + oneOf: + - + type: integer + - + type: 'null' + nextCursor: + description: 'Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter.' + oneOf: + - + type: string + - + type: 'null' + prevCursor: + description: 'Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter.' + oneOf: + - + type: string + - + type: 'null' + type: object + CursorPaginationQueryObject: + properties: + before: + description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' + type: string + after: + description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' + type: string + limit: + description: 'Maximum number of items to return. This can be at most 100.' + type: integer + default: 50 + maximum: 100 + minimum: 1 + type: object + EmployeeVerificationIntegration: + title: EmployeeVerificationIntegration + description: "Install state and partner metadata for the company's employee verification integration." + required: + - enabled + - integrationType + properties: + enabled: + description: 'True when the integration is installed for the company and partner endpoints are usable.' + type: boolean + integrationType: + description: 'Identifier of the configured employee verification partner (opaque string; matches `integrationType` from the integration GET response).' + type: string + type: object + EmployeeVerificationPublicApiRecord: + title: EmployeeVerificationPublicApiRecord + description: 'A single employee verification row as returned by the public list API.' + properties: + id: + type: integer + format: int64 + employeeId: + oneOf: + - + type: integer + format: int64 + - + type: 'null' + integrationType: + type: string + verificationType: + type: string + verificationStatus: + oneOf: + - + type: string + - + type: 'null' + verificationStatusNotes: + oneOf: + - + type: string + - + type: 'null' + remoteAccessUrl: + oneOf: + - + type: string + - + type: 'null' + eVerifyStatus: + oneOf: + - + type: string + - + type: 'null' + archived: + type: boolean + billingProcessed: + type: boolean + createdByUserId: + type: integer + format: int64 + createdYmdt: + description: 'Creation timestamp (company DB format).' + type: string + lastModifiedYmdt: + description: 'Last modified timestamp (company DB format).' + type: string + startDateYmdt: + type: string + type: object + NewHireWidgetItem: + description: "Single upcoming new hire as projected for the public welcome-new-hires widget endpoint. Strips sensitive contact fields (work email, home email) and normalizes the domain's dynamic BasicEmployee decorations into a stable shape." + required: + - id + - preferredFirstName + - lastName + - hireDate + - canSeeEmployee + properties: + id: + description: 'Employee id.' + type: integer + preferredFirstName: + description: 'Nickname when set, otherwise first name.' + type: string + lastName: + type: string + hireDate: + description: 'ISO 8601 date (YYYY-MM-DD).' + oneOf: + - + type: string + format: date + - + type: 'null' + profilePictureUrl: + description: 'Medium-size profile photo URL, or default silhouette URL.' + oneOf: + - + type: string + - + type: 'null' + department: + description: 'Department display name. Null when the authenticated user cannot view the department field.' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Location display name. Null when the authenticated user cannot view the location field.' + oneOf: + - + type: string + - + type: 'null' + canSeeEmployee: + description: "Whether the authenticated user can navigate to the employee's profile." + type: boolean + getToKnowYou: + description: 'Completed Get-To-Know-You questions and responses for the new hire. Null when the new hire has not completed any questions or any answer is hidden.' + oneOf: + - + type: array + items: + $ref: '#/components/schemas/CompletedQuestionsAndResponseDataObject' + - + type: 'null' + type: object + NewHirePacketPublicApi: + description: 'Flat new hire packet instance for public read APIs (list and detail).' + properties: + id: + description: 'Primary key of the new hire packet instance.' + oneOf: + - + type: integer + - + type: 'null' + employeeId: + description: 'Employee this packet belongs to.' + type: integer + contactEmployeeId: + description: 'Contact employee for the packet, if any.' + oneOf: + - + type: integer + - + type: 'null' + requiresPersonalInformation: + type: boolean + requiresPhoto: + type: boolean + requiresPersonalQuestions: + type: boolean + arriveByTime: + description: 'Expected arrival time (time portion).' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Work location label for the new hire.' + oneOf: + - + type: string + - + type: 'null' + sentDatetime: + description: 'When the packet was sent (datetime string).' + oneOf: + - + type: string + - + type: 'null' + viewedDatetime: + description: 'When the packet was first viewed (datetime string).' + oneOf: + - + type: string + - + type: 'null' + completedDatetime: + description: 'When the packet was completed (datetime string).' + oneOf: + - + type: string + - + type: 'null' + createdByUserId: + oneOf: + - + type: integer + - + type: 'null' + createdDatetime: + description: 'When the packet row was created (datetime string).' + oneOf: + - + type: string + - + type: 'null' + sendGetToKnowYouEmail: + type: boolean + getToKnowYouEmailSent: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollState: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollFederal: + oneOf: + - + type: boolean + - + type: 'null' + showPayrollDirectDeposit: + oneOf: + - + type: boolean + - + type: 'null' + nhpConfigurationId: + description: 'Linked new hire packet configuration id, if any.' + oneOf: + - + type: integer + - + type: 'null' + nhpTemplateId: + oneOf: + - + type: integer + - + type: 'null' + countNhpGtkySent: + oneOf: + - + type: integer + - + type: 'null' + cancelled: + type: boolean + includePhotoOption: + description: 'Whether photo collection is offered based on configuration.' + type: boolean + status: + description: 'Derived lifecycle status for the instance.' + type: string + enum: + - cancelled + - completed + - sent + - draft + type: object + NewHirePacketPublicApiWritableBody: + description: 'Optional fields that may be set when creating or updating a new hire packet instance. All properties are optional for PUT; for POST, employeeId is required and supplied via a second schema in the request body allOf.' + properties: + contactEmployeeId: + description: 'Contact employee for the packet, if any.' + oneOf: + - + type: integer + - + type: 'null' + requiresPersonalInformation: + description: 'Whether personal information collection is required.' + type: boolean + requiresPhoto: + description: 'Whether a photo is required.' + type: boolean + requiresPersonalQuestions: + description: 'Whether personal questions are required.' + type: boolean + arriveByTime: + description: 'Expected arrival time (time portion).' + oneOf: + - + type: string + - + type: 'null' + location: + description: 'Work location label for the new hire.' + oneOf: + - + type: string + - + type: 'null' + sendGetToKnowYouEmail: + description: 'Whether to send the Get To Know You email.' + type: boolean + showPayrollState: + description: 'Whether to show state payroll fields.' + type: boolean + showPayrollFederal: + description: 'Whether to show federal payroll fields.' + type: boolean + showPayrollDirectDeposit: + description: 'Whether to show direct deposit payroll fields.' + type: boolean + nhpTemplateId: + description: 'Linked new hire packet template id, if any.' + oneOf: + - + type: integer + - + type: 'null' + type: object + OnboardingExperiencePublicApi: + description: 'Onboarding experience for public APIs; links to the new hire packet instance by id only.' + properties: + id: + description: 'Onboarding experience id (same as the new hire packet instance primary key).' + type: integer + employeeId: + description: 'Employee this onboarding experience belongs to.' + type: integer + newHirePacketId: + description: 'Primary key of the linked new hire packet instance (NHP row).' + type: integer + nhpTemplateId: + description: 'Linked NHP template id, if any.' + oneOf: + - + type: integer + - + type: 'null' + nhpConfigurationId: + description: 'Linked NHP configuration id, if any.' + oneOf: + - + type: integer + - + type: 'null' + status: + description: 'Derived lifecycle status for the linked new hire packet instance.' + type: string + enum: + - cancelled + - completed + - sent + - draft + type: object + ProjectCreateRequestSchema: + description: 'Schema for creating a new time tracking project with optional tasks' + required: + - name + properties: + name: + description: 'Name of the project. Must be unique and no more than 50 characters.' + type: string + maxLength: 50 + example: 'Project A' + billable: + description: 'Indicates if the project is billable. Defaults to true if not provided.' + type: boolean + allowAllEmployees: + description: 'Indicates if all employees can log time for this project. Defaults to true if not provided.' + type: boolean + employeeIds: + description: 'A list of employee IDs that can log time for this project. Only used when `allowAllEmployees` is false.' + type: array + items: + type: integer + hasTasks: + description: 'Indicates if the project has tasks. Defaults to false if not provided.' + type: boolean + tasks: + description: 'List of tasks to create and associate with the project.' + type: array + items: + $ref: '#/components/schemas/TaskCreateSchema' + type: object + TaskCreateSchema: + description: 'Schema for creating a new task for a time tracking project' + required: + - name + properties: + name: + description: 'Name of the task.' + type: string + billable: + description: 'Indicates if the task is billable. Defaults to true if not provided.' + type: boolean + type: object + Scheduling-CreateSchedulingShiftRequest-V1: + description: 'Fields required to create a scheduling shift.' + required: + - scheduleId + - status + - color + - timezone + - start + - end + properties: + scheduleId: + description: 'The ID of the schedule the shift belongs to.' + type: string + format: uuid + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the shift.' + example: 'Morning Shift' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the shift.' + enum: + - planned + - published + color: + description: '6 character color hex code.' + type: string + maxLength: 6 + minLength: 6 + example: 00FFAA + timezone: + description: 'The timezone for the shift. Defaults to schedule timezone.' + example: America/Denver + capacity: + description: 'The expected headcount for the shift. If null, has no restrictions.' + default: null + example: 1 + oneOf: + - + type: integer + minimum: 1 + - + type: 'null' + employeeIds: + description: 'What employees are assigned to this shift?' + type: array + items: + type: integer + default: [] + start: + description: 'UTC timestamp of the start of the shift.' + type: string + format: date-time + example: '2025-01-01T06:00:00Z' + end: + description: 'UTC timestamp of the end of the shift.' + type: string + format: date-time + example: '2025-01-01T14:00:00Z' + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: FREQ=WEEKLY;INTERVAL=1 + oneOf: + - + type: string + - + type: 'null' + recurrenceDtstart: + description: 'The UTC start time for a recurring shift (anchor point for the recurrence rule).' + example: '2024-01-01T09:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift.' + example: '2024-12-01T17:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE).' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + type: object + Scheduling-UpdateSchedulingShiftRequest-V1: + description: 'Fields for updating a scheduling shift. All fields are optional, and only provided fields will be updated. recurrenceEditOption is required when the shift already has recurrence settings.' + properties: + name: + description: 'The name of the shift' + example: 'Front Desk - Morning' + oneOf: + - + type: string + - + type: 'null' + color: + description: '6 character color hex code.' + type: string + maxLength: 6 + minLength: 6 + example: 00FFAA + capacity: + description: 'The expected headcount for the shift. If null, has no restrictions.' + default: null + example: 3 + oneOf: + - + type: integer + minimum: 1 + - + type: 'null' + start: + description: 'UTC timestamp of the start of the shift.' + type: string + format: date-time + example: '2026-01-14T16:00:00Z' + end: + description: 'UTC timestamp of the end of the shift.' + type: string + format: date-time + example: '2026-01-14T20:00:00Z' + timezone: + description: 'The timezone for the shift.' + type: string + example: America/Denver + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: 'FREQ=WEEKLY;BYDAY=MO,WE;INTERVAL=1' + oneOf: + - + type: string + - + type: 'null' + recurrenceEditOption: + description: 'How should recurrence edits be effective? Edits will not affect any realized shifts regardless of option.' + type: string + enum: + - instance + - future + - all + example: future + recurrenceDtstart: + description: 'The UTC start time for a recurring shift and the anchor point for the recurrence rule.' + example: '2026-01-14T09:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift.' + example: '2026-01-14T17:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE).' + example: '2026-03-31T17:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + employeeIds: + description: 'What employees are assigned to this shift?' + type: array + items: + type: integer + unpublishedChanges: + description: 'The pending changes that have not been published. Only accepts null to clear unpublished changes.' + type: 'null' + type: object + EmployeeTimeOffRequestApproverResponse: + description: 'List of time off request approvers' + type: array + items: + required: + - userId + - displayName + - employeeId + properties: + userId: + description: 'User ID of the approver' + type: integer + displayName: + description: 'Display name of the approver' + type: string + employeeId: + description: 'Employee ID of the approver' + type: integer + photoUrl: + description: "URL to the approver's photo" + oneOf: + - + type: string + - + type: 'null' + type: object + PersonInfoApiTransformer: + properties: + employeeId: + description: 'Employee ID' + oneOf: + - + type: integer + - + type: 'null' + userId: + description: 'User ID' + oneOf: + - + type: integer + - + type: 'null' + displayFirstName: + description: 'Display first name' + type: string + lastName: + description: 'Last name' + type: string + photoUrl: + description: 'Photo URL' + type: string + type: object + TimeTracking-OffsetPaginatedResponseData-V1: + description: 'Additional data for paginated responses' + properties: + meta: + description: 'Pagination metadata' + required: + - totalItems + - offset + - limit + properties: + totalItems: + type: integer + example: 3 + offset: + type: integer + example: 2 + limit: + type: integer + example: 2 + type: object + _links: + description: 'Pagination links' + required: + - prev + - next + properties: + prev: + description: 'Link object for the previous page, or null if on the first page' + properties: + href: + description: 'Full URL for the previous page' + type: string + oneOf: + - + type: object + - + type: 'null' + next: + description: 'Link object for the next page, or null if on the last page' + properties: + href: + description: 'Full URL for the next page' + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + type: object + TimeTracking-BreakPolicyEmployeeCollection-V1: + description: 'Employee data relevant for break policies' + type: array + items: + required: + - id + - name + - photoUrl + properties: + id: + description: 'The employee ID' + type: integer + name: + description: 'The employee name {Preferred Last}' + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: 'The employee profile photo' + oneOf: + - + type: string + - + type: 'null' + type: object + Project-PaginatedResponseData-V1: + description: 'Pagination envelope shared by paginated Project endpoints.' + properties: + meta: + description: 'Pagination metadata.' + required: + - totalItems + - totalPages + - page + - pageSize + properties: + totalItems: + type: integer + example: 100 + totalPages: + type: integer + example: 2 + page: + type: integer + example: 1 + pageSize: + type: integer + example: 50 + type: object + _links: + description: 'Pagination links. Keys are omitted when there is no previous/next page.' + properties: + prev: + description: 'Link object for the previous page. Omitted on the first page.' + properties: + href: + type: string + type: object + next: + description: 'Link object for the next page. Omitted on the last page.' + properties: + href: + type: string + type: object + type: object + type: object + Project-CreateTimeTrackingProject-V1: + description: 'Request body for creating a time tracking project.' + required: + - name + properties: + name: + type: string + maxLength: 50 + minLength: 1 + example: 'Project A' + billable: + type: boolean + default: false + example: true + includeInPayroll: + type: boolean + default: false + example: true + allEmployeesAssigned: + description: 'If true, every time-tracked employee is assigned to the project. Ignored when `employeeIds` is provided.' + type: boolean + default: false + employeeIds: + description: 'Specific employee IDs to assign. Minimum 1 entry required when provided. Takes precedence over `allEmployeesAssigned`.' + type: array + items: + type: integer + minItems: 1 + example: + - 1 + - 2 + - 3 + tasks: + description: 'Tasks to create alongside the project. Minimum 1 entry required when provided.' + type: array + items: + required: + - name + properties: + name: + type: string + maxLength: 50 + minLength: 1 + example: 'Task A' + billable: + type: boolean + default: false + example: true + type: object + minItems: 1 + type: object + AdjustTimeTrackingRequestSchema: + description: 'Schema for adjust time tracking request body' + required: + - timeTrackingId + - hoursWorked + properties: + timeTrackingId: + description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + hoursWorked: + description: 'The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0.' + type: number + example: 6 + projectId: + description: 'ID of the project associated with this time tracking record' + example: 123 + oneOf: + - + type: integer + - + type: 'null' + taskId: + description: 'ID of the task associated with this time tracking record' + example: 456 + oneOf: + - + type: integer + - + type: 'null' + shiftDifferentialId: + description: 'ID of the shift differential associated with this time tracking record' + example: 789 + oneOf: + - + type: integer + - + type: 'null' + holidayId: + description: 'ID of the holiday associated with this time tracking record' + example: 101 + oneOf: + - + type: integer + - + type: 'null' + type: object + ClockInRequestSchema: + description: 'Schema for clock-in request body' + properties: + projectId: + description: 'ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified.' + example: 10 + oneOf: + - + type: integer + - + type: 'null' + taskId: + description: 'ID of the time tracking task that should be associated with the timesheet entry.' + example: 25 + oneOf: + - + type: integer + - + type: 'null' + note: + description: 'The note that should be associated with the timesheet entry' + example: 'Back from lunch.' + oneOf: + - + type: string + - + type: 'null' + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + example: '2024-12-12' + oneOf: + - + type: string + format: date + - + type: 'null' + start: + description: 'The time for the clock in. In 24 hour format HH:MM' + example: '13:00' + oneOf: + - + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + - + type: 'null' + timezone: + description: 'The timezone associated with the clock in.' + example: America/Denver + oneOf: + - + type: string + - + type: 'null' + breakId: + description: 'ID of the break that should be associated with the timesheet entry.' + example: 123e4567-e89b-12d3-a456-426614174000 + oneOf: + - + type: string + format: uuid + - + type: 'null' + offline: + description: 'Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later.' + type: boolean + example: false + type: object + ClockOutRequestSchema: + description: 'Schema for clock out request body' + properties: + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + type: string + format: date + example: '2024-12-12' + end: + description: 'The time for the clock out. In 24 hour format HH:MM' + type: string + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + example: '13:00' + timezone: + description: 'The timezone associated with the clock out.' + type: string + example: America/Denver + type: object + HourEntriesRequestSchema: + description: 'Schema for timesheet hour entries request' + required: + - hours + properties: + hours: + description: 'Array of hour entries to add or update' + type: array + items: + $ref: '#/components/schemas/HourEntrySchema' + type: object + HourEntrySchema: + description: 'Schema for a single timesheet hour entry' + properties: + employeeId: + description: 'Unique identifier for the employee' + type: integer + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format' + type: string + format: date + example: '2024-12-01' + hours: + description: 'Hours worked for this timesheet entry' + type: number + format: float + example: 3.5 + id: + description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry' + type: integer + projectId: + description: 'The ID of the project to associate with the timesheet entry' + type: integer + taskId: + description: 'The ID of the task to associate with the timesheet entry' + type: integer + note: + description: 'Optional note to associate with the timesheet entry' + type: string + type: object + TimeTrackingBulkResponseSchema: + description: 'Schema for time tracking bulk operation response' + properties: + success: + description: 'Indicates whether the operation was successful' + type: boolean + response: + description: 'Response data containing ID and message' + properties: + id: + description: 'Unique identifier for the time tracking record' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + message: + description: 'Response message, typically used for error details' + oneOf: + - + type: string + - + type: 'null' + type: object + type: object + TimeTrackingDeleteResponseSchema: + description: 'Schema for time tracking delete operation response' + properties: + status: + description: 'Status of the delete operation' + type: string + example: success + message: + description: 'Response message indicating the result of the operation' + type: string + example: 'Record removed' + type: object + TimeTrackingIdResponseSchema: + description: 'Schema for time tracking ID response' + properties: + id: + description: 'Unique identifier for the time tracking record' + type: string + example: 550e8400-e29b-41d4-a716-446655440000 + type: object + TimeTrackingRecordSchema: + description: 'Schema for time tracking record response' + properties: + timeTrackingId: + description: 'Unique identifier for the time tracking record' + type: string + employeeId: + description: 'ID of the employee associated with this time tracking record' + type: string + divisionId: + description: 'ID of the division associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: 'ID of the department associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: 'ID of the job title associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + payCode: + description: 'Pay code for this time tracking record' + oneOf: + - + type: string + - + type: 'null' + dateHoursWorked: + description: 'Date the hours were worked' + type: string + format: date + type: + description: 'Type of time tracking record' + type: string + payRate: + description: 'Pay rate for this time tracking record' + type: string + format: decimal + rateType: + description: 'Rate type for this time tracking record' + type: string + hoursWorked: + description: 'Number of hours worked' + type: string + format: decimal + adjustedHours: + description: 'Number of adjusted hours' + type: string + format: decimal + dateAdjusted: + description: 'Date and time when the hours were adjusted' + type: string + format: date-time + jobCode: + description: 'Job code associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + jobData: + description: 'Additional job data for this time tracking record' + oneOf: + - + type: string + - + type: 'null' + projectId: + description: 'ID of the project associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + taskId: + description: 'ID of the task associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + shiftDifferentialId: + description: 'ID of the shift differential associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + holidayId: + description: 'ID of the holiday associated with this time tracking record' + oneOf: + - + type: string + - + type: 'null' + project: + description: 'Project information associated with this time tracking record' + properties: + id: + description: 'Project information' + type: integer + name: + type: string + task: + properties: + id: + type: integer + name: + type: string + oneOf: + - + type: object + - + type: 'null' + oneOf: + - + type: object + - + type: 'null' + shiftDifferential: + description: 'Shift differential information associated with this time tracking record' + properties: + id: + description: 'Shift Differential information' + type: integer + name: + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + FieldOptionsRequestSchema: + description: 'Schema for field options request' + required: + - fields + properties: + fields: + description: 'List of field names to get options for' + type: array + items: + type: string + example: + - field_name1 + - field_name2 + dependentFields: + description: 'Dependent fields and their values that affect the options of the requested fields' + example: + field_name1: + - + field: field_name2 + value: 123 + oneOf: + - + type: object + additionalProperties: + type: array + items: + properties: { field: { type: string }, value: { type: string } } + type: object + - + type: 'null' + filters: + description: 'Optional filters to apply when retrieving field options. Filters limit the returned options based on other field values. The object contains a `match` key (`all` or `any`) and a `filters` array of objects with `field`, `operator`, and `value` keys.' + example: + match: all + filters: + - + field: employee_status + operator: includes + value: + - Active + oneOf: + - + type: object + - + type: 'null' + type: object + Employee: + title: 'Employee when updating' + description: 'A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. **Important for AI agents:** Unknown or misspelled field names are silently ignored — the endpoint returns 200 but the field is not updated. Always use the exact alias from the schema properties below or from the list-fields endpoint; do not invent aliases by adding prefixes such as `home` (e.g., `homeCity` is wrong — the correct alias is `city`). Photo data is not writable through this schema: photo-related keys are silently ignored. Use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to change a profile photo.' + properties: + firstName: + description: 'Legal first name.' + type: string + lastName: + description: 'Legal last name.' + type: string + workEmail: + description: 'Work email address.' + type: string + jobTitle: + description: 'Job title.' + type: string + department: + description: 'Department name.' + type: string + division: + description: 'Division name.' + type: string + location: + description: 'Location name.' + type: string + hireDate: + description: 'Hire date in YYYY-MM-DD format.' + type: string + format: date + mobilePhone: + description: 'Mobile phone number.' + type: string + homePhone: + description: 'Home phone number.' + type: string + workPhone: + description: 'Work phone number.' + type: string + address1: + description: 'Home street address line 1. The correct alias is `address1` — do not use `homeAddress1`, `homeStreet1`, or `street1`.' + type: string + address2: + description: 'Home street address line 2 (apartment, suite, etc.). The correct alias is `address2` — do not use `homeAddress2` or `homeStreet2`.' + type: string + city: + description: 'Home city. The correct alias is `city` — do not use `homeCity`.' + type: string + state: + description: 'Home state or province. The correct alias is `state` — do not use `homeState`. Values are normalized to standard abbreviations (e.g., "Pennsylvania" becomes "PA").' + type: string + zipcode: + description: 'Home ZIP or postal code. The correct alias is `zipcode` — do not use `homeZipcode` or `homeZip`.' + type: string + country: + description: 'Home country name. The correct alias is `country` — do not use `homeCountry`.' + type: string + type: object + example: + firstName: Panda + lastName: Bear + workEmail: panda.bear@example.com + jobTitle: 'Software Engineer' + department: Engineering + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + postNewEmployee: + title: 'New Employee' + description: 'A dictionary of employee field names and their values for the new employee. At minimum, firstName and lastName are required. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Additional fields may use string, number, boolean, array, object, or null values depending on the field type. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. Photo data is not writable through this schema: photo-related keys are silently ignored. After creation, use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to attach a profile photo.' + required: + - firstName + - lastName + properties: + firstName: + description: 'Legal first name (required).' + type: string + lastName: + description: 'Legal last name (required).' + type: string + workEmail: + description: 'Work email address.' + type: string + jobTitle: + description: 'Job title.' + type: string + department: + description: 'Department name.' + type: string + hireDate: + description: 'Hire date in YYYY-MM-DD format.' + type: string + format: date + type: object + example: + firstName: Panda + lastName: Bear + jobTitle: 'Software Engineer' + department: Engineering + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + ListFieldValues: + title: 'Create or Update List Field Values' + description: 'Payload for creating, updating, or archiving options on a list field.' + properties: + options: + description: 'The list field options to create, update, or archive.' + type: array + items: + properties: + id: + description: 'The existing option ID. Omit this field to create a new option. Required when archiving an existing option.' + type: integer + value: + description: 'The display value for the option. Required when creating a new option (i.e., when id is omitted).' + type: string + archived: + description: 'Whether the option should be archived. Use `yes` to soft-delete an option or `no` to reactivate a previously archived option. Archived options continue to appear in GET responses for historical data integrity.' + type: string + enum: + - 'yes' + - 'no' + adpCode: + description: 'Optional payroll-mapping code associated with the option.' + type: string + type: object + type: object + ListFieldValuesXml: + title: 'Create or Update List Field Values (XML)' + description: 'XML payload for creating, updating, or archiving options on a list field. The root element is <options>, containing one or more <option> elements. Each <option> element carries optional id, archived, and adpCode XML attributes; the display value is the text content of the element.' + properties: + option: + description: 'One or more options to create, update, or archive.' + type: array + items: + properties: + id: + description: 'The existing option ID. Omit to create a new option. Required when archiving.' + type: integer + xml: + attribute: true + value: + description: 'The display value for the option. In XML format, this is the text content of the <option> element.' + type: string + archived: + description: 'Whether to archive this option. Use yes to soft-delete or no to reactivate.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + adpCode: + description: 'Optional payroll-mapping code.' + type: string + xml: + attribute: true + type: object + xml: + name: option + xml: + name: option + wrapped: false + type: object + xml: + name: options + TimeOffRequest: + title: 'Create Time Off Request' + required: + - status + - start + - end + - timeOffTypeId + properties: + status: + description: 'The initial status of the request.' + type: string + enum: + - approved + - denied + - declined + - requested + start: + description: 'Start date in YYYY-MM-DD format.' + type: string + format: date + end: + description: 'End date in YYYY-MM-DD format. Must be on or after the start date.' + type: string + format: date + timeOffTypeId: + description: 'The ID of the time off type for this request.' + type: integer + amount: + description: 'Total hours or days requested. Ignored when `dates` array is provided (sum of daily amounts is used instead).' + type: number + previousRequest: + description: 'The ID of a previous time off request to supersede. The previous request will be cancelled.' + type: integer + notes: + description: 'Optional notes from the employee or manager.' + type: array + items: + properties: + from: + description: 'Who the note is from.' + type: string + enum: + - employee + - manager + note: + description: 'The note text.' + type: string + type: object + dates: + description: 'Optional per-day breakdown. When provided, the top-level `amount` is ignored and the sum of daily amounts is used.' + type: array + items: + properties: + ymd: + description: 'Date in YYYY-MM-DD format.' + type: string + format: date + amount: + description: 'Hours or days for this date.' + type: number + type: object + type: object + request: + title: 'Request Status' + required: + - status + properties: + status: + description: 'The new status for the time off request.' + type: string + enum: + - approved + - denied + - declined + - canceled + - cancelled + note: + description: 'A note to attach to the change in status.' + type: string + type: object + example: + status: approved + note: 'Looks good, approved!' + TimeOffHistory: + required: + - date + properties: + date: + description: 'The date for the history item in YYYY-MM-DD format.' + type: string + format: date + eventType: + description: 'The type of history event. Defaults to `used` for the /history path and `override` for the /balance_adjustment path when omitted.' + type: string + enum: + - used + - override + timeOffRequestId: + description: 'The ID of an approved time off request. Required when eventType is `used`.' + type: integer + timeOffTypeId: + description: 'The ID of the time off type. Required when eventType is `override`.' + type: integer + amount: + description: 'The number of hours/days to record. Required when eventType is `override`.' + type: number + note: + description: 'An optional note to show in history.' + type: string + type: object + AdjustTimeOffBalance: + required: + - amount + - date + - timeOffTypeId + properties: + date: + description: 'The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD).' + type: string + format: date + timeOffTypeId: + description: 'The ID of the time off type to add a balance adjustment for.' + type: integer + amount: + description: 'The number of hours/days to adjust the balance by.' + type: number + note: + description: 'This is an optional note to show in history.' + type: string + type: object + PostNewEmployeeFileCategory: + title: 'New Employee File Category' + type: array + items: + type: string + example: + - 'A new category' + EmployeeFileUpdate: + title: 'Employee File Update' + properties: + name: + description: 'The new display name for the file.' + type: string + categoryId: + description: 'The ID of the file category (section) to move the file into.' + type: integer + shareWithEmployee: + description: "Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'." + type: string + enum: + - 'yes' + - 'no' + shareWithEmployees: + description: 'Alias for shareWithEmployee. Whether the file is shared with the employee.' + type: string + enum: + - 'yes' + - 'no' + type: object + NewCompanyFileCategory: + title: 'New Company File Category' + type: array + items: + type: string + example: + - 'A new category' + CompanyFileUpdate: + title: 'Company File Update' + properties: + name: + description: 'The new display name for the file.' + type: string + categoryId: + description: 'The ID of the category (file section) to move the file to.' + type: string + shareWithEmployee: + description: 'Whether the file is shared with employees.' + type: string + enum: + - 'yes' + - 'no' + type: object + RequestCustomReport: + title: 'Request Custom Report' + description: 'Report definition for an ad-hoc custom report. Specify the fields to include and optionally filter the employee set. Field IDs are the internal BambooHR field names (e.g. `firstName`, `lastName`, `department`). See the fields metadata endpoint for available field IDs.' + properties: + title: + description: 'A label for the report. Included in the response and used as the file name for downloaded reports.' + type: string + fields: + description: 'Array of field IDs to include as columns in the report. Maximum of 400 fields.' + type: array + items: + type: string + filters: + description: 'Optional filters to restrict which employees appear in the report.' + properties: + lastChanged: + description: 'Filters employees to those whose data was last changed on or after the given date/time.' + properties: + value: + description: 'ISO 8601 date-time value. Only employees whose data has changed at or after this date-time will be included.' + type: string + format: date-time + includeNull: + description: 'Whether to include employees with no last-changed date. `yes` (default) includes them; `no` excludes them.' + type: string + enum: ['yes', 'no'] + type: object + employeeIds: + description: 'Restricts the report to only the specified employee IDs.' + type: array + items: + type: integer + type: object + filterDuplicates: + description: 'Whether to apply standard duplicate row filtering. Defaults to enabled. Set to `no` to return raw results without deduplication.' + type: string + enum: + - 'yes' + - 'no' + type: object + TableRowUpdate: + title: 'Table Row Update' + description: 'A dictionary of table field names and values for creating or updating a row in an employee table. The listed properties are common examples, but accepted fields depend on the specific table being targeted. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered.' + properties: + date: + description: 'The effective date for the row in YYYY-MM-DD format.' + type: string + format: date + location: + description: 'The employee location value for the row.' + type: string + division: + description: 'The division value for the row.' + type: string + department: + description: 'The department value for the row.' + type: string + jobTitle: + description: 'The job title value for the row.' + type: string + reportsTo: + description: 'The manager or reports-to value for the row.' + type: string + teams: + description: 'Team values associated with the row.' + type: array + items: + type: string + type: object + additionalProperties: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: array + items: + anyOf: + - + type: string + - + type: number + - + type: boolean + - + type: integer + - + type: object + additionalProperties: true + - + type: 'null' + - + type: object + additionalProperties: true + - + type: 'null' + Login: + title: Login + required: + - applicationKey + - user + - password + properties: + applicationKey: + description: 'The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.' + type: string + user: + description: "The user's email address or username." + type: string + password: + description: "The user's password." + type: string + format: password + deviceId: + description: 'Optional device identifier. When provided, the generated API key is associated with this device.' + type: string + type: object + EmployeeDependent: + title: 'Employee Dependent' + required: + - employeeId + properties: + employeeId: + description: 'The ID of the employee this dependent belongs to. Required.' + type: string + firstName: + description: "The dependent's first name." + type: string + middleName: + description: "The dependent's middle name." + type: string + lastName: + description: "The dependent's last name." + type: string + relationship: + description: 'The dependent''s relationship to the employee (e.g. "spouse", "child", "domestic_partner").' + type: string + gender: + description: "The dependent's gender." + type: string + ssn: + description: 'The dependent''s Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. "xxx-xx-1234") on read.' + type: string + sin: + description: "The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read." + type: string + dateOfBirth: + description: "The dependent's date of birth in YYYY-MM-DD format." + type: string + format: date + addressLine1: + description: "The first line of the dependent's address." + type: string + addressLine2: + description: "The second line of the dependent's address." + type: string + city: + description: "The dependent's city." + type: string + state: + description: 'The dependent''s state, provided as a state code (e.g. "UT"). Returned as a full state name on read.' + type: string + zipCode: + description: "The dependent's ZIP or postal code." + type: string + homePhone: + description: "The dependent's home phone number." + type: string + country: + description: 'The dependent''s country, provided as an ISO 3166-1 alpha-2 country code (e.g. "US"). Returned as a full country name on read.' + type: string + isUsCitizen: + description: 'Whether the dependent is a US citizen. Accepted values: "yes" or "no".' + type: string + enum: + - 'yes' + - 'no' + isStudent: + description: 'Whether the dependent is currently a student. Accepted values: "yes" or "no".' + type: string + enum: + - 'yes' + - 'no' + type: object + EmployeeDependentsResponse: + title: 'Employee Dependents Response' + properties: + 'Employee Dependents': + description: 'Array of employee dependent objects.' + type: array + items: + properties: + id: + description: 'The unique ID of the dependent record.' + type: string + employeeId: + description: 'The ID of the employee this dependent belongs to.' + type: string + firstName: + description: "The dependent's first name." + type: string + middleName: + description: "The dependent's middle name. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + lastName: + description: "The dependent's last name." + type: string + relationship: + description: "The dependent's relationship to the employee." + type: string + gender: + description: "The dependent's gender." + type: string + maskedSSN: + description: 'The dependent''s masked SSN (e.g. "xxx-xx-1234"). Null if no SSN on file.' + oneOf: + - { type: string } + - { type: 'null' } + maskedSIN: + description: "The dependent's masked SIN. Null if no SIN on file." + oneOf: + - { type: string } + - { type: 'null' } + dateOfBirth: + description: "The dependent's date of birth in YYYY-MM-DD format." + type: string + format: date + addressLine1: + description: "The first line of the dependent's address. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + addressLine2: + description: "The second line of the dependent's address. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + city: + description: "The dependent's city. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + state: + description: 'The dependent''s state as a full name (e.g. "Utah"). Null if not set.' + oneOf: + - { type: string } + - { type: 'null' } + zipCode: + description: "The dependent's ZIP or postal code. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + homePhone: + description: "The dependent's home phone number. Null if not set." + oneOf: + - { type: string } + - { type: 'null' } + country: + description: 'The dependent''s country as a full name (e.g. "United States"). Null if not set.' + oneOf: + - { type: string } + - { type: 'null' } + isUsCitizen: + description: 'Whether the dependent is a US citizen. "yes" or "no". Null if not set.' + oneOf: + - { type: string, enum: ['yes', 'no'] } + - { type: 'null' } + isStudent: + description: 'Whether the dependent is currently a student. "yes" or "no". Null if not set.' + oneOf: + - { type: string, enum: ['yes', 'no'] } + - { type: 'null' } + type: object + type: object + CompanyBenefitSummary: + title: 'Company Benefit Summary' + description: 'A summary representation of a company benefit plan as returned by the list endpoint.' + properties: + id: + description: 'The unique identifier of the company benefit plan.' + type: string + name: + description: 'The name of the company benefit plan.' + type: string + type: + description: 'The benefit category type.' + type: string + enum: + - health + - dental + - vision + - retirement + - hsa + - flex + - life + - disability + - reimbursement + - supplemental + - other + benefitVendorId: + description: 'The ID of the benefit vendor associated with this plan, or null if none.' + oneOf: + - + type: string + - + type: 'null' + deductionTypeId: + description: 'The deduction type ID for this plan, or null if not applicable.' + oneOf: + - + type: string + - + type: 'null' + companyDeductionId: + description: 'The company-level deduction record ID linked to this plan, or null if not set.' + oneOf: + - + type: string + - + type: 'null' + startDate: + description: 'The date the benefit plan becomes effective (YYYY-MM-DD), or null if not set.' + oneOf: + - + type: string + format: date + - + type: 'null' + endDate: + description: 'The date the benefit plan ends (YYYY-MM-DD), or null if ongoing.' + oneOf: + - + type: string + format: date + - + type: 'null' + allowsCatchUp: + description: 'Whether the plan allows catch-up contributions (e.g., for HSA plans for employees 55+), or null if not applicable to this plan type.' + oneOf: + - + type: boolean + - + type: 'null' + allowsSuperCatchUp: + description: 'Whether the plan allows super catch-up contributions, or null if not applicable to this plan type.' + oneOf: + - + type: boolean + - + type: 'null' + type: object + EmployeeBenefitFilters: + title: 'Employee Benefit Filters' + required: + - filters + properties: + filters: + description: 'Scope filters for the request. At least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided; none of the three is individually required, but omitting all three returns a 400 validation error. Any combination of the three is accepted.' + minProperties: 1 + properties: + employeeId: + description: 'Return benefit enrollments for a specific employee identified by their numeric ID. Optional unless neither `companyBenefitId` nor `enrollmentStatusEffectiveDate` is supplied.' + type: integer + companyBenefitId: + description: 'Return benefit enrollments for a specific company benefit plan identified by its numeric ID. Optional unless neither `employeeId` nor `enrollmentStatusEffectiveDate` is supplied.' + type: integer + enrollmentStatusEffectiveDate: + description: 'Return benefit enrollments whose enrollment status became effective on this date. Must be in `YYYY-MM-DD` format. Optional unless neither `employeeId` nor `companyBenefitId` is supplied.' + type: string + format: date + type: object + type: object + MemberBenefitEvent: + title: 'Member Benefit Event' + description: 'A single member (employee or dependent) and their benefit coverage events across all enrolled plans.' + properties: + memberId: + description: "The unique identifier of the member. Format: 'employee.{id}' for employees, 'dependent.{id}' for dependents." + type: string + coverages: + description: 'The benefit plan coverages for this member, one entry per plan.' + type: array + items: + properties: + planId: + description: 'The ID of the benefit plan.' + type: string + events: + description: "Chronological list of benefit events for this member and plan, covering the past year. Event type 'enrollment' includes premiumTierId and monthlyPremiumInCents; 'eligibility' and 'loss' events include only effectiveDate and type." + type: array + items: + properties: { effectiveDate: { description: 'The date this event takes effect (YYYY-MM-DD).', type: string, format: date }, type: { description: 'The type of benefit event.', type: string, enum: [eligibility, enrollment, loss] }, premiumTierId: { description: "The premium tier ID for enrollment events. Only present on events with type 'enrollment'.", oneOf: [{ type: string }, { type: 'null' }] }, monthlyPremiumInCents: { description: "The monthly premium amount in cents for enrollment events. Only present on events with type 'enrollment'.", oneOf: [{ type: number }, { type: 'null' }] } } + type: object + type: object type: object - CursorPaginationQueryObject: + TimeTrackingRecord: + title: 'Time Tracking Record' + required: + - dateHoursWorked + - employeeId + - hoursWorked + - rateType + - timeTrackingId properties: - before: - description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' + timeTrackingId: + description: 'A unique identifier for the record. Use this ID to adjust or delete these hours. It can be any ID you use to track the record up to 36 characters in length. (i.e. UUID).' type: string - after: - description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' + employeeId: + description: 'The ID of the employee.' + type: integer + divisionId: + description: '[Optional] The ID of the division for the employee.' + type: integer + departmentId: + description: '[Optional] The ID of the department for the employee.' + type: integer + jobTitleId: + description: '[Optional] The ID of the job title for the employee.' + type: integer + payCode: + description: '[Optional] Only necessary if the payroll provider requires a pay code' type: string - limit: - description: 'Maximum number of items to return. This can be at most 100.' + dateHoursWorked: + description: 'The date the hours were worked. Please use the ISO-8601 date format YYYY-MM-DD.' + type: string + payRate: + description: '[Optional] The rate of pay. e.g. $15.00/hour should use 15.00 here. Only necessary if the payroll provider requires a pay rate.' + type: number + rateType: + description: 'The type of hours - regular or overtime. Please use either "REG", "OT", or "DT" here.' + type: string + hoursWorked: + description: 'The number of hours worked.' + type: number + jobCode: + description: '[Optional] A job code.' type: integer - default: 50 - maximum: 100 - minimum: 1 + jobData: + description: '[Optional] A list of up to four 20 characters max job numbers in comma delimited format with no spaces.' + type: string type: object - ProjectCreateRequestSchema: - description: 'Schema for creating a new time tracking project with optional tasks' - required: - - name + TimeTrackingRecordBulk: + title: 'Time Tracking Record Bulk' + type: array + items: + $ref: '#/components/schemas/TimeTrackingRecord' + TimeTrackingTask: + title: 'Time Tracking Task' properties: + id: + description: 'ID of the task.' + type: integer name: - description: 'Name of the project. Must be unique and no more than 50 characters.' + description: 'Name of the task.' type: string - maxLength: 50 - example: 'Project A' - billable: - description: 'Indicates if the project is billable. Defaults to true if not provided.' - type: boolean - allowAllEmployees: - description: 'Indicates if all employees can log time for this project. Defaults to true if not provided.' - type: boolean + type: object + TimeTrackingProjectWithTasksAndEmployeeIds: + title: 'Time tracking project with tasks and list of employee IDs.' + properties: + id: + description: 'ID of the project.' + type: integer + name: + description: 'Name of the project.' + type: string + tasks: + description: 'A list of time tracking tasks for the project.' + type: array + items: + $ref: '#/components/schemas/TimeTrackingTask' employeeIds: - description: 'A list of employee IDs that can log time for this project. Only used when `allowAllEmployees` is false.' + description: 'A list of employee IDs that can log time for this project. If not present, all employees can log time for the project.' type: array items: type: integer - hasTasks: - description: 'Indicates if the project has tasks. Defaults to false if not provided.' - type: boolean - tasks: - description: 'List of tasks to create and associate with the project.' + type: object + UpdateGoalV1: + title: 'Update Employee Goal (v1)' + required: + - dueDate + - sharedWithEmployeeIds + - title + properties: + title: + description: '[Required] The goal title.' + type: string + description: + description: '[Optional] The goal description. If omitted, the existing value will be overwritten with an empty string.' + type: string + percentComplete: + description: '[Optional] The goal completion percentage (0-100). If omitted, the existing value will be overwritten with 0.' + type: integer + alignsWithOptionId: + description: '[Optional] The option ID that aligns with this goal. If omitted, the existing value will be overwritten with null.' + oneOf: + - + type: string + - + type: 'null' + sharedWithEmployeeIds: + description: '[Required] Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with". This must include the employee for whom the goal is created.' type: array items: - $ref: '#/components/schemas/TaskCreateSchema' + type: integer + dueDate: + description: '[Required] The goal due date in YYYY-MM-DD format.' + type: string + format: date + completionDate: + description: '[Optional] The date the goal was completed, in YYYY-MM-DD format. Required when percentComplete is 100. If omitted, the existing value will be overwritten with null.' + oneOf: + - + type: string + format: date + - + type: 'null' type: object - TaskCreateSchema: - description: 'Schema for creating a new task for a time tracking project' - required: - - name + Location: + properties: + id: + description: 'The ID of the location' + type: integer + name: + description: 'Name of the location' + type: string + description: + description: 'Description of the location' + type: string + city: + description: 'City of the location' + type: string + state: + $ref: '#/components/schemas/State' + country: + $ref: '#/components/schemas/Country' + zipcode: + description: 'The ZIP or postal code of the location' + type: string + addressLine1: + description: 'The first address line of the location' + type: string + addressLine2: + description: 'The second address line of the location' + type: string + phone: + description: 'The phone number of the location' + type: string + type: object + State: + properties: + id: + description: 'The ID of the state' + type: integer + name: + description: 'The name of the state' + type: string + abbrev: + description: 'The abbreviation of the state' + type: string + iso_code: + description: 'The ISO standard code of the state' + type: string + type: object + Country: + properties: + id: + description: 'The ID of the country' + type: integer + name: + description: 'The name of the country' + type: string + iso_code: + description: 'The ISO standard code of the country' + type: string + type: object + TrainingType: + properties: + id: + description: 'The ID of the training' + type: integer + name: + description: 'Name of the training type.' + type: string + renewable: + description: 'If true, training will be renewed based off of frequency.' + type: boolean + frequency: + description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' + type: integer + dueFromHireDate: + description: 'Number of days before the training is due for new hires. Not valid if training is not required.' + type: integer + required: + description: 'Whether this is a required training. Null when not set.' + oneOf: + - + type: boolean + - + type: 'null' + category: + description: 'The training category when set, or an empty array when no category is assigned.' + oneOf: + - + $ref: '#/components/schemas/TrainingCategory' + - + description: 'Empty array when no category is set' + type: array + items: { } + maxItems: 0 + linkUrl: + description: 'Optional URL that can be included with a training. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + description: + description: 'Description for the training. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + allowEmployeesToMarkComplete: + description: 'Allows all employees who can view the training to be able to mark it complete.' + type: boolean + type: object + TrainingCategory: + description: 'The category ID and name' properties: + id: + description: 'The ID of the training category.' + type: integer name: - description: 'Name of the task.' + description: 'The name of the training category.' type: string - billable: - description: 'Indicates if the task is billable. Defaults to true if not provided.' - type: boolean type: object - PersonInfoApiTransformer: + TrainingRecord: properties: + id: + description: 'The ID of the training record.' + type: integer employeeId: - description: 'Employee ID' - type: - - integer - - 'null' - userId: - description: 'User ID' - type: - - integer - - 'null' - displayFirstName: - description: 'Display first name' - type: string - lastName: - description: 'Last name' + description: 'The ID of the employee associated with the training, returned as a string.' type: string - photoUrl: - description: 'Photo URL' + completed: + description: 'Completed is a date in the format yyyy-mm-dd.' type: string - type: object - TimeTracking-OffsetPaginatedResponseData-V1: - description: 'Additional data for paginated responses' - properties: - meta: - description: 'Pagination metadata' - required: - - totalItems - - offset - - limit - properties: - totalItems: - type: integer - example: 3 - offset: - type: integer - example: 2 - limit: + format: date + notes: + description: 'Notes left on the training record. Null when not set.' + oneOf: + - + type: string + - + type: 'null' + instructor: + description: 'Name of the instructor. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + credits: + description: 'Credits earned for the training record, returned as a string. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours associated with the training record, returned as a string. Null when not set or when disabled by company training settings.' + oneOf: + - + type: string + - + type: 'null' + cost: + description: "The cost in the format '{amount} {currency}', e.g. '50.00 USD'. May be null or empty string when not set." + oneOf: + - + type: string + - + type: 'null' + type: + description: 'The training type ID. Returned as a string on update/list responses, and as an integer on create responses.' + oneOf: + - + description: 'String form' + type: string + - + description: 'Integer form' type: integer - example: 2 - type: object - _links: - description: 'Pagination links' - required: - - prev - - next - properties: - prev: - description: 'Link object for the previous page, or null if on the first page' - properties: - href: - description: 'Full URL for the previous page' - type: string - type: - - object - - 'null' - next: - description: 'Link object for the next page, or null if on the last page' - properties: - href: - description: 'Full URL for the next page' - type: string - type: - - object - - 'null' - type: object type: object - TimeTracking-BreakPolicyEmployeeCollection-V1: - description: 'Employee data relevant for break policies' - type: array - items: - required: - - id - - name - - photoUrl - properties: - id: - description: 'The employee ID' - type: integer - name: - description: 'The employee name {Preferred Last}' - type: - - string - - 'null' - photoUrl: - description: 'The employee profile photo' - type: - - string - - 'null' - type: object - AdjustTimeTrackingRequestSchema: - description: 'Schema for adjust time tracking request body' + WebhookEventType: + title: 'Webhook Event Type' + description: 'The type of event that triggers a webhook. Cannot mix employee_with_fields events with employee events. This list will be expanded in the future.' + type: string + enum: + - employee_with_fields.updated + - employee_with_fields.created + - employee_with_fields.deleted + - company-integrations.updated + - employee.created + - employee.updated + - employee.deleted + - company.updated + - company.deleted + NewWebHook: + title: 'Add Webhook' required: - - timeTrackingId - - hoursWorked - properties: - timeTrackingId: - description: 'The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).' - type: string - example: 550e8400-e29b-41d4-a716-446655440000 - hoursWorked: - description: 'The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0.' - type: number - example: 6 - projectId: - description: 'ID of the project associated with this time tracking record' - type: - - integer - - 'null' - example: 123 - taskId: - description: 'ID of the task associated with this time tracking record' - type: - - integer - - 'null' - example: 456 - shiftDifferentialId: - description: 'ID of the shift differential associated with this time tracking record' - type: - - integer - - 'null' - example: 789 - holidayId: - description: 'ID of the holiday associated with this time tracking record' - type: - - integer - - 'null' - example: 101 - type: object - ClockInRequestSchema: - description: 'Schema for clock-in request body' - properties: - projectId: - description: 'ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified.' - type: - - integer - - 'null' - example: 10 - taskId: - description: 'ID of the time tracking task that should be associated with the timesheet entry.' - type: - - integer - - 'null' - example: 25 - note: - description: 'The note that should be associated with the timesheet entry' - type: - - string - - 'null' - example: 'Back from lunch.' - date: - description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' - type: - - string - - 'null' - format: date - example: '2024-12-12' - start: - description: 'The time for the clock in. In 24 hour format HH:MM' - type: - - string - - 'null' - pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' - example: '13:00' - timezone: - description: 'The timezone associated with the clock in.' - type: - - string - - 'null' - example: America/Denver - breakId: - description: 'ID of the break that should be associated with the timesheet entry.' - type: - - string - - 'null' - format: uuid - example: 123e4567-e89b-12d3-a456-426614174000 - offline: - description: 'Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later.' - type: boolean - example: false - type: object - ClockOutRequestSchema: - description: 'Schema for clock out request body' + - name + - url + - format properties: - date: - description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' + name: + description: 'The name of the webhook.' type: string - format: date - example: '2024-12-12' - end: - description: 'The time for the clock out. In 24 hour format HH:MM' + example: 'My new webhook' + monitorFields: + description: 'A list of fields to monitor. At least one field is required to be monitored if events is empty or contains employee_with_fields.updated or employee.updated.' + type: array + items: + type: string + example: + - firstName + - lastName + postFields: + description: 'An object map of field ID or alias to the external name used in the webhook payload (e.g. `{"firstName": "First Name"}`). Omit or send an empty object to include no extra fields.' + type: object + default: { } + example: + firstName: Name + lastName: Surname + dateOfBirth: DOB + url: + description: 'The url the webhook should send data to (must begin with https://).' type: string - pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' - example: '13:00' - timezone: - description: 'The timezone associated with the clock out.' + format: + description: 'The payload format the webhook uses. Required.' type: string - example: America/Denver - type: object - HourEntriesRequestSchema: - description: 'Schema for timesheet hour entries request' - required: - - hours - properties: - hours: - description: 'Array of hour entries to add or update' + enum: + - json + - form-encoded + example: json + includeCompanyDomain: + description: 'If set to true, the company domain will be added to the webhook request header.' + type: boolean + example: false + events: + description: "Events that trigger this webhook. Defaults to ['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created'] if not specified. Cannot mix employee_with_fields events with employee events." type: array items: - $ref: '#/components/schemas/HourEntrySchema' + $ref: '#/components/schemas/WebhookEventType' + example: + - employee.created + - employee.updated + - employee.deleted type: object - HourEntrySchema: - description: 'Schema for a single timesheet hour entry' + WebHookResponse: + title: 'Webhook Response' properties: - employeeId: - description: 'Unique identifier for the employee' - type: integer - date: - description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format' - type: string - format: date - example: '2024-12-01' - hours: - description: 'Hours worked for this timesheet entry' - type: number - format: float - example: 3.5 id: - description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry' - type: integer - projectId: - description: 'The ID of the project to associate with the timesheet entry' - type: integer - taskId: - description: 'The ID of the task to associate with the timesheet entry' - type: integer - note: - description: 'Optional note to associate with the timesheet entry' + description: 'The ID of the webhook.' type: string - type: object - TimeTrackingBulkResponseSchema: - description: 'Schema for time tracking bulk operation response' - properties: - success: - description: 'Indicates whether the operation was successful' - type: boolean - response: - description: 'Response data containing ID and message' - properties: - id: - description: 'Unique identifier for the time tracking record' + example: '4' + name: + description: 'The name of the webhook.' + type: string + example: 'Example Webhook' + created: + description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).' + type: string + example: '2021-09-20 22:38:01' + lastSent: + description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.' + example: '2021-09-20 22:38:01' + oneOf: + - type: string - example: 550e8400-e29b-41d4-a716-446655440000 - message: - description: 'Response message, typically used for error details' - type: - - string - - 'null' + - + type: 'null' + monitorFields: + description: 'A list of fields being monitored. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).' + example: + - firstName + - lastName + oneOf: + - + type: array + items: + type: string + - + type: 'null' + postFields: + description: 'A map of field ID or alias to the external name used in the webhook payload.' type: object - type: object - TimeTrackingDeleteResponseSchema: - description: 'Schema for time tracking delete operation response' - properties: - status: - description: 'Status of the delete operation' - type: string - example: success - message: - description: 'Response message indicating the result of the operation' + example: + firstName: Name + lastName: Surname + dateOfBirth: DOB + url: + description: 'The URL the webhook sends data to.' type: string - example: 'Record removed' - type: object - TimeTrackingIdResponseSchema: - description: 'Schema for time tracking ID response' - properties: - id: - description: 'Unique identifier for the time tracking record' + example: 'https://www.example.com' + format: + description: 'The payload format used by the webhook.' type: string - example: 550e8400-e29b-41d4-a716-446655440000 + enum: + - json + - form-encoded + example: json + includeCompanyDomain: + description: 'Whether the company domain is added to the webhook request header.' + type: boolean + example: false + events: + description: 'Events that trigger this webhook.' + type: array + items: + $ref: '#/components/schemas/WebhookEventType' + example: + - employee_with_fields.created + - employee_with_fields.updated + errors: + description: 'Field-level permission errors associated with the webhook configuration, when present.' + type: array + items: + $ref: '#/components/schemas/WebhookSubErrorProperty' + example: + - + error: 'Permission denied to the following fields' + postFields: + - + id: 2 + name: lastName type: object - TimeTrackingRecordSchema: - description: 'Schema for time tracking record response' + WebhookBadRequest: properties: - timeTrackingId: - description: 'Unique identifier for the time tracking record' - type: string - employeeId: - description: 'ID of the employee associated with this time tracking record' - type: string - divisionId: - description: 'ID of the division associated with this time tracking record' - type: - - string - - 'null' - departmentId: - description: 'ID of the department associated with this time tracking record' - type: - - string - - 'null' - jobTitleId: - description: 'ID of the job title associated with this time tracking record' - type: - - string - - 'null' - payCode: - description: 'Pay code for this time tracking record' - type: - - string - - 'null' - dateHoursWorked: - description: 'Date the hours were worked' - type: string - format: date - type: - description: 'Type of time tracking record' - type: string - payRate: - description: 'Pay rate for this time tracking record' - type: string - format: decimal - rateType: - description: 'Rate type for this time tracking record' - type: string - hoursWorked: - description: 'Number of hours worked' - type: string - format: decimal - adjustedHours: - description: 'Number of adjusted hours' - type: string - format: decimal - dateAdjusted: - description: 'Date and time when the hours were adjusted' - type: string - format: date-time - jobCode: - description: 'Job code associated with this time tracking record' - type: - - string - - 'null' - jobData: - description: 'Additional job data for this time tracking record' - type: - - string - - 'null' - projectId: - description: 'ID of the project associated with this time tracking record' - type: - - string - - 'null' - taskId: - description: 'ID of the task associated with this time tracking record' - type: - - string - - 'null' - shiftDifferentialId: - description: 'ID of the shift differential associated with this time tracking record' - type: - - string - - 'null' - holidayId: - description: 'ID of the holiday associated with this time tracking record' - type: - - string - - 'null' - project: - description: 'Project information associated with this time tracking record' - properties: - id: - description: 'Project information' - type: integer - name: - type: string - task: - properties: - id: - type: integer - name: + errors: + type: array + items: + properties: + error: + type: string + issues: + type: array + items: type: string - type: - - object - - 'null' - type: - - object - - 'null' - shiftDifferential: - description: 'Shift differential information associated with this time tracking record' - properties: - id: - description: 'Shift Differential information' - type: integer - name: - type: string - type: - - object - - 'null' + type: object type: object - FieldOptionsRequestSchema: - description: 'Schema for field options request' + example: + errors: + - + error: 'Invalid request body' + issues: + - 'problem one' + - 'problem two' + - … + WebhookError: + title: 'Webhook Standard error' + properties: + errors: + oneOf: + - + $ref: '#/components/schemas/WebhookSubErrorProperty' + - + type: array + items: + $ref: '#/components/schemas/WebhookSubErrorProperty' + type: object + example: + errors: + - + error: 'You do not have access to webhook ID: 5' + - + error: 'No webhook was found with ID: 7.' + - + error: 'Sorry for the inconvenience, please try again later or contact BambooHR' + additionalProperties: false + WebhookSubErrorProperty: + properties: + error: + type: string + unknownFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + - { type: 'null' } + name: + type: string + type: object + monitorFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + name: + type: string + type: object + duplicatePostString: + type: array + items: + type: string + postFields: + type: array + items: + properties: + id: + oneOf: + - { type: integer } + - { type: string } + name: + type: string + type: object + type: object + additionalProperties: false + DataRequest: + title: 'Data Request' required: - fields properties: fields: - description: 'List of field names to get options for' + description: 'Field names to include in each returned record. Use "Get Fields from Dataset" to discover available names.' type: array items: type: string example: - - field_name1 - - field_name2 - dependentFields: - description: 'Dependent fields and their values that affect the options of the requested fields' - type: - - object - - 'null' - example: - field_name1: - - - field: field_name2 - value: 123 - additionalProperties: - type: array - items: - properties: - field: + - lastNameFirstName + - firstName + - employeeNumber + - hireDate + - ssn + aggregations: + description: 'Aggregation configuration. Set `defaultAggregation` to apply one aggregation type to every requested field, or use `overridingAggregations` to target specific fields. Both may be combined.' + properties: + defaultAggregation: + description: 'Aggregation type applied to all requested fields when set. Pass null to skip the default.' + example: count + oneOf: + - type: string - value: + enum: [count, count_unique, sum, avg, min, max] + - + type: 'null' + overridingAggregations: + description: 'Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type.' + type: array + items: + type: object + additionalProperties: type: string - type: object + example: + - + hireDate: count + type: object + sortBy: + description: 'Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field.' + type: array + items: + properties: + field: + description: 'Field name to sort by.' + type: string + sort: + description: 'Sort direction.' + type: string + enum: + - asc + - desc + aggregationType: + description: 'Optional. Use when sorting by an aggregated value; must match the requested aggregation for this field.' + type: string + enum: + - count + - count_unique + - sum + - avg + - min + - max + type: object + example: + - + field: hireDate + sort: desc + aggregationType: count filters: - description: 'Optional filters to apply when retrieving field options. Filters limit the returned options based on other field values. The object contains a `match` key (`all` or `any`) and a `filters` array of objects with `field`, `operator`, and `value` keys.' - type: - - object - - 'null' + description: 'Filter configuration. Combine multiple conditions with a `match` strategy.' + properties: + match: + description: 'Logical operator for combining filters: `all` (AND) or `any` (OR).' + type: string + enum: + - all + - any + filters: + description: 'Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array.' + type: array + items: + properties: + field: { description: 'Field name to filter on.', type: string } + operator: { description: 'Comparison operator. Available operators depend on field type (see endpoint description).', type: string, enum: [contains, does_not_contain, equal, not_equal, empty, not_empty, lt, lte, gt, gte, last, next, range, checked, not_checked, includes, does_not_include] } + value: { description: 'Filter value. For `includes`/`does_not_include` operators, pass the value as an array enclosed in square brackets, for example `["Full-Time", "Part-Time"]`.' } + type: object + type: object example: match: all filters: - - field: employee_status - operator: includes - value: - - Active + field: firstName + operator: equal + value: Pudgy + groupBy: + description: 'Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array.' + type: array + items: + type: string + example: + - hireDate + showHistory: + description: 'Entity names of historical table fields whose history rows should be included. Entity names are returned by "Get Fields from Dataset".' + type: array + items: + type: string + example: + - education type: object - Employee: - title: 'Employee when updating' - description: 'A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid employee field name can be used as a key. To discover all available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered.' + DatasetEmployee: + type: object + example: + lastNameFirstName: 'Panda, Pudgy' + firstName: Pudgy + employeeNumber: '123' + middleName: 'null' + ssn: 123-45-6478 + Pagination: + properties: + total_records: + type: integer + example: '10' + current_page: + type: integer + example: '2' + total_pages: + type: integer + example: '10' + next_page: + example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=3&page_size=1' + oneOf: + - + type: string + - + type: 'null' + prev_page: + example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=1&page_size=1' + oneOf: + - + type: string + - + type: 'null' + type: object + EmployeeResponse: + title: 'Employee Response' + properties: + data: + type: array + items: + $ref: '#/components/schemas/DatasetEmployee' + aggregations: + type: array + items: + properties: + field: + type: string + aggregationType: + type: string + groups: + type: object + all: + type: integer + type: object + pagination: + $ref: '#/components/schemas/Pagination' + type: object + DatasetV1: + title: 'Dataset (v1)' properties: - firstName: - description: 'Legal first name.' + name: + description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.' type: string - lastName: - description: 'Legal last name.' + example: employee + label: + description: 'Human-readable display name for the dataset.' type: string - workEmail: - description: 'Work email address.' + example: Employee + type: object + DatasetResponseV1: + title: 'Dataset Response (v1)' + properties: + datasets: + description: 'Array of available datasets.' + type: array + items: + $ref: '#/components/schemas/DatasetV1' + type: object + Field: + title: Field + properties: + name: + description: 'Machine-readable field identifier. Use this value in the `fields` array when querying data.' type: string - jobTitle: - description: 'Job title.' + example: status + label: + description: 'Human-readable display name for the field.' type: string - department: - description: 'Department name.' + example: Status + parentType: + description: 'The type of the parent section (e.g. `page`, `table`).' type: string - division: - description: 'Division name.' + example: page + parentName: + description: 'The name of the parent section this field belongs to.' type: string - location: - description: 'Location name.' + example: Personal + entityName: + description: 'The entity name for the field, used in `showHistory` when querying historical table fields.' type: string - hireDate: - description: 'Hire date in YYYY-MM-DD format.' + example: personal + type: object + DatasetFieldsResponse: + title: 'Dataset Fields Response' + properties: + pagination: + $ref: '#/components/schemas/Pagination' + name: + description: 'Machine-readable dataset identifier matching the requested datasetName.' type: string - format: date - mobilePhone: - description: 'Mobile phone number.' + example: employee + label: + description: 'Human-readable display name for the dataset.' type: string - homePhone: - description: 'Home phone number.' + example: Employee + fields: + description: 'Paginated array of field descriptors for this dataset.' + type: array + items: + $ref: '#/components/schemas/Field' + example: + - + name: status + label: Status + parentType: page + parentName: Personal + entityName: personal + - + name: employeeNumber + label: 'Employee #' + parentType: page + parentName: Personal + entityName: personal + type: object + Report: + title: 'Report (v1)' + properties: + id: + type: integer + example: 4 + name: type: string - workPhone: - description: 'Work phone number.' + example: New + type: object + ReportsResponse: + title: 'Reports Response (v1)' + properties: + reports: + type: array + items: + $ref: '#/components/schemas/Report' + pagination: + $ref: '#/components/schemas/Pagination' + type: object + FieldOptionsTransformer: + title: 'Field Option' + properties: + id: + description: 'The ID of the field option. May be a string or an integer depending on the field type.' + oneOf: + - + type: string + - + type: integer + value: + description: 'The human-readable label of the field option' type: string - address1: - description: 'Street address line 1.' + type: object + TableName: + description: 'The API name of an employee table. Standard table names: `jobInfo`, `jobInformation`, `compensation`, `employmentStatus`, `contacts`, `emergencyContacts`, `dependents`, `earnings`, `bonus`, `commission`, `benefit_class`, `employeeVisas`, `employeeEducation`, `employeePassports`, `employeeDriverLicenses`, `employeeCertifications`, `employeeStockOptions`, `employeeAssets`, `employeeCreditCards`, `employeeCovidTests`, `employeeCovidVaccinations`, `employeeCovidVaccinationExemptions`, `employeeCovidExposures`, `employeeEquityGrants`, `levelsAndBands`, `employeeProjectPayRates`. Custom company-defined tables also accepted — they use a numeric suffix (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names for a specific company.' + type: string + example: employeeEducation + TableRowDeleteResponse: + description: 'Response from deleting an employee table row.' + properties: + success: + description: 'Whether the row was successfully deleted.' + type: boolean + error: + description: 'Error message when success is false. Absent when success is true.' type: string - city: - description: City. + type: object + ErrorResponse: + description: 'Standard error response from BaseController' + properties: + error: + properties: + code: + type: integer + example: 500 + message: + type: string + example: 'Internal server error' + type: object + type: object + GoalFiltersV1: + description: 'Array containing goal filters and their counts for API v1' + properties: + filters: + description: 'Array of goal filter objects with counts' + type: array + items: + properties: + id: + description: 'Filter identifier based on goal status.' + type: string + enum: + - status-inProgress + - status-completed + example: status-inProgress + name: + description: 'Display name of the filter' + type: string + enum: + - 'In Progress' + - Completed + example: 'In Progress' + count: + description: 'Number of goals matching this filter' + type: integer + example: 1 + type: object + type: object + GoalFiltersV1_1: + description: 'Array containing goal filters, their counts, and actions' + properties: + filters: + description: 'Array of goal filter objects with counts' + type: array + items: + properties: + id: + description: 'Filter identifier based on goal status.' + type: string + enum: + - status-inProgress + - status-completed + - status-closed + example: status-inProgress + name: + description: 'Display name of the filter' + type: string + enum: + - 'In Progress' + - Completed + - Closed + example: 'In Progress' + count: + description: 'Number of goals matching this filter' + type: integer + example: 1 + actions: + description: 'Available actions for goals in this state, defined by PerformanceDefinitions::GOAL_FILTER_ACTIONS' + properties: + canCloseGoal: { description: 'Whether goals in this state can be closed', type: boolean, example: true } + canEditGoal: { description: 'Whether goals in this state can be edited', type: boolean, example: true } + canEditGoalProgressBar: { description: 'Whether progress bar can be edited for goals in this state', type: boolean, example: true } + canReopenGoal: { description: 'Whether goals in this state can be reopened', type: boolean, example: false } + canShareGoal: { description: 'Whether goals in this state can be shared', type: boolean, example: true } + type: object + type: object + type: object + TransformedApiGoal: + properties: + id: + description: 'The id of the goal.' type: string - state: - description: 'State or province. Values are normalized to standard abbreviations (e.g., "Pennsylvania" becomes "PA").' + example: '4' + title: + description: 'Title of the goal.' type: string - zipcode: - description: 'ZIP or postal code.' + example: 'Complete Documentation Epic' + description: + description: 'A description of the goal.' type: string - country: - description: 'Country name.' + example: 'Document every endpoint for the goals API.' + percentComplete: + description: 'A percentage (0-100) that denotes how complete the goal is.' + type: integer + example: 78 + alignsWithOptionId: + description: 'The ID of the goal this goal is aligned with. Returns null when not aligned, or an empty string when the goal has no parent set.' + oneOf: + - + type: string + - + type: 'null' + sharedWithEmployeeIds: + description: 'Ids of the employees that have access to this goal.' + type: array + items: + type: integer + dueDate: + description: 'The due date of the goal.' + type: string + example: '2025-12-31' + completionDate: + description: 'ISO 8601 UTC timestamp of when the goal was completed.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + lastChangedDateTime: + description: 'ISO 8601 UTC timestamp of when the goal was last modified.' + example: '2025-12-17T10:30:00Z' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the goal.' type: string + enum: + - in_progress + - completed + - closed + example: in_progress + milestones: + description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' + oneOf: + - + type: array + items: + properties: + id: { description: 'The id of the milestone.', type: integer, example: 2 } + employeeGoalId: { description: 'The id of the goal which encompasses this milestone.', type: integer, example: 12 } + title: { description: 'The title of the milestone.', type: string, example: 'Sell 15 Doohickeys' } + currentValue: { description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.', example: '9.9', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + startValue: { description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '7.01', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + endValue: { description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '15', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] } + completedDateTime: { description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.', type: string, example: '2025-04-10T15:36:38Z' } + lastUpdateDateTime: { description: 'The date and time in which the goal was last updated.', type: string, example: '2025-04-10T15:36:38Z' } + lastUpdateUserId: { description: 'The ID of the user who last updated this milestone.', type: integer, example: 24 } + type: object + - + type: 'null' + actions: + description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' + properties: + canEditGoalProgressBar: + description: 'Can the user edit the progress bar of this goal.' + type: boolean + example: false + canEditGoalMilestoneProgressBar: + description: 'can the user edit the progress of a milestone in this goal.' + type: boolean + example: true + oneOf: + - + type: object + - + type: 'null' type: object - example: - firstName: Panda - lastName: Bear - workEmail: panda.bear@example.com - jobTitle: 'Software Engineer' - department: Engineering - additionalProperties: - anyOf: - - - type: string - - - type: number - - - type: boolean - - - type: integer - - - type: array - items: - anyOf: + TransformedApiEmployeeGoalDetails: + properties: + goal: + description: 'An individual goal' + properties: + id: + description: 'The id of the goal.' + type: string + example: '4' + title: + description: 'Title of the goal.' + type: string + example: 'Complete Documentation Epic' + description: + description: 'A description of the goal.' + type: string + example: 'Document every endpoint for the goals API.' + percentComplete: + description: 'A percentage (0-100) that denotes how complete the goal is.' + type: integer + example: 78 + alignsWithOptionId: + oneOf: - type: string - - type: number - - - type: boolean - - - type: integer + type: 'null' + sharedWithEmployeeIds: + description: 'Ids of the employees that have access to this goal.' + type: array + items: + type: integer + dueDate: + description: 'The due date of the goal.' + type: string + example: '2025-12-31' + completionDate: + description: 'ISO 8601 UTC timestamp of when the goal was completed.' + example: '2025-12-17T10:30:00Z' + oneOf: - - type: object - additionalProperties: true + type: string - type: 'null' - - - type: object - additionalProperties: true - - - type: 'null' - postNewEmployee: - title: 'New Employee' - description: 'A dictionary of employee field names and their values for the new employee. At minimum, firstName and lastName are required. The properties listed below are commonly used fields, but any valid employee field name can be used as a key. To discover all available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Additional fields may use string, number, boolean, array, object, or null values depending on the field type. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered.' - required: - - firstName - - lastName - properties: - firstName: - description: 'Legal first name (required).' - type: string - lastName: - description: 'Legal last name (required).' - type: string - workEmail: - description: 'Work email address.' - type: string - jobTitle: - description: 'Job title.' - type: string - department: - description: 'Department name.' - type: string - hireDate: - description: 'Hire date in YYYY-MM-DD format.' - type: string - format: date - type: object - example: - firstName: Panda - lastName: Bear - jobTitle: 'Software Engineer' - department: Engineering - additionalProperties: - anyOf: - - - type: string - - - type: number - - - type: boolean - - - type: integer - - - type: array - items: - anyOf: + lastChangedDateTime: + description: 'ISO 8601 UTC timestamp of when the goal was last modified.' + example: '2025-12-17T10:30:00Z' + oneOf: - type: string - - type: number + type: 'null' + status: + description: 'The status of the goal.' + type: string + enum: + - in_progress + - completed + - closed + example: in_progress + milestones: + description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' + oneOf: - - type: boolean + type: array + items: { properties: { id: { description: 'The id of the milestone.', type: integer, example: 2 }, employeeGoalId: { description: 'The id of the goal which encompasses this milestone.', type: integer, example: 12 }, title: { description: 'The title of the milestone.', type: string, example: 'Sell 15 Doohickeys' }, currentValue: { description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.', example: '9.9', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, startValue: { description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '7.01', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, endValue: { description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', example: '15', deprecated: true, oneOf: [{ type: number }, { type: 'null' }] }, completedDateTime: { description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.', type: string, example: '2025-04-10T15:36:38Z' }, lastUpdateDateTime: { description: 'The date and time in which the goal was last updated.', type: string, example: '2025-04-10T15:36:38Z' }, lastUpdateUserId: { description: 'The ID of the user who last updated this milestone.', type: integer, example: 24 } }, type: object } - - type: integer + type: 'null' + actions: + description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' + properties: + canEditGoalProgressBar: + description: 'Can the user edit the progress bar of this goal.' + type: boolean + example: true + canEditGoalMilestoneProgressBar: + description: 'can the user edit the progress of a milestone in this goal.' + type: boolean + example: false + oneOf: - type: object - additionalProperties: true - type: 'null' - - - type: object - additionalProperties: true - - - type: 'null' - ListFieldValues: - title: 'Create or Update List Field Values' - description: 'Payload for creating, updating, or archiving options on a list field.' + type: object + type: object + ProjectInfoApiTransformer: + description: 'Project information data representation' properties: - options: - description: 'The list field options to create, update, or archive.' - type: array - items: - properties: - id: - description: 'The existing option ID. Omit this field to create a new option.' - type: integer - value: - description: 'The display value for the option.' - type: string - archived: - description: 'Whether the option should be archived. Use `yes` to archive an option or `no` to keep it active.' - type: string - enum: - - 'yes' - - 'no' - adpCode: - description: 'Optional payroll-mapping code associated with the option.' - type: string - type: object + project: + description: 'Project information' + properties: + id: + description: 'Project ID' + type: integer + name: + description: 'Project name' + type: string + type: object + task: + description: 'Task information' + properties: + id: + description: 'Task ID' + type: integer + name: + description: 'Task name' + type: string + oneOf: + - + type: object + - + type: 'null' + type: object + TotalRewardsOnboardingStep: + properties: + name: + description: 'Name of the onboarding step' + type: string + completed: + description: 'Whether or not the onboarding step is completed' + type: boolean + type: object + CompanyIntegrationsUpdatedWebhookPayload: + title: 'Company Integrations Updated Webhook Payload' + description: 'Webhook payload sent when company integrations are updated.' + properties: + type: + description: 'The event type identifier' + type: string + enum: + - company-integrations.updated + example: company-integrations.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object type: object - TimeOffRequest: - title: 'Create Time Off Request' - required: - - status - - start - - end - - timeOffTypeId + CompanyUpdatedWebhookPayload: + title: 'Company Updated Webhook Payload' + description: 'Webhook payload sent when a company is updated.' properties: - status: - description: 'The initial status of the request.' + type: + description: 'The event type identifier' type: string enum: - - approved - - denied - - declined - - requested - start: - description: 'Start date in YYYY-MM-DD format.' + - company.updated + example: company.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' type: string - format: date - end: - description: 'End date in YYYY-MM-DD format. Must be on or after the start date.' + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object + type: object + CompanyDeletedWebhookPayload: + title: 'Company Deleted Webhook Payload' + description: 'Webhook payload sent when a company is deleted.' + properties: + type: + description: 'The event type identifier' type: string - format: date - timeOffTypeId: - description: 'The ID of the time off type for this request.' - type: integer - amount: - description: 'Total hours or days requested. Ignored when `dates` array is provided (sum of daily amounts is used instead).' - type: number - previousRequest: - description: 'The ID of a previous time off request to supersede. The previous request will be cancelled.' - type: integer - notes: - description: 'Optional notes from the employee or manager.' - type: array - items: - properties: - from: - description: 'Who the note is from.' - type: string - enum: - - employee - - manager - note: - description: 'The note text.' - type: string - type: object - dates: - description: 'Optional per-day breakdown. When provided, the top-level `amount` is ignored and the sum of daily amounts is used.' - type: array - items: - properties: - ymd: - description: 'Date in YYYY-MM-DD format.' - type: string - format: date - amount: - description: 'Hours or days for this date.' - type: number - type: object + enum: + - company.deleted + example: company.deleted + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing company information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + type: object type: object - request: - title: 'Request Status' - required: - - status + EmployeeCreatedWebhookPayload: + title: 'Employee Created Webhook Payload' + description: 'Webhook payload sent when a new employee is created.' properties: - status: - description: 'The new status for the time off request.' + type: + description: 'The event type identifier' type: string enum: - - approved - - denied - - declined - - canceled - - cancelled - note: - description: 'A note to attach to the change in status.' + - employee.created + example: employee.created + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was created' + type: string + example: '100' + type: object type: object - example: - status: approved - note: 'Looks good, approved!' - TimeOffHistory: - required: - - date + EmployeeDeletedWebhookPayload: + title: 'Employee Deleted Webhook Payload' + description: 'Webhook payload sent when an employee is deleted.' properties: - date: - description: 'The date for the history item in YYYY-MM-DD format.' + type: + description: 'The event type identifier' type: string - format: date - eventType: - description: 'The type of history event. Defaults to `used` for the /history path and `override` for the /balance_adjustment path when omitted.' + enum: + - employee.deleted + example: employee.deleted + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was deleted' + type: string + example: '100' + type: object + type: object + EmployeeUpdatedWebhookPayload: + title: 'Employee Updated Webhook Payload' + description: 'Webhook payload sent when an employee is updated.' + properties: + type: + description: 'The event type identifier' type: string enum: - - used - - override - timeOffRequestId: - description: 'The ID of an approved time off request. Required when eventType is `used`.' + - employee.updated + example: employee.updated + timestamp: + description: 'ISO 8601 timestamp (UTC) when the event was fired' + type: string + format: date-time + example: '2025-02-18T15:30:00Z' + data: + description: 'Event data containing employee and change information' + properties: + companyId: + description: 'The company ID' + type: string + example: '12345' + employeeId: + description: 'The employee ID that was updated' + type: string + example: '100' + changedFields: + description: 'Array of API aliases for fields that changed and are monitored by this webhook' + type: array + items: + type: string + example: + - firstName + - lastName + - department + type: object + type: object + CompanyAlertDataObject: + properties: + id: + description: 'The unique identifier of the company alert.' type: integer - timeOffTypeId: - description: 'The ID of the time off type. Required when eventType is `override`.' + bambooAlertId: + description: 'The unique identifier of the Bamboo alert.' type: integer - amount: - description: 'The number of hours/days to record. Required when eventType is `override`.' - type: number - note: - description: 'An optional note to show in history.' + schedule: + description: 'The schedule for the company alert.' type: string + enum: + - daily + - weekly + - monthly + - quarterly + dueWithin: + description: 'The number of days before the alert is due.' + oneOf: + - + type: integer + - + type: 'null' + dueInterval: + description: 'The interval for the alert.' + oneOf: + - + type: string + - + type: 'null' + sendToEmployee: + description: 'Whether the alert should be sent to employees.' + type: boolean + sendToManager: + description: 'Whether the alert should be sent to managers.' + type: boolean + sendToAdmin: + description: 'Whether the alert should be sent to admins.' + type: boolean + editorUserId: + description: 'The user ID of the editor.' + oneOf: + - + type: integer + - + type: 'null' + lastEdited: + description: 'The last edited date of the company alert.' + type: + - 'null' + customMessage: + description: 'The custom message for the company alert.' + oneOf: + - + type: string + - + type: 'null' + customSubject: + description: 'The custom subject for the company alert.' + oneOf: + - + type: string + - + type: 'null' + groupBy: + description: 'The group by for the company alert.' + oneOf: + - + type: string + - + type: 'null' + limitTrainingToRequired: + description: 'Whether the training should be limited to required training.' + type: boolean + runAtTime: + description: 'The time the company alert should run at.' + oneOf: + - + type: string + - + type: 'null' + runAtTimeZone: + description: 'The time zone the company alert should run at.' + oneOf: + - + type: string + - + type: 'null' + includePosition: + description: 'Whether the alert should include position.' + type: boolean + includeLocation: + description: 'Whether the alert should include location.' + type: boolean + additionalRecipientEmails: + description: 'The additional recipient emails for the company alert.' + type: array + items: + type: string + employeeIds: + description: 'The employee IDs for the company alert.' + type: array + items: + type: string + listValueIds: + description: 'The list value IDs for the company alert.' + type: array + items: + type: integer + filterListValueIds: + description: 'The filter list value IDs for the company alert.' + type: array + items: + type: integer + userIds: + description: 'The user IDs for the company alert.' + type: array + items: + type: integer type: object - AdjustTimeOffBalance: - required: - - amount - - date - - timeOffTypeId + TimezoneResource: + description: 'A timezone resource.' properties: - date: - description: 'The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD).' + id: + description: 'The timezone ID.' type: string - format: date - timeOffTypeId: - description: 'The ID of the time off type to add a balance adjustment for.' - type: integer - amount: - description: 'The number of hours/days to adjust the balance by.' - type: number - note: - description: 'This is an optional note to show in history.' + example: '1' + gmtOffset: + description: 'The GMT offset label (e.g. "(GMT-07:00)").' type: string - type: object - PostNewEmployeeFileCategory: - title: 'New Employee File Category' - type: array - items: - type: string - example: - - 'A new category' - EmployeeFileUpdate: - title: 'Employee File Update' - properties: + example: '(GMT-07:00)' name: - description: 'The new display name for the file.' - type: string - categoryId: - description: 'The ID of the file category (section) to move the file into.' - type: integer - shareWithEmployee: - description: "Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'." + description: 'The display name of the timezone.' type: string - enum: - - 'yes' - - 'no' - shareWithEmployees: - description: 'Alias for shareWithEmployee. Whether the file is shared with the employee.' + example: 'Mountain Time' + utcName: + description: 'The IANA/UTC timezone identifier.' type: string - enum: - - 'yes' - - 'no' + example: America/Denver type: object - NewCompanyFileCategory: - title: 'New Company File Category' + CountriesResponseSchema: + description: 'Top-level JSON array of country objects. The response is not wrapped in a parent object.' type: array items: - type: string - example: - - 'A new category' - CompanyFileUpdate: - title: 'Company File Update' + $ref: '#/components/schemas/CountrySchema' + CountrySchema: + description: 'A country in the list returned by the Get Countries endpoint' properties: + id: + description: 'Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits).' + type: integer name: - description: 'The new display name for the file.' - type: string - categoryId: - description: 'The ID of the category (file section) to move the file to.' + description: 'Full display name of the country' type: string - shareWithEmployee: - description: 'Whether the file is shared with employees.' - type: string - enum: - - 'yes' - - 'no' + isoCode: + description: 'ISO 3166-1 alpha-2 when defined. The `isoCode` key is always present; the value is JSON `null` when the country has no code set in data (not omitted).' + oneOf: + - + type: string + - + type: 'null' type: object - RequestCustomReport: - title: 'Request Custom Report' - description: 'Report definition for an ad-hoc custom report. Specify the fields to include and optionally filter the employee set. Field IDs are the internal BambooHR field names (e.g. `firstName`, `lastName`, `department`). See the fields metadata endpoint for available field IDs.' + StateProvinceResponseSchema: + description: 'Response from `GET /api/v1/meta/provinces/{countryId}`. The `options` list is sorted by `label` (subdivision abbreviation).' properties: - title: - description: 'A label for the report. Included in the response and used as the file name for downloaded reports.' - type: string - fields: - description: 'Array of field IDs to include as columns in the report. Maximum of 400 fields.' + options: + description: 'Subdivisions for the requested `countryId`. Each object matches StateProvinceSchema; `label` is the subdivision abbreviation, `name` the full name, `iso` the ISO 3166-2 code.' type: array items: - type: string - filters: - description: 'Optional filters to restrict which employees appear in the report.' - properties: - lastChanged: - description: 'Filters employees to those whose data was last changed on or after the given date/time.' - properties: - value: - description: 'ISO 8601 date-time value. Only employees whose data has changed at or after this date-time will be included.' - type: string - format: date-time - includeNull: - description: 'Whether to include employees with no last-changed date. `yes` (default) includes them; `no` excludes them.' - type: string - enum: ['yes', 'no'] - type: object - employeeIds: - description: 'Restricts the report to only the specified employee IDs.' - type: array - items: - type: integer - type: object - filterDuplicates: - description: 'Whether to apply standard duplicate row filtering. Defaults to enabled. Set to `no` to return raw results without deduplication.' - type: string - enum: - - 'yes' - - 'no' + $ref: '#/components/schemas/StateProvinceSchema' type: object - TableRowUpdate: - title: 'Table Row Update' - description: 'A dictionary of table field names and values for creating or updating a row in an employee table. The listed properties are common examples, but accepted fields depend on the specific table being targeted. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered.' + StateProvinceSchema: + description: 'One state or province (subdivision) row. The same field meanings as each element of `StateProvinceResponseSchema.options` from `GET /api/v1/meta/provinces/{countryId}`.' properties: - date: - description: 'The effective date for the row in YYYY-MM-DD format.' - type: string - format: date - location: - description: 'The employee location value for the row.' - type: string - division: - description: 'The division value for the row.' - type: string - department: - description: 'The department value for the row.' + id: + description: 'State/province ID' + type: integer + label: + description: 'Subdivision abbreviation (e.g. "UT" for Utah). This is the short code used in `options[].label`, not the full name (see `name`).' type: string - jobTitle: - description: 'The job title value for the row.' + iso: + description: 'ISO 3166-2 subdivision code (e.g. "US-UT" for Utah).' type: string - reportsTo: - description: 'The manager or reports-to value for the row.' + name: + description: 'Full subdivision name (e.g. "Utah"), distinct from the abbreviation in `label`.' type: string - teams: - description: 'Team values associated with the row.' - type: array - items: - type: string type: object - additionalProperties: - anyOf: - - - type: string - - - type: number - - - type: boolean - - - type: integer - - - type: array - items: - anyOf: - - - type: string - - - type: number - - - type: boolean - - - type: integer - - - type: object - additionalProperties: true - - - type: 'null' - - - type: object - additionalProperties: true - - - type: 'null' - Login: - title: Login + CompanyIndustryCollection: + title: CompanyIndustryDataObjectCollection + type: array + items: + $ref: '#/components/schemas/CompanyIndustryDataObject' + CompanyIndustryDataObject: + description: "Company's enabled industry." required: - - applicationKey - - user - - password + - industryId + - addedByCustomer + - addedByUserId + - addedYmdt + properties: + industryId: + description: "The company's industry id." + type: integer + addedByCustomer: + description: 'If the industry was added by the customer.' + type: boolean + addedByUserId: + description: 'The user id of the user who added the industry.' + oneOf: + - + type: integer + - + type: 'null' + addedYmdt: + description: 'The date that the industry was added.' + oneOf: + - + type: string + - + type: 'null' + type: object + CompensationBenchmarking-ColumnMap: + description: 'Schema for compensation benchmarking column map' properties: - applicationKey: - description: 'The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.' - type: string - user: - description: "The user's email address or username." - type: string - password: - description: "The user's password." - type: string - format: password - deviceId: - description: 'Optional device identifier. When provided, the generated API key is associated with this device.' + expectedColumnKey: + description: 'Expected column key' + oneOf: + - + type: string + - + type: 'null' + columnName: + description: 'Column name' type: string type: object - EmployeeDependent: - title: 'Employee Dependent' - required: - - employeeId + BudgetGuidelinesView: + description: 'Budget guidelines for compensation planning budgets' properties: - employeeId: - description: 'The ID of the employee this dependent belongs to. Required.' - type: string - firstName: - description: "The dependent's first name." - type: string - middleName: - description: "The dependent's middle name." - type: string - lastName: - description: "The dependent's last name." + useGuidelines: + description: 'Whether to use budget guidelines' + type: boolean + softMinimum: + description: 'Soft minimum budget guideline' + oneOf: + - + type: number + - + type: 'null' + softMaximum: + description: 'Soft maximum budget guideline' + oneOf: + - + type: number + - + type: 'null' + guidelinesWarningErrors: + oneOf: + - + $ref: '#/components/schemas/BudgetGuidelinesWarnings' + description: 'Budget guidelines warning errors' + - + type: 'null' + description: 'Budget guidelines warning errors' + requireComments: + description: 'Whether a comment is required for recommendations outside of guidelines' + type: boolean + type: object + BudgetGuidelinesWarnings: + description: 'Warning messages for saved budget guidelines' + properties: + softMinimumWarningMessage: + description: 'Soft minimum warning message' + oneOf: + - + type: string + - + type: 'null' + softMaximumWarningMessage: + description: 'Soft maximum warning message' + oneOf: + - + type: string + - + type: 'null' + type: object + CompensationToolsDataObject: + description: 'Schema for the compensation tools list.' + properties: + levelsAndBands: + description: 'Has access to Levels & Bands tool' + type: boolean + compensationBenchmarking: + description: 'Has access to Compensation Benchmarking tool' + type: boolean + compensationPlanning: + description: 'Has access to Compensation Planning tool' + type: boolean + totalRewards: + description: 'Has access to Total Rewards tool' + type: boolean + type: object + CompensationUpsellData: + description: 'Schema for the compensation upsell data.' + properties: + accountOwnerName: + description: 'Account owner name' type: string - relationship: - description: 'The dependent''s relationship to the employee (e.g. "spouse", "child", "domestic_partner").' + canRequestDemo: + description: 'Whether user can request a demo' + type: boolean + userPermissions: + $ref: '#/components/schemas/UserPermissionData' + description: 'User permissions' + type: object + ConversionRateDataObject: + title: ConversionRateDataObject + description: 'Represents a currency conversion rate from a source to a target currency.' + properties: + currencyName: + description: 'The full name of the target currency.' type: string - gender: - description: "The dependent's gender." + currencyCode: + description: 'The code of the target currency (e.g. USD, EUR, JPY).' type: string - ssn: - description: 'The dependent''s Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. "xxx-xx-1234") on read.' + conversionRate: + description: 'The numeric conversion rate to the target currency.' + type: number + format: float + type: object + DetailsAndCurrencyRequestDataObject: + title: DetailsAndCurrencyRequestDataObject + description: 'Request data for updating compensation planning cycle details and currency settings. Pre-condition: User must have permission to update cycle. Post-condition: Cycle configuration is updated.' + properties: + id: + description: 'ID of the cycle to update' type: string - sin: - description: "The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read." + cycleName: + description: 'Name of the cycle to update' type: string - dateOfBirth: - description: "The dependent's date of birth in YYYY-MM-DD format." + cycleCurrency: + description: 'Currency code for the cycle' + oneOf: + - + type: string + - + type: 'null' + cycleWindowStartYmd: + description: 'Start date of the cycle window' type: string format: date - addressLine1: - description: "The first line of the dependent's address." - type: string - addressLine2: - description: "The second line of the dependent's address." - type: string - city: - description: "The dependent's city." - type: string - state: - description: 'The dependent''s state, provided as a state code (e.g. "UT"). Returned as a full state name on read.' - type: string - zipCode: - description: "The dependent's ZIP or postal code." - type: string - homePhone: - description: "The dependent's home phone number." - type: string - country: - description: 'The dependent''s country, provided as an ISO 3166-1 alpha-2 country code (e.g. "US"). Returned as a full country name on read.' + cycleWindowEndYmd: + description: 'End date of the cycle window' type: string - isUsCitizen: - description: 'Whether the dependent is a US citizen. Accepted values: "yes" or "no".' - type: string - enum: - - 'yes' - - 'no' - isStudent: - description: 'Whether the dependent is currently a student. Accepted values: "yes" or "no".' - type: string - enum: - - 'yes' - - 'no' - type: object - EmployeeDependentsResponse: - title: 'Employee Dependents Response' - properties: - 'Employee Dependents': - description: 'Array of employee dependent objects.' - type: array - items: - properties: - id: - description: 'The unique ID of the dependent record.' - type: string - employeeId: - description: 'The ID of the employee this dependent belongs to.' - type: string - firstName: - description: "The dependent's first name." - type: string - middleName: - description: "The dependent's middle name. Null if not set." - type: - - string - - 'null' - lastName: - description: "The dependent's last name." - type: string - relationship: - description: "The dependent's relationship to the employee." - type: string - gender: - description: "The dependent's gender." - type: string - maskedSSN: - description: 'The dependent''s masked SSN (e.g. "xxx-xx-1234"). Null if no SSN on file.' - type: - - string - - 'null' - maskedSIN: - description: "The dependent's masked SIN. Null if no SIN on file." - type: - - string - - 'null' - dateOfBirth: - description: "The dependent's date of birth in YYYY-MM-DD format." - type: string - format: date - addressLine1: - description: "The first line of the dependent's address. Null if not set." - type: - - string - - 'null' - addressLine2: - description: "The second line of the dependent's address. Null if not set." - type: - - string - - 'null' - city: - description: "The dependent's city. Null if not set." - type: - - string - - 'null' - state: - description: 'The dependent''s state as a full name (e.g. "Utah"). Null if not set.' - type: - - string - - 'null' - zipCode: - description: "The dependent's ZIP or postal code. Null if not set." - type: - - string - - 'null' - homePhone: - description: "The dependent's home phone number. Null if not set." - type: - - string - - 'null' - country: - description: 'The dependent''s country as a full name (e.g. "United States"). Null if not set.' - type: - - string - - 'null' - isUsCitizen: - description: 'Whether the dependent is a US citizen. "yes" or "no". Null if not set.' - type: - - string - - 'null' - enum: - - 'yes' - - 'no' - isStudent: - description: 'Whether the dependent is currently a student. "yes" or "no". Null if not set.' - type: - - string - - 'null' - enum: - - 'yes' - - 'no' - type: object - type: object - CompanyBenefitSummary: - title: 'Company Benefit Summary' - description: 'A summary representation of a company benefit plan as returned by the list endpoint.' - properties: - id: - description: 'The unique identifier of the company benefit plan.' + format: date + recommendationsDueYmd: + description: 'Date when recommendations are due' type: string - name: - description: 'The name of the company benefit plan.' + format: date + approvalsDueYmd: + description: 'Date when approvals are due' type: string - type: - description: 'The benefit category type.' + format: date + cycleEffectiveDate: + description: 'Effective date of the cycle' type: string - enum: - - health - - dental - - vision - - retirement - - hsa - - flex - - life - - disability - - reimbursement - - supplemental - - other - benefitVendorId: - description: 'The ID of the benefit vendor associated with this plan, or null if none.' - type: - - string - - 'null' - deductionTypeId: - description: 'The deduction type ID for this plan, or null if not applicable.' - type: - - string - - 'null' - companyDeductionId: - description: 'The company-level deduction record ID linked to this plan, or null if not set.' - type: - - string - - 'null' - startDate: - description: 'The date the benefit plan becomes effective (YYYY-MM-DD), or null if not set.' - type: - - string - - 'null' format: date - endDate: - description: 'The date the benefit plan ends (YYYY-MM-DD), or null if ongoing.' - type: - - string - - 'null' + salaryIncluded: + description: 'Whether salary is included in this cycle' + type: boolean + bonusIncluded: + description: 'Whether bonus is included in this cycle' + type: boolean + equityIncluded: + description: 'Whether equity is included in this cycle' + type: boolean + cycleCurrencyConversionRates: + description: 'Currency conversion rates' + type: array + items: + $ref: '#/components/schemas/ConversionRateDataObject' + paycheckDateYmd: + description: 'Date of first paycheck with new compensation updates' + type: string format: date - allowsCatchUp: - description: 'Whether the plan allows catch-up contributions (e.g., for HSA plans for employees 55+), or null if not applicable to this plan type.' - type: - - boolean - - 'null' - allowsSuperCatchUp: - description: 'Whether the plan allows super catch-up contributions, or null if not applicable to this plan type.' - type: - - boolean - - 'null' type: object - EmployeeBenefitFilters: - title: 'Employee Benefit Filters' + UserPermissionData: + description: 'Schema for the compensation upsell data.' + properties: + isAdmin: + description: 'Whether user is an admin' + type: boolean + isBillingContact: + description: 'Whether user is a billing contact' + type: boolean + isOwner: + description: 'Whether user is the owner' + type: boolean + isSupportAdmin: + description: 'Whether user is a support admin' + type: boolean + type: object + Employee-StringCodeErrorResponse-V1: + description: 'Error response returned by Employee API endpoints where `error.code` is a string identifier.' required: - - filters + - error properties: - filters: - description: 'Scope filters for the request. At least one of employeeId, companyBenefitId, or enrollmentStatusEffectiveDate must be provided; omitting all three returns a 400 validation error.' + error: + required: + - code + - message properties: - employeeId: - description: 'Return benefit enrollments for a specific employee identified by their numeric ID.' - type: integer - companyBenefitId: - description: 'Return benefit enrollments for a specific company benefit plan identified by its numeric ID.' + code: + description: 'String error code identifier (for example `BadRequest` or `BadPage`).' + type: string + example: BadRequest + message: + description: 'Human-readable error message.' + type: string + example: 'Invalid request parameters.' + type: object + type: object + EmployeeCursorPaginationQueryObject: + type: object + allOf: + - + $ref: '#/components/schemas/CursorPaginationQueryObject' + - + properties: + before: + description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' + type: string + after: + description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' + type: string + limit: + description: 'Maximum number of items to return. This can be at most 2500.' type: integer - enrollmentStatusEffectiveDate: - description: 'Return benefit enrollments whose enrollment status became effective on this date. Must be in YYYY-MM-DD format.' + default: 250 + maximum: 2500 + minimum: 1 + type: object + GetEmployeeResponse: + description: "Employee data returned by the Get Employee endpoint.\n\tThe `id` field is always present; all other named properties are included only when explicitly requested via the `fields` query parameter.\n\tAdditional custom or company-configured fields may also appear." + required: + - id + properties: + id: + description: 'Unique identifier for the employee' + type: string + firstName: + description: "Employee's first name" + oneOf: + - + type: string + - + type: 'null' + lastName: + description: "Employee's last name" + oneOf: + - + type: string + - + type: 'null' + preferredName: + description: "Employee's preferred name" + oneOf: + - + type: string + - + type: 'null' + middleName: + description: "Employee's middle name" + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: "URL to the employee's profile photo" + oneOf: + - + type: string + - + type: 'null' + jobTitleName: + description: "Employee's current job title" + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: "Employee's job title ID" + oneOf: + - + type: string + - + type: 'null' + status: + description: "Employee's current status" + oneOf: + - + type: string + enum: + - Active + - Inactive + - + type: 'null' + workEmail: + description: "Employee's work email address" + oneOf: + - + type: string + - + type: 'null' + homeEmail: + description: "Employee's home email address" + oneOf: + - + type: string + - + type: 'null' + bestEmail: + description: "Employee's best email address" + oneOf: + - + type: string + - + type: 'null' + workPhone: + description: "Employee's work phone number" + oneOf: + - + type: string + - + type: 'null' + workPhoneExtension: + description: "Employee's work phone extension" + oneOf: + - + type: string + - + type: 'null' + mobilePhone: + description: "Employee's mobile phone number" + oneOf: + - + type: string + - + type: 'null' + homePhone: + description: "Employee's home phone number" + oneOf: + - + type: string + - + type: 'null' + skypeUsername: + description: "Employee's Skype username" + oneOf: + - + type: string + - + type: 'null' + linkedinUrl: + description: "Employee's LinkedIn profile URL" + oneOf: + - + type: string + - + type: 'null' + facebookUrl: + description: "Employee's Facebook profile URL" + oneOf: + - + type: string + - + type: 'null' + instagramUrl: + description: "Employee's Instagram profile URL" + oneOf: + - + type: string + - + type: 'null' + twitterUrl: + description: "Employee's Twitter/X profile URL" + oneOf: + - + type: string + - + type: 'null' + pinterestUrl: + description: "Employee's Pinterest profile URL" + oneOf: + - + type: string + - + type: 'null' + birthDate: + description: "Employee's birth date" + oneOf: + - + type: string + - + type: 'null' + hireDate: + description: "Employee's hire date" + oneOf: + - + type: string + - + type: 'null' + originalHireDate: + description: "Employee's original hire date" + oneOf: + - + type: string + - + type: 'null' + terminationDate: + description: "Employee's termination date" + oneOf: + - + type: string + - + type: 'null' + address1: + description: "Employee's street address" + oneOf: + - type: string - format: date - type: object - anyOf: - - required: - - employeeId + type: 'null' + city: + description: "Employee's city" + oneOf: - - required: - - companyBenefitId + type: string - - required: - - enrollmentStatusEffectiveDate - type: object - MemberBenefitEvent: - title: 'Member Benefit Event' - description: 'A single member (employee or dependent) and their benefit coverage events across all enrolled plans.' - properties: - memberId: - description: "The unique identifier of the member. Format: 'employee.{id}' for employees, 'dependent.{id}' for dependents." - type: string - coverages: - description: 'The benefit plan coverages for this member, one entry per plan.' - type: array - items: - properties: - planId: - description: 'The ID of the benefit plan.' - type: string - events: - description: "Chronological list of benefit events for this member and plan, covering the past year. Event type 'enrollment' includes premiumTierId and monthlyPremiumInCents; 'eligibility' and 'loss' events include only effectiveDate and type." - type: array - items: - properties: { effectiveDate: { description: 'The date this event takes effect (YYYY-MM-DD).', type: string, format: date }, type: { description: 'The type of benefit event.', type: string, enum: [eligibility, enrollment, loss] }, premiumTierId: { description: "The premium tier ID for enrollment events. Only present on events with type 'enrollment'.", type: [string, 'null'] }, monthlyPremiumInCents: { description: "The monthly premium amount in cents for enrollment events. Only present on events with type 'enrollment'.", type: [number, 'null'] } } - type: object - type: object - type: object - TimeTrackingRecord: - title: 'Time Tracking Record' - required: - - dateHoursWorked - - employeeId - - hoursWorked - - rateType - - timeTrackingId - properties: - timeTrackingId: - description: 'A unique identifier for the record. Use this ID to adjust or delete these hours. It can be any ID you use to track the record up to 36 characters in length. (i.e. UUID).' - type: string - employeeId: - description: 'The ID of the employee.' - type: integer - divisionId: - description: '[Optional] The ID of the division for the employee.' - type: integer - departmentId: - description: '[Optional] The ID of the department for the employee.' - type: integer - jobTitleId: - description: '[Optional] The ID of the job title for the employee.' - type: integer - payCode: - description: '[Optional] Only necessary if the payroll provider requires a pay code' - type: string - dateHoursWorked: - description: 'The date the hours were worked. Please use the ISO-8601 date format YYYY-MM-DD.' - type: string - payRate: - description: '[Optional] The rate of pay. e.g. $15.00/hour should use 15.00 here. Only necessary if the payroll provider requires a pay rate.' - type: number - rateType: - description: 'The type of hours - regular or overtime. Please use either "REG", "OT", or "DT" here.' - type: string - hoursWorked: - description: 'The number of hours worked.' - type: number - jobCode: - description: '[Optional] A job code.' - type: integer - jobData: - description: '[Optional] A list of up to four 20 characters max job numbers in comma delimited format with no spaces.' - type: string - type: object - TimeTrackingRecordBulk: - title: 'Time Tracking Record Bulk' - type: array - items: - $ref: '#/components/schemas/TimeTrackingRecord' - TimeTrackingTask: - title: 'Time Tracking Task' - properties: - id: - description: 'ID of the task.' - type: integer - name: - description: 'Name of the task.' - type: string - type: object - TimeTrackingProjectWithTasksAndEmployeeIds: - title: 'Time tracking project with tasks and list of employee IDs.' - properties: - id: - description: 'ID of the project.' - type: integer - name: - description: 'Name of the project.' - type: string - tasks: - description: 'A list of time tracking tasks for the project.' - type: array - items: - $ref: '#/components/schemas/TimeTrackingTask' - employeeIds: - description: 'A list of employee IDs that can log time for this project. If not present, all employees can log time for the project.' - type: array - items: - type: integer - type: object - UpdateGoalV1: - title: 'Update Employee Goal (v1)' - required: - - dueDate - - sharedWithEmployeeIds - - title - properties: - title: - description: '[Required] The goal title.' - type: string - description: - description: '[Optional] The goal description. If omitted, the existing value will be overwritten with an empty string.' - type: string - percentComplete: - description: '[Optional] The goal completion percentage (0-100). If omitted, the existing value will be overwritten with 0.' - type: integer - alignsWithOptionId: - description: '[Optional] The option ID that aligns with this goal. If omitted, the existing value will be overwritten with null.' - type: - - string - - 'null' - sharedWithEmployeeIds: - description: '[Required] Employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with". This must include the employee for whom the goal is created.' - type: array - items: - type: integer - dueDate: - description: '[Required] The goal due date in YYYY-MM-DD format.' - type: string - format: date - completionDate: - description: '[Optional] The date the goal was completed, in YYYY-MM-DD format. Required when percentComplete is 100. If omitted, the existing value will be overwritten with null.' - type: - - string - - 'null' - format: date - type: object - Location: - properties: - id: - description: 'The ID of the location' - type: integer - name: - description: 'Name of the location' - type: string - description: - description: 'Description of the location' - type: string - city: - description: 'City of the location' - type: string + type: 'null' state: - $ref: '#/components/schemas/State' + description: "Employee's state or province" + oneOf: + - + type: string + - + type: 'null' country: - $ref: '#/components/schemas/Country' - zipcode: - description: 'The ZIP or postal code of the location' - type: string - addressLine1: - description: 'The first address line of the location' - type: string - addressLine2: - description: 'The second address line of the location' - type: string - phone: - description: 'The phone number of the location' - type: string - type: object - State: - properties: - id: - description: 'The ID of the state' - type: integer - name: - description: 'The name of the state' - type: string - abbrev: - description: 'The abbreviation of the state' - type: string - iso_code: - description: 'The ISO standard code of the state' - type: string - type: object - Country: - properties: - id: - description: 'The ID of the country' - type: integer - name: - description: 'The name of the country' - type: string - iso_code: - description: 'The ISO standard code of the country' - type: string - type: object - TrainingType: - properties: - id: - description: 'The ID of the training' - type: integer - name: - description: 'Name of the training type.' - type: string - renewable: - description: 'If true, training will be renewed based off of frequency.' - type: boolean - frequency: - description: 'The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.' - type: integer - dueFromHireDate: - description: 'Number of days before the training is due for new hires. Not valid if training is not required.' - type: integer - required: - description: 'Whether this is a required training. Null when not set.' - type: - - boolean - - 'null' - category: - description: 'The training category when set, or an empty array when no category is assigned.' + description: "Employee's country" + oneOf: + - + type: string + - + type: 'null' + gender: + description: "Employee's gender" + oneOf: + - + type: string + - + type: 'null' + marital: + description: "Employee's marital status" + oneOf: + - + type: string + - + type: 'null' + payRate: + description: "Employee's pay rate" oneOf: - - $ref: '#/components/schemas/TrainingCategory' + type: string - - description: 'Empty array when no category is set' - type: array - items: { } - maxItems: 0 - linkUrl: - description: 'Optional URL that can be included with a training. Null when not set.' - type: - - string - - 'null' - description: - description: 'Description for the training. Null when not set.' - type: - - string - - 'null' - allowEmployeesToMarkComplete: - description: 'Allows all employees who can view the training to be able to mark it complete.' - type: boolean - type: object - TrainingCategory: - description: 'The category ID and name' - properties: - id: - description: 'The ID of the training category.' - type: integer - name: - description: 'The name of the training category.' - type: string - type: object - TrainingRecord: - properties: - id: - description: 'The ID of the training record.' - type: integer - employeeId: - description: 'The ID of the employee associated with the training, returned as a string.' - type: string - completed: - description: 'Completed is a date in the format yyyy-mm-dd.' - type: string - format: date - notes: - description: 'Notes left on the training record. Null when not set.' - type: - - string - - 'null' - instructor: - description: 'Name of the instructor. Null when not set or when disabled by company training settings.' - type: - - string - - 'null' - credits: - description: 'Credits earned for the training record, returned as a string. Null when not set or when disabled by company training settings.' - type: - - string - - 'null' - hours: - description: 'Hours associated with the training record, returned as a string. Null when not set or when disabled by company training settings.' - type: - - string - - 'null' - cost: - description: "The cost in the format '{amount} {currency}', e.g. '50.00 USD'. May be null or empty string when not set." - type: - - string - - 'null' - type: - description: 'The training type ID. Returned as a string on update/list responses, and as an integer on create responses.' + type: 'null' + payType: + description: "Employee's pay type" oneOf: - - description: 'String form' type: string - - description: 'Integer form' - type: integer + type: 'null' + payPeriod: + description: "Employee's pay period" + oneOf: + - + type: string + - + type: 'null' + exempt: + description: 'Whether the employee is FLSA exempt' + oneOf: + - + type: string + - + type: 'null' + canUploadPhoto: + description: 'Whether the requesting user can upload a photo for this employee' + oneOf: + - + type: boolean + - + type: 'null' + division: + description: "Employee's division name" + oneOf: + - + type: string + - + type: 'null' + divisionId: + description: "Employee's division ID" + oneOf: + - + type: string + - + type: 'null' + department: + description: "Employee's department name" + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: "Employee's department ID" + oneOf: + - + type: string + - + type: 'null' + location: + description: "Employee's location name" + oneOf: + - + type: string + - + type: 'null' + locationId: + description: "Employee's location ID" + oneOf: + - + type: string + - + type: 'null' + employmentStatus: + description: "Employee's current employment status name" + oneOf: + - + type: string + - + type: 'null' + employmentStatusId: + description: "Employee's current employment status ID" + oneOf: + - + type: string + - + type: 'null' + reportsToName: + description: "Name of the employee's manager" + oneOf: + - + type: string + - + type: 'null' + reportsToId: + description: "Employee ID of the employee's manager" + oneOf: + - + type: string + - + type: 'null' type: object - WebhookEventType: - title: 'Webhook Event Type' - description: 'The type of event that triggers a webhook. Cannot mix employee_with_fields events with employee events. This list will be expanded in the future.' - type: string - enum: - - employee_with_fields.updated - - employee_with_fields.created - - employee_with_fields.deleted - - company-integrations.updated - - employee.created - - employee.updated - - employee.deleted - - company.updated - - company.deleted - NewWebHook: - title: 'Add Webhook' + additionalProperties: true + GetEmployeesEmployeeBaseResponse: + description: 'Base employee fields that are always included in the response.' required: - - name - - url - - format + - employeeId + - firstName + - lastName + - preferredName + - photoUrl + - jobTitleName + - status + - _restrictedFields properties: - name: - description: 'The name of the webhook.' - type: string - example: 'My new webhook' - monitorFields: - description: 'A list of fields to monitor. At least one field is required to be monitored if events is empty or contains employee_with_fields.updated or employee.updated.' - type: array - items: - type: string - example: - - firstName - - lastName - postFields: - description: 'An object map of field ID or alias to the external name used in the webhook payload (e.g. `{"firstName": "First Name"}`). Omit or send an empty object to include no extra fields.' - type: object - default: { } - example: - firstName: Name - lastName: Surname - dateOfBirth: DOB - url: - description: 'The url the webhook should send data to (must begin with https://).' - type: string - format: - description: 'The payload format the webhook uses. Required.' + employeeId: + description: 'Unique identifier for the employee' type: string - enum: - - json - - form-encoded - example: json - includeCompanyDomain: - description: 'If set to true, the company domain will be added to the webhook request header.' - type: boolean - example: false - events: - description: "Events that trigger this webhook. Defaults to ['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created'] if not specified. Cannot mix employee_with_fields events with employee events." + firstName: + description: "Employee's first name" + oneOf: + - + type: string + - + type: 'null' + lastName: + description: "Employee's last name" + oneOf: + - + type: string + - + type: 'null' + preferredName: + description: "Employee's preferred name" + oneOf: + - + type: string + - + type: 'null' + photoUrl: + description: "URL to employee's profile photo" + oneOf: + - + type: string + - + type: 'null' + jobTitleName: + description: "Employee's current job title" + oneOf: + - + type: string + - + type: 'null' + status: + description: "Employee's current status (Active or Inactive)." + oneOf: + - + type: string + - + type: 'null' + _restrictedFields: + description: 'Array of field names that are restricted due to permission checks' type: array items: - $ref: '#/components/schemas/WebhookEventType' - example: - - employee.created - - employee.updated - - employee.deleted + type: string type: object - WebHookResponse: - title: 'Webhook Response' - properties: - id: - description: 'The ID of the webhook.' - type: string - example: '4' - name: - description: 'The name of the webhook.' - type: string - example: 'Example Webhook' - created: - description: 'Datetime when the webhook was created (UTC, format: YYYY-MM-DD HH:MM:SS).' - type: string - example: '2021-09-20 22:38:01' - lastSent: - description: 'Datetime when the webhook was last fired (UTC, format: YYYY-MM-DD HH:MM:SS). Null if the webhook has never fired.' - type: - - string - - 'null' - example: '2021-09-20 22:38:01' - monitorFields: - description: 'A list of fields being monitored. Null when the webhook is not configured to monitor fields (e.g. event-only webhooks).' - example: - - firstName - - lastName - oneOf: - - + GetEmployeesEmployeeResponse: + description: 'Employee data response object containing basic employee information and optionally requested fields. When the `fields` parameter is provided, additional requested fields will be included. Field values are subject to permission checks — restricted fields are returned as `null` and their names are listed in `_restrictedFields`.' + type: object + allOf: + - + $ref: '#/components/schemas/GetEmployeesEmployeeBaseResponse' + - + properties: + addressLine1: + description: "Employee's address line 1. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + addressLine2: + description: "Employee's address line 2. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + age: + description: "Employee's age. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + allergies: + description: "Employee's allergies. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + bestEmail: + description: "Employee's best email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + birthDate: + description: "Employee's birth date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + birthplace: + description: "Employee's birthplace. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + citizenship: + description: "Employee's citizenship. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + citizenshipId: + description: "Employee's citizenship ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + city: + description: "Employee's city. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationChangeReason: + description: "Employee's compensation change reason. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationChangeReasonId: + description: "Employee's compensation change reason ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationComment: + description: "Employee's compensation comment. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationEffectiveDate: + description: "Employee's compensation effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + compensationEndDate: + description: "Employee's compensation end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + contractEndDate: + description: "Employee's contract end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + country: + description: "Employee's country. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + countryId: + description: "Employee's country ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + departmentId: + description: "Employee's department ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + departmentName: + description: "Employee's department name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + dietaryRestrictions: + description: "Employee's dietary restrictions. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + displayName: + description: "Employee's name displayed in the company configured format. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + divisionId: + description: "Employee's division ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + divisionName: + description: "Employee's division name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eeoJobCategory: + description: "Employee's EEO job category. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eeoJobCategoryId: + description: "Employee's EEO job category ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ein: + description: "Employee's EIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eligibleForRehire: + description: "Employee's eligible-for-rehire flag. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + eligibleForRehireId: + description: "Employee's eligible-for-rehire ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employeeName: + description: "Employee's name (last, first). Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employeeNumber: + description: "Employee's employee number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusComment: + description: "Employee's employment status comment. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusEffectiveDate: + description: "Employee's employment status effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusId: + description: "Employee's employment status id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentStatusName: + description: "Employee's employment status name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentType: + description: "Employee's employment type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + employmentTypeId: + description: "Employee's employment type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ethnicity: + description: "Employee's ethnicity. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ethnicityId: + description: "Employee's ethnicity ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + facebookUrl: + description: "Employee's Facebook profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + finalDoseAdministrationDate: + description: "Employee's final COVID dose administration date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + finalPayDate: + description: "Employee's final pay date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + firstNameLastName: + description: "Employee's first and last name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + firstNameMiddleInitial: + description: "Employee's first name and middle initial. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + flsaCode: + description: "Employee's FLSA code. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + flsaCodeId: + description: "Employee's FLSA code ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + gender: + description: "Employee's gender. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + genderIdentity: + description: "Employee's gender identity. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + genderIdentityId: + description: "Employee's gender identity ID. Only included when requested via the `fields` parameter." type: array items: - type: string - - - type: 'null' - postFields: - description: 'A map of field ID or alias to the external name used in the webhook payload.' - type: object - example: - firstName: Name - lastName: Surname - dateOfBirth: DOB - url: - description: 'The URL the webhook sends data to.' - type: string - example: 'https://www.example.com' - format: - description: 'The payload format used by the webhook.' - type: string - enum: - - json - - form-encoded - example: json - includeCompanyDomain: - description: 'Whether the company domain is added to the webhook request header.' - type: boolean - example: false - events: - description: 'Events that trigger this webhook.' - type: array - items: - $ref: '#/components/schemas/WebhookEventType' - example: - - employee_with_fields.created - - employee_with_fields.updated - errors: - description: 'Field-level permission errors associated with the webhook configuration, when present.' - type: array - items: - $ref: '#/components/schemas/WebhookSubErrorProperty' - example: - - - error: 'Permission denied to the following fields' - postFields: + type: integer + hireDate: + description: "Employee's hire date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + homeEmail: + description: "Employee's home email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + homePhone: + description: "Employee's home phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + hoursPerPayCycle: + description: "Employee's hours per pay cycle. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + instagramUrl: + description: "Employee's Instagram profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + isManager: + description: 'Whether the employee is a manager. Only included when requested via the `fields` parameter.' + oneOf: + - + type: boolean + - + type: 'null' + jacketSize: + description: "Employee's jacket size. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jacketSizeId: + description: "Employee's jacket size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jobInformationEffectiveDate: + description: "Employee's job information effective date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + jobTitleId: + description: "Employee's job title id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + linkedinUrl: + description: "Employee's LinkedIn profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + locationId: + description: "Employee's location ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + locationName: + description: "Employee's location name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + maritalStatus: + description: "Employee's marital status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + middleInitial: + description: "Employee's middle initial. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + middleName: + description: "Employee's middle name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + mobilePhone: + description: "Employee's mobile phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalId: + description: "Employee's national ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalInsuranceCategory: + description: "Employee's national insurance category. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalInsuranceCategoryId: + description: "Employee's national insurance category ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationality: + description: "Employee's nationality. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nationalityId: + description: "Employee's nationality ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nickName: + description: "Employee's preferred name. If preferred name is not set then employee's first name is returned. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + nin: + description: "Employee's NIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + noticePeriod: + description: "Employee's notice period. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + noticePeriodId: + description: "Employee's notice period ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + originalHireDate: + description: "Employee's original hire date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + overtime: + description: "Employee's overtime status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + overtimeRate: + description: "Employee's overtime rate. Only included when requested via the `fields` parameter." + properties: + amount: + type: string + currency: + type: string + type: object + paidPer: + description: 'How the employee is paid (e.g., hour, year). Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + payRate: + description: "Employee's pay rate. Only included when requested via the `fields` parameter." + properties: + amount: + type: string + currency: + type: string + type: object + paySchedule: + description: "Employee's pay schedule. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + payScheduleId: + description: "Employee's pay schedule ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + payType: + description: "Employee's pay type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pinterestUrl: + description: "Employee's Pinterest profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + preferredNameLastName: + description: "Employee's preferred name and last name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + probationEndDate: + description: "Employee's probation end date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pronouns: + description: "Employee's pronouns. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + pronounsId: + description: "Employee's pronouns ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + proofOfVaccination: + description: 'Whether proof of vaccination has been provided. Only included when requested via the `fields` parameter.' + oneOf: + - + type: boolean + - + type: 'null' + reportsToId: + description: "Employee's manager's employee id. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + reportsToName: + description: "Employee's manager's name. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + secondaryLanguage: + description: "Employee's secondary language. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + shirtSize: + description: "Employee's shirt size. Only included when requested via the `fields` parameter." + oneOf: - - id: 2 - name: lastName - type: object - WebhookBadRequest: - properties: - errors: - type: array - items: - properties: - error: - type: string - issues: - type: array - items: type: string - type: object - type: object - example: - errors: - - - error: 'Invalid request body' - issues: - - 'problem one' - - 'problem two' - - … - WebhookError: - title: 'Webhook Standard error' - properties: - errors: - oneOf: - - - $ref: '#/components/schemas/WebhookSubErrorProperty' - - - type: array - items: - $ref: '#/components/schemas/WebhookSubErrorProperty' - type: object - example: - errors: - - - error: 'You do not have access to webhook ID: 5' - - - error: 'No webhook was found with ID: 7.' - - - error: 'Sorry for the inconvenience, please try again later or contact BambooHR' - additionalProperties: false - WebhookSubErrorProperty: - properties: - error: - type: string - unknownFields: - type: array - items: - properties: - id: - oneOf: - - { type: integer } - - { type: string } - - { type: 'null' } - name: - type: string - type: object - monitorFields: - type: array - items: - properties: - id: - oneOf: - - { type: integer } - - { type: string } - name: - type: string - type: object - duplicatePostString: - type: array - items: - type: string - postFields: - type: array - items: - properties: - id: - oneOf: - - { type: integer } - - { type: string } - name: - type: string - type: object - type: object - additionalProperties: false - DataRequest: - title: 'Data Request' - required: - - fields - properties: - fields: - description: 'Field names to include in each returned record. Use "Get Fields from Dataset" to discover available names.' - type: array - items: - type: string - example: - - lastNameFirstName - - firstName - - employeeNumber - - hireDate - - ssn - aggregations: - description: 'Aggregation configuration. Set `defaultAggregation` to apply one aggregation type to every requested field, or use `overridingAggregations` to target specific fields. Both may be combined.' - properties: - defaultAggregation: - description: 'Aggregation type applied to all requested fields when set. Pass null to skip the default.' - type: - - string - - 'null' - enum: - - count - - sum - - avg - - min - - max - example: count - overridingAggregations: - description: 'Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type.' + - + type: 'null' + shirtSizeId: + description: "Employee's shirt size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + sin: + description: "Employee's SIN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + skypeUsername: + description: "Employee's Skype username. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + ssn: + description: "Employee's SSN. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + state: + description: "Employee's state. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + stateId: + description: "Employee's state ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + taxTypeId: + description: "Employee's tax type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + teams: + description: "Employee's teams. Only included when requested via the `fields` parameter." type: array items: + properties: + id: { type: integer } + label: { type: string } type: object - additionalProperties: + tenure: + description: "Employee's tenure. Only included when requested via the `fields` parameter." + oneOf: + - type: string - example: - - hireDate: count - type: object - sortBy: - description: 'Ordered list of sort rules. Priority follows array order.' - type: array - items: - properties: - field: - description: 'Field name to sort by.' - type: string - sort: - description: 'Sort direction.' - type: string - enum: - - asc - - desc - type: object - example: - field: firstName - sort: asc - filters: - description: 'Filter configuration. Combine multiple conditions with a `match` strategy.' - properties: - match: - description: 'Logical operator for combining filters: `all` (AND) or `any` (OR).' - type: string - enum: - - all - - any - filters: - description: 'Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array.' + type: 'null' + terminationDate: + description: "Employee's termination date. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationReason: + description: "Employee's termination reason. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationReasonId: + description: "Employee's termination reason ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationRegrettable: + description: 'Whether the termination was regrettable. Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + terminationRegrettableId: + description: 'Termination regrettable ID. Only included when requested via the `fields` parameter.' + oneOf: + - + type: string + - + type: 'null' + terminationType: + description: "Employee's termination type. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + terminationTypeId: + description: "Employee's termination type ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + tShirtSize: + description: "Employee's t-shirt size. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + tShirtSizeId: + description: "Employee's t-shirt size ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + twitterUrl: + description: "Employee's Twitter/X profile URL. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + userId: + description: "Employee's user ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccinationStatus: + description: "Employee's COVID vaccination status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccinationStatusId: + description: "Employee's COVID vaccination status ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccineReceived: + description: "Employee's COVID vaccine received. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + vaccineReceivedId: + description: "Employee's COVID vaccine received ID. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + veteranStatus: + description: "Employee's veteran status. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + veteranStatusId: + description: "Employee's veteran status ID. Only included when requested via the `fields` parameter." type: array items: - properties: - field: { description: 'Field name to filter on.', type: string } - operator: { description: 'Comparison operator. Available operators depend on field type (see endpoint description).', type: string, enum: [contains, does_not_contain, equal, not_equal, empty, not_empty, lt, lte, gt, gte, last, next, range, checked, not_checked, includes, does_not_include] } - value: { description: 'Filter value. For `includes`/`does_not_include` operators, pass the value as an array enclosed in square brackets, for example `["Full-Time", "Part-Time"]`.' } - type: object + type: integer + workEmail: + description: "Employee's work email address. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + workPhone: + description: "Employee's work phone number. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + workPhoneExtension: + description: "Employee's work phone extension. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' + zipcode: + description: "Employee's zip code. Only included when requested via the `fields` parameter." + oneOf: + - + type: string + - + type: 'null' type: object - example: - match: all - filters: - - - field: firstName - operator: equal - value: Pudgy - groupBy: - description: 'Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array.' - type: array - items: - type: string - example: - - hireDate - showHistory: - description: 'Entity names of historical table fields whose history rows should be included. Entity names are returned by "Get Fields from Dataset".' - type: array - items: - type: string - example: - - education - type: object - DatasetEmployee: - type: object - example: - lastNameFirstName: 'Panda, Pudgy' - firstName: Pudgy - employeeNumber: '123' - middleName: 'null' - ssn: 123-45-6478 - Pagination: + GetEmployeesEmployeeResponseCollection: + description: 'Typed collection of employee response objects' + type: array + items: + $ref: '#/components/schemas/GetEmployeesEmployeeResponse' + GetEmployeesFilterRequestObject: + description: "Filter criteria for the employee list endpoint, supplied as `filter[fieldName]=value` query parameters. All filter fields are optional, and multiple fields are combined with AND logic.\n\nThree matching strategies are used depending on the field:\n\n- **Substring** (case-insensitive `LIKE`) — applied to free-text fields such as names, addresses, social URLs, and free-form labels.\n- **Equality** — applied to IDs (integer), enumerated string values, booleans (`true`/`false`), numeric values, and ISO 8601 dates (`YYYY-MM-DD`).\n- **Special** — `ids` accepts a list of employee IDs (`filter[ids][]=123&filter[ids][]=124` or `filter[ids]=123,124`).\n\nFiltering is **not supported** for the following fields and will return a 422: `bestEmail`, `ein`, `genderIdentity`, `genderIdentityId`, `nationalId`, `nin`, `overtime`, `overtimeRate`, `payRate`, `sin`, `ssn`, `teams`, `userId`, `veteranStatus`, `veteranStatusId`. Any unrecognized filter key will also return a 422." + required: [] properties: - total_records: + addressLine1: + description: 'Substring match (case-insensitive).' + type: string + addressLine2: + description: 'Substring match (case-insensitive).' + type: string + allergies: + description: 'Substring match (case-insensitive).' + type: string + birthplace: + description: 'Substring match (case-insensitive).' + type: string + citizenship: + description: 'Substring match (case-insensitive).' + type: string + city: + description: 'Substring match (case-insensitive).' + type: string + compensationChangeReason: + description: 'Substring match (case-insensitive).' + type: string + compensationComment: + description: 'Substring match (case-insensitive).' + type: string + country: + description: 'Substring match (case-insensitive).' + type: string + departmentName: + description: 'Substring match (case-insensitive).' + type: string + dietaryRestrictions: + description: 'Substring match (case-insensitive).' + type: string + displayName: + description: 'Substring match (case-insensitive).' + type: string + divisionName: + description: 'Substring match (case-insensitive).' + type: string + eeoJobCategory: + description: 'Substring match (case-insensitive).' + type: string + eligibleForRehire: + description: 'Substring match (case-insensitive).' + type: string + employeeName: + description: 'Substring match (case-insensitive).' + type: string + employeeNumber: + description: 'Substring match (case-insensitive).' + type: string + employmentStatusName: + description: 'Substring match (case-insensitive).' + type: string + employmentStatusComment: + description: 'Substring match (case-insensitive).' + type: string + employmentType: + description: 'Substring match (case-insensitive).' + type: string + ethnicity: + description: 'Substring match (case-insensitive).' + type: string + facebookUrl: + description: 'Substring match (case-insensitive).' + type: string + firstNameLastName: + description: 'Substring match (case-insensitive).' + type: string + firstNameMiddleInitial: + description: 'Substring match (case-insensitive).' + type: string + flsaCode: + description: 'Substring match (case-insensitive).' + type: string + homeEmail: + description: 'Substring match (case-insensitive).' + type: string + homePhone: + description: 'Substring match (case-insensitive).' + type: string + instagramUrl: + description: 'Substring match (case-insensitive).' + type: string + jacketSize: + description: 'Substring match (case-insensitive).' + type: string + linkedinUrl: + description: 'Substring match (case-insensitive).' + type: string + locationName: + description: 'Substring match (case-insensitive).' + type: string + maritalStatus: + description: 'Substring match (case-insensitive).' + type: string + middleInitial: + description: 'Substring match (case-insensitive).' + type: string + middleName: + description: 'Substring match (case-insensitive).' + type: string + mobilePhone: + description: 'Substring match (case-insensitive).' + type: string + nationalInsuranceCategory: + description: 'Substring match (case-insensitive).' + type: string + nationality: + description: 'Substring match (case-insensitive).' + type: string + nickName: + description: 'Substring match (case-insensitive).' + type: string + noticePeriod: + description: 'Substring match (case-insensitive).' + type: string + paySchedule: + description: 'Substring match (case-insensitive).' + type: string + pinterestUrl: + description: 'Substring match (case-insensitive).' + type: string + preferredNameLastName: + description: 'Substring match (case-insensitive).' + type: string + pronouns: + description: 'Substring match (case-insensitive).' + type: string + reportsToName: + description: 'Substring match (case-insensitive).' + type: string + secondaryLanguage: + description: 'Substring match (case-insensitive).' + type: string + shirtSize: + description: 'Substring match (case-insensitive).' + type: string + skypeUsername: + description: 'Substring match (case-insensitive).' + type: string + state: + description: 'Substring match (case-insensitive).' + type: string + terminationReason: + description: 'Substring match (case-insensitive).' + type: string + terminationRegrettable: + description: 'Substring match (case-insensitive).' + type: string + terminationType: + description: 'Substring match (case-insensitive).' + type: string + tShirtSize: + description: 'Substring match (case-insensitive).' + type: string + twitterUrl: + description: 'Substring match (case-insensitive).' + type: string + vaccinationStatus: + description: 'Substring match (case-insensitive).' + type: string + vaccineReceived: + description: 'Substring match (case-insensitive).' + type: string + workEmail: + description: 'Substring match (case-insensitive).' + type: string + workPhone: + description: 'Substring match (case-insensitive).' + type: string + workPhoneExtension: + description: 'Substring match (case-insensitive).' + type: string + zipcode: + description: 'Substring match (case-insensitive).' + type: string + gender: + description: 'Exact match.' + type: string + enum: + - Male + - Female + - Non-Binary + paidPer: + description: 'Exact match.' + type: string + enum: + - Day + - Week + - Month + - Quarter + - Year + - PayPeriod + - Piece + payType: + description: 'Exact match.' + type: string + enum: + - Hourly + - Salary + - Commission + citizenshipId: + description: 'Exact match against an integer ID.' type: integer - example: '10' - current_page: + compensationChangeReasonId: + description: 'Exact match against an integer ID.' type: integer - example: '2' - total_pages: + countryId: + description: 'Exact match against an integer ID.' type: integer - example: '10' - next_page: - type: - - string - - 'null' - example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=3&page_size=1' - prev_page: - type: - - string - - 'null' - example: 'https://{companyDomain}.bamboohr.com/api/v1/{endpointPath}?page=1&page_size=1' - type: object - EmployeeResponse: - title: 'Employee Response' - properties: - data: - type: array - items: - $ref: '#/components/schemas/DatasetEmployee' - aggregations: - type: array - items: - properties: - field: - type: string - aggregationType: - type: string - groups: - type: object - all: - type: integer - type: object - pagination: - $ref: '#/components/schemas/Pagination' - type: object - DatasetV1: - title: 'Dataset (v1)' - properties: - name: - description: 'Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.' + departmentId: + description: 'Exact match against an integer ID.' + type: integer + divisionId: + description: 'Exact match against an integer ID.' + type: integer + eeoJobCategoryId: + description: 'Exact match against an integer ID.' + type: integer + eligibleForRehireId: + description: 'Exact match against an integer ID.' + type: integer + employmentStatusId: + description: 'Exact match against an integer ID.' + type: integer + employmentTypeId: + description: 'Exact match against an integer ID.' + type: integer + ethnicityId: + description: 'Exact match against an integer ID.' + type: integer + flsaCodeId: + description: 'Exact match against an integer ID.' + type: integer + jacketSizeId: + description: 'Exact match against an integer ID.' + type: integer + jobTitleId: + description: 'Exact match against an integer ID.' + type: integer + locationId: + description: 'Exact match against an integer ID.' + type: integer + nationalInsuranceCategoryId: + description: 'Exact match against an integer ID.' + type: integer + nationalityId: + description: 'Exact match against an integer ID.' + type: integer + noticePeriodId: + description: 'Exact match against an integer ID.' + type: integer + payScheduleId: + description: 'Exact match against an integer ID.' + type: integer + pronounsId: + description: 'Exact match against an integer ID.' + type: integer + reportsToId: + description: 'Exact match against an integer ID.' + type: integer + shirtSizeId: + description: 'Exact match against an integer ID.' + type: integer + stateId: + description: 'Exact match against an integer ID.' + type: integer + taxTypeId: + description: 'Exact match against an integer ID.' + type: integer + terminationReasonId: + description: 'Exact match against an integer ID.' + type: integer + terminationRegrettableId: + description: 'Exact match against an integer ID.' + type: integer + terminationTypeId: + description: 'Exact match against an integer ID.' + type: integer + tShirtSizeId: + description: 'Exact match against an integer ID.' + type: integer + vaccinationStatusId: + description: 'Exact match against an integer ID.' + type: integer + vaccineReceivedId: + description: 'Exact match against an integer ID.' + type: integer + isManager: + description: 'Exact match (true/false).' + type: boolean + proofOfVaccination: + description: 'Exact match (true/false).' + type: boolean + age: + description: 'Exact numeric match.' + type: number + tenure: + description: 'Exact numeric match.' + type: number + hoursPerPayCycle: + description: 'Exact numeric match.' + type: number + birthDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: employee - label: - description: 'Human-readable display name for the dataset.' + format: date + compensationEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: Employee - type: object - DatasetResponseV1: - title: 'Dataset Response (v1)' - properties: - datasets: - description: 'Array of available datasets.' - type: array - items: - $ref: '#/components/schemas/DatasetV1' - type: object - Field: - title: Field - properties: - name: - description: 'Machine-readable field identifier. Use this value in the `fields` array when querying data.' + format: date + compensationEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + contractEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + employmentStatusEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + finalDoseAdministrationDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' + type: string + format: date + finalPayDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: status - label: - description: 'Human-readable display name for the field.' + format: date + hireDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: Status - parentType: - description: 'The type of the parent section (e.g. `page`, `table`).' + format: date + jobInformationEffectiveDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: page - parentName: - description: 'The name of the parent section this field belongs to.' + format: date + originalHireDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: Personal - entityName: - description: 'The entity name for the field, used in `showHistory` when querying historical table fields.' + format: date + probationEndDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: personal - type: object - DatasetFieldsResponse: - title: 'Dataset Fields Response' - properties: - pagination: - $ref: '#/components/schemas/Pagination' - name: - description: 'Machine-readable dataset identifier matching the requested datasetName.' + format: date + terminationDate: + description: 'Exact match against an ISO 8601 date (YYYY-MM-DD).' type: string - example: employee - label: - description: 'Human-readable display name for the dataset.' + format: date + firstName: + description: 'This will match any employees whose first name contains this string (case insensitive)' type: string - example: Employee - fields: - description: 'Paginated array of field descriptors for this dataset.' - type: array - items: - $ref: '#/components/schemas/Field' - example: - - - name: status - label: Status - parentType: page - parentName: Personal - entityName: personal - - - name: employeeNumber - label: 'Employee #' - parentType: page - parentName: Personal - entityName: personal - type: object - Report: - title: 'Report (v1)' - properties: - id: - type: integer - example: 4 - name: + lastName: + description: 'This will match any employees whose last name contains this string (case insensitive)' type: string - example: New - type: object - ReportsResponse: - title: 'Reports Response (v1)' - properties: - reports: + jobTitleName: + description: 'This will match any employees whose current job title descriptor contains this string (case insensitive)' + type: string + status: + description: 'Employee status' + type: string + enum: + - active + - inactive + ids: + description: 'List of employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`).' type: array items: - $ref: '#/components/schemas/Report' - pagination: - $ref: '#/components/schemas/Pagination' + type: integer + example: + - 123 + - 124 type: object - ErrorResponse: - description: 'Standard error response from BaseController' + GetEmployeesResponseObject: + description: 'Complete response object for employee list API containing employee data, metadata, and navigation links' + required: + - data + - meta + - _links properties: - error: + data: + $ref: '#/components/schemas/GetEmployeesEmployeeResponseCollection' + description: 'Collection of employee data objects' + meta: + $ref: '#/components/schemas/CursorPagedResponseMetadata' + description: 'Metadata information including total count and pagination details' + _links: + description: 'Navigation links for API pagination' properties: - code: - description: respondWithError - type: integer - example: 500 - message: - type: string - example: 'Internal server error' + self: + description: 'Link to current page' + properties: + href: + description: 'URL of the current page' + type: string + type: object + next: + description: 'Link to next page' + properties: + href: + description: 'URL of the next page' + type: string + type: object + prev: + description: 'Link to previous page' + properties: + href: + description: 'URL of the previous page' + type: string + type: object type: object type: object - FieldOptionsTransformer: - title: 'Field Option' + EmployeeOptionalField: + description: 'Valid field names that can be passed via the `fields` query parameter to request additional employee data beyond the default set.' + type: string + enum: + - addressLine1 + - addressLine2 + - age + - allergies + - bestEmail + - birthDate + - birthplace + - citizenship + - citizenshipId + - city + - compensationChangeReason + - compensationChangeReasonId + - compensationComment + - compensationEffectiveDate + - compensationEndDate + - contractEndDate + - country + - countryId + - departmentId + - departmentName + - dietaryRestrictions + - displayName + - divisionId + - divisionName + - eeoJobCategory + - eeoJobCategoryId + - ein + - eligibleForRehire + - eligibleForRehireId + - employeeName + - employeeNumber + - employmentStatusComment + - employmentStatusEffectiveDate + - employmentStatusId + - employmentStatusName + - employmentType + - employmentTypeId + - ethnicity + - ethnicityId + - facebookUrl + - finalDoseAdministrationDate + - finalPayDate + - firstNameLastName + - firstNameMiddleInitial + - flsaCode + - flsaCodeId + - gender + - genderIdentity + - genderIdentityId + - hireDate + - homeEmail + - homePhone + - hoursPerPayCycle + - instagramUrl + - isManager + - jacketSize + - jacketSizeId + - jobInformationEffectiveDate + - jobTitleId + - linkedinUrl + - locationId + - locationName + - maritalStatus + - middleInitial + - middleName + - mobilePhone + - nationalId + - nationalInsuranceCategory + - nationalInsuranceCategoryId + - nationality + - nationalityId + - nickName + - nin + - noticePeriod + - noticePeriodId + - originalHireDate + - overtime + - overtimeRate + - paidPer + - payRate + - paySchedule + - payScheduleId + - payType + - pinterestUrl + - preferredNameLastName + - probationEndDate + - pronouns + - pronounsId + - proofOfVaccination + - reportsToId + - reportsToName + - secondaryLanguage + - shirtSize + - shirtSizeId + - sin + - skypeUsername + - ssn + - state + - stateId + - taxTypeId + - teams + - tenure + - terminationDate + - terminationReason + - terminationReasonId + - terminationRegrettable + - terminationRegrettableId + - terminationType + - terminationTypeId + - tShirtSize + - tShirtSizeId + - twitterUrl + - userId + - vaccinationStatus + - vaccinationStatusId + - vaccineReceived + - vaccineReceivedId + - veteranStatus + - veteranStatusId + - workEmail + - workPhone + - workPhoneExtension + - zipcode + LevelsAndBands-ColumnMap: + description: 'Schema for levels and bands column map' properties: - id: - description: 'The ID of the field option. May be a string or an integer depending on the field type.' + expectedColumnKey: + description: 'Expected column key' oneOf: - type: string - - type: integer - value: - description: 'The human-readable label of the field option' + type: 'null' + columnName: + description: 'Column name' type: string type: object - GoalFiltersV1: - description: 'Array containing goal filters and their counts for API v1' + LevelsAndBands-GroupStatusCounts: + description: 'Schema for levels and bands group status counts' properties: - filters: - description: 'Array of goal filter objects with counts' - type: array - items: - properties: - id: - description: 'Filter identifier based on goal status.' - type: string - enum: - - status-inProgress - - status-completed - example: status-inProgress - name: - description: 'Display name of the filter' - type: string - enum: - - 'In Progress' - - Completed - example: 'In Progress' - count: - description: 'Number of goals matching this filter' - type: integer - example: 1 - type: object + draft: + description: 'Number of levels/bands in draft status' + type: integer + historic: + description: 'Number of levels/bands in historic status' + type: integer + published: + description: 'Number of levels/bands in published status' + type: integer type: object - GoalFiltersV1_1: - description: 'Array containing goal filters, their counts, and actions' + LevelsAndBands-Employee: + description: 'Job titles employee object' properties: - filters: - description: 'Array of goal filter objects with counts' - type: array - items: - properties: - id: - description: 'Filter identifier based on goal status.' - type: string - enum: - - status-inProgress - - status-completed - - status-closed - example: status-inProgress - name: - description: 'Display name of the filter' - type: string - enum: - - 'In Progress' - - Completed - - Closed - example: 'In Progress' - count: - description: 'Number of goals matching this filter' - type: integer - example: 1 - actions: - description: 'Available actions for goals in this state, defined by PerformanceDefinitions::GOAL_FILTER_ACTIONS' - properties: - canCloseGoal: { description: 'Whether goals in this state can be closed', type: boolean, example: true } - canEditGoal: { description: 'Whether goals in this state can be edited', type: boolean, example: true } - canEditGoalProgressBar: { description: 'Whether progress bar can be edited for goals in this state', type: boolean, example: true } - canReopenGoal: { description: 'Whether goals in this state can be reopened', type: boolean, example: false } - canShareGoal: { description: 'Whether goals in this state can be shared', type: boolean, example: true } - type: object - type: object + id: + description: 'Employee id' + type: integer + name: + description: 'Employee name' + type: string type: object - TransformedApiGoal: + LevelsAndBands-JobTitleAssignment: + description: 'Job title assignment to a level' properties: - id: - description: 'The id of the goal.' - type: string - example: '4' - title: - description: 'Title of the goal.' - type: string - example: 'Complete Documentation Epic' - description: - description: 'A description of the goal.' - type: string - example: 'Document every endpoint for the goals API.' - percentComplete: - description: 'A percentage (0-100) that denotes how complete the goal is.' + jobTitleId: + description: 'Job title id' type: integer - example: 78 - alignsWithOptionId: - description: 'The ID of the goal this goal is aligned with. Returns null when not aligned, or an empty string when the goal has no parent set.' - type: - - string - - 'null' - sharedWithEmployeeIds: - description: 'Ids of the employees that have access to this goal.' + levelId: + description: 'Compensation level id' + type: integer + type: object + LevelsAndBands-JobTitleAssignmentsRequest: + description: 'Request to bulk assign job titles to levels' + required: + - jobTitles + properties: + jobTitles: + description: 'Array of job title assignments' type: array items: - type: integer - dueDate: - description: 'The due date of the goal.' + $ref: '#/components/schemas/LevelsAndBands-JobTitleAssignment' + type: object + LevelsAndBands-JobTitle: + description: 'Job Titles Job Title Data Object' + properties: + id: + description: 'Job title id' + type: integer + jobTitle: + description: 'Job title name' type: string - example: '2025-12-31' - completionDate: - description: 'ISO 8601 UTC timestamp of when the goal was completed.' - type: - - string - - 'null' - example: '2025-12-17T10:30:00Z' - lastChangedDateTime: - description: 'ISO 8601 UTC timestamp of when the goal was last modified.' - type: - - string - - 'null' - example: '2025-12-17T10:30:00Z' - status: - description: 'The status of the goal.' + type: object + LevelsAndBands-JobTitleWithEmployees: + description: 'Levels and bands job titles with employees object' + properties: + id: + description: 'Job id' + type: integer + title: + description: 'Job title' type: string - enum: - - in_progress - - completed - - closed - example: in_progress - milestones: - description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' - type: - - array - - 'null' + employees: + description: 'Employees with this job title' + type: array items: - properties: - id: - description: 'The id of the milestone.' - type: integer - example: 2 - employeeGoalId: - description: 'The id of the goal which encompasses this milestone.' - type: integer - example: 12 - title: - description: 'The title of the milestone.' - type: string - example: 'Sell 15 Doohickeys' - currentValue: - description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.' - type: - - number - - 'null' - example: '9.9' - deprecated: true - startValue: - description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.' - type: - - number - - 'null' - example: '7.01' - deprecated: true - endValue: - description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.' - type: - - number - - 'null' - example: '15' - deprecated: true - completedDateTime: - description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.' - type: string - example: '2025-04-10T15:36:38Z' - lastUpdateDateTime: - description: 'The date and time in which the goal was last updated.' - type: string - example: '2025-04-10T15:36:38Z' - lastUpdateUserId: - description: 'The ID of the user who last updated this milestone.' - type: integer - example: 24 - type: object - actions: - description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' - properties: - canEditGoalProgressBar: - description: 'Can the user edit the progress bar of this goal.' - type: boolean - example: false - canEditGoalMilestoneProgressBar: - description: 'can the user edit the progress of a milestone in this goal.' - type: boolean - example: true - type: - - object - - 'null' + $ref: '#/components/schemas/LevelsAndBands-Employee' + levelId: + description: 'Associated level ID, null if not associated with any level' + oneOf: + - + type: integer + - + type: 'null' type: object - TransformedApiEmployeeGoalDetails: + LevelsAndBands-JobTitlesCollection: + description: 'Job Titles Collection' + type: object + LevelsAndBands-Group: + title: 'Group Data Object' + description: 'Represents a compensation level group with its levels' properties: - goal: - description: 'An individual goal' - properties: - id: - description: 'The id of the goal.' - type: string - example: '4' - title: - description: 'Title of the goal.' - type: string - example: 'Complete Documentation Epic' - description: - description: 'A description of the goal.' - type: string - example: 'Document every endpoint for the goals API.' - percentComplete: - description: 'A percentage (0-100) that denotes how complete the goal is.' + id: + description: 'The group ID. Null for new groups.' + oneOf: + - type: integer - example: 78 - alignsWithOptionId: - type: - - string - - 'null' - sharedWithEmployeeIds: - description: 'Ids of the employees that have access to this goal.' - type: array - items: - type: integer - dueDate: - description: 'The due date of the goal.' - type: string - example: '2025-12-31' - completionDate: - description: 'ISO 8601 UTC timestamp of when the goal was completed.' - type: - - string - - 'null' - example: '2025-12-17T10:30:00Z' - lastChangedDateTime: - description: 'ISO 8601 UTC timestamp of when the goal was last modified.' - type: - - string - - 'null' - example: '2025-12-17T10:30:00Z' - status: - description: 'The status of the goal.' + - + type: 'null' + groupName: + description: 'The name of the group. A warning will be shown if blank.' + oneOf: + - type: string - enum: - - in_progress - - completed - - closed - example: in_progress - milestones: - description: 'All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.' - type: - - array - - 'null' - items: - properties: - id: { description: 'The id of the milestone.', type: integer, example: 2 } - employeeGoalId: { description: 'The id of the goal which encompasses this milestone.', type: integer, example: 12 } - title: { description: 'The title of the milestone.', type: string, example: 'Sell 15 Doohickeys' } - currentValue: { description: 'The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.', type: [number, 'null'], example: '9.9', deprecated: true } - startValue: { description: 'The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', type: [number, 'null'], example: '7.01', deprecated: true } - endValue: { description: 'The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.', type: [number, 'null'], example: '15', deprecated: true } - completedDateTime: { description: 'The date and time in which the goal has been completed. If the goal is not completed the value will be null.', type: string, example: '2025-04-10T15:36:38Z' } - lastUpdateDateTime: { description: 'The date and time in which the goal was last updated.', type: string, example: '2025-04-10T15:36:38Z' } - lastUpdateUserId: { description: 'The ID of the user who last updated this milestone.', type: integer, example: 24 } - type: object - actions: - description: 'Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.' - properties: - canEditGoalProgressBar: - description: 'Can the user edit the progress bar of this goal.' - type: boolean - example: true - canEditGoalMilestoneProgressBar: - description: 'can the user edit the progress of a milestone in this goal.' - type: boolean - example: false - type: - - object - - 'null' - type: object + - + type: 'null' + levels: + description: 'Array of levels in this group' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-Level' type: object - ProjectInfoApiTransformer: - description: 'Project information data representation' + LevelsAndBands-Level: + title: 'Level Data Object' + description: 'Represents a single compensation level' properties: - project: - description: 'Project information' - properties: - id: - description: 'Project ID' - type: integer - name: - description: 'Project name' - type: string - type: object - task: - description: 'Task information' - properties: - id: - description: 'Task ID' + levelId: + description: 'The level ID. Null for new levels.' + oneOf: + - type: integer - name: - description: 'Task name' + - + type: 'null' + levelName: + description: 'The name of the level' + oneOf: + - type: string - type: - - object - - 'null' + - + type: 'null' + payBand: + $ref: '#/components/schemas/LevelsAndBands-PayBand' + description: 'Pay band associated with this level' + jobTitles: + description: 'Array of job titles associated with this level' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitle' + errors: + description: 'Array of validation errors for this level' + type: array + items: + type: string + warnings: + description: 'Array of validation warnings for this level' + type: array + items: + type: string + type: object + LevelsAndBands-UploadResponse: + description: 'Schema for levels and bands import upload response' + properties: + uploadData: + description: 'Upload data' + type: array + items: + type: string + columnMap: + description: 'Column map' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ColumnMap' type: object - CompanyIntegrationsUpdatedWebhookPayload: - title: 'Company Integrations Updated Webhook Payload' - description: 'Webhook payload sent when company integrations are updated.' + LevelsAndBands-ErrorWarningIdentifier: + title: 'Error Warning Identifier' + description: 'Object for compensation level groups and levels' + required: + - groupId + - levelId properties: - type: - description: 'The event type identifier' - type: string - enum: - - company-integrations.updated - example: company-integrations.updated - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing company information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - type: object + groupId: + description: 'Group ID' + type: integer + levelId: + description: 'Level ID' + type: integer type: object - CompanyUpdatedWebhookPayload: - title: 'Company Updated Webhook Payload' - description: 'Webhook payload sent when a company is updated.' + LevelsAndBands-JobTitlesStatus: + title: 'Job Titles Status' + description: 'Object for compensation level groups and levels' + required: + - isComplete + - errors + - warnings properties: - type: - description: 'The event type identifier' - type: string - enum: - - company.updated - example: company.updated - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing company information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - type: object + isComplete: + description: 'Is the job titles step complete' + type: boolean + errors: + description: 'Array of errors' + type: array + items: + type: string + warnings: + description: 'Array of warnings' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-JobTitlesCollection' type: object - CompanyDeletedWebhookPayload: - title: 'Company Deleted Webhook Payload' - description: 'Webhook payload sent when a company is deleted.' + LevelsAndBands-LevelsAndBands: + title: 'Levels and Bands' + description: 'Object for compensation level groups and levels' + required: + - groups properties: - type: - description: 'The event type identifier' - type: string - enum: - - company.deleted - example: company.deleted - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing company information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - type: object + groups: + description: 'Array of compensation level groups to upsert' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-Group' type: object - EmployeeCreatedWebhookPayload: - title: 'Employee Created Webhook Payload' - description: 'Webhook payload sent when a new employee is created.' + LevelsAndBands-LevelsAndBandsStatus: + title: 'Levels and Bands Status' + description: 'Object for compensation level groups and levels' + required: + - levels + - payBands + - jobTitles + - review properties: - type: - description: 'The event type identifier' - type: string - enum: - - employee.created - example: employee.created - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing employee information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - employeeId: - description: 'The employee ID that was created' - type: string - example: '100' - type: object + levels: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' + payBands: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' + jobTitles: + $ref: '#/components/schemas/LevelsAndBands-JobTitlesStatus' + description: 'Object for compensation level groups and levels' + review: + $ref: '#/components/schemas/LevelsAndBands-StepStatus' + description: 'Object for compensation level groups and levels' type: object - EmployeeDeletedWebhookPayload: - title: 'Employee Deleted Webhook Payload' - description: 'Webhook payload sent when an employee is deleted.' + LevelsAndBands-StepStatus: + title: 'Step Status' + description: 'Object for compensation level groups and levels' + required: + - isComplete + - errors + - warnings properties: - type: - description: 'The event type identifier' - type: string - enum: - - employee.deleted - example: employee.deleted - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing employee information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - employeeId: - description: 'The employee ID that was deleted' - type: string - example: '100' - type: object + isComplete: + description: 'Whether the step is complete' + type: boolean + errors: + description: 'Array of errors' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' + warnings: + description: 'Array of warnings' + type: array + items: + $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' type: object - EmployeeUpdatedWebhookPayload: - title: 'Employee Updated Webhook Payload' - description: 'Webhook payload sent when an employee is updated.' + LevelsAndBands-PayBand: + description: 'Pay band data object' properties: - type: - description: 'The event type identifier' - type: string - enum: - - employee.updated - example: employee.updated - timestamp: - description: 'ISO 8601 timestamp (UTC) when the event was fired' - type: string - format: date-time - example: '2025-02-18T15:30:00Z' - data: - description: 'Event data containing employee and change information' - properties: - companyId: - description: 'The company ID' - type: string - example: '12345' - employeeId: - description: 'The employee ID that was updated' - type: string - example: '100' - changedFields: - description: 'Array of API aliases for fields that changed and are monitored by this webhook' - type: array - items: - type: string - example: - - firstName - - lastName - - department - type: object + levelId: + description: 'The level ID' + oneOf: + - + type: integer + - + type: 'null' + min: + description: 'The minimum value for the level' + type: number + format: float + mid: + description: 'The middle value for the level' + type: number + format: float + max: + description: 'The maximum value for the level' + type: number + format: float + currencyCode: + description: 'The currency code for the level' + oneOf: + - + type: string + - + type: 'null' + percentageRange: + description: 'The percentage range for the level' + type: number + format: float + compensationType: + description: 'The compensation type for the level' + type: string type: object - TimezoneResource: - description: 'A timezone resource.' + CompletedQuestionsAndResponseDataObject: + description: 'Data object for completed questions and responses' properties: - id: - description: 'The timezone ID.' + question: + description: 'The question that was completed' type: string - example: '1' - gmtOffset: - description: 'The GMT offset label (e.g. "(GMT-07:00)").' + isRequired: + description: 'Indicates if the question is required' + type: boolean + archived: + description: 'Indicates if the question is archived' + type: boolean + sortOrder: + description: 'The sort order of the question' + type: integer + employeeId: + description: 'The employee ID associated with the question' + type: integer + employeePersonalQuestionId: + description: 'The employee personal question ID associated with the question' + type: integer + employeeResponse: + description: 'The response to the question' type: string - example: '(GMT-07:00)' - name: - description: 'The display name of the timezone.' + hidden: + description: 'Indicates if the question is hidden' + type: boolean + type: object + LocationResponseObject: + description: 'Transformer for location data with nested address structure' + properties: + id: + description: 'Unique identifier for the location' type: string - example: 'Mountain Time' - utcName: - description: 'The IANA/UTC timezone identifier.' + label: + description: 'Display name for the location' type: string - example: America/Denver + archived: + description: 'Whether the location is archived' + type: boolean + manageable: + description: 'Whether the location is manageable' + type: boolean + address: + description: 'Address information for the location' + properties: + address1: + description: 'Address line 1. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + address2: + description: 'Address line 2' + oneOf: + - + type: string + - + type: 'null' + city: + description: 'City name. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + stateId: + description: 'State identifier. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + state: + description: 'State information. Optional and requested via expand property from the request' + properties: + id: + description: 'State identifier' + type: string + name: + description: 'State name' + type: string + abbreviation: + description: 'State abbreviation' + type: string + type: object + zipcode: + description: 'Postal code. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + countryId: + description: 'Country identifier. Should only be null if this is a remote location' + oneOf: + - + type: string + - + type: 'null' + country: + description: 'Country information. Optional and requested via expand property from the request' + properties: + id: + description: 'Country identifier' + type: string + name: + description: 'Country name' + type: string + isoCode: + description: 'Country ISO code' + type: string + type: object + timezone: + description: 'Timezone name' + oneOf: + - + type: string + - + type: 'null' + remoteLocation: + description: 'Whether this is a remote location' + type: boolean + type: object + createdAt: + description: 'ISO 8601 timestamp of when the location was created' + oneOf: + - + type: string + format: date-time + - + type: 'null' + archivedAt: + description: 'ISO 8601 timestamp of when the location was archived' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - CountriesResponseSchema: - description: 'Schema for countries response' + Project-TimeTrackingProjectCollection-V1: + description: 'Collection of time tracking projects.' type: array items: - $ref: '#/components/schemas/CountrySchema' - CountrySchema: - description: 'Schema for country data' + $ref: '#/components/schemas/Project-TimeTrackingProject-V1' + Project-TimeTrackingProject-V1: + description: 'A time tracking project. Projects are organizational units used to classify hours worked.' properties: id: - description: 'Unique identifier for the country' - type: string + description: 'The ID of the project.' + type: integer + readOnly: true + example: 1 name: - description: 'Full name of the country' + description: 'The name of the project.' type: string - isoCode: - description: 'ISO 3166-1 alpha-2 code for the country, or null if no ISO code is defined.' - type: - - string - - 'null' - type: object - StateProvinceResponseSchema: - description: 'Schema for states/provinces response' - properties: - options: - description: 'Array of state/province options' + example: 'Project A' + billable: + description: 'Whether or not the project is billable.' + type: boolean + example: false + includeInPayroll: + description: 'Whether hours logged to this project will show in payroll and payroll reports.' + type: boolean + example: false + allEmployeesAssigned: + description: 'Whether all time & attendance employees are assigned or not.' + type: boolean + example: true + archived: + description: 'Whether or not the project is archived.' + type: boolean + example: false + hasTasks: + description: 'Whether time is logged to tasks under the project (true) or directly to the project (false).' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the project was created.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + updatedAt: + description: 'ISO 8601 timestamp when the project was last updated.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the project was deleted.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + employeeIds: + description: 'Array of employeeIds assigned to the project.' type: array items: - $ref: '#/components/schemas/StateProvinceSchema' + type: integer + example: + - 1 + - 2 + - 3 type: object - StateProvinceSchema: - description: 'Schema for state/province data' + Project-UpdateTimeTrackingProject-V1: + description: 'Data contract for partially updating a time tracking project. All fields are optional; only fields present in the request body will be updated.' properties: - id: - description: 'State/province ID' - type: integer - label: - description: 'State/province abbreviation' - type: string - iso: - description: 'ISO code for the state/province' - type: string name: - description: 'Full name of the state/province' + description: 'The name of the project.' type: string - type: object - CompanyIndustryCollection: - title: CompanyIndustryDataObjectCollection - type: array - items: - $ref: '#/components/schemas/CompanyIndustryDataObject' - CompanyIndustryDataObject: - description: "Company's enabled industry." - required: - - industryId - - addedByCustomer - - addedByUserId - - addedYmdt - properties: - industryId: - description: "The company's industry id." - type: integer - addedByCustomer: - description: 'If the industry was added by the customer.' + example: 'Project A' + billable: + description: 'Whether or not the project is billable.' type: boolean - addedByUserId: - description: 'The user id of the user who added the industry.' - type: - - integer - - 'null' - addedYmdt: - description: 'The date that the industry was added.' - type: - - string - - 'null' - type: object - CompensationBenchmarking-ColumnMap: - description: 'Schema for compensation benchmarking column map' - properties: - expectedColumnKey: - description: 'Expected column key' - type: - - string - - 'null' - columnName: - description: 'Column name' - type: string + example: true + includeInPayroll: + description: 'Whether hours logged to this project will show in payroll and payroll reports.' + type: boolean + example: true + allEmployeesAssigned: + description: 'Whether all time & attendance employees are assigned or not.' + type: boolean + example: true + archived: + description: 'Whether or not the project is archived.' + type: boolean + example: false + employeeIds: + description: 'Array of employee IDs to assign to the project. Replaces the current assignment list when present; an empty array clears all assignments.' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + hasTasks: + description: 'Toggles whether time is logged directly to the project (false) or to specific tasks on the project (true). Setting to true requires the project to already have at least one active task; setting to false leaves existing tasks unchanged.' + type: boolean + example: true type: object - Employee-StringCodeErrorResponse-V1: - description: 'Error response returned by Employee API endpoints where `error.code` is a string identifier.' + Project-TimeTrackingTaskCollection-V1: + description: 'Collection of time tracking tasks for a project.' + type: array + items: + $ref: '#/components/schemas/Project-TimeTrackingTask-V1' + Project-CreateTimeTrackingProjectTask-V1: + description: 'Payload to create a task on a time tracking project.' required: - - error + - name properties: - error: - required: - - code - - message - properties: - code: - description: 'String error code identifier (for example `BadRequest` or `BadPage`).' - type: string - example: BadRequest - message: - description: 'Human-readable error message.' - type: string - example: 'Invalid request parameters.' - type: object - type: object - EmployeeCursorPaginationQueryObject: + name: + description: 'Display name of the task.' + type: string + maxLength: 50 + example: 'Client onboarding' + billable: + description: 'Whether hours on this task are billable. Defaults to false when omitted.' + example: true + oneOf: + - + type: boolean + - + type: 'null' type: object - allOf: - - - $ref: '#/components/schemas/CursorPaginationQueryObject' - - - properties: - before: - description: 'Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.' - type: integer - after: - description: 'Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.' - type: integer - limit: - description: 'Maximum number of items to return. This can be at most 2500.' - type: integer - default: 250 - maximum: 2500 - minimum: 1 - type: object - GetEmployeeResponse: - description: "Employee data returned by the Get Employee endpoint.\n\tThe `id` field is always present; all other named properties are included only when explicitly requested via the `fields` query parameter.\n\tAdditional custom or company-configured fields may also appear." - required: - - id + Project-TimeTrackingTask-V1: + description: 'A task within a time tracking project. Tasks are sub-organizational units used to further classify hours worked.' properties: id: - description: 'Unique identifier for the employee' + description: 'The ID of the task.' + type: integer + readOnly: true + example: 1 + name: + description: 'The name of the task.' type: string - firstName: - description: "Employee's first name" - type: - - string - - 'null' - lastName: - description: "Employee's last name" - type: - - string - - 'null' - preferredName: - description: "Employee's preferred name" - type: - - string - - 'null' - middleName: - description: "Employee's middle name" - type: - - string - - 'null' - photoUrl: - description: "URL to the employee's profile photo" - type: - - string - - 'null' - jobTitleName: - description: "Employee's current job title" - type: - - string - - 'null' - jobTitleId: - description: "Employee's job title ID" - type: - - string - - 'null' - status: - description: "Employee's current status" - type: - - string - - 'null' - enum: - - Active - - Inactive - workEmail: - description: "Employee's work email address" - type: - - string - - 'null' - homeEmail: - description: "Employee's home email address" - type: - - string - - 'null' - bestEmail: - description: "Employee's best email address" - type: - - string - - 'null' - workPhone: - description: "Employee's work phone number" - type: - - string - - 'null' - workPhoneExtension: - description: "Employee's work phone extension" - type: - - string - - 'null' - mobilePhone: - description: "Employee's mobile phone number" - type: - - string - - 'null' - homePhone: - description: "Employee's home phone number" - type: - - string - - 'null' - skypeUsername: - description: "Employee's Skype username" - type: - - string - - 'null' - linkedinUrl: - description: "Employee's LinkedIn profile URL" - type: - - string - - 'null' - facebookUrl: - description: "Employee's Facebook profile URL" - type: - - string - - 'null' - instagramUrl: - description: "Employee's Instagram profile URL" - type: - - string - - 'null' - twitterUrl: - description: "Employee's Twitter/X profile URL" - type: - - string - - 'null' - pinterestUrl: - description: "Employee's Pinterest profile URL" - type: - - string - - 'null' - birthDate: - description: "Employee's birth date" - type: - - string - - 'null' - hireDate: - description: "Employee's hire date" - type: - - string - - 'null' - originalHireDate: - description: "Employee's original hire date" - type: - - string - - 'null' - terminationDate: - description: "Employee's termination date" - type: - - string - - 'null' - address1: - description: "Employee's street address" - type: - - string - - 'null' - city: - description: "Employee's city" - type: - - string - - 'null' - state: - description: "Employee's state or province" - type: - - string - - 'null' - country: - description: "Employee's country" - type: - - string - - 'null' - gender: - description: "Employee's gender" - type: - - string - - 'null' - marital: - description: "Employee's marital status" - type: - - string - - 'null' - payRate: - description: "Employee's pay rate" - type: - - string - - 'null' - payType: - description: "Employee's pay type" - type: - - string - - 'null' - payPeriod: - description: "Employee's pay period" - type: - - string - - 'null' - exempt: - description: 'Whether the employee is FLSA exempt' - type: - - string - - 'null' - canUploadPhoto: - description: 'Whether the requesting user can upload a photo for this employee' - type: - - boolean - - 'null' - division: - description: "Employee's division name" - type: - - string - - 'null' - divisionId: - description: "Employee's division ID" - type: - - string - - 'null' - department: - description: "Employee's department name" - type: - - string - - 'null' - departmentId: - description: "Employee's department ID" - type: - - string - - 'null' - location: - description: "Employee's location name" - type: - - string - - 'null' - locationId: - description: "Employee's location ID" - type: - - string - - 'null' - employmentStatus: - description: "Employee's current employment status name" - type: - - string - - 'null' - employmentStatusId: - description: "Employee's current employment status ID" - type: - - string - - 'null' - reportsToName: - description: "Name of the employee's manager" - type: - - string - - 'null' - reportsToId: - description: "Employee ID of the employee's manager" - type: - - string - - 'null' + example: 'Task A' + projectId: + description: 'The ID of the project this task belongs to.' + type: integer + example: 1 + billable: + description: 'Whether the task is billable.' + type: boolean + example: false + createdAt: + description: 'ISO 8601 timestamp when the task was created.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + updatedAt: + description: 'ISO 8601 timestamp when the task was last updated.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the task was deleted.' + readOnly: true + example: '2025-10-15T16:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - additionalProperties: true - GetEmployeesEmployeeBaseResponse: - description: 'Base employee fields that are always included in the response.' + Project-UpdateTimeTrackingProjectTask-V1: + description: 'Payload to partially update a task on a time tracking project. All fields are optional; at least one field must be provided.' + minProperties: 1 + properties: + name: + description: 'Display name of the task.' + type: string + maxLength: 50 + example: 'Client onboarding' + billable: + description: 'Whether hours on this task are billable.' + type: boolean + example: true + type: object + Scheduling-CreateScheduleRequest-V1: + description: 'Request object for creating or updating a schedule' required: - - employeeId - - firstName - - lastName - - preferredName - - photoUrl - - jobTitleName - - status - - _restrictedFields + - name + - locationId + - startOfWeek properties: - employeeId: - description: 'Unique identifier for the employee' + name: + description: 'The name of the schedule' type: string - firstName: - description: "Employee's first name" - type: - - string - - 'null' - lastName: - description: "Employee's last name" - type: - - string - - 'null' - preferredName: - description: "Employee's preferred name" - type: - - string - - 'null' - photoUrl: - description: "URL to employee's profile photo" - type: - - string - - 'null' - jobTitleName: - description: "Employee's current job title" - type: - - string - - 'null' - status: - description: "Employee's current status (Active or Inactive)." - type: - - string - - 'null' - _restrictedFields: - description: 'Array of field names that are restricted due to permission checks' + example: 'Morning Shift' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 1 + timezone: + description: 'The timezone of the schedule. Required for remote locations. For non-remote locations, the location timezone is used.' + example: America/Denver + oneOf: + - + type: string + - + type: 'null' + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 15 + managerUserIds: + description: 'User IDs of managers for this schedule' type: array items: - type: string + type: integer + example: + - 1 + - 2 + - 3 + employeeIds: + description: 'Employee IDs assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + - 30 type: object - GetEmployeesEmployeeResponse: - description: 'Employee data response object containing basic employee information and optionally requested fields. When the `fields` parameter is provided, additional requested fields will be included. Field values are subject to permission checks — restricted fields are returned as `null` and their names are listed in `_restrictedFields`.' + Scheduling-Schedule-V1: + description: 'A shift schedule for a specific location, which organizes shifts for employees' + properties: + id: + description: 'The UUID of the schedule' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the schedule' + type: string + example: 'Main Schedule' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 123 + timezone: + description: 'The timezone of the schedule, provide if location is missing timezone' + type: string + example: America/Denver + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 10 + managerUserIds: + description: 'What users manage this schedule' + type: array + items: + type: integer + example: + - 1 + - 2 + employeeIds: + description: 'What employees are assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + createdAt: + description: 'UTC timestamp when the schedule was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'UTC timestamp when the schedule was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'UTC timestamp when the schedule was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - allOf: - - - $ref: '#/components/schemas/GetEmployeesEmployeeBaseResponse' - - - properties: - workEmail: - description: "Employee's work email address. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - homeEmail: - description: "Employee's home email address. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - bestEmail: - description: "Employee's best email address. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - middleName: - description: "Employee's middle name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - workPhone: - description: "Employee's work phone number. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - workPhoneExtension: - description: "Employee's work phone extension. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - mobilePhone: - description: "Employee's mobile phone number. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - homePhone: - description: "Employee's home phone number. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - skypeUsername: - description: "Employee's Skype username. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - linkedinUrl: - description: "Employee's LinkedIn profile URL. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - facebookUrl: - description: "Employee's Facebook profile URL. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - instagramUrl: - description: "Employee's Instagram profile URL. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - twitterUrl: - description: "Employee's Twitter/X profile URL. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - pinterestUrl: - description: "Employee's Pinterest profile URL. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - birthDate: - description: "Employee's birth date. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - hireDate: - description: "Employee's hire date. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - divisionName: - description: "Employee's division name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - divisionId: - description: "Employee's division ID. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - departmentName: - description: "Employee's department name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - departmentId: - description: "Employee's department ID. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - locationName: - description: "Employee's location name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - locationId: - description: "Employee's location ID. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - jobTitleId: - description: "Employee's job title id. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - employmentStatusName: - description: "Employee's employment status name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - employmentStatusId: - description: "Employee's employment status id. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - reportsToName: - description: "Employee's manager's name. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - reportsToId: - description: "Employee's manager's employee id. Only included when requested via the `fields` parameter." - type: - - string - - 'null' - type: object - GetEmployeesEmployeeResponseCollection: - description: 'Typed collection of employee response objects' - type: array - items: - $ref: '#/components/schemas/GetEmployeesEmployeeResponse' - GetEmployeesFilterRequestObject: - description: 'Filter criteria for the employee list endpoint. All filter fields are optional. Multiple fields are combined with AND logic.' - required: [] + Scheduling-UpdateScheduleRequest-V1: + description: 'Request object for updating a schedule' properties: - firstName: - description: 'This will match any employees whose first name contains this string (case insensitive)' + name: + description: 'The name of the schedule' type: string - lastName: - description: 'This will match any employees whose last name contains this string (case insensitive)' + example: 'Morning Shift' + locationId: + description: 'The ID of the location the schedule belongs to' + type: integer + example: 1 + timezone: + description: 'The timezone of the schedule. Required if location does not have a timezone. Error if location already has a timezone.' type: string - jobTitleName: - description: 'This will match any employees whose current job title descriptor contains this string (case insensitive)' + example: America/Denver + startOfWeek: + description: 'The starting day of the week for the schedule' + type: string + example: Monday + earlyClockInThreshold: + description: 'The threshold (in minutes) that an employee is allowed to clock in early to a shift on this schedule' + type: integer + example: 15 + managerUserIds: + description: 'User IDs of managers for this schedule' + type: array + items: + type: integer + example: + - 1 + - 2 + - 3 + employeeIds: + description: 'Employee IDs assigned to this schedule' + type: array + items: + type: integer + example: + - 10 + - 20 + - 30 + type: object + Scheduling-PublishShiftsFailure-V1: + description: 'A shift that failed to publish due to a conflict' + required: + - shiftId + - reason + properties: + shiftId: + description: 'The ID of the shift that failed to publish.' + type: string + example: 019aa09f-0712-74cb-9186-8ad0eb6038dc + reason: + description: 'The reason the shift failed to publish.' + type: string + example: 'Employee is already assigned to a published shift that overlaps with this shift.' + type: object + Scheduling-PublishShiftsResult-V1: + description: 'Result of a bulk publish operation, containing both successfully published shifts and any failures' + required: + - published + - failed + properties: + published: + description: 'The shifts that were successfully published.' + type: array + items: + $ref: '#/components/schemas/Scheduling-SchedulingShift-V1' + failed: + description: 'The shifts that failed to publish due to conflicts.' + type: array + items: + $ref: '#/components/schemas/Scheduling-PublishShiftsFailure-V1' + type: object + Scheduling-SchedulingShift-V1: + description: 'A shift for scheduling' + required: + - id + - scheduleId + - status + - color + - start + - end + - timezone + properties: + id: + description: 'The ID of the shift. This can be the UUIDv7 of the shift instance, or a composite ID (<recurringShiftDefinitionId>_<recurrenceId>) for uninstantiated recurring shifts.' type: string - status: - description: 'Employee status' + readOnly: true + example: 019aa09f-0712-74cb-9186-8ad0eb6038dc_20240101T093000 + scheduleId: + description: 'The ID of the schedule the shift belongs to.' type: string + format: uuid + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the shift.' + example: 'Morning Shift' + oneOf: + - + type: string + - + type: 'null' + status: + description: 'The status of the shift.' enum: - - active - - inactive - ids: - description: 'List of employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`).' + - planned + - published + - cancelled + - deleted + color: + description: '6 character color hex code.' + type: string + example: 00FFAA + capacity: + description: 'The expected headcount for the shift. Defaults to 1 if unset.' + example: 1 + oneOf: + - + type: integer + - + type: 'null' + start: + description: 'UTC timestamp of the start of the shift.' + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'UTC timestamp of the end of the shift.' + example: '2025-01-01T14:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: 'The timezone for the shift.' + type: string + example: America/Denver + recurrenceRule: + description: 'The recurrence rule. Follows the iCalendar RFC 5545 RRULE syntax.' + example: FREQ=WEEKLY;INTERVAL=1 + oneOf: + - + type: string + - + type: 'null' + recurrenceId: + description: 'The stable identifier for a recurrence, which is the original start of shift according to recurrence rules. Null for non-recurring shifts.' + example: 20240101T090000 + oneOf: + - + type: string + - + type: 'null' + recurrenceDtstart: + description: 'The UTC start time for a recurring shift and the anchor point for the recurrence rule. Null for non-recurring shifts.' + example: '2024-01-01T09:00:00Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceDtend: + description: 'The UTC end time for a recurring shift. Null for non-recurring shifts.' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + recurrenceUntil: + description: 'The UTC datetime when the recurrence series stops generating new occurrences (UNTIL in RRULE). Null for non-recurring shifts.' + example: '2024-12-31T23:59:59Z' + oneOf: + - + type: string + - + type: 'null' + employeeIds: + description: 'The list of employee IDs currently assigned.' type: array items: type: integer example: - - 123 - - 124 - type: object - GetEmployeesResponseObject: - description: 'Complete response object for employee list API containing employee data, metadata, and navigation links' - required: - - data - - meta - - _links - properties: - data: - $ref: '#/components/schemas/GetEmployeesEmployeeResponseCollection' - description: 'Collection of employee data objects' - meta: - $ref: '#/components/schemas/CursorPagedResponseMetadata' - description: 'Metadata information including total count and pagination details' - _links: - description: 'Navigation links for API pagination' - properties: - self: - description: 'Link to current page' - properties: - href: - description: 'URL of the current page' - type: string - type: object - next: - description: 'Link to next page' - properties: - href: - description: 'URL of the next page' - type: string - type: object - prev: - description: 'Link to previous page' - properties: - href: - description: 'URL of the previous page' - type: string + - 10 + - 20 + unpublishedChanges: + description: 'The pending changes that have not been published.' + oneOf: + - type: object - type: object - type: object - EmployeeOptionalField: - description: 'Valid field names that can be passed via the `fields` query parameter to request additional employee data beyond the default set.' - type: string - enum: - - workEmail - - homeEmail - - bestEmail - - middleName - - workPhone - - workPhoneExtension - - mobilePhone - - homePhone - - skypeUsername - - linkedinUrl - - facebookUrl - - instagramUrl - - twitterUrl - - pinterestUrl - - birthDate - - hireDate - - divisionName - - divisionId - - departmentName - - departmentId - - locationName - - locationId - - jobTitleId - - employmentStatusName - - employmentStatusId - - reportsToName - - reportsToId - LevelsAndBands-GroupStatusCounts: - description: 'Schema for levels and bands group status counts' - properties: - draft: - description: 'Number of levels/bands in draft status' - type: integer - historic: - description: 'Number of levels/bands in historic status' - type: integer - published: - description: 'Number of levels/bands in published status' - type: integer + - + type: 'null' + createdAt: + description: 'UTC timestamp when the shift was created' + type: string + format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'UTC timestamp when the shift was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'UTC timestamp when the shift was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - LevelsAndBands-Employee: - description: 'Job titles employee object' + Scheduling-Timezone-V1: + description: 'A timezone resource with its name and current UTC offset.' + required: + - name + - offset properties: - id: - description: 'Employee id' - type: integer name: - description: 'Employee name' + description: 'The timezone identifier.' type: string + example: America/Denver + offset: + description: 'The current UTC offset for this timezone.' + type: string + example: '-7:00' type: object - LevelsAndBands-JobTitle: - description: 'Job Titles Job Title Data Object' + EmployeeTimesheetEntryCollectionTransformer: + description: 'Class EmployeeTimesheetEntryCollectionTransformer' + type: array + items: + $ref: '#/components/schemas/EmployeeTimesheetEntryTransformer' + EmployeeTimesheetEntryTransformer: properties: id: - description: 'Job title id' + description: 'Timesheet entry ID' type: integer - jobTitle: - description: 'Job title name' + employeeId: + description: 'Employee ID' + type: integer + type: + description: 'Entry type' + type: string + date: + description: 'Date of the timesheet' + type: string + format: date + start: + description: 'Start time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'End time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: Timezone + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours worked' + oneOf: + - + type: number + format: float + - + type: 'null' + note: + description: Note + oneOf: + - + type: string + - + type: 'null' + projectInfo: + oneOf: + - + $ref: '#/components/schemas/ProjectInfoApiTransformer' + - + type: 'null' + approvedAt: + description: 'Approved time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + approved: + description: 'Whether the timesheet entry is approved' + type: boolean + createdAt: + description: 'Created time' type: string + format: date-time + updatedAt: + description: 'Updated time' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - LevelsAndBands-JobTitleWithEmployees: - description: 'Levels and bands job titles with employees object' + TimesheetEntryInfoApiTransformer: properties: id: - description: 'Job id' + description: 'Timesheet entry ID' type: integer - title: - description: 'Job title' + employeeId: + description: 'Employee ID' + type: integer + type: + description: 'Entry type' type: string - employees: - description: 'Employees with this job title' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-Employee' - levelId: - description: 'Associated level ID, null if not associated with any level' - type: - - integer - - 'null' - type: object - LevelsAndBands-JobTitlesCollection: - description: 'Job Titles Collection' + date: + description: 'Date of the timesheet' + type: string + format: date + start: + description: 'Start time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + end: + description: 'End time' + oneOf: + - + type: string + format: date-time + - + type: 'null' + timezone: + description: Timezone + oneOf: + - + type: string + - + type: 'null' + hours: + description: 'Hours worked' + oneOf: + - + type: number + format: float + - + type: 'null' + note: + description: Note + oneOf: + - + type: string + - + type: 'null' + projectInfo: + oneOf: + - + $ref: '#/components/schemas/ProjectInfoApiTransformer' + - + type: 'null' + breakInfo: + description: 'Break information' + properties: + id: + description: 'Break ID' + type: integer + name: + description: 'Break name' + type: string + oneOf: + - + type: object + - + type: 'null' type: object - LevelsAndBands-Group: - title: 'Group Data Object' - description: 'Represents a compensation level group with its levels' + TimesheetEntryInfoCollectionApiTransformer: + description: 'Class TimesheetEntryInfoApiTransformer' + type: array + items: + $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' + TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1: + description: 'Collection of time tracking breaks to create or update without a policy' + type: array + items: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1' + TimeTracking-TimeTrackingBreakAssessmentCollection-V1: + description: 'Collection of time tracking break assessments' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessment-V1' + TimeTracking-TimeTrackingBreakAvailabilityCollection-V1: + description: 'Collection of time tracking break availabilities' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailability-V1' + TimeTracking-TimeTrackingBreakCollection-V1: + description: 'Collection of time tracking breaks' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + TimeTracking-TimeTrackingBreakPolicyCollection-V1: + description: 'Collection of time tracking break policies' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' + TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1: + description: 'Data contract for creating or updating a break' properties: id: - description: 'The group ID. Null for new groups.' - type: - - integer - - 'null' - groupName: - description: 'The name of the group. A warning will be shown if blank.' - type: - - string - - 'null' - levels: - description: 'Array of levels in this group' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-Level' - type: object - LevelsAndBands-Level: - title: 'Level Data Object' - description: 'Represents a single compensation level' - properties: - levelId: - description: 'The level ID. Null for new levels.' - type: - - integer - - 'null' - levelName: - description: 'The name of the level' - type: - - string - - 'null' - payBand: - $ref: '#/components/schemas/LevelsAndBands-PayBand' - description: 'Pay band associated with this level' - jobTitles: - description: 'Array of job titles associated with this level' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-JobTitle' - errors: - description: 'Array of validation errors for this level' - type: array - items: - type: string - warnings: - description: 'Array of validation warnings for this level' - type: array - items: - type: string - type: object - LevelsAndBands-ErrorWarningIdentifier: - title: 'Error Warning Identifier' - description: 'Object for compensation level groups and levels' - required: - - groupId - - levelId - properties: - groupId: - description: 'Group ID' - type: integer - levelId: - description: 'Level ID' - type: integer - type: object - LevelsAndBands-JobTitlesStatus: - title: 'Job Titles Status' - description: 'Object for compensation level groups and levels' - required: - - isComplete - - errors - - warnings - properties: - isComplete: - description: 'Is the job titles step complete' + description: 'The unique identifier of the break. If not included, a new break will be created.' + oneOf: + - + type: string + format: uuid + - + type: 'null' + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + paid: + description: 'Whether the break is paid' type: boolean - errors: - description: 'Array of errors' - type: array - items: - type: string - warnings: - description: 'Array of warnings' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-JobTitlesCollection' - type: object - LevelsAndBands-LevelsAndBands: - title: 'Levels and Bands' - description: 'Object for compensation level groups and levels' - required: - - groups - properties: - groups: - description: 'Array of compensation level groups to upsert' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-Group' + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' type: object - LevelsAndBands-LevelsAndBandsStatus: - title: 'Levels and Bands Status' - description: 'Object for compensation level groups and levels' - required: - - levels - - payBands - - jobTitles - - review + TimeTracking-CreateTimeTrackingBreak-V1: + description: 'Data contract for creating a break' properties: - levels: - $ref: '#/components/schemas/LevelsAndBands-StepStatus' - description: 'Object for compensation level groups and levels' - payBands: - $ref: '#/components/schemas/LevelsAndBands-StepStatus' - description: 'Object for compensation level groups and levels' - jobTitles: - $ref: '#/components/schemas/LevelsAndBands-JobTitlesStatus' - description: 'Object for compensation level groups and levels' - review: - $ref: '#/components/schemas/LevelsAndBands-StepStatus' - description: 'Object for compensation level groups and levels' + name: + description: 'The name of the break' + type: string + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + paid: + description: 'Whether the break is paid' + type: boolean + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + oneOf: + - + type: string + format: time + - + type: 'null' type: object - LevelsAndBands-StepStatus: - title: 'Step Status' - description: 'Object for compensation level groups and levels' + TimeTracking-CreateTimeTrackingBreakPolicy-V1: + description: 'Data contract for creating a break policy' required: - - isComplete - - errors - - warnings + - name properties: - isComplete: - description: 'Whether the step is complete' + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' type: boolean - errors: - description: 'Array of errors' - type: array - items: - $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' - warnings: - description: 'Array of warnings' + example: true + breaks: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' + employeeIds: + description: 'The employees that should be assigned to this policy' type: array items: - $ref: '#/components/schemas/LevelsAndBands-ErrorWarningIdentifier' + type: integer type: object - LevelsAndBands-PayBand: - description: 'Pay band data object' + TimeTracking-SyncTimeTrackingBreakPolicy-V1: + description: 'Data contract for syncing a break policy' properties: - levelId: - description: 'The level ID' - type: - - integer - - 'null' - min: - description: 'The minimum value for the level' - type: number - format: float - mid: - description: 'The middle value for the level' - type: number - format: float - max: - description: 'The maximum value for the level' - type: number - format: float - currencyCode: - description: 'The currency code for the level' - type: - - string - - 'null' - percentageRange: - description: 'The percentage range for the level' - type: number - format: float - compensationType: - description: 'The compensation type for the level' + name: + description: 'Name of the break policy' type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + breaks: + $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' + employeeIds: + description: 'The employees that should be assigned to this policy' + type: array + items: + type: integer type: object - LocationResponseObject: - description: 'Transformer for location data with nested address structure' + TimeTracking-TimeTrackingBreak-V1: + description: 'A break for time tracking belonging to a break policy' properties: id: - description: 'Unique identifier for the location' + description: 'The unique identifier for the time tracking break' type: string - label: - description: 'Display name for the location' + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'The name of the break' type: string - archived: - description: 'Whether the location is archived' - type: boolean - manageable: - description: 'Whether the location is manageable' + example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + paid: + description: 'Whether the break is paid' type: boolean - address: - description: 'Address information for the location' - properties: - address1: - description: 'Address line 1. Should only be null if this is a remote location' - type: - - string - - 'null' - address2: - description: 'Address line 2' - type: - - string - - 'null' - city: - description: 'City name. Should only be null if this is a remote location' - type: - - string - - 'null' - stateId: - description: 'State identifier. Should only be null if this is a remote location' - type: - - string - - 'null' - state: - description: 'State information. Optional and requested via expand property from the request' - properties: - id: - description: 'State identifier' - type: string - name: - description: 'State name' - type: string - abbreviation: - description: 'State abbreviation' - type: string - type: object - zipcode: - description: 'Postal code. Should only be null if this is a remote location' - type: - - string - - 'null' - countryId: - description: 'Country identifier. Should only be null if this is a remote location' - type: - - string - - 'null' - country: - description: 'Country information. Optional and requested via expand property from the request' - properties: - id: - description: 'Country identifier' - type: string - name: - description: 'Country name' - type: string - isoCode: - description: 'Country ISO code' - type: string - type: object - timezone: - description: 'Timezone name' - type: - - string - - 'null' - remoteLocation: - description: 'Whether this is a remote location' - type: boolean - type: object + duration: + description: 'Duration of the break in minutes' + type: integer + example: 60 + availabilityType: + description: 'When the break is available to be taken' + enum: + - anytime + - hours_worked + - time_of_day + availabilityMinHoursWorked: + description: 'Minimum hours that must be worked before the break can be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityMaxHoursWorked: + description: 'Maximum hours that can be worked before the break must be taken' + oneOf: + - + type: number + format: float + - + type: 'null' + availabilityStartTime: + description: 'Earliest time the break can be taken (HH:MM format)' + example: '08:00' + oneOf: + - + type: string + format: time + - + type: 'null' + availabilityEndTime: + description: 'Latest time the break can be taken (HH:MM format)' + example: '17:00' + oneOf: + - + type: string + format: time + - + type: 'null' createdAt: - description: 'ISO 8601 timestamp of when the location was created' - type: - - string - - 'null' - format: date-time - archivedAt: - description: 'ISO 8601 timestamp of when the location was archived' - type: - - string - - 'null' + description: 'ISO 8601 timestamp when the break was created' + type: string format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break was deleted' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - EmployeeTimesheetEntryCollectionTransformer: - description: 'Class EmployeeTimesheetEntryCollectionTransformer' - type: array - items: - $ref: '#/components/schemas/EmployeeTimesheetEntryTransformer' - EmployeeTimesheetEntryTransformer: + TimeTracking-TimeTrackingBreakAssessment-V1: + description: 'A break assessment' properties: id: - description: 'Timesheet entry ID' - type: integer + description: 'The unique identifier for the time tracking break assessment' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + breakId: + description: 'The unique identifier of the break' + type: string + format: uuid + readOnly: true + example: 4983000f-b8cd-436a-bbf0-574cfd7a8517 employeeId: - description: 'Employee ID' + description: 'The id of the employee' type: integer - type: - description: 'Entry type' - type: string + example: 40342 + employeeTimesheetId: + description: 'The id of the employee timesheet' + type: integer + example: 123 date: - description: 'Date of the timesheet' + description: 'The date of the break assessment' type: string format: date - start: - description: 'Start time' - type: - - string - - 'null' - format: date-time - end: - description: 'End time' - type: - - string - - 'null' - format: date-time + example: '2025-01-01' timezone: - description: Timezone - type: - - string - - 'null' - hours: - description: 'Hours worked' - type: - - number - - 'null' - format: float - note: - description: Note - type: - - string - - 'null' - projectInfo: + description: 'The timezone of the break assessment' + type: string + example: America/Los_Angeles + result: + description: 'The result of the break assessment' + enum: + - compliant + - violation + - waived + availableYmdt: + description: 'ISO 8601 timestamp when the break became available' + readOnly: true + example: '2025-01-01T06:00:00Z' oneOf: - - $ref: '#/components/schemas/ProjectInfoApiTransformer' + type: string + format: date-time + - + type: 'null' + unavailableYmdt: + description: 'ISO 8601 timestamp when the break became unavailable' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time - type: 'null' - approvedAt: - description: 'Approved time' - type: - - string - - 'null' - format: date-time - approved: - description: 'Whether the timesheet entry is approved' - type: boolean createdAt: - description: 'Created time' + description: 'ISO 8601 timestamp when the break was created' type: string format: date-time + readOnly: true + example: '2025-01-01T06:00:00Z' updatedAt: - description: 'Updated time' - type: - - string - - 'null' - format: date-time + description: 'ISO 8601 timestamp when the break was last updated' + readOnly: true + example: '2025-01-01T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + violations: + description: 'Violations associated with the assessment ' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentViolation-V1' + clockEntryIds: + description: 'Clock entry ids associated with the time tracking break assessment' + type: array + items: + type: integer + expectedDuration: + description: 'The expected duration of the break in minutes' + example: 15 + oneOf: + - + type: integer + - + type: 'null' + recordedDuration: + description: 'The recorded duration of the break in minutes' + example: 10 + oneOf: + - + type: integer + - + type: 'null' + durationDifference: + description: 'The difference between the expected and recorded duration in minutes' + example: -5 + oneOf: + - + type: integer + - + type: 'null' type: object - TimesheetEntryInfoApiTransformer: + TimeTracking-TimeTrackingBreakAssessmentViolation-V1: + description: 'A break assessment violation' properties: - id: - description: 'Timesheet entry ID' - type: integer - employeeId: - description: 'Employee ID' - type: integer - type: - description: 'Entry type' - type: string - date: - description: 'Date of the timesheet' + assessmentId: + description: 'The unique identifier for the time tracking break assessment.' type: string - format: date - start: - description: 'Start time' - type: - - string - - 'null' - format: date-time - end: - description: 'End time' - type: - - string - - 'null' - format: date-time - timezone: - description: Timezone - type: - - string - - 'null' - hours: - description: 'Hours worked' - type: - - number - - 'null' - format: float - note: - description: Note - type: - - string - - 'null' - projectInfo: + format: uuid + readOnly: true + example: 21e369e9-295c-41fd-8973-08ee3b54f1a6 + type: + description: 'The type of the violation' + enum: + - break_started_early + - break_started_late + - break_ended_early + - break_ended_late + - break_missed + readOnly: true + employeeTimesheetClockEntryId: + description: 'The id of the employee timesheet clock entry' + readOnly: true + example: 101 + oneOf: + - + type: number + format: integer + - + type: 'null' + amount: + description: 'The amount of the violation' + readOnly: true + example: 101 oneOf: - - $ref: '#/components/schemas/ProjectInfoApiTransformer' + type: number + format: integer - type: 'null' - breakInfo: - description: 'Break information' - properties: - id: - description: 'Break ID' - type: integer - name: - description: 'Break name' - type: string - type: - - object - - 'null' type: object - TimesheetEntryInfoCollectionApiTransformer: - description: 'Class TimesheetEntryInfoApiTransformer' - type: array - items: - $ref: '#/components/schemas/TimesheetEntryInfoApiTransformer' - TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1: - description: 'Collection of time tracking breaks to create or update without a policy' - type: array - items: - $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1' - TimeTracking-TimeTrackingBreakAssessmentCollection-V1: - description: 'Collection of time tracking break assessments' - type: array - items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessment-V1' - TimeTracking-TimeTrackingBreakAvailabilityCollection-V1: - description: 'Collection of time tracking break availabilities' - type: array - items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAvailability-V1' - TimeTracking-TimeTrackingBreakCollection-V1: - description: 'Collection of time tracking breaks' - type: array - items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' - TimeTracking-TimeTrackingBreakPolicyCollection-V1: - description: 'Collection of time tracking break policies' - type: array - items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakPolicy-V1' - TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicy-V1: - description: 'Data contract for creating or updating a break' + TimeTracking-TimeTrackingBreakAvailability-V1: + description: 'Break availability information for time tracking' properties: id: - description: 'The unique identifier of the break. If not included, a new break will be created.' - type: - - string - - 'null' + description: 'The unique identifier for the time tracking break' + type: string format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 name: description: 'The name of the break' type: string + readOnly: true example: 'Lunch Break' + policyId: + description: 'The unique identifier of the break policy this break belongs to' + type: string + format: uuid + readOnly: true paid: description: 'Whether the break is paid' type: boolean + readOnly: true duration: description: 'Duration of the break in minutes' type: integer + readOnly: true example: 60 availabilityType: description: 'When the break is available to be taken' @@ -14918,33 +22922,188 @@ components: - anytime - hours_worked - time_of_day - availabilityMinHoursWorked: - description: 'Minimum hours that must be worked before the break can be taken' - type: - - number - - 'null' - format: float - availabilityMaxHoursWorked: - description: 'Maximum hours that can be worked before the break must be taken' - type: - - number - - 'null' - format: float - availabilityStartTime: - description: 'Earliest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time - availabilityEndTime: - description: 'Latest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time + readOnly: true + calculatedAt: + description: 'When the break availability was calculated' + type: string + format: date-time + readOnly: true + effectiveAt: + description: 'Timestamp that all time-based calculations are evaluated relative to.' + type: string + format: date-time + readOnly: true + timezone: + description: 'The timezone the break availability is calculated in' + type: string + readOnly: true + recordedDuration: + description: 'The duration of the break that has been recorded so far' + type: integer + readOnly: true + available: + description: 'Whether the break is currently available to be taken' + type: boolean + readOnly: true + availableAfterMinutesWorked: + description: 'Minutes of work after which the break becomes available' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + availableIn: + description: 'Minutes until the break becomes available' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + unavailableIn: + description: 'Minutes until the break becomes unavailable' + readOnly: true + oneOf: + - + type: integer + - + type: 'null' + availableAt: + description: 'When the break is or becomes available' + readOnly: true + oneOf: + - + type: string + format: date-time + - + type: 'null' + unavailableAt: + description: 'When the break is or becomes unavailable' + readOnly: true + oneOf: + - + type: string + format: date-time + - + type: 'null' type: object - TimeTracking-CreateTimeTrackingBreak-V1: - description: 'Data contract for creating a break' + TimeTracking-TimeTrackingBreakPolicy-V1: + description: 'A policy governing breaks for time tracking' + properties: + id: + description: 'Unique identifier for the break policy' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the break policy was created' + type: string + format: date-time + readOnly: true + example: '2025-10-15T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break policy was last updated' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break policy was deleted' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + type: object + TimeTracking-TimeTrackingBreakPolicyWithRelations-V1: + description: 'A break policy for time tracking' + properties: + id: + description: 'Unique identifier for the break policy' + type: string + format: uuid + readOnly: true + example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 + name: + description: 'Name of the break policy' + type: string + example: California + description: + description: 'Optional description of the break policy' + example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' + allEmployeesAssigned: + description: 'Whether all employees are assigned to this break policy' + type: boolean + example: true + createdAt: + description: 'ISO 8601 timestamp when the break policy was created' + type: string + format: date-time + readOnly: true + example: '2025-10-15T06:00:00Z' + updatedAt: + description: 'ISO 8601 timestamp when the break policy was last updated' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + deletedAt: + description: 'ISO 8601 timestamp when the break policy was deleted' + readOnly: true + example: '2025-10-15T06:00:00Z' + oneOf: + - + type: string + format: date-time + - + type: 'null' + breaks: + description: 'The breaks that are assigned to this policy' + type: array + items: + $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' + employeeIds: + description: 'The employees that are assigned to this policy' + type: array + items: + type: integer + type: object + TimeTracking-UpdateTimeTrackingBreak-V1: + description: 'Data contract for partially updating a break. All fields are optional; only fields present in the request body will be updated.' properties: name: description: 'The name of the break' @@ -14960,7 +23119,6 @@ components: duration: description: 'Duration of the break in minutes' type: integer - example: 60 availabilityType: description: 'When the break is available to be taken' enum: @@ -14969,33 +23127,39 @@ components: - time_of_day availabilityMinHoursWorked: description: 'Minimum hours that must be worked before the break can be taken' - type: - - number - - 'null' - format: float + oneOf: + - + type: number + format: float + - + type: 'null' availabilityMaxHoursWorked: description: 'Maximum hours that can be worked before the break must be taken' - type: - - number - - 'null' - format: float + oneOf: + - + type: number + format: float + - + type: 'null' availabilityStartTime: description: 'Earliest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time + oneOf: + - + type: string + format: time + - + type: 'null' availabilityEndTime: description: 'Latest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time + oneOf: + - + type: string + format: time + - + type: 'null' type: object - TimeTracking-CreateTimeTrackingBreakPolicy-V1: - description: 'Data contract for creating a break policy' - required: - - name + TimeTracking-UpdateTimeTrackingBreakPolicy-V1: + description: 'Data contract for updating a break policy' properties: name: description: 'Name of the break policy' @@ -15003,604 +23167,718 @@ components: example: California description: description: 'Optional description of the break policy' - type: - - string - - 'null' example: 'All breaks for California compliance' + oneOf: + - + type: string + - + type: 'null' allEmployeesAssigned: description: 'Whether all employees are assigned to this break policy' type: boolean example: true - breaks: - $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' - employeeIds: - description: 'The employees that should be assigned to this policy' + type: object + ClockEntriesSchema: + description: 'Request body schema for operations involving multiple clock entries' + required: + - entries + properties: + entries: + description: 'Array of clock entries' type: array items: - type: integer + $ref: '#/components/schemas/ClockEntrySchema' + minItems: 1 type: object - TimeTracking-SyncTimeTrackingBreakPolicy-V1: - description: 'Data contract for syncing a break policy' + ClockEntryIdsSchema: + description: 'Request body schema for operations involving multiple clock entry IDs' + required: + - clockEntryIds properties: - name: - description: 'Name of the break policy' - type: string - example: California - description: - description: 'Optional description of the break policy' - type: - - string - - 'null' - example: 'All breaks for California compliance' - allEmployeesAssigned: - description: 'Whether all employees are assigned to this break policy' - type: boolean - example: true - breaks: - $ref: '#/components/schemas/TimeTracking-CreateOrUpdateTimeTrackingBreakWithoutPolicyCollection-V1' - employeeIds: - description: 'The employees that should be assigned to this policy' + clockEntryIds: + description: 'Array of clock entry IDs to process' type: array items: type: integer + minItems: 1 + example: + - 10 + - 11 + - 12 type: object - TimeTracking-TimeTrackingBreak-V1: - description: 'A break for time tracking belonging to a break policy' + ClockEntrySchema: + description: 'Schema for a single clock entry' + required: + - employeeId + - date + - start + - end properties: - id: - description: 'The unique identifier for the time tracking break' + employeeId: + description: 'Unique identifier for the employee.' + type: integer + date: + description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' type: string - format: uuid - readOnly: true - example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 - name: - description: 'The name of the break' + format: date + example: '2024-01-01' + start: + description: 'Start time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' type: string - example: 'Lunch Break' - policyId: - description: 'The unique identifier of the break policy this break belongs to' + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' + example: '09:00' + end: + description: 'End time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' type: string - format: uuid - paid: - description: 'Whether the break is paid' - type: boolean - duration: - description: 'Duration of the break in minutes' - type: integer - example: 60 - availabilityType: - description: 'When the break is available to be taken' - enum: - - anytime - - hours_worked - - time_of_day - availabilityMinHoursWorked: - description: 'Minimum hours that must be worked before the break can be taken' - type: - - number - - 'null' - format: float - availabilityMaxHoursWorked: - description: 'Maximum hours that can be worked before the break must be taken' - type: - - number - - 'null' - format: float - availabilityStartTime: - description: 'Earliest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time - example: '08:00' - availabilityEndTime: - description: 'Latest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time + pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' example: '17:00' - createdAt: - description: 'ISO 8601 timestamp when the break was created' - type: string - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - updatedAt: - description: 'ISO 8601 timestamp when the break was last updated' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - deletedAt: - description: 'ISO 8601 timestamp when the break was deleted' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - type: object - TimeTracking-TimeTrackingBreakAssessment-V1: - description: 'A break assessment' - properties: id: - description: 'The unique identifier for the time tracking break assessment' - type: string - format: uuid - readOnly: true - example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 - breakId: - description: 'The unique identifier of the break' - type: string - format: uuid - readOnly: true - example: 4983000f-b8cd-436a-bbf0-574cfd7a8517 - employeeId: - description: 'The id of the employee' + description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry.' type: integer - example: 40342 - employeeTimesheetId: - description: 'The id of the employee timesheet' + projectId: + description: 'The ID of the project to associate with the timesheet entry.' type: integer - example: 123 - date: - description: 'The date of the break assessment' - type: string - format: date - example: '2025-01-01' - timezone: - description: 'The timezone of the break assessment' + taskId: + description: 'The ID of the task to associate with the timesheet entry.' + type: integer + note: + description: 'Optional note to associate with the timesheet entry.' type: string - example: America/Los_Angeles - result: - description: 'The result of the break assessment' - enum: - - compliant - - violation - - waived - availableYmdt: - description: 'ISO 8601 timestamp when the break became available' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - unavailableYmdt: - description: 'ISO 8601 timestamp when the break became unavailable' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - createdAt: - description: 'ISO 8601 timestamp when the break was created' + breakId: + description: 'Optional break id to associate with the timesheet entry.' + oneOf: + - + type: string + format: uuid + - + type: 'null' + type: object + HourEntryIdsSchema: + description: 'Request body schema for operations involving multiple hour entry IDs' + required: + - hourEntryIds + properties: + hourEntryIds: + description: 'Array of hour entry IDs to process' + type: array + items: + type: integer + minItems: 1 + example: + - 100 + - 101 + - 102 + type: object + TotalRewards-BenefitDetailsValues: + description: 'Schema for a total rewards benefit details value' + properties: + name: + description: Name type: string - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - updatedAt: - description: 'ISO 8601 timestamp when the break was last updated' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-01-01T06:00:00Z' - violations: - description: 'Violations associated with the assessment ' + companyContributionAmount: + description: 'Company contribution amount' + type: string + companyContributionSubvalue: + description: 'Source contribution when the amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + summary: + description: Summary + oneOf: + - + type: string + - + type: 'null' + url: + description: Url + oneOf: + - + type: string + - + type: 'null' + benefitModalValuesLink: + description: 'Link to the benefits modal' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-BenefitSectionValues: + description: 'Schema for a total rewards benefit section' + properties: + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary' + benefitDetails: + description: 'Benefit details' type: array items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreakAssessmentViolation-V1' - clockEntryIds: - description: 'Clock entry ids associated with the time tracking break assessment' + $ref: '#/components/schemas/TotalRewards-BenefitDetailsValues' + type: object + TotalRewards-CalendarSectionValues: + description: 'Schema for total rewards calendar section' + properties: + holidays: + description: 'List of holidays' type: array items: - type: integer - expectedDuration: - description: 'The expected duration of the break in minutes' - type: - - integer - - 'null' - example: 15 - recordedDuration: - description: 'The recorded duration of the break in minutes' - type: - - integer - - 'null' - example: 10 - durationDifference: - description: 'The difference between the expected and recorded duration in minutes' - type: - - integer - - 'null' - example: -5 + $ref: '#/components/schemas/TotalRewards-HolidayValue' + timeOffPolicies: + description: 'List of time off policies' + type: array + items: + $ref: '#/components/schemas/TotalRewards-TimeOffPolicyValue' + hourlyAccrualDisclaimer: + description: 'Hourly accrual disclaimer text' + oneOf: + - + type: string + - + type: 'null' type: object - TimeTracking-TimeTrackingBreakAssessmentViolation-V1: - description: 'A break assessment violation' + TotalRewards-CompSummaryValues: + description: 'Schema for total rewards compensation summary values' properties: - assessmentId: - description: 'The unique identifier for the time tracking break assessment.' + title: + description: Title type: string - format: uuid - readOnly: true - example: 21e369e9-295c-41fd-8973-08ee3b54f1a6 - type: - description: 'The type of the violation' - enum: - - break_started_early - - break_started_late - - break_ended_early - - break_ended_late - - break_missed - readOnly: true - employeeTimesheetClockEntryId: - description: 'The id of the employee timesheet clock entry' - type: - - number - - 'null' - format: integer - readOnly: true - example: 101 - amount: - description: 'The amount of the violation' - type: - - number - - 'null' - format: integer - readOnly: true - example: 101 + subtitle: + description: Subtitle + oneOf: + - + type: string + - + type: 'null' + value: + description: Value + oneOf: + - + type: string + - + type: 'null' + subvalue: + description: 'When conversion applies: localized “(from …)” fragment including the original amount' + oneOf: + - + type: string + - + type: 'null' type: object - TimeTracking-TimeTrackingBreakAvailability-V1: - description: 'Break availability information for time tracking' + TotalRewards-CustomDisclaimerInfo: + description: 'Schema for a total rewards custom disclaimer info' properties: - id: - description: 'The unique identifier for the time tracking break' + isViewerAdmin: + description: 'Is admin currently viewing' + type: boolean + customDisclaimer: + description: 'Custom disclaimer text' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EquityDetailsValues: + description: 'Schema for total rewards equity details values' + properties: + cliffMonths: + description: 'Cliff months' + oneOf: + - + type: integer + - + type: 'null' + estimatedExerciseCost: + description: 'Estimated exercise cost' + oneOf: + - + type: string + - + type: 'null' + estimatedExerciseCostSubvalue: + description: 'Source exercise cost when converted' + oneOf: + - + type: string + - + type: 'null' + estimatedSharePrice: + description: 'Estimated share price' type: string - format: uuid - readOnly: true - example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 - name: - description: 'The name of the break' + estimatedSharePriceSubvalue: + description: 'Source share price when converted' + oneOf: + - + type: string + - + type: 'null' + estimatedTotalValue: + description: 'Estimated total value' type: string - readOnly: true - example: 'Lunch Break' - policyId: - description: 'The unique identifier of the break policy this break belongs to' + estimatedTotalValueSubvalue: + description: 'Source total when converted' + oneOf: + - + type: string + - + type: 'null' + grantDate: + description: 'Grant date' type: string - format: uuid - readOnly: true - paid: - description: 'Whether the break is paid' - type: boolean - readOnly: true - duration: - description: 'Duration of the break in minutes' + format: date + grantType: + description: 'Grant type' + type: string + grantName: + description: 'Grant name' + oneOf: + - + type: string + - + type: 'null' + equityGrowthChartData: + description: 'Equity growth chart data' + oneOf: + - + type: array + items: + $ref: '#/components/schemas/TotalRewards-EquityGrowthChartItem' + - + type: 'null' + numShares: + description: 'Number of shares' type: integer - readOnly: true - example: 60 - availabilityType: - description: 'When the break is available to be taken' - enum: - - anytime - - hours_worked - - time_of_day - readOnly: true - calculatedAt: - description: 'When the break availability was calculated' + numVestedShares: + description: 'Number of vested shares' + type: integer + percentVested: + description: 'Percent vested' + type: number + format: float + strikePrice: + description: 'Strike price' + oneOf: + - + type: string + - + type: 'null' + strikePriceSubvalue: + description: 'Source strike when converted' + oneOf: + - + type: string + - + type: 'null' + vestingMonths: + description: 'Vesting months' + oneOf: + - + type: integer + - + type: 'null' + vestingSchedule: + description: 'Vesting schedule' type: string - format: date-time - readOnly: true - effectiveAt: - description: 'Timestamp that all time-based calculations are evaluated relative to.' + vestingStartDate: + description: 'Vesting start date' type: string - format: date-time - readOnly: true - timezone: - description: 'The timezone the break availability is calculated in' + format: date + vestedValue: + description: 'Vested value' type: string - readOnly: true - recordedDuration: - description: 'The duration of the break that has been recorded so far' - type: integer - readOnly: true - available: - description: 'Whether the break is currently available to be taken' - type: boolean - readOnly: true - availableAfterMinutesWorked: - description: 'Minutes of work after which the break becomes available' - type: - - integer - - 'null' - readOnly: true - availableIn: - description: 'Minutes until the break becomes available' - type: - - integer - - 'null' - readOnly: true - unavailableIn: - description: 'Minutes until the break becomes unavailable' - type: - - integer - - 'null' - readOnly: true - availableAt: - description: 'When the break is or becomes available' - type: - - string - - 'null' - format: date-time - readOnly: true - unavailableAt: - description: 'When the break is or becomes unavailable' - type: - - string - - 'null' - format: date-time - readOnly: true + vestedValueSubvalue: + description: 'Source vested when converted' + oneOf: + - + type: string + - + type: 'null' type: object - TimeTracking-TimeTrackingBreakPolicy-V1: - description: 'A policy governing breaks for time tracking' + TotalRewards-EquityEstimatedValuationValues: + description: 'Schema for total rewards equity growth valuation' properties: - id: - description: 'Unique identifier for the break policy' - type: string - format: uuid - readOnly: true - example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 - name: - description: 'Name of the break policy' + equityGrowthEstimationItems: + description: 'Equity estimated growth items' + type: array + items: + $ref: '#/components/schemas/TotalRewards-EquityGrowthEstimation' + numberOfVestedShares: + description: 'Number of vested shares' + type: integer + numberOfTotalShares: + description: 'Number of total shares' + type: integer + equityGrowthSliderMax: + description: 'Equity growth slider max value' + oneOf: + - + type: integer + - + type: 'null' + equityGrowthSliderMin: + description: 'Equity growth slider min value' + oneOf: + - + type: integer + - + type: 'null' + type: object + TotalRewards-EquityGrowthChartItem: + description: 'Schema for total rewards equity growth chart item' + properties: + label: + description: Label type: string - example: California - description: - description: 'Optional description of the break policy' - type: - - string - - 'null' - example: 'All breaks for California compliance' - allEmployeesAssigned: - description: 'Whether all employees are assigned to this break policy' - type: boolean - example: true - createdAt: - description: 'ISO 8601 timestamp when the break policy was created' + estimatedNetValue: + description: 'Estimated value' type: string - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' - updatedAt: - description: 'ISO 8601 timestamp when the break policy was last updated' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' - deletedAt: - description: 'ISO 8601 timestamp when the break policy was deleted' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' + subvalue: + description: 'Source amount for estimated value when it was currency-converted' + oneOf: + - + type: string + - + type: 'null' + vested: + description: 'Amount vested' + oneOf: + - + type: number + format: float + - + type: 'null' + current: + description: 'Current value' + oneOf: + - + type: number + format: float + - + type: 'null' + unvested: + description: 'Amount unvested' + oneOf: + - + type: number + format: float + - + type: 'null' type: object - TimeTracking-TimeTrackingBreakPolicyWithRelations-V1: - description: 'A break policy for time tracking' + TotalRewards-EquityGrowthEstimation: + description: 'Schema for total rewards equity growth estimation' properties: - id: - description: 'Unique identifier for the break policy' + stop: + description: Stop + type: integer + companyValuation: + description: 'Company valuation' type: string - format: uuid - readOnly: true - example: 0199de9b-6bcb-77e7-941d-3caf74b9a372 - name: - description: 'Name of the break policy' + companyValuationSubvalue: + description: 'Source company valuation when converted' + oneOf: + - + type: string + - + type: 'null' + totalValue: + description: 'Total value' type: string - example: California - description: - description: 'Optional description of the break policy' - type: - - string - - 'null' - example: 'All breaks for California compliance' - allEmployeesAssigned: - description: 'Whether all employees are assigned to this break policy' - type: boolean - example: true - createdAt: - description: 'ISO 8601 timestamp when the break policy was created' + totalValueSubvalue: + description: 'Source total when converted' + oneOf: + - + type: string + - + type: 'null' + vestedValue: + description: 'Vested amount value' type: string - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' - updatedAt: - description: 'ISO 8601 timestamp when the break policy was last updated' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' - deletedAt: - description: 'ISO 8601 timestamp when the break policy was deleted' - type: - - string - - 'null' - format: date-time - readOnly: true - example: '2025-10-15T06:00:00Z' - breaks: - description: 'The breaks that are assigned to this policy' + vestedValueSubvalue: + description: 'Source vested when converted' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-EquitySectionValues: + description: 'Schema for total rewards equity section values' + properties: + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary values for equity' + conditions: + description: 'Terms and conditions' + oneOf: + - + type: string + - + type: 'null' + disclaimers: + description: Disclaimers + oneOf: + - + type: string + - + type: 'null' + equityDetails: + description: 'Equity details' type: array items: - $ref: '#/components/schemas/TimeTracking-TimeTrackingBreak-V1' - employeeIds: - description: 'The employees that are assigned to this policy' + $ref: '#/components/schemas/TotalRewards-EquityDetailsValues' + equityEstimatedValuation: + $ref: '#/components/schemas/TotalRewards-EquityEstimatedValuationValues' + description: 'Total rewards equity estimated valuation object' + type: object + TotalRewards-ExtraPayDetailsValues: + description: 'Schema for total rewards extra pay details' + properties: + name: + description: Name + type: string + amount: + description: Amount + type: string + amountSubvalue: + description: 'Source amount when amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + frequency: + description: Frequency + type: string + formattedDateString: + description: 'Extra pay formatted date' + type: string + format: date + annualizedAmount: + description: 'Annualized amount' + type: string + annualizedSubvalue: + description: 'Source text when annualized amount was currency-converted' + oneOf: + - + type: string + - + type: 'null' + type: object + TotalRewards-ExtraPaySectionValues: + description: 'Schema for total rewards extra pay section values' + properties: + title: + description: Title + type: string + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary values for extra pay' + extraPayDetails: + description: 'Extra pay details' type: array items: - type: integer + $ref: '#/components/schemas/TotalRewards-ExtraPayDetailsValues' type: object - TimeTracking-UpdateTimeTrackingBreak-V1: - description: 'Data contract for partially updating a break. All fields are optional; only fields present in the request body will be updated.' + TotalRewards-HolidayValue: + description: 'Schema for total rewards holiday value' properties: - name: - description: 'The name of the break' + title: + description: Title type: string - example: 'Lunch Break' - policyId: - description: 'The unique identifier of the break policy this break belongs to' + startDate: + description: 'Start date' type: string - format: uuid - paid: - description: 'Whether the break is paid' - type: boolean - duration: - description: 'Duration of the break in minutes' - type: integer - availabilityType: - description: 'When the break is available to be taken' - enum: - - anytime - - hours_worked - - time_of_day - availabilityMinHoursWorked: - description: 'Minimum hours that must be worked before the break can be taken' - type: - - number - - 'null' - format: float - availabilityMaxHoursWorked: - description: 'Maximum hours that can be worked before the break must be taken' - type: - - number - - 'null' - format: float - availabilityStartTime: - description: 'Earliest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time - availabilityEndTime: - description: 'Latest time the break can be taken (HH:MM format)' - type: - - string - - 'null' - format: time + endDate: + description: 'End date' + oneOf: + - + type: string + - + type: 'null' type: object - TimeTracking-UpdateTimeTrackingBreakPolicy-V1: - description: 'Data contract for updating a break policy' + TotalRewards-OverviewSectionValues: + description: 'Schema for total rewards overview section' properties: - name: - description: 'Name of the break policy' + estimatedTotalCompValue: + description: 'Estimated total compensation' + oneOf: + - + type: string + - + type: 'null' + paidPer: + description: 'Paid per reference' + oneOf: + - + type: string + - + type: 'null' + multiplierValue: + description: 'Multiplier for hours worked for hourly paid type' + oneOf: + - + type: number + format: float + - + type: 'null' + type: object + TotalRewards-TimeOffPolicyValue: + description: 'Schema for total rewards time off policy' + properties: + title: + description: Title type: string - example: California - description: - description: 'Optional description of the break policy' - type: - - string - - 'null' - example: 'All breaks for California compliance' - allEmployeesAssigned: - description: 'Whether all employees are assigned to this break policy' - type: boolean - example: true + value: + description: Value + type: string + showDisclaimer: + description: 'Show disclaimer' + oneOf: + - + type: boolean + - + type: 'null' + showEligible: + description: 'Show eligibility' + oneOf: + - + type: boolean + - + type: 'null' type: object - ClockEntriesSchema: - description: 'Request body schema for operations involving multiple clock entries' - required: - - entries + TotalRewards-TimelineItem: + description: 'Schema for total rewards timeline item' properties: - entries: - description: 'Array of clock entries' - type: array - items: - $ref: '#/components/schemas/ClockEntrySchema' - minItems: 1 + value: + description: Value + oneOf: + - + type: string + - + type: 'null' + subvalue: + description: 'When conversion applies: localized “(from …)” fragment including the original amount, e.g. (from $48,000.00 / Year)' + oneOf: + - + type: string + - + type: 'null' + label: + description: Label + oneOf: + - + type: string + - + type: array + items: + type: string type: object - ClockEntryIdsSchema: - description: 'Request body schema for operations involving multiple clock entry IDs' - required: - - clockEntryIds + TotalRewards-TimelineSectionValues: + description: 'Schema for total rewards overview section' properties: - clockEntryIds: - description: 'Array of clock entry IDs to process' + compSummary: + $ref: '#/components/schemas/TotalRewards-CompSummaryValues' + description: 'Compensation summary' + timelineData: + description: 'Timeline data' type: array items: - type: integer - minItems: 1 - example: - - 10 - - 11 - - 12 + $ref: '#/components/schemas/TotalRewards-TimelineItem' + placeholderText: + description: 'Placeholder text' + oneOf: + - + type: string + - + type: 'null' type: object - ClockEntrySchema: - description: 'Schema for a single clock entry' - required: - - employeeId - - date - - start - - end + TotalRewards-EmployeeStatement: + description: 'Schema for a total rewards statement' properties: employeeId: - description: 'Unique identifier for the employee.' - type: integer - date: - description: 'Date for the timesheet entry. Must be in YYYY-MM-DD format.' - type: string - format: date - example: '2024-01-01' - start: - description: 'Start time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' - type: string - pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' - example: '09:00' - end: - description: 'End time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.' - type: string - pattern: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$' - example: '17:00' - id: - description: 'The ID of an existing timesheet entry. This can be specified to edit an existing entry.' - type: integer - projectId: - description: 'The ID of the project to associate with the timesheet entry.' - type: integer - taskId: - description: 'The ID of the task to associate with the timesheet entry.' - type: integer - note: - description: 'Optional note to associate with the timesheet entry.' + description: 'Employee Id' + oneOf: + - + type: string + - + type: 'null' + employeeName: + description: 'Employee Name' type: string - breakId: - description: 'Optional break id to associate with the timesheet entry.' - type: - - string - - 'null' - format: uuid - type: object - HourEntryIdsSchema: - description: 'Request body schema for operations involving multiple hour entry IDs' - required: - - hourEntryIds - properties: - hourEntryIds: - description: 'Array of hour entry IDs to process' - type: array - items: - type: integer - minItems: 1 - example: - - 100 - - 101 - - 102 + jobTitle: + description: 'Employee Job Title' + oneOf: + - + type: string + - + type: 'null' + hasMixedCurrencyTypes: + description: 'Employee statement has multiple currencies' + oneOf: + - + type: boolean + format: boolean + - + type: 'null' + overviewSection: + $ref: '#/components/schemas/TotalRewards-OverviewSectionValues' + description: 'Total Rewards overview section object' + paySection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards pay timeline object' + bonusSection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards bonus section timeline object' + commissionSection: + $ref: '#/components/schemas/TotalRewards-TimelineSectionValues' + description: 'Total Rewards commission section timeline object' + benefitSection: + $ref: '#/components/schemas/TotalRewards-BenefitSectionValues' + description: 'Total Rewards benefit section object' + equitySection: + $ref: '#/components/schemas/TotalRewards-EquitySectionValues' + description: 'Total Rewards equity section object' + calendarSection: + $ref: '#/components/schemas/TotalRewards-CalendarSectionValues' + description: 'Total Rewards equity section object' + extraPaySection: + $ref: '#/components/schemas/TotalRewards-ExtraPaySectionValues' + description: 'Total Rewards extra pay section object' + customDisclaimerInfo: + $ref: '#/components/schemas/TotalRewards-CustomDisclaimerInfo' + description: 'Total Rewards custom disclaimer object' + companyName: + description: 'Company name' + oneOf: + - + type: string + - + type: 'null' + companyLogoUrl: + description: 'Company logo URL' + oneOf: + - + type: string + - + type: 'null' + statementYear: + description: 'Statement year' + oneOf: + - + type: integer + - + type: 'null' + minStatementYear: + description: 'Minimum selectable statement year' + oneOf: + - + type: integer + - + type: 'null' type: object WebHookPostFieldDataObject: title: WebHookPostFieldDataObject @@ -15614,17 +23892,21 @@ components: properties: alias: description: 'Field identifier used in the API' - type: - - string - - 'null' + oneOf: + - + type: string + - + type: 'null' name: description: 'Field name' type: string type: description: 'Field type' - type: - - string - - 'null' + oneOf: + - + type: string + - + type: 'null' id: description: 'Field ID. This may be a standard/custom field ID or a synthetic negative ID for calculated fields.' type: integer @@ -15633,9 +23915,11 @@ components: type: integer tableId: description: 'ID of the table the field belongs to' - type: - - integer - - 'null' + oneOf: + - + type: integer + - + type: 'null' type: object WebHookPostFieldDataObjectCollection: title: WebHookPostFieldDataObjectCollection @@ -15729,47 +24013,109 @@ components: id: description: 'The option ID.' type: integer + xml: + attribute: true name: - description: 'The display value of the option.' + description: 'The display value of the option. In XML format, this is the text content of the <option> element.' type: string archived: - description: 'Whether this option is archived. One of: yes, no.' + description: 'Whether this option is archived. Archived options are preserved for historical data integrity and continue to appear in responses. Filter by archived: no to show only active options.' type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true createdDate: - description: 'When the option was created, in ISO 8601 format when available.' - type: - - string - - 'null' + description: 'The date the option was created, in ISO 8601 format. Server-set on creation; not client-supplied.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' archivedDate: - description: 'When the option was archived, in ISO 8601 format when available.' - type: - - string - - 'null' + description: 'The date the option was archived, in ISO 8601 format. Server-set when archived is first set to yes; persists even if the option is later un-archived.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' + manageable: + description: 'Whether this individual option can be modified via the API.' + type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true + frequency: + description: 'The pay frequency for the option. Only present on pay-group list fields.' + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' type: object + xml: + name: option ListFieldDetail: description: 'A single list field and its available options.' properties: + id: + description: 'The list ID.' + type: integer + xml: + attribute: true fieldId: description: 'The field ID.' - type: string + type: integer + xml: + attribute: true name: description: 'The display name of the list field.' type: string alias: description: 'The API alias for the list field.' - type: string + xml: + attribute: true + oneOf: + - + type: string + - + type: 'null' manageable: - description: 'Whether the list field options can be modified via the API. One of: yes, no.' + description: 'Whether the list field options can be modified via the API.' type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true multiple: - description: 'Whether this field supports multiple values. One of: yes, no.' + description: 'Whether this field supports multiple values.' type: string + enum: + - 'yes' + - 'no' + xml: + attribute: true options: description: 'The available options for this list field.' type: array items: $ref: '#/components/schemas/ListFieldOption' + xml: + name: options + wrapped: true type: object + xml: + name: list AvailableAction: description: 'Represents an action that can be performed on a resource based on permissions and resource state' properties: @@ -15779,11 +24125,13 @@ components: example: /api/v1/hris/job-openings/uuid-123 fields: description: 'Fields that can be modified with this action' - type: - - array - - 'null' - items: - type: object + oneOf: + - + type: array + items: + type: object + - + type: 'null' type: object PagedResponse: description: 'A response object that contains a paginated list of results.' @@ -15798,16 +24146,18 @@ components: description: 'The pagination metadata for the response.' _links: description: 'Hypermedia links for collection navigation (next, prev) and available collection actions (e.g., create). Actions are permission-based and may vary.' - type: - - object - - 'null' example: next: href: '/api/v1/reference-resources?page=2&pageSize=100' prev: href: '/api/v1/reference-resources?page=0&pageSize=100' - additionalProperties: - $ref: '#/components/schemas/AvailableAction' + oneOf: + - + type: object + additionalProperties: + $ref: '#/components/schemas/AvailableAction' + - + type: 'null' type: object PaginationMetaData: description: 'A response object that contains pagination metadata.' @@ -15925,6 +24275,17 @@ components: type: array items: { type: string, enum: [ideon, noyo] } type: object + DependentValidationFailedResponse: + description: 'Validation failed — returns a bare array of field identifier strings' + content: + application/json: + schema: + type: array + items: + type: string + example: + - firstName + - dateOfBirth WebhookSuccessResponse: description: 'Webhook received successfully (200-299 status code).' WebhookClientErrorResponse: @@ -15984,6 +24345,18 @@ components: application/json: schema: type: string + DependentUpdateRequest: + required: true + content: + application/json: + schema: + properties: + fields: + type: array + items: + properties: { id: { type: string }, value: { type: string } } + type: object + type: object securitySchemes: oauth: type: oauth2 @@ -15998,7 +24371,9 @@ components: compensation_benchmarks: 'Read and write access to compensation benchmarking data including job-location pairs, benchmark values, and benchmark sources.' compensation_benchmarks.write: 'Read and write access to compensation benchmarking data including job-location pairs, benchmark values, and benchmark sources.' pay_grades_and_bands: 'Read access to levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' + pay_grades_and_bands.write: 'Read access to levels and bands data including compensation level groups, levels, pay bands, and job title assignments.' planning_cycles: 'Read access to compensation planning cycle data including cycle lists, details, summaries, employees, budgets, approvals, admins, and change communication settings.' + planning_cycles.write: 'Read access to compensation planning cycle data including cycle lists, details, summaries, employees, budgets, approvals, admins, and change communication settings.' background_checks: 'Access background check information' background_checks.write: 'Access background check information' benefit: 'Get Benefit Details' @@ -16013,6 +24388,7 @@ components: 'company:administration': 'Company Administration' 'company:administration.write': 'Company Administration' data_cleaner: 'Allows viewing data cleaning job data.' + data_cleaner.write: 'Allows viewing data cleaning job data.' deductions: 'Access to employee deductions information' deductions.write: 'Access to employee deductions information' payroll: 'Allows access to payroll related fields' @@ -16023,6 +24399,8 @@ components: 'payroll:retirements': 'Access to employee payroll retirements information' 'payroll:pay_schedules': 'Access to payroll pay schedule information' 'payroll:pay_periods': 'Access to payroll pay period information' + 'payroll:earnings': 'Access to earnings records within a pay cycle' + 'payroll:pay_cycles': 'Access to pay cycle records' 'payroll:pay_stubs': 'Access to employee pay stub information including gross pay, net pay, deductions, taxes, and YTD totals' 'payroll:payrolls': 'Access to payroll information including pay dates and processing details' 'payroll:ach_returns': 'Access to ACH return information including return details and resolution' @@ -16086,6 +24464,7 @@ components: 'ask_bamboohr:policy_documents': 'View and manage policy documents used as sources in Ask BambooHR' 'ask_bamboohr:policy_documents.write': 'View and manage policy documents used as sources in Ask BambooHR' equity: 'Read access to company-level equity settings such as calculation type, valuation, share counts, pricing, and vesting-related configuration.' + equity.write: 'Read access to company-level equity settings such as calculation type, valuation, share counts, pricing, and vesting-related configuration.' field: 'Query Lists of Fields, Tables and Lists.' field.write: 'Query Lists of Fields, Tables and Lists.' goal: 'Access performance goals data for employees.' @@ -16120,6 +24499,8 @@ components: openid: 'Allows the application to authenticate with BambooHR' 'recognitions:manage': 'Access and manage Rewards and Recognition settings, exclusion rules, and point allocations for the company' 'recognitions:manage.write': 'Access and manage Rewards and Recognition settings, exclusion rules, and point allocations for the company' + 'recognitions:suggestions': 'Read and write recognition suggestions for employees, including viewer suggestion pools and one-off or broadcast suggestion writes' + 'recognitions:suggestions.write': 'Read and write recognition suggestions for employees, including viewer suggestion pools and one-off or broadcast suggestion writes' report: 'Allows access to query custom reports and creation of bulk data requests' tasks: 'Manage Employee Tasks' tasks.write: 'Manage Employee Tasks' @@ -16129,13 +24510,20 @@ components: time_tracking.write: 'Add and Manage Hours Worked.' 'time_tracking:breaks': 'View and manage meal and rest break tracking information.' 'time_tracking:breaks.write': 'View and manage meal and rest break tracking information.' + 'time_tracking:shift_differentials': 'View and manage time tracking shift differentials.' + 'time_tracking:shift_differentials.write': 'View and manage time tracking shift differentials.' + 'time_tracking:project': 'View and manage time tracking projects and tasks.' + 'time_tracking:project.write': 'View and manage time tracking projects and tasks.' 'scheduling:schedules': 'View and manage schedules.' 'scheduling:schedules.write': 'View and manage schedules.' 'scheduling:shifts': 'View and manage shifts within schedules.' 'scheduling:shifts.write': 'View and manage shifts within schedules.' training: 'Get Training Details' training.write: 'Get Training Details' + total_rewards: 'Read and write access to Total Rewards data including employee statements, onboarding steps, and custom disclaimers.' + total_rewards.write: 'Read and write access to Total Rewards data including employee statements, onboarding steps, and custom disclaimers.' user: 'Get Users List' + user.write: 'Get Users List' 'user:management': 'Manage state of company users' 'user:management.write': 'Manage state of company users' webhooks: 'Create and Manage Application Specific Webhooks' @@ -16145,12 +24533,14 @@ components: 'workflows:instances': 'View and manage workflow instances.' 'workflows:instances.write': 'View and manage workflow instances.' error_management: 'Manage errors and notifications' + error_management.write: 'Manage errors and notifications' public.integration: 'Allows access to all authorized scopes for all employees. Must be installed by an admin.' public.user: 'Authorizes the application to perform scoped actions on behalf of the user who authorized the application.' alerts: 'Provides read and write access to alert configurations.' alerts.write: 'Provides read and write access to alert configurations.' approval_workflows: 'Provides read and write access to approval workflow configurations.' approval_workflows.write: 'Provides read and write access to approval workflow configurations.' + compensation_tools: 'Read access to the list of available compensation tools and upsell information for the company.' employee_verifications: 'Provides read and write access to employee verification records, including I-9 and E-Verify verification data and partner role assignments.' employee_verifications.write: 'Provides read and write access to employee verification records, including I-9 and E-Verify verification data and partner role assignments.' esignature: 'Provides read access to electronic signature records and requests.' @@ -16159,6 +24549,8 @@ components: gridlets: Gridlets meta: 'Read-only access to public BambooHR meta reference endpoints such as countries, subdivisions, timezones, currencies, and related lookup data used to configure integrations.' mcp: 'Grants access to Model Context Protocol (MCP) endpoints' + insights: 'Insight data' + insights.write: 'Insight data' basic: type: http scheme: basic @@ -16174,17 +24566,32 @@ components: in: header tags: - - name: Compensation - description: Compensation + name: 'Alert Configurations' + description: 'Alert Configurations' - name: 'Public API' description: 'Public API' + - + name: Alert + description: Alert + - + name: Compensation + description: Compensation - name: 'Compensation Planning' description: 'Compensation Planning' + - + name: EmployeeVerification + description: EmployeeVerification + - + name: Onboarding + description: Onboarding - name: 'Time Tracking' description: 'Time Tracking' + - + name: Scheduling + description: Scheduling - name: 'Time Off' description: 'Time Off' @@ -16239,6 +24646,9 @@ tags: - name: Hours description: Hours + - + name: 'Total Rewards' + description: 'Total Rewards' - name: 'Account Information' description: 'Account Information' diff --git a/specs/spec-source.json b/specs/spec-source.json index 99276c6d..a8801651 100644 --- a/specs/spec-source.json +++ b/specs/spec-source.json @@ -1,6 +1,6 @@ { - "source_commit": "81c52907f86083e70769fb557df8fb1fddf7bf6d", - "checksum_sha256": "6b328e2986455da3d91c22d0cdcf851d67df6c86b428139bc7b48defccc6fa8f", - "generated_at": "2026-04-27T22:27:15Z", + "source_commit": "9a3900af040817251293f457c1cfecaf6e6def77", + "checksum_sha256": "e3fcd9935a6c977a9b7cf856e7523827ccf12c5a204af2b5b576f16246f6f0ec", + "generated_at": "2026-06-01T22:40:00Z", "url": "https://d40bgjb2zs35x.cloudfront.net/main/latest/docs/openapi/public-openapi.yaml" } diff --git a/test/Api/AlertApiTest.php b/test/Api/AlertApiTest.php new file mode 100644 index 00000000..b8e23820 --- /dev/null +++ b/test/Api/AlertApiTest.php @@ -0,0 +1,80 @@ +<?php +declare(strict_types=1); +/** + * AlertApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * AlertApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class AlertApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for call0f0dcb585e5883175b6557c16cf6755a + * + * List alert templates. + * + */ + public function testCall0f0dcb585e5883175b6557c16cf6755a(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/AlertConfigurationsApiTest.php b/test/Api/AlertConfigurationsApiTest.php new file mode 100644 index 00000000..78e0e9dc --- /dev/null +++ b/test/Api/AlertConfigurationsApiTest.php @@ -0,0 +1,113 @@ +<?php +declare(strict_types=1); +/** + * AlertConfigurationsApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * AlertConfigurationsApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class AlertConfigurationsApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for a05e93bc2eb9c39a40fbd71e6e07f3c6 + * + * Create an alert configuration. + * + */ + public function testA05e93bc2eb9c39a40fbd71e6e07f3c6(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call14e66bfb5f075043221ce1e843c97493 + * + * Get an alert configuration. + * + */ + public function testCall14e66bfb5f075043221ce1e843c97493(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call6d0a073cbf3e97fe0409de42c68fe779 + * + * List alert configurations. + * + */ + public function testCall6d0a073cbf3e97fe0409de42c68fe779(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for eb42aa2fa339ba5c08b147fc13c6a79e + * + * Update an alert configuration. + * + */ + public function testEb42aa2fa339ba5c08b147fc13c6a79e(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/CompanyApiTest.php b/test/Api/CompanyApiTest.php new file mode 100644 index 00000000..27d5eef2 --- /dev/null +++ b/test/Api/CompanyApiTest.php @@ -0,0 +1,80 @@ +<?php +declare(strict_types=1); +/** + * CompanyApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * CompanyApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompanyApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for putCompanyIndustryCodes + * + * Update Company Industry Codes. + * + */ + public function testPutCompanyIndustryCodes(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/CompanyProfileApiTest.php b/test/Api/CompanyProfileApiTest.php new file mode 100644 index 00000000..b9a749b3 --- /dev/null +++ b/test/Api/CompanyProfileApiTest.php @@ -0,0 +1,102 @@ +<?php +declare(strict_types=1); +/** + * CompanyProfileApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * CompanyProfileApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompanyProfileApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for getCompanyProfileIntegrations + * + * Get Company Profile Integrations. + * + */ + public function testGetCompanyProfileIntegrations(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for patchCompanyProfileCompanyInformation + * + * Update company information (phone, address, legal name). + * + */ + public function testPatchCompanyProfileCompanyInformation(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for putCompanyProfileDisplayName + * + * Update company display name. + * + */ + public function testPutCompanyProfileDisplayName(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/CompensationApiTest.php b/test/Api/CompensationApiTest.php new file mode 100644 index 00000000..18578cf3 --- /dev/null +++ b/test/Api/CompensationApiTest.php @@ -0,0 +1,102 @@ +<?php +declare(strict_types=1); +/** + * CompensationApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * CompensationApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for c5880b509783cd9d7fce9ddf5d6af1be + * + * Update company equity settings. + * + */ + public function testC5880b509783cd9d7fce9ddf5d6af1be(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call9f398e2652ea47a6dc5121ce5184222a + * + * List available compensation tools. + * + */ + public function testCall9f398e2652ea47a6dc5121ce5184222a(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for db49fb29f9f04d59afad7c01ce860418 + * + * Get company equity settings. + * + */ + public function testDb49fb29f9f04d59afad7c01ce860418(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/CompensationBenchmarkingApiTest.php b/test/Api/CompensationBenchmarkingApiTest.php new file mode 100644 index 00000000..86cb3d56 --- /dev/null +++ b/test/Api/CompensationBenchmarkingApiTest.php @@ -0,0 +1,190 @@ +<?php +declare(strict_types=1); +/** + * CompensationBenchmarkingApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * CompensationBenchmarkingApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationBenchmarkingApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for createCompensationBenchmark + * + * Create Compensation Benchmark. + * + */ + public function testCreateCompensationBenchmark(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for createCompensationBenchmarkSource + * + * Create Compensation Benchmark Source. + * + */ + public function testCreateCompensationBenchmarkSource(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteCompensationBenchmark + * + * Delete Compensation Benchmark. + * + */ + public function testDeleteCompensationBenchmark(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteCompensationBenchmarkSource + * + * Delete Compensation Benchmark Source. + * + */ + public function testDeleteCompensationBenchmarkSource(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for exportCompensationBenchmarkDetails + * + * Export Compensation Benchmark Details. + * + */ + public function testExportCompensationBenchmarkDetails(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getCompensationBenchmarkDetails + * + * Get Compensation Benchmark Details. + * + */ + public function testGetCompensationBenchmarkDetails(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for importCompensationBenchmarks + * + * Import Compensation Benchmarks From CSV. + * + */ + public function testImportCompensationBenchmarks(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for listCompensationBenchmarkSources + * + * List Compensation Benchmark Sources. + * + */ + public function testListCompensationBenchmarkSources(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for listCompensationBenchmarks + * + * List Compensation Benchmarks. + * + */ + public function testListCompensationBenchmarks(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateCompensationBenchmark + * + * Update Compensation Benchmark. + * + */ + public function testUpdateCompensationBenchmark(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateCompensationBenchmarkSources + * + * Update Compensation Benchmark Sources. + * + */ + public function testUpdateCompensationBenchmarkSources(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/CompensationPlanningApiTest.php b/test/Api/CompensationPlanningApiTest.php new file mode 100644 index 00000000..3129edf6 --- /dev/null +++ b/test/Api/CompensationPlanningApiTest.php @@ -0,0 +1,377 @@ +<?php +declare(strict_types=1); +/** + * CompensationPlanningApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * CompensationPlanningApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class CompensationPlanningApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for a05b6d5f564f805d688ff2c1e37c3990 + * + * Send recommendations to next stage. + * + */ + public function testA05b6d5f564f805d688ff2c1e37c3990(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for a6b8da1348a3151fe95adc03aaf64447 + * + * List employees in compensation planning cycle. + * + */ + public function testA6b8da1348a3151fe95adc03aaf64447(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for b1e467e0eef72350eec61fcfeaf4e19d + * + * Remove from approval flow. + * + */ + public function testB1e467e0eef72350eec61fcfeaf4e19d(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for b3c51254de6918637a971fe4af382a53 + * + * List compensation planning cycle admins. + * + */ + public function testB3c51254de6918637a971fe4af382a53(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for b65f246186b41a9783a9397c11c703b4 + * + * List compensation planning cycles. + * + */ + public function testB65f246186b41a9783a9397c11c703b4(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for c79f9c5950f983e59d2626faa30c00a1 + * + * Save change comm template. + * + */ + public function testC79f9c5950f983e59d2626faa30c00a1(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for c7c32ed5278ac67e2e518bf7484a75dc + * + * Add cycle admins. + * + */ + public function testC7c32ed5278ac67e2e518bf7484a75dc(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call100b0cf8c5207b35697ff10370fd5fe1 + * + * Update compensation planning cycle. + * + */ + public function testCall100b0cf8c5207b35697ff10370fd5fe1(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call1d1fc0f164cb51973a0206b8e2fb2d2d + * + * Import budget breakdown. + * + */ + public function testCall1d1fc0f164cb51973a0206b8e2fb2d2d(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call1d64402ee192568adbd5e3179a91e6e2 + * + * Save budget breakdown. + * + */ + public function testCall1d64402ee192568adbd5e3179a91e6e2(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call22ad75be25455279e2987c80851af5fc + * + * Delete compensation planning cycle. + * + */ + public function testCall22ad75be25455279e2987c80851af5fc(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call329acecaa6df729733d0752aa9f6b204 + * + * Get compensation planning cycle worksheet. + * + */ + public function testCall329acecaa6df729733d0752aa9f6b204(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call3958585c861325ea7a2cd30a8c74f042 + * + * Add employees to cycle. + * + */ + public function testCall3958585c861325ea7a2cd30a8c74f042(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call3a19f07aa737dc826ba43b9a1c1cd257 + * + * Launch compensation planning cycle. + * + */ + public function testCall3a19f07aa737dc826ba43b9a1c1cd257(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call4e886b18264480611f380805301c49c4 + * + * Get compensation planning approval flows. + * + */ + public function testCall4e886b18264480611f380805301c49c4(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call593d5bff120edf2a218a92022a682728 + * + * Export compensation planning cycle worksheet to CSV. + * + */ + public function testCall593d5bff120edf2a218a92022a682728(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call5c2b55158b0950b1e9211655666645b6 + * + * Get compensation planning cycle details. + * + */ + public function testCall5c2b55158b0950b1e9211655666645b6(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call5c4aab35a34f5760ec044104b5232bf5 + * + * Set final approver. + * + */ + public function testCall5c4aab35a34f5760ec044104b5232bf5(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call7efceaee2c010f88244dd01ee81e6e7b + * + * Get compensation planning cycle budgets. + * + */ + public function testCall7efceaee2c010f88244dd01ee81e6e7b(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call89a5068111ec499135c7d6e9a53d5a30 + * + * Remove employees from cycle. + * + */ + public function testCall89a5068111ec499135c7d6e9a53d5a30(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call9bc279d788f6e86b4cd8b2e0d3de91b1 + * + * Get compensation planning cycle summary. + * + */ + public function testCall9bc279d788f6e86b4cd8b2e0d3de91b1(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for cf87b8e09a001b6fb81dfce6c20ab9e3 + * + * Update approval flow. + * + */ + public function testCf87b8e09a001b6fb81dfce6c20ab9e3(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for d6987e300672a00c7cfe59afebb64156 + * + * Get change communication letter details. + * + */ + public function testD6987e300672a00c7cfe59afebb64156(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for dacd313af2106213fc4696175941ce65 + * + * Save budget guidelines. + * + */ + public function testDacd313af2106213fc4696175941ce65(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for e2ac4e1535f296cb8901f209e04caa83 + * + * Create compensation planning cycle. + * + */ + public function testE2ac4e1535f296cb8901f209e04caa83(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for ef7619b0ee4c8dc079aaea870cfbe81b + * + * Remove cycle admin. + * + */ + public function testEf7619b0ee4c8dc079aaea870cfbe81b(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for f3883a522dadbe9e11b34f8b656e3adb + * + * Save recommendations. + * + */ + public function testF3883a522dadbe9e11b34f8b656e3adb(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for f4b431363af6573af46750f32632e88b + * + * Complete compensation planning cycle. + * + */ + public function testF4b431363af6573af46750f32632e88b(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/EmployeeVerificationApiTest.php b/test/Api/EmployeeVerificationApiTest.php new file mode 100644 index 00000000..0e28a37b --- /dev/null +++ b/test/Api/EmployeeVerificationApiTest.php @@ -0,0 +1,124 @@ +<?php +declare(strict_types=1); +/** + * EmployeeVerificationApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * EmployeeVerificationApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class EmployeeVerificationApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for getEmployeeVerificationIntegration + * + * Get employee verification integration status. + * + */ + public function testGetEmployeeVerificationIntegration(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for listEmployeeVerificationsByEmployee + * + * List employee verification records for an employee. + * + */ + public function testListEmployeeVerificationsByEmployee(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for sendEmployeeVerificationLifecycleEmailByUser + * + * Send employee verification lifecycle email by user and email type. + * + */ + public function testSendEmployeeVerificationLifecycleEmailByUser(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateEmployeeVerification + * + * Update an employee verification record. + * + */ + public function testUpdateEmployeeVerification(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateEmployeeVerificationIntegration + * + * Enable or disable the employee verification integration. + * + */ + public function testUpdateEmployeeVerificationIntegration(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/LocationsApiTest.php b/test/Api/LocationsApiTest.php new file mode 100644 index 00000000..7b4efe86 --- /dev/null +++ b/test/Api/LocationsApiTest.php @@ -0,0 +1,124 @@ +<?php +declare(strict_types=1); +/** + * LocationsApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * LocationsApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class LocationsApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for createLocation + * + * Create a job location. + * + */ + public function testCreateLocation(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteLocation + * + * Delete a job location. + * + */ + public function testDeleteLocation(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getLocation + * + * Get a job location. + * + */ + public function testGetLocation(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getLocations + * + * List job locations. + * + */ + public function testGetLocations(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateLocation + * + * Update a job location. + * + */ + public function testUpdateLocation(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/OnboardingApiTest.php b/test/Api/OnboardingApiTest.php new file mode 100644 index 00000000..0f2d3eec --- /dev/null +++ b/test/Api/OnboardingApiTest.php @@ -0,0 +1,201 @@ +<?php +declare(strict_types=1); +/** + * OnboardingApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * OnboardingApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class OnboardingApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for caa7fc488bcfaef14125398f2ebb987d + * + * Delete new hire packet. + * + */ + public function testCaa7fc488bcfaef14125398f2ebb987d(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call0158de7cde2a4c4cf577f0b25070d809 + * + * List employee onboarding experiences. + * + */ + public function testCall0158de7cde2a4c4cf577f0b25070d809(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call044949386f2d655c6a627ef53f9434b7 + * + * Get welcome new hires widget. + * + */ + public function testCall044949386f2d655c6a627ef53f9434b7(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call19c7e26a1347ae7eb22919e9b0595c19 + * + * Cancel new hire packet. + * + */ + public function testCall19c7e26a1347ae7eb22919e9b0595c19(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call1ab0279d46023eb951a434f24df885f1 + * + * Update new hire packet. + * + */ + public function testCall1ab0279d46023eb951a434f24df885f1(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call288aa996aba16d7a495c62321ea999a9 + * + * Create employee onboarding experience. + * + */ + public function testCall288aa996aba16d7a495c62321ea999a9(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call696f0a229cdde60b733568e3c4d043d9 + * + * Get new hire packet by id. + * + */ + public function testCall696f0a229cdde60b733568e3c4d043d9(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for call847dd061d1d1859e7ce8cb3adfc9faf2 + * + * Get employee onboarding experience by id. + * + */ + public function testCall847dd061d1d1859e7ce8cb3adfc9faf2(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for ec1ba8e76f33960b018d0d7518fe97b5 + * + * Create new hire packet. + * + */ + public function testEc1ba8e76f33960b018d0d7518fe97b5(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for f44b802c30cdea2b9076b3f82f99c74d + * + * List new hire packets. + * + */ + public function testF44b802c30cdea2b9076b3f82f99c74d(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for f49b0f1f2fb1ef2c408ba12916ee9baa + * + * Send new hire packet. + * + */ + public function testF49b0f1f2fb1ef2c408ba12916ee9baa(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateNewHirePacketGtkyAnswerVisibility + * + * Update GTKY answer visibility for a new hire packet. + * + */ + public function testUpdateNewHirePacketGtkyAnswerVisibility(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/SchedulingApiTest.php b/test/Api/SchedulingApiTest.php new file mode 100644 index 00000000..c3499fd5 --- /dev/null +++ b/test/Api/SchedulingApiTest.php @@ -0,0 +1,212 @@ +<?php +declare(strict_types=1); +/** + * SchedulingApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * SchedulingApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class SchedulingApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for schedulingCreateSchedule + * + * Create Schedule. + * + */ + public function testSchedulingCreateSchedule(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingCreateShift + * + * Create Shift. + * + */ + public function testSchedulingCreateShift(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingDeleteSchedule + * + * Delete Schedule. + * + */ + public function testSchedulingDeleteSchedule(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingDeleteShift + * + * Delete Shift. + * + */ + public function testSchedulingDeleteShift(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingGetSchedule + * + * Get Schedule. + * + */ + public function testSchedulingGetSchedule(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingGetSchedulePdf + * + * Get Schedule PDF. + * + */ + public function testSchedulingGetSchedulePdf(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingGetShift + * + * Get Shift. + * + */ + public function testSchedulingGetShift(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingListSchedules + * + * List Schedules. + * + */ + public function testSchedulingListSchedules(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingListShifts + * + * List Shifts. + * + */ + public function testSchedulingListShifts(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingListTimezones + * + * List Timezones. + * + */ + public function testSchedulingListTimezones(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingPublishShifts + * + * Publish Shifts. + * + */ + public function testSchedulingPublishShifts(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingUpdateSchedule + * + * Update Schedule. + * + */ + public function testSchedulingUpdateSchedule(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for schedulingUpdateShift + * + * Update Shift. + * + */ + public function testSchedulingUpdateShift(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/TotalRewardsApiTest.php b/test/Api/TotalRewardsApiTest.php new file mode 100644 index 00000000..e0a8e72e --- /dev/null +++ b/test/Api/TotalRewardsApiTest.php @@ -0,0 +1,157 @@ +<?php +declare(strict_types=1); +/** + * TotalRewardsApiTest + * PHP version 8.1 + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ + +/** + * BambooHR API + * + * BambooHR API documentation. https://www.bamboohr.com/api/documentation/ + * + * The version of the OpenAPI document: 1.0 + * Generated by: https://openapi-generator.tech + * Generator version: 7.16.0 + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Please update the test case below to test the endpoint. + */ + +namespace BhrSdk\Test\Api; + +use \BhrSdk\Configuration; +use \BhrSdk\ApiException; +use \BhrSdk\ObjectSerializer; +use PHPUnit\Framework\TestCase; + +/** + * TotalRewardsApiTest Class Doc Comment + * + * @category Class + * @package BhrSdk + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class TotalRewardsApiTest extends TestCase { + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void { + } + + /** + * Setup before running each test case + */ + public function setUp(): void { + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void { + } + + /** + * Test case for addTotalRewardsEmployees + * + * Add Employees to Total Rewards. + * + */ + public function testAddTotalRewardsEmployees(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for checkTotalRewardsProfile + * + * Check Total Rewards Profile Availability. + * + */ + public function testCheckTotalRewardsProfile(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getTotalRewardsPrintableStatement + * + * Get Printable Total Rewards Statement. + * + */ + public function testGetTotalRewardsPrintableStatement(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getTotalRewardsStatement + * + * Get Total Rewards Statement. + * + */ + public function testGetTotalRewardsStatement(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for removeTotalRewardsCustomDisclaimer + * + * Remove Total Rewards Custom Disclaimer. + * + */ + public function testRemoveTotalRewardsCustomDisclaimer(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for removeTotalRewardsEmployees + * + * Remove Employees from Total Rewards. + * + */ + public function testRemoveTotalRewardsEmployees(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for setTotalRewardsCustomDisclaimer + * + * Set Total Rewards Custom Disclaimer. + * + */ + public function testSetTotalRewardsCustomDisclaimer(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for setTotalRewardsOnboardingStep + * + * Set Total Rewards Onboarding Step Status. + * + */ + public function testSetTotalRewardsOnboardingStep(): void { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +}